CN113836559A - Sample alignment method, device, equipment and storage medium in federated learning - Google Patents
Sample alignment method, device, equipment and storage medium in federated learning Download PDFInfo
- Publication number
- CN113836559A CN113836559A CN202111140469.1A CN202111140469A CN113836559A CN 113836559 A CN113836559 A CN 113836559A CN 202111140469 A CN202111140469 A CN 202111140469A CN 113836559 A CN113836559 A CN 113836559A
- Authority
- CN
- China
- Prior art keywords
- identifier
- party
- sample
- encrypted
- private key
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000004590 computer program Methods 0.000 claims description 12
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Bioethics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Storage Device Security (AREA)
Abstract
The embodiment of the application provides a sample alignment method, a sample alignment device, sample alignment equipment and a storage medium in federated learning, which relate to the technical field of artificial intelligence, and the method comprises the following steps: and the two parties participating in the federal learning respectively generate corresponding public and private keys, send the generated public keys to the opposite party, and encrypt the sample identifications in the sample identification set based on the private keys generated by the two parties and the public keys of the opposite party to obtain an encrypted identification set. The first participant obtains a sample alignment result of the first participant and the second participant based on the intersection of the first encrypted identification set and the second encrypted identification set. And the second party obtains a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set. Thus, the keys owned by the two parties participating in federal learning are peer-to-peer. Any party can not obtain the sample identification of the other party in an exhaustive mode, the problem of sample identification leakage is solved, and data security is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a sample alignment method, a sample alignment device, sample alignment equipment and a storage medium in federated learning.
Background
Sample alignment is one of important steps in the longitudinal federated learning technology, and under the condition that the participant sample ID (identity document) is not disclosed, the intersection of the participant sample IDs is obtained, so that the subsequent longitudinal federated learning modeling is facilitated.
The related art is generally based on RSA encryption and a hash function for sample alignment, and in this method, one party possesses a public key and a private key, and the other party possesses only the public key. Because the secret keys owned by the two participating parties are not equal, the participating party possessing the public key and the private key can easily acquire all sample IDs of the other participating party by an exhaustive method, so that the problem of sample ID leakage exists, and the data security of the participating party is influenced.
Disclosure of Invention
The embodiment of the application provides a sample alignment method, a sample alignment device, sample alignment equipment and a storage medium in federated learning, which are used for solving the problem of sample data safety.
In one aspect, an embodiment of the present application provides a sample alignment method in bang learning, where the method includes:
the method comprises the steps of obtaining a first private key and a first public key of a first participant, and sending the first public key to second equipment, wherein the first public key is generated based on the first private key and a preset value;
receiving a second public key of a second party sent by the second device, wherein the second public key is generated based on a second private key of the second party and the preset value;
respectively encrypting at least one first sample identifier of the first participant based on the first private key and the second public key to obtain a first encrypted identifier set;
receiving a second encrypted identifier set of the second party sent by the second device, where the second encrypted identifier set is obtained by respectively encrypting at least one second sample identifier of the second party based on the second private key and the first public key;
obtaining a sample alignment result of the first party and the second party based on an intersection of the first encrypted identification set and the second encrypted identification set.
In one aspect, an embodiment of the present application provides a sample alignment method in bang learning, where the method includes:
acquiring a second private key and a second public key of a second party, and sending the second public key to first equipment, wherein the second public key is generated based on the second private key and a preset value;
receiving a first public key of a first party sent by the first device, wherein the first public key is generated based on a first private key of the first party and the preset value;
encrypting at least one second sample identifier of the second party respectively based on the second private key and the first public key to obtain a second encrypted identifier set;
receiving a first encrypted identifier set of the first party sent by the first device, where the first encrypted identifier set is obtained by encrypting at least one first sample identifier of the first party based on the first private key and the second public key, respectively;
and obtaining a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set.
In one aspect, an embodiment of the present application provides a sample alignment apparatus in bang learning, and the apparatus includes:
the first obtaining module is used for obtaining a first private key and a first public key of a first participant and sending the first public key to second equipment, wherein the first public key is generated based on the first private key and a preset value;
a first receiving module, configured to receive a second public key of a second party sent by the second device, where the second public key is generated based on a second private key of the second party and the preset value;
the first encryption module is used for encrypting at least one first sample identifier of the first participant respectively based on the first private key and the second public key to obtain a first encryption identifier set;
the first receiving module is further configured to receive a second encrypted identifier set of the second party, which is sent by the second device, where the second encrypted identifier set is obtained by encrypting at least one second sample identifier of the second party based on the second private key and the first public key, respectively;
a first sample alignment module, configured to obtain a sample alignment result of the first participant and the second participant based on an intersection of the first encrypted identification set and the second encrypted identification set.
Optionally, the first encryption module is further configured to:
sending the first encrypted identification set to the second device, so that the second device obtains a sample alignment result of the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set.
Optionally, the first encrypted identifier set includes first encrypted identifiers corresponding to the at least one first sample identifier respectively;
the first encryption module is specifically configured to:
for the at least one first sample identification, the following steps are performed:
encrypting a first sample identifier by using the first private key to obtain a first private key encryption identifier;
and encrypting the first private key encryption identification by adopting the second public key to obtain a first encryption identification corresponding to the first sample identification.
Optionally, the first encryption module is specifically configured to:
encrypting the first private key encryption identifier by adopting the second public key to obtain a first public and private key encryption identifier;
and encrypting the first public and private key encryption identifier by adopting a Hash algorithm to obtain a first encryption identifier corresponding to the first sample identifier.
Optionally, the first sample alignment module is specifically configured to:
taking the intersection of the first encrypted identification set and the second encrypted identification set as a target encrypted identification set;
and taking the first sample identifier corresponding to each first encryption identifier in the target encryption identifier set as a sample alignment result of the first party and the second party.
Optionally, the first private key is generated based on an SM2 elliptic curve, and the preset value is a base point of the SM2 elliptic curve;
the first obtaining module is specifically configured to:
the first public key is generated by multiplying the first private key and the base point.
In one aspect, an embodiment of the present application provides a sample alignment apparatus in bang learning, and the apparatus includes:
the second obtaining module is used for obtaining a second private key and a second public key of a second party and sending the second public key to the first equipment, wherein the second public key is generated based on the second private key and a preset value;
a second receiving module, configured to receive a first public key of a first party sent by the first device, where the first public key is generated based on a first private key of the first party and the preset value;
the second encryption module is used for encrypting at least one second sample identifier of the second party respectively based on the second private key and the first public key to obtain a second encrypted identifier set;
the second receiving module is further configured to receive a first encrypted identifier set of the first party, which is sent by the first device, where the first encrypted identifier set is obtained by encrypting at least one first sample identifier of the first party based on the first private key and the second public key, respectively;
a second sample alignment module, configured to obtain a sample alignment result of the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set.
Optionally, the second encryption module is further configured to:
sending the second encrypted identification set to the first device, so that the first device obtains a sample alignment result of the first party and the second party based on an intersection of the first encrypted identification set and the second encrypted identification set.
Optionally, the second encrypted identifier set includes second encrypted identifiers corresponding to the at least one second sample identifier respectively;
the second encryption module is specifically configured to:
for the at least one second sample identification, respectively performing the following steps:
encrypting a second sample identifier by using the second private key to obtain a second private key encrypted identifier;
and encrypting the second private key encryption identification by adopting the first public key to obtain a second encryption identification corresponding to the second sample identification.
Optionally, the second encryption module is specifically configured to:
encrypting the second private key encryption identifier by adopting the first public key to obtain a second public and private key encryption identifier;
and encrypting the second public and private key encryption identifier by adopting a Hash algorithm to obtain a second encryption identifier corresponding to the second sample identifier.
Optionally, the second sample alignment module is specifically configured to:
taking the intersection of the second encrypted identification set and the first encrypted identification set as a target encrypted identification set;
and taking the second sample identifier corresponding to each second encryption identifier in the target encryption identifier set as a sample alignment result of the second party and the first party.
Optionally, the second private key is generated based on an SM2 elliptic curve, and the preset value is a base point of the SM2 elliptic curve;
the second obtaining module is specifically configured to:
the second public key is generated by multiplying the second private key and the base point.
In one aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the sample alignment method in the federal learning when executing the program.
In one aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program executable by a computer device, where the program is executed on the computer device, and causes the computer device to execute the steps of the sample alignment method in federal learning.
In the embodiment of the application, two parties participating in federal learning respectively generate corresponding public and private keys, the generated public keys are sent to the other party, and then the sample identifications in the sample identification set are encrypted based on the private keys generated by the parties and the public keys of the other party to obtain an encrypted identification set. The first participant obtains a sample alignment result of the first participant and the second participant based on the intersection of the first encrypted identification set and the second encrypted identification set. And the second party obtains a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set. Thus, the keys owned by the two parties participating in federal learning are peer-to-peer. Any party can not obtain the sample identification of the other party in an exhaustive mode, the problem of sample identification leakage is solved, and data security is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a sample alignment method in federated learning according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a sample alignment method in federated learning according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a sample alignment apparatus in bang learning according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a sample alignment apparatus in bang learning according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
For convenience of understanding, terms referred to in the embodiments of the present invention are explained below.
Federal learning: the machine learning framework can effectively help a plurality of organizations to perform data use and machine learning modeling under the condition of meeting the requirements of user privacy protection, data safety and government regulations.
RSA: a cryptosystem that uses different encryption and decryption keys, and deriving the decryption key from the encryption key is computationally infeasible.
SM 2: an elliptic curve public key cryptographic algorithm.
Referring to fig. 1, a system architecture diagram applicable to the embodiment of the present application is shown, where the system architecture includes at least a first device 101 and a second device 102.
The first device 101 is used to perform a sample alignment method in federated learning at a first party. The first device 101 may be, but is not limited to, a smartphone, a tablet, a laptop, a desktop computer, a server, etc.
The second device 102 is used to perform a sample alignment method in federated learning at the second party. The second device 102 may be, but is not limited to, a smartphone, a tablet, a laptop, a desktop computer, a server, etc.
The first device 101 and the second device 102 may be connected directly by wire or wirelessly, or may be connected through an intermediate server. The intermediate server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and an artificial intelligence platform.
The first device 101 obtains a first private key and a first public key of the first party and sends the first public key to the second device 102.
The second device 102 obtains a second private key and a second public key of the second party and sends the second public key to the first device 101.
The first device 101 encrypts at least one first sample identifier of the first participant based on the first private key and the second public key, respectively, obtains a first encrypted identifier set, and sends the first encrypted identifier set to the second device 102.
The second device 102 encrypts at least one second sample identifier of the second participant based on the second private key and the first public key, respectively, obtains a second encrypted identifier set, and sends the second encrypted identifier set to the first device 101.
The first device 101 obtains a sample alignment result of the first party and the second party based on the intersection of the first encrypted identification set and the second encrypted identification set.
The second device 102 obtains a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set.
Based on the system architecture diagram illustrated in fig. 1, an embodiment of the present application provides a flow of a sample alignment method in federated learning, as illustrated in fig. 2, where the flow of the method is executed by the first device 101 and the second device 102 illustrated in fig. 1, and includes the following steps:
step S201, the first device obtains a first private key and a first public key of the first party.
Specifically, the first public key is generated based on the first private key and a preset value.
In one possible implementation, a random number is randomly generated based on the SM2 elliptic curve as the first private key, and the base point of the SM2 elliptic curve is used as the preset value. The first public key is generated by multiplying the first private key by the base point of the SM2 elliptic curve.
In another possible implementation, a random number is randomly generated based on the discrete logarithm as the first private key, and the generator g of the discrete logarithm is used as a preset value. The first public key is obtained by the first private key and a generator g of a p-order group through modular exponentiation.
It should be noted that the preset value in the present application is not limited to the base point of the SM2 elliptic curve and the generator of the discrete logarithm, and may be other parameters.
For example, the first device generates the first private key of the first party a as d based on the SM2 elliptic curveADetermining the base point of the SM2 elliptic curve as G, and the first public key P of the first participant AA=[dA]G。
Step S202, the first device sends the first public key to the second device.
The second device receives and stores the first public key.
Step S203, the second device obtains a second private key and a second public key of the second party.
Specifically, the second public key is generated based on the second private key and a preset value.
In one possible implementation, a random number is randomly generated based on the SM2 elliptic curve as the second private key, and the base point of the SM2 elliptic curve is used as the preset value. The second public key is generated by multiplying the second private key by the base point of the SM2 elliptic curve.
In another possible implementation, a random number is randomly generated based on the discrete logarithm as the first private key, and the generator g of the discrete logarithm is used as a preset value. The first public key is obtained by the first private key and a generator g of a p-order group through modular exponentiation.
It should be noted that the preset value in the present application is not limited to the base point of the SM2 elliptic curve and the generator of the discrete logarithm, and may be other parameters.
For example, the second device generates the second private key of the second party B as d based on the SM2 elliptic curveBDetermining the base point of the SM2 elliptic curve as G, and the second public key P of the second participant BB=[dB]G。
And step S204, the second equipment sends the second public key to the first equipment.
And the first device receives and stores the second public key.
The execution sequence of step S201 and step S203 is not sequential.
Step S205, the first device encrypts at least one first sample identifier of the first party based on the first private key and the second public key, respectively, to obtain a first encrypted identifier set.
Specifically, the first encrypted identifier set includes first encrypted identifiers corresponding to at least one first sample identifier.
Step S206, the first device sends the first encryption identification set to the second device.
And the second equipment receives and stores the first encryption identification set.
Step S207, the second device encrypts at least one second sample identifier of the second party based on the second private key and the first public key, respectively, to obtain a second encrypted identifier set.
Specifically, the second encrypted identifier set includes second encrypted identifiers corresponding to at least one second sample identifier.
And step S208, the second device sends the second encryption identification set to the first device.
And the first equipment receives and stores the second encryption identification set.
The execution sequence of step S205 and step S207 is not sequential.
Step S209, the first device obtains a sample alignment result of the first party and the second party based on an intersection of the first encrypted identifier set and the second encrypted identifier set.
Step S210, the second device obtains a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set.
The execution sequence of step S209 and step S210 is not sequential.
In the embodiment of the application, two parties participating in federal learning respectively generate corresponding public and private keys, the generated public keys are sent to the other party, and then the sample identifications in the sample identification set are encrypted based on the private keys generated by the parties and the public keys of the other party to obtain an encrypted identification set. The first participant obtains a sample alignment result of the first participant and the second participant based on the intersection of the first encrypted identification set and the second encrypted identification set. And the second party obtains a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set. Thus, the keys owned by the two parties participating in federal learning are peer-to-peer. Any party can not obtain the sample identification of the other party in an exhaustive mode, the problem of sample identification leakage is solved, and data security is improved.
Optionally, in step S205, in this embodiment of the present application, at least the following several implementation manners are provided to obtain the first encrypted identifier set:
in a first embodiment, for at least one first sample identifier, the following steps are performed:
and then, the second public key is used for encrypting the first private key encryption identification to obtain a first encryption identification corresponding to the first sample identification.
For example, a first participant a includes a first set U of sample identificationsA={u1,u2,u3,u4}. Using a first private key dARespectively identify the sets U to the first samplesAEncrypting each first sample identifier to obtain a plurality of first private key encryption identifiers, which are u respectively1dA、u2dA、u3dA、u4dA。
Using a second public key PBRespectively encrypting each first private key encryption identifier to obtain a plurality of first encryption identifiers which are respectively [ u [ ]1dA]PB、[u2dA]PB、[u3dA]PB、[u4dA]PB。
Due to the second public key PB=[dB]G, therefore, each first encryption identity may also be denoted as [ u ]1dAdB]G、[u2dAdB]G、[u3dAdB]G、[u4dAdB]G. Then, the corresponding relationship between the first sample identifier and the first encrypted identifier of the first party a is established, which is specifically shown in table 1.
Table 1.
First sample identification | First encrypted identification |
u1 | [u1dAdB]G |
u2 | [u2dAdB]G |
u3 | [u3dAdB]G |
u4 | [u4dAdB]G |
In the present application, the first private key and the first public private key of the first participant are determined based on the SM2 elliptic curve. Because the SM2 elliptic curve algorithm is an encryption algorithm in a commercial cipher system in China, the autonomous controllability of the cipher algorithm is met. The first sample identification is encrypted through the first private key and the second public key, so that the encryption complexity is reduced, and the data security is ensured.
In a second embodiment, for at least one first sample identifier, the following steps are performed:
and encrypting a first sample identifier by using a first private key to obtain a first private key encryption identifier. And then, encrypting the first private key encryption identifier by adopting a second public key to obtain a first public and private key encryption identifier. And then, encrypting the first public and private key encryption identifier by adopting a Hash algorithm to obtain a first encryption identifier corresponding to the first sample identifier.
Specifically, the first public-private key encryption identifier is encrypted through a hash algorithm to generate a first encryption identifier with a fixed length. Common hash algorithms include MD5 algorithm, SHA algorithm, and SM3 algorithm in the commercial cryptosystem in our country. The MD5 algorithm comprises a 16-bit MD5 algorithm, a 32-bit MD5 algorithm and a 64-bit MD5 algorithm. The SHA algorithm comprises an SHA-1 algorithm, an SHA-2 algorithm and an SHA-3 algorithm.
For example, a first participant a includes a first set U of sample identificationsA={u1,u2,u3,u4}. Using a first private key dARespectively identify the sets U to the first samplesAEncrypting each first sample identifier to obtain a plurality of first private key encryption identifiers, which are u respectively1dA、u2dA、u3dA、u4dA。
Using a second public key PBRespectively encrypting each first private key encryption identifier to obtain a plurality of first public and private key encryption identifiers, which are [ u ] respectively1dA]PB、[u2dA]PB、[u3dA]PB、[u4dA]PB. And then, encrypting each first public and private key encryption identifier by adopting a Hash algorithm to obtain a plurality of first encryption identifiers which are respectively H ([ u ])1dA]PB)、H([u2dA]PB)、H([u3dA]PB)、H([u4dA]PB)。
Due to the second public key PB=[dB]G, therefore, each first encrypted identity may also be denoted as H ([ u [ ])1dAdB]G)、H([u2dAdB]G)、H([u3dAdB]G)、H([u4dAdB]G) In that respect Then, the corresponding relationship between the first sample identifier and the first encrypted identifier of the first party a is established, as shown in table 2.
Table 2.
First sample identification | First encrypted identification |
u1 | H([u1dAdB]G) |
u2 | H([u2dAdB]G) |
u3 | H([u3dAdB]G) |
u4 | H([u4dAdB]G) |
In the present application, the first private key and the first public key of the first participant are determined based on the SM2 elliptic curve. Because the SM2 elliptic curve algorithm is an encryption algorithm in a commercial cipher system in China, the autonomous controllability of the cipher algorithm is met. The first sample identification is encrypted through the first private key, the second public key and the Hash algorithm, and the safety of data can be further enhanced.
Optionally, in step S207, the embodiment of the present application provides at least the following several implementations to obtain the second encrypted identifier set:
in a third embodiment, for at least one second sample identifier, the following steps are performed:
and encrypting a second sample identifier by using a second private key to obtain a second private key encrypted identifier. And then, encrypting the second private key encryption identification by adopting the first public key to obtain a second encryption identification corresponding to the second sample identification.
For example, the second participant B includes a second set of sample identifications UB={u1,u2,u3,u5}. Using a second private key dBIdentifying the sets U separately for the second samplesBEncrypting each second sample identifier to obtain a plurality of second private key encrypted identifiers, which are u respectively1dB、u2dB、u3dB、u5dB。
Using a first public key PARespectively encrypting each second private key encryption identifier to obtain a plurality of second encryption identifiers which are respectively [ u ]1dB]PA、[u2dB]PA、[u3dB]PA、[u5dB]PA。
Since the first public key PA=[dA]G, therefore, each second encryption identity may also be denoted as [ u ]1dBdA]G、[u2dBdA]G、[u3dBdA]G、[u5dBdA]G. Then, the corresponding relationship between the second sample identifier and the second encrypted identifier of the second party B is established, as shown in table 3.
Table 3.
Second sample identification | Second encrypted identification |
u1 | [u1dBdA]G |
u2 | [u2dBdA]G |
u3 | [u3dBdA]G |
u5 | [u5dBdA]G |
In this application, the second private key and the second public key of the second participant are determined based on the SM2 elliptic curve. Because the SM2 elliptic curve algorithm is an encryption algorithm in a commercial cipher system in China, the autonomous controllability of the cipher algorithm is met. The second sample identification is encrypted through the second private key and the first public key, so that the encryption complexity is reduced, and the data security is ensured.
In a fourth embodiment, for at least one second sample identifier, the following steps are performed:
and encrypting a second sample identifier by using a second private key to obtain a second private key encrypted identifier. And then, encrypting the second private key encryption identifier by adopting the first public key to obtain a second public and private key encryption identifier. And then, encrypting the second public and private key encryption identifier by adopting a Hash algorithm to obtain a second encryption identifier corresponding to the second sample identifier.
Specifically, the second public-private key encryption identifier is encrypted through a hash algorithm to generate a second encryption identifier with a fixed length.
For example, the second participant B includes a second set of sample identifications UB={u1,u2,u3,u5}. Using a second private key dBIdentifying the sets U separately for the second samplesBEncrypting each second sample identifier to obtain a plurality of second private key encrypted identifiers, which are u respectively1dB、u2dB、u3dB、u5dB。
Using a first public key PARespectively encrypting each second private key encryption identifier to obtain a plurality of second public and private key encryption identifiers, which are respectively [ u ]1dB]PA、[u2dB]PA、[u3dB]PA、[u5dB]PA. And then, encrypting each second public and private key encryption identifier by adopting a Hash algorithm to obtain a plurality of second encryption identifiers which are respectively H ([ u ])1dB]PA)、H([u2dB]PA)、H([u3dB]PA)、H([u5dB]PA)。
Since the first public key PA=[dA]G, therefore, each second encryption identity may also be denoted as H ([ u [ ])1dBdA]G)、H([u2dBdA]G)、H([u3dBdA]G)、H([u5dBdA]G) In that respect Then, the corresponding relationship between the second sample identifier and the second encrypted identifier of the second party B is established, as shown in table 4.
Table 4.
Second sample identification | Second encrypted identification |
u1 | H([u1dBdA]G) |
u2 | H([u2dBdA]G) |
u3 | H([u3dBdA]G) |
u5 | H([u5dBdA]G) |
In this application, the second private key and the second public key of the second participant are determined based on the SM2 elliptic curve. Because the SM2 elliptic curve algorithm is an encryption algorithm in a commercial cipher system in China, the autonomous controllability of the cipher algorithm is met. The second sample identification is encrypted through the second private key, the first public key and the Hash algorithm, and the safety of data can be further enhanced.
Optionally, in step S209, the first device uses an intersection of the first encrypted identifier set and the second encrypted identifier set as a target encrypted identifier set, and then uses a first sample identifier corresponding to each first encrypted identifier in the target encrypted identifier set as a sample alignment result of the first participant and the second participant.
In a possible embodiment, when the first device obtains the first encrypted identifier set of the first participant a by using the first embodiment, the first encrypted identifier set is { [ u ] in1dAdB]G,[u2dAdB]G,[u3dAdB]G,[u4dAdB]G}。
The first device receives a second encrypted identifier set sent by the second device, where the second device obtains the second encrypted identifier set of the second party B by using the third embodiment, and the second encrypted identifier set is { [ u ] { [ u ])1dBdA]G,[u2dBdA]G,[u3dBdA]G,[u5dBdA]G}。
The first equipment finds the intersection of the first encryption identification set and the second encryption identification set, and the obtained target encryption identification set is { [ u ]1dAdB]G,[u2dAdB]G,[u3dAdB]G}。
According to the first in Table 1The corresponding relation between the sample identification and the first encryption identification and the target encryption identification set, the first device determines the sample alignment result of the first party A and the second party B as { u1,u2,u3}。
In a possible implementation manner, when the first device obtains the first encryption identifier set of the first participant a by using the second implementation manner, the first encryption identifier set is { H ([ u ] u)1dAdB]G)、H([u2dAdB]G)、H([u3dAdB]G)、H([u4dAdB]G)}。
The first device receives a second encrypted identifier set sent by the second device, where the second encrypted identifier set is { H ([ u ] u) when the second device obtains the second encrypted identifier set of the second party B by using the fourth embodiment1dBdA]G)、H([u2dBdA]G)、H([u3dBdA]G)、H([u5dBdA]G)}。
The first equipment finds the intersection of the first encryption identification set and the second encryption identification set, and the obtained target encryption identification set is { H ([ u ] u)1dAdB]G)、H([u2dAdB]G)、H([u3dAdB]G)}。
According to the corresponding relationship between the first sample identifier and the first encryption identifier in table 2 and the target encryption identifier set, the first device determines that the sample alignment result of the first party a and the second party B is { u }1,u2,u3}。
In the application, the first device determines the sample alignment result of the first participant and the second participant based on the intersection of the first encrypted identifier set and the second encrypted identifier set, instead of directly comparing the sample identifiers of the first participant and the second participant to obtain the sample alignment result, so that the sample identifier is prevented from being leaked, and the safety of sample data of each participant is improved.
Optionally, in step S210, the second device uses an intersection of the second encrypted identifier set and the first encrypted identifier set as the target encrypted identifier set. And then, taking the second sample identifier corresponding to each second encryption identifier in the target encryption identifier set as a sample alignment result of the second party and the first party.
In a possible embodiment, the second device receives the first encrypted identifier set sent by the first device, where the first encrypted identifier set is { [ u ] when the first device obtains the first encrypted identifier set of the first party a by using the first embodiment1dAdB]G、[u2dAdB]G、[u3dAdB]G、[u4dAdB]G}。
When the second device obtains the second encrypted identifier set of the second party B by using the third embodiment, the second encrypted identifier set is { [ u ])1dBdA]G,[u2dBdA]G,[u3dBdA]G,[u5dBdA]G}。
The second equipment obtains the intersection of the second encryption identification set and the first encryption identification set to obtain a target encryption identification set of { [ u ]1dBdA]G、[u2dBdA]G、[u3dBdA]G}。
According to the corresponding relationship between the second sample identifier and the second encrypted identifier in table 3 and the target encrypted identifier set, the second device determines that the sample alignment result of the second party B and the first party a is { u }1,u2,u3}。
In a possible embodiment, the second device receives the first encrypted identifier set sent by the first device, where when the first device obtains the first encrypted identifier set of the first party a by using the second embodiment, the first encrypted identifier set is { H ([ u ] u)1dAdB]G)、H([u2dAdB]G)、H([u3dAdB]G)、H([u4dAdB]G)}。
When the second device obtains the second encryption identifier set of the second party B by using the fourth embodiment, the second encryption identifier set is { H ([ u ] u)1dBdA]G)、H([u2dBdA]G)、H([u3dBdA]G)、H([u5dBdA]G)}。
The second equipment calculates the intersection of the second encryption identification set and the first encryption identification set to obtain a target encryption identification set of { H ([ u ] u)1dBdA]G)、H([u2dBdA]G)、H([u3dBdA]G)}。
According to the corresponding relationship between the second sample identifier and the second encrypted identifier in table 4 and the target encrypted identifier set, the second device determines that the sample alignment result of the second party B and the first party a is { u }1,u2,u3}。
In the application, the second device determines the sample alignment result of the second party and the first party based on the intersection of the second encrypted identifier set and the first encrypted identifier set, rather than directly comparing the sample identifiers of the second party and the first party to obtain the sample alignment result, so that the sample identifier is prevented from being leaked, and the security of the sample data of each party is improved.
To better explain the embodiment of the present application, a specific implementation scenario is taken as an example to describe a flow of the sample alignment method in federated learning provided in the embodiment of the present application, as shown in fig. 3:
in step S301, the first device obtains a first private key of the first party based on the SM2 elliptic curve.
In step S302, the first device obtains a first public key of the first participant based on the SM2 elliptic curve.
Step S303, the first device sends the first public key to the second device.
In step S304, the second device obtains a second private key of the second party based on the SM2 elliptic curve.
In step S305, the second device obtains a second public key of the second participant based on the SM2 elliptic curve.
Step S306, the second device sends the second public key to the first device.
Step S307, for each first sample identifier, the first device encrypts with the first private key to obtain a first private key encryption identifier.
Step S308, the first device encrypts the first private key encryption identifier with the second public key to obtain the first public and private key encryption identifier.
Step S309, the first device encrypts the first public-private key encryption identifier by using a hash algorithm, and obtains a first encryption identifier.
Specifically, a first encrypted identifier set is formed based on the obtained first encrypted identifiers.
In step S310, the first device sends the first encrypted identifier set to the second device.
Step S311, for each second sample identifier, the second device encrypts with the second private key to obtain a second private key encryption identifier.
In step S312, the second device encrypts the second private key encryption identifier by using the first public key to obtain the second public-private key encryption identifier.
In step S313, the second device encrypts the second public-private key encryption identifier by using a hash algorithm to obtain a second encryption identifier.
Specifically, a second encrypted identifier set is formed based on the obtained second encrypted identifiers.
In step S314, the second device sends the second encrypted identifier set to the first device.
Step S315, the first device uses the intersection of the first encrypted identifier set and the second encrypted identifier set as a target encrypted identifier set.
Step S316, the first device uses the first sample identifier corresponding to each first encryption identifier in the target encryption identifier set as a sample alignment result of the first party and the second party.
In step S317, the second device uses the intersection of the second encrypted identifier set and the first encrypted identifier set as the target encrypted identifier set.
Step S318, the second device uses the second sample identifier corresponding to each second encryption identifier in the target encryption identifier set as a sample alignment result between the second party and the first party.
In the embodiment of the application, two parties participating in federal learning respectively generate corresponding public and private keys, the generated public keys are sent to the other party, and then the sample identifications in the sample identification set are encrypted based on the private keys generated by the parties and the public keys of the other party to obtain an encrypted identification set. The first participant obtains a sample alignment result of the first participant and the second participant based on the intersection of the first encrypted identification set and the second encrypted identification set. And the second party obtains a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set. Thus, the keys owned by the two parties participating in federal learning are peer-to-peer. Any party can not obtain the sample identification of the other party in an exhaustive mode, the problem of sample identification leakage is solved, and data security is improved. Because the SM2 elliptic curve algorithm is an encryption algorithm in a commercial cipher system in China, the autonomous controllability of the cipher algorithm is met. The first sample identification is encrypted through the first private key, the second public key and the Hash algorithm, and the second sample identification is encrypted through the second private key, the first public key and the Hash algorithm, so that the data security can be further enhanced.
Based on the same technical concept, the embodiment of the present application provides a sample alignment apparatus in bang learning, as shown in fig. 4, the apparatus 400 includes:
a first obtaining module 401, configured to obtain a first private key and a first public key of a first participant, and send the first public key to a second device, where the first public key is generated based on the first private key and a preset value;
a first receiving module 402, configured to receive a second public key of a second party sent by the second device, where the second public key is generated based on a second private key of the second party and the preset value;
a first encryption module 403, configured to encrypt at least one first sample identifier of the first party based on the first private key and the second public key, respectively, to obtain a first encrypted identifier set;
the first receiving module 402 is further configured to receive a second encrypted identifier set of the second party, which is sent by the second device, where the second encrypted identifier set is obtained by respectively encrypting at least one second sample identifier of the second party based on the second private key and the first public key;
a first sample alignment module 404, configured to obtain a sample alignment result of the first participant and the second participant based on an intersection of the first encrypted identification set and the second encrypted identification set.
Optionally, the first encryption module 403 is further configured to:
sending the first encrypted identification set to the second device, so that the second device obtains a sample alignment result of the first participant and the second participant based on an intersection of the first encrypted identification set and the second encrypted identification set.
Optionally, the first encrypted identifier set includes first encrypted identifiers corresponding to the at least one first sample identifier respectively;
the first encryption module 403 is specifically configured to:
for the at least one first sample identification, the following steps are performed:
encrypting a first sample identifier by using the first private key to obtain a first private key encryption identifier;
and encrypting the first private key encryption identification by adopting the second public key to obtain a first encryption identification corresponding to the first sample identification.
Optionally, the first encryption module 403 is specifically configured to:
encrypting the first private key encryption identifier by adopting the second public key to obtain a first public and private key encryption identifier;
and encrypting the first public and private key encryption identifier by adopting a Hash algorithm to obtain a first encryption identifier corresponding to the first sample identifier.
Optionally, the first sample alignment module 404 is specifically configured to:
taking the intersection of the first encrypted identification set and the second encrypted identification set as a target encrypted identification set;
and taking the first sample identifier corresponding to each first encryption identifier in the target encryption identifier set as a sample alignment result of the first party and the second party.
Optionally, the first private key is generated based on an SM2 elliptic curve, and the preset value is a base point of the SM2 elliptic curve;
the first obtaining module 401 is specifically configured to:
the first public key is generated by multiplying the first private key and the base point.
Based on the same technical concept, the embodiment of the present application provides a sample alignment apparatus in bang learning, as shown in fig. 5, the apparatus 500 includes:
a second obtaining module 501, configured to obtain a second private key and a second public key of a second party, and send the second public key to the first device, where the second public key is generated based on the second private key and a preset value;
a second receiving module 502, configured to receive a first public key of a first party sent by the first device, where the first public key is generated based on a first private key of the first party and the preset value;
a second encryption module 503, configured to encrypt at least one second sample identifier of the second party based on the second private key and the first public key, respectively, to obtain a second encrypted identifier set;
the second receiving module 502 is further configured to receive a first encrypted identifier set of the first party sent by the first device, where the first encrypted identifier set is obtained by encrypting at least one first sample identifier of the first party based on the first private key and the second public key, respectively;
a second sample alignment module 504, configured to obtain a sample alignment result of the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set.
Optionally, the second encryption module 503 is further configured to:
sending the second encrypted identification set to the first device, so that the first device obtains a sample alignment result of the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set.
Optionally, the second encrypted identifier set includes second encrypted identifiers corresponding to the at least one second sample identifier respectively;
the second encryption module 503 is specifically configured to:
for the at least one second sample identification, respectively performing the following steps:
encrypting a second sample identifier by using the second private key to obtain a second private key encrypted identifier;
and encrypting the second private key encryption identification by adopting the first public key to obtain a second encryption identification corresponding to the second sample identification.
Optionally, the second encryption module 503 is specifically configured to:
encrypting the second private key encryption identifier by adopting the first public key to obtain a second public and private key encryption identifier;
and encrypting the second public and private key encryption identifier by adopting a Hash algorithm to obtain a second encryption identifier corresponding to the second sample identifier.
Optionally, the second sample alignment module 504 is specifically configured to:
taking the intersection of the second encrypted identification set and the first encrypted identification set as a target encrypted identification set;
and taking the second sample identifier corresponding to each second encryption identifier in the target encryption identifier set as a sample alignment result of the second party and the first party.
Optionally, the second private key is generated based on an SM2 elliptic curve, and the preset value is a base point of the SM2 elliptic curve;
the second obtaining module 501 is specifically configured to:
the second public key is generated by multiplying the second private key and the base point.
Based on the same technical concept, the embodiment of the present application provides a computer device, which may be a terminal or a server, as shown in fig. 6, including at least one processor 601 and a memory 602 connected to the at least one processor, where a specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application, and the processor 601 and the memory 602 are connected through a bus in fig. 6 as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present application, the memory 602 stores instructions executable by the at least one processor 601, and the at least one processor 601 may execute the steps included in the sample alignment method in the federal learning by executing the instructions stored in the memory 602.
The processor 601 is a control center of the computer device, and may connect various parts of the computer device by using various interfaces and lines, and perform sample alignment in federal learning by executing or executing instructions stored in the memory 602 and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles an operating system, a user interface, an application program, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 601 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
The memory 602, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 602 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 602 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 602 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when the program runs on the computer device, causes the computer device to execute the steps of the sample alignment method in the federal learning described above.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (16)
1. A sample alignment method in federated learning is characterized by comprising the following steps:
the method comprises the steps of obtaining a first private key and a first public key of a first participant, and sending the first public key to second equipment, wherein the first public key is generated based on the first private key and a preset value;
receiving a second public key of a second party sent by the second device, wherein the second public key is generated based on a second private key of the second party and the preset value;
respectively encrypting at least one first sample identifier of the first participant based on the first private key and the second public key to obtain a first encrypted identifier set;
receiving a second encrypted identifier set of the second party sent by the second device, where the second encrypted identifier set is obtained by respectively encrypting at least one second sample identifier of the second party based on the second private key and the first public key;
obtaining a sample alignment result of the first party and the second party based on an intersection of the first encrypted identification set and the second encrypted identification set.
2. The method of claim 1, further comprising:
sending the first encrypted identification set to the second device, so that the second device obtains a sample alignment result of the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set.
3. The method according to claim 1, wherein the first encrypted identification set comprises first encrypted identifications corresponding to the at least one first sample identification;
the encrypting at least one first sample identifier of the first participant based on the first private key and the second public key respectively to obtain a first encrypted identifier set, including:
for the at least one first sample identification, the following steps are performed:
encrypting a first sample identifier by using the first private key to obtain a first private key encryption identifier;
and encrypting the first private key encryption identification by adopting the second public key to obtain a first encryption identification corresponding to the first sample identification.
4. The method as claimed in claim 3, wherein said encrypting the first private key encrypted identifier by using the second public key to obtain the first encrypted identifier corresponding to the one first sample identifier comprises:
encrypting the first private key encryption identifier by adopting the second public key to obtain a first public and private key encryption identifier;
and encrypting the first public and private key encryption identifier by adopting a Hash algorithm to obtain a first encryption identifier corresponding to the first sample identifier.
5. The method of claim 3, wherein obtaining the sample alignment result for the first party and the second party based on the intersection of the first encrypted identification set and the second encrypted identification set comprises:
taking the intersection of the first encrypted identification set and the second encrypted identification set as a target encrypted identification set;
and taking the first sample identifier corresponding to each first encryption identifier in the target encryption identifier set as a sample alignment result of the first party and the second party.
6. The method of any of claims 1 to 5, wherein the first private key is generated based on an SM2 elliptic curve, the preset value being a base point of the SM2 elliptic curve;
the first public key is generated based on the first private key and a preset value, and comprises the following steps:
the first public key is generated by multiplying the first private key and the base point.
7. A sample alignment method in federated learning is characterized by comprising the following steps:
acquiring a second private key and a second public key of a second party, and sending the second public key to first equipment, wherein the second public key is generated based on the second private key and a preset value;
receiving a first public key of a first party sent by the first device, wherein the first public key is generated based on a first private key of the first party and the preset value;
encrypting at least one second sample identifier of the second party respectively based on the second private key and the first public key to obtain a second encrypted identifier set;
receiving a first encrypted identifier set of the first party sent by the first device, where the first encrypted identifier set is obtained by encrypting at least one first sample identifier of the first party based on the first private key and the second public key, respectively;
and obtaining a sample alignment result of the second party and the first party based on the intersection of the second encrypted identification set and the first encrypted identification set.
8. The method of claim 7, further comprising:
sending the second encrypted identification set to the first device, so that the first device obtains a sample alignment result of the first party and the second party based on an intersection of the first encrypted identification set and the second encrypted identification set.
9. The method of claim 7, wherein the second encrypted identification set includes second encrypted identifications corresponding to the at least one second sample identification;
the encrypting at least one second sample identifier of the second participant based on the second private key and the first public key respectively to obtain a second encrypted identifier set, including:
for the at least one second sample identification, respectively performing the following steps:
encrypting a second sample identifier by using the second private key to obtain a second private key encrypted identifier;
and encrypting the second private key encryption identification by adopting the first public key to obtain a second encryption identification corresponding to the second sample identification.
10. The method of claim 9, wherein said encrypting the second private key encrypted identifier with the first public key to obtain a second encrypted identifier corresponding to the one second sample identifier comprises:
encrypting the second private key encryption identifier by adopting the first public key to obtain a second public and private key encryption identifier;
and encrypting the second public and private key encryption identifier by adopting a Hash algorithm to obtain a second encryption identifier corresponding to the second sample identifier.
11. The method of claim 9, wherein obtaining a sample alignment result for the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set comprises:
taking the intersection of the second encrypted identification set and the first encrypted identification set as a target encrypted identification set;
and taking the second sample identifier corresponding to each second encryption identifier in the target encryption identifier set as a sample alignment result of the second party and the first party.
12. The method of any of claims 7 to 11, wherein the second private key is generated based on an SM2 elliptic curve, the preset value being a base point of the SM2 elliptic curve;
the second public key is generated based on the second private key and a preset value, and comprises:
the second public key is generated by multiplying the second private key and the base point.
13. A sample alignment device in bang learning, comprising:
the first obtaining module is used for obtaining a first private key and a first public key of a first participant and sending the first public key to second equipment, wherein the first public key is generated based on the first private key and a preset value;
a first receiving module, configured to receive a second public key of a second party sent by the second device, where the second public key is generated based on a second private key of the second party and the preset value;
the first encryption module is used for encrypting at least one first sample identifier of the first participant respectively based on the first private key and the second public key to obtain a first encryption identifier set;
the first receiving module is further configured to receive a second encrypted identifier set of the second party, which is sent by the second device, where the second encrypted identifier set is obtained by encrypting at least one second sample identifier of the second party based on the second private key and the first public key, respectively;
a first sample alignment module, configured to obtain a sample alignment result of the first participant and the second participant based on an intersection of the first encrypted identification set and the second encrypted identification set.
14. A sample alignment device in bang learning, comprising:
the second obtaining module is used for obtaining a second private key and a second public key of a second party and sending the second public key to the first equipment, wherein the second public key is generated based on the second private key and a preset value;
a second receiving module, configured to receive a first public key of a first party sent by the first device, where the first public key is generated based on a first private key of the first party and the preset value;
the second encryption module is used for encrypting at least one second sample identifier of the second party respectively based on the second private key and the first public key to obtain a second encrypted identifier set;
the second receiving module is further configured to receive a first encrypted identifier set of the first party, which is sent by the first device, where the first encrypted identifier set is obtained by encrypting at least one first sample identifier of the first party based on the first private key and the second public key, respectively;
a second sample alignment module, configured to obtain a sample alignment result of the second party and the first party based on an intersection of the second encrypted identification set and the first encrypted identification set.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any one of claims 1 to 12 are performed by the processor when the program is executed.
16. A computer-readable storage medium, having stored thereon a computer program executable by a computer device, for causing the computer device to perform the steps of the method of any one of claims 1 to 12, when the program is run on the computer device.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111140469.1A CN113836559A (en) | 2021-09-28 | 2021-09-28 | Sample alignment method, device, equipment and storage medium in federated learning |
PCT/CN2022/076928 WO2023050687A1 (en) | 2021-09-28 | 2022-02-18 | Sample alignment method and apparatus in federated learning, and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111140469.1A CN113836559A (en) | 2021-09-28 | 2021-09-28 | Sample alignment method, device, equipment and storage medium in federated learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113836559A true CN113836559A (en) | 2021-12-24 |
Family
ID=78970743
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111140469.1A Pending CN113836559A (en) | 2021-09-28 | 2021-09-28 | Sample alignment method, device, equipment and storage medium in federated learning |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113836559A (en) |
WO (1) | WO2023050687A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114357518A (en) * | 2022-01-04 | 2022-04-15 | 腾讯科技(深圳)有限公司 | Data encryption method and device based on federal learning and computer equipment |
CN114358311A (en) * | 2021-12-31 | 2022-04-15 | 中国电信股份有限公司 | Longitudinal federal data processing method and device |
WO2023050687A1 (en) * | 2021-09-28 | 2023-04-06 | 中国银联股份有限公司 | Sample alignment method and apparatus in federated learning, and device and storage medium |
CN116089991A (en) * | 2023-04-13 | 2023-05-09 | 北京百度网讯科技有限公司 | Data alignment method, device, equipment and storage medium |
CN117010002A (en) * | 2023-09-28 | 2023-11-07 | 腾讯科技(深圳)有限公司 | Sample identifier alignment method and device, electronic equipment and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117708887B (en) * | 2024-02-05 | 2024-04-30 | 智慧眼科技股份有限公司 | Longitudinal logistic regression-based federal learning model acquisition method and system |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018044146A1 (en) * | 2016-09-05 | 2018-03-08 | Lg Electronics Inc. | Lightweight and escrow-less authenticated key agreement for the internet of things |
US20180323973A1 (en) * | 2016-11-07 | 2018-11-08 | Infosec Global Inc. | Elliptic curve isogeny-based cryptographic scheme |
CN110633806A (en) * | 2019-10-21 | 2019-12-31 | 深圳前海微众银行股份有限公司 | Longitudinal federated learning system optimization method, device, equipment and readable storage medium |
CN111291084A (en) * | 2020-02-12 | 2020-06-16 | 深圳前海微众银行股份有限公司 | Sample ID alignment method, device, equipment and storage medium |
CN111461874A (en) * | 2020-04-13 | 2020-07-28 | 浙江大学 | Credit risk control system and method based on federal mode |
WO2020177392A1 (en) * | 2019-03-01 | 2020-09-10 | 深圳前海微众银行股份有限公司 | Federated learning-based model parameter training method, apparatus and device, and medium |
CN112132292A (en) * | 2020-09-16 | 2020-12-25 | 建信金融科技有限责任公司 | Block chain-based longitudinal federated learning data processing method, device and system |
CN112241537A (en) * | 2020-09-23 | 2021-01-19 | 易联众信息技术股份有限公司 | Longitudinal federated learning modeling method, system, medium and equipment |
CN112365006A (en) * | 2021-01-12 | 2021-02-12 | 深圳致星科技有限公司 | Parallel training method and system for federal learning |
CN112668020A (en) * | 2020-12-24 | 2021-04-16 | 深圳前海微众银行股份有限公司 | Feature interleaving method, device, readable storage medium and computer program product |
US20210143987A1 (en) * | 2019-11-13 | 2021-05-13 | International Business Machines Corporation | Privacy-preserving federated learning |
WO2021139467A1 (en) * | 2020-08-07 | 2021-07-15 | 平安科技(深圳)有限公司 | Federated learning method and system, and computer device and storage medium |
US20210248244A1 (en) * | 2018-12-28 | 2021-08-12 | Webank Co., Ltd | Model parameter training method, terminal, and system based on federation learning, and medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113836559A (en) * | 2021-09-28 | 2021-12-24 | 中国银联股份有限公司 | Sample alignment method, device, equipment and storage medium in federated learning |
-
2021
- 2021-09-28 CN CN202111140469.1A patent/CN113836559A/en active Pending
-
2022
- 2022-02-18 WO PCT/CN2022/076928 patent/WO2023050687A1/en active Application Filing
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018044146A1 (en) * | 2016-09-05 | 2018-03-08 | Lg Electronics Inc. | Lightweight and escrow-less authenticated key agreement for the internet of things |
US20180323973A1 (en) * | 2016-11-07 | 2018-11-08 | Infosec Global Inc. | Elliptic curve isogeny-based cryptographic scheme |
US20210248244A1 (en) * | 2018-12-28 | 2021-08-12 | Webank Co., Ltd | Model parameter training method, terminal, and system based on federation learning, and medium |
WO2020177392A1 (en) * | 2019-03-01 | 2020-09-10 | 深圳前海微众银行股份有限公司 | Federated learning-based model parameter training method, apparatus and device, and medium |
CN110633806A (en) * | 2019-10-21 | 2019-12-31 | 深圳前海微众银行股份有限公司 | Longitudinal federated learning system optimization method, device, equipment and readable storage medium |
US20210143987A1 (en) * | 2019-11-13 | 2021-05-13 | International Business Machines Corporation | Privacy-preserving federated learning |
CN111291084A (en) * | 2020-02-12 | 2020-06-16 | 深圳前海微众银行股份有限公司 | Sample ID alignment method, device, equipment and storage medium |
CN111461874A (en) * | 2020-04-13 | 2020-07-28 | 浙江大学 | Credit risk control system and method based on federal mode |
WO2021139467A1 (en) * | 2020-08-07 | 2021-07-15 | 平安科技(深圳)有限公司 | Federated learning method and system, and computer device and storage medium |
CN112132292A (en) * | 2020-09-16 | 2020-12-25 | 建信金融科技有限责任公司 | Block chain-based longitudinal federated learning data processing method, device and system |
CN112241537A (en) * | 2020-09-23 | 2021-01-19 | 易联众信息技术股份有限公司 | Longitudinal federated learning modeling method, system, medium and equipment |
CN112668020A (en) * | 2020-12-24 | 2021-04-16 | 深圳前海微众银行股份有限公司 | Feature interleaving method, device, readable storage medium and computer program product |
CN112365006A (en) * | 2021-01-12 | 2021-02-12 | 深圳致星科技有限公司 | Parallel training method and system for federal learning |
Non-Patent Citations (1)
Title |
---|
何雯;白翰茹;李超;: "基于联邦学习的企业数据共享探讨", 信息与电脑(理论版), no. 08 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023050687A1 (en) * | 2021-09-28 | 2023-04-06 | 中国银联股份有限公司 | Sample alignment method and apparatus in federated learning, and device and storage medium |
CN114358311A (en) * | 2021-12-31 | 2022-04-15 | 中国电信股份有限公司 | Longitudinal federal data processing method and device |
CN114358311B (en) * | 2021-12-31 | 2023-11-07 | 中国电信股份有限公司 | Longitudinal federal data processing method and device |
CN114357518A (en) * | 2022-01-04 | 2022-04-15 | 腾讯科技(深圳)有限公司 | Data encryption method and device based on federal learning and computer equipment |
CN116089991A (en) * | 2023-04-13 | 2023-05-09 | 北京百度网讯科技有限公司 | Data alignment method, device, equipment and storage medium |
CN116089991B (en) * | 2023-04-13 | 2024-02-20 | 北京百度网讯科技有限公司 | Data alignment method, device, equipment and storage medium |
CN117010002A (en) * | 2023-09-28 | 2023-11-07 | 腾讯科技(深圳)有限公司 | Sample identifier alignment method and device, electronic equipment and storage medium |
CN117010002B (en) * | 2023-09-28 | 2024-01-05 | 腾讯科技(深圳)有限公司 | Sample identifier alignment method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2023050687A1 (en) | 2023-04-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113836559A (en) | Sample alignment method, device, equipment and storage medium in federated learning | |
CN108809646B (en) | Secure shared key sharing system | |
US10284372B2 (en) | Method and system for secure management of computer applications | |
CN110457945B (en) | List query method, query party device, service party device and storage medium | |
CN109034796B (en) | Alliance chain-based transaction supervision method, electronic device and readable storage medium | |
CN112507365B (en) | Data matching method, terminal and storage medium | |
CN113128999B (en) | Block chain privacy protection method and device | |
CN110750810A (en) | Data desensitization method and device, computer equipment and storage medium | |
CN106452770A (en) | Data encryption method and apparatus, data decryption method and apparatus, and system | |
CN114143108B (en) | Session encryption method, device, equipment and storage medium | |
US20240323023A1 (en) | Sample alignment method and apparatus, device, and storage medium | |
CN111475690B (en) | Character string matching method and device, data detection method and server | |
CN111628863B (en) | Data signature method and device, electronic equipment and storage medium | |
CN114840867A (en) | Data query method, device and system based on exchangeable encrypted data confusion | |
CN111404892B (en) | Data supervision method and device and server | |
CN111935163B (en) | Data joint processing method and device for protecting privacy | |
CN111949996A (en) | Generation method, encryption method, system, device and medium of security private key | |
CN115361198A (en) | Decryption method, encryption method, device, computer equipment and storage medium | |
CN114745181A (en) | Data processing method and device | |
CN114239004A (en) | Electronic signature generation method and device, computer equipment and storage medium | |
CN114117388A (en) | Device registration method, device registration apparatus, electronic device, and storage medium | |
CN114817970B (en) | Data analysis method and system based on data source protection and related equipment | |
CN110881040B (en) | Calling method and device | |
CN117077156A (en) | Data processing method and electronic equipment | |
CN115604006A (en) | Data transmission method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |