Correlation coefficient acquisition method, device, electronic device, and storage medium
Homomorphic encryption enables secure calculation of correlation coefficients in federated learning by encrypting data with shared keys, ensuring privacy and security in data transmission and calculation.
Patent Information
- Application Number
- JP2023015662
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-02-07
- Filing Date
- 2023-02-03
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2043-02-03
AI Technical Summary
Current methods for calculating correlation coefficients in federated learning models expose participant data, leading to privacy leaks and security vulnerabilities.
A method involving homomorphic encryption, where participating nodes encrypt their data using a shared key, and an auxiliary node performs operations on the encrypted data to calculate correlation coefficients without decrypting the original data, ensuring privacy and security.
This approach allows for accurate calculation of correlation coefficients while protecting the privacy of participant data, enhancing data security and transmission integrity.
Smart Images

Figure 0007571932000013 
Figure 0007571932000014 
Figure 0007571932000015
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of data processing, specifically to the technical fields of big data, deep learning and artificial intelligence, and in particular to a correlation coefficient acquisition method, device, electronic device and storage medium. [Background technology]
[0002] Nowadays, data correlation analysis has a great impact on people's decisions. Especially, for a large amount of data on the Internet, data can be sorted based on data correlation analysis to assist users in data processing.
[0003] For example, in the training process of a federated learning model, it is necessary to collect sample data provided by multiple participants, and correlation analysis between the sample data can be used to select the sample data input to the federated learning model. Summary of the Invention [Problem to be solved by the invention]
[0004] The present disclosure provides a correlation coefficient obtaining method, an apparatus, an electronic device, and a storage medium. [Means for solving the problem]
[0005] According to one aspect of the present disclosure, A correlation coefficient obtaining method applied to a first participating node, comprising: obtaining the first original data, homomorphically encrypting the first original data using an associated key mutually determined by the first participating node and the second participating node to determine the first transmission data; receiving the first transmission data, and sending the first transmission data to the auxiliary node, such that the auxiliary node performs homomorphic computation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data; and the second transmission data is determined by homomorphically encrypting the second original data by the second participating node using the associated key; receiving a correlation coefficient fed back from the auxiliary node; A method for obtaining a correlation coefficient is provided.
[0006] According to another aspect of the present disclosure, A correlation coefficient obtaining method applied to an auxiliary node, comprising: receiving first transmission data transmitted from a first participating node and second transmission data transmitted from a second participating node; performing a homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, the first transmission data being determined by homomorphically encrypting the first original data using an associated key by the first participating node, the second transmission data being determined by homomorphically encrypting the second original data using the associated key by the second participating node, the associated key being mutually determined by the first participating node and the second participating node; transmitting the correlation coefficient to the first participating node and to the second participating node; A method for obtaining a correlation coefficient is provided.
[0007] According to one aspect of the present disclosure, A correlation coefficient acquisition device disposed in a first participating node, a first-element data homomorphic encryption module for obtaining the first element data, homomorphically encrypting the first element data using a related key mutually determined by the first participating node and the second participating node, and determining the first transmission data; a first transmission data sending module for sending the first transmission data to the auxiliary node, so that the auxiliary node receives the first transmission data and performs a homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, where the second transmission data is determined by homomorphically encrypting the second original data using an associated key by the second participating node; a correlation coefficient obtaining module for receiving a correlation coefficient fed back from the auxiliary node; A correlation coefficient acquisition device is provided.
[0008] According to another aspect of the present disclosure, A correlation coefficient acquisition device disposed in a supplementary node, a transmission data acquisition module for receiving first transmission data transmitted from a first participating node and second transmission data transmitted from a second participating node; a transmission data homomorphic calculation module for performing homomorphic calculation on first transmission data and second transmission data to obtain a correlation coefficient between the first original data and the second original data, wherein the first transmission data is determined by homomorphically encrypting the first original data using an associated key by the first participating node, and the second transmission data is determined by homomorphically encrypting the second original data using the associated key by the second participating node, the associated key being mutually determined by the first participating node and the second participating node; a correlation coefficient transmission module for transmitting the correlation coefficient to the first participating node and the second participating node. A correlation coefficient acquisition device is provided.
[0009] According to another aspect of the present disclosure, At least one processor; a memory communicatively coupled to at least one processor, A memory stores instructions executable by at least one processor; The instructions are executed by at least one processor such that the at least one processor can execute a correlation coefficient acquisition method according to any embodiment of the present disclosure. Provide electronic devices.
[0010] According to another aspect of the present disclosure, A non-transitory computer-readable storage medium having computer instructions stored thereon, comprising: The computer instructions are used to cause a computer to execute the correlation coefficient acquisition method of any embodiment of the present disclosure. A non-transitory computer-readable storage medium is provided.
[0011] According to another aspect of the present disclosure, When executed by a processor, the method for obtaining a correlation coefficient according to any one of the embodiments of the present disclosure is realized. A computer program is provided. Effect of the Invention
[0012] The embodiments of the present disclosure can improve the security of correlation coefficient calculation data.
[0013] It should be understood that the contents described in this disclosure are not intended to identify key or important features of the embodiments of the disclosure, nor are they intended to limit the scope of the disclosure. Other features of the disclosure can be readily understood from the following specification. [Brief description of the drawings]
[0014] The drawings are for a better understanding of the present embodiments and are not intended to limit the present disclosure.
[0015] [Figure 1] FIG. 1 is a schematic diagram of a correlation coefficient acquisition method according to an embodiment of the present disclosure. [Diagram 2] FIG. 1 is a schematic diagram of a correlation coefficient acquisition method according to an embodiment of the present disclosure. [Diagram 3] FIG. 1 is a schematic diagram of a correlation coefficient acquisition method according to an embodiment of the present disclosure. [Figure 4] FIG. 1 is a schematic diagram of a correlation coefficient acquisition method according to an embodiment of the present disclosure. [Diagram 5] FIG. 2 is a scene diagram of a correlation coefficient acquisition method according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a schematic diagram of a correlation coefficient acquisition device according to an embodiment of the present disclosure. [Figure 7] FIG. 1 is a schematic diagram of a correlation coefficient acquisition device according to an embodiment of the present disclosure. [Figure 8] FIG. 1 is a block diagram of an electronic device for implementing a correlation coefficient acquisition method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings, and although various details of the embodiments of the present disclosure are included for the convenience of understanding, they should be understood to be merely exemplary. Similarly, in the following description, descriptions of known functions and structures are omitted for clarity and conciseness.
[0017] 1 is a flow chart of a correlation coefficient acquisition method according to an embodiment of the present disclosure, and this embodiment is applied to the case of calculating the correlation between the original data of two participating nodes. The method of this embodiment can be implemented in a correlation coefficient acquisition device, which can be realized in the manner of software and / or hardware, specifically configured in an electronic device with a certain data computing capability, the electronic device being a first participating node, and the electronic device can be a client device or a server device, and the client device can be, for example, a mobile phone, a tablet computer, an in-vehicle terminal, a desktop computer, etc.
[0018] In S101, the first original data is acquired, and the first original data is homomorphically encrypted using an associated key mutually determined by the first participating node and the second participating node, to determine the first transmission data.
[0019] The first elemental data is used to calculate a correlation coefficient. The content of the first elemental data can be set arbitrarily, and may be, for example, training sample data of a federated learning model, user behavior data, vehicle travel trajectory data, face image data, etc., or a large amount of data such as advertisement distribution, financial credit, or knowledge graph. The related key is used to homomorphically encrypt the first elemental data. The related key is mutually determined by the first participating node and the second participating node, which means that only the first participating node and the second participating node can obtain the related key, and other devices cannot obtain or decrypt it. For example, the first participating node and the second participating node can agree and determine the related key by a key agreement protocol (Diffie Hellman, DH). The first participating node and the second participating node are different nodes. It is necessary to perform correlation calculation on the data of the first participating node and the data of the second participating node. The first transmission data is used to perform homomorphic calculation on the second transmission data transmitted from the second participating node. The first transmission data may refer to data for which a correlation coefficient is to be calculated, provided by the first participating node, and the first transmission data includes at least the homomorphically encrypted first original data.
[0020] Here, homomorphic encryption refers to a single output obtained by processing homomorphically encrypted data, which, when decrypted, results in the same output obtained by processing the original unencrypted data in the same way; specifically, the result of adding and / or multiplying ciphertexts without decrypting the data is the same as the computational result obtained by performing the same operation on the corresponding plaintext.
[0021] In S102, the auxiliary node receives the first transmission data, and sends the first transmission data to the auxiliary node, so as to perform homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, and the second transmission data is determined by homomorphically encrypting the second original data by the second participating node using the associated key.
[0022] The auxiliary node is used to receive the first transmission data transmitted from the first participating node, receive the second transmission data transmitted from the second participating node, and perform homomorphic computation on the first transmission data and the second transmission data. The second transmission data is used to perform homomorphic computation with the first transmission data to calculate a correlation coefficient. The second transmission data may refer to data provided by the second participating node for which a correlation coefficient is to be calculated, and the second transmission data includes at least homomorphically encrypted second elemental data. The first transmission data is obtained through homomorphic encryption based on the first elemental data, and the second transmission data is obtained through homomorphic encryption based on the second elemental data, so that performing homomorphic computation on the first transmission data and the second transmission data is equivalent to performing homomorphic computation on the first elemental data and the second elemental data, that is, the output results of the correlation coefficient obtained by performing homomorphic computation on both are the same. Here, by homomorphically encrypting the first original data and the second original data using the same associated key, the encryption methods of the homomorphically encrypted first original data and the homomorphically encrypted second original data can be made to match, thereby avoiding a situation in which the encryption result cannot realize homomorphic operation due to the adoption of an encryption method in which the first original data and the second original data do not match, and the homomorphic operation between the first transmission data and the second transmission data can be accurately realized.
[0023] At S103, the correlation coefficient fed back from the auxiliary node is received.
[0024] The auxiliary node calculates a correlation coefficient between the first transmission data and the second transmission data, i.e., a correlation coefficient between the first original data and the second original data, and feeds back the correlation coefficient to the first participating node and the second participating node. Because the auxiliary node calculates the encrypted first original data and the encrypted second original data, the auxiliary node cannot obtain the true original data, which prevents the auxiliary node from obtaining and leaking the original data of the participating node, and protects the security of the original data.
[0025] In the prior art, both sets of data are needed to calculate the correlation coefficient, and data sharing leads to the leakage of privacy information protected in the data.
[0026] According to the technical solution disclosed herein, a first participating node participating in the calculation of the correlation coefficient homomorphically encrypts the first original data to determine the first transmission data, and sends the first transmission data to a third-party auxiliary node, and the auxiliary node performs homomorphic calculation on the first transmission data and the second transmission data, which corresponds to performing homomorphic calculation on the homomorphically encrypted first original data and the homomorphically encrypted second original data, and calculating the correlation coefficient between the homomorphically encrypted first original data and the homomorphically encrypted second original data to determine the correlation coefficient between the first original data and the second original data, which realizes accurate calculation of the correlation coefficient between the original data when the auxiliary node cannot decrypt the transmission data, improves the security of the original data, protects privacy information, enhances the security of data transmission and the security of calculation, and improves the calculation accuracy of the correlation coefficient.
[0027] 2 is a flowchart of another method for obtaining a correlation coefficient according to an embodiment of the present disclosure, which can be further optimized and extended based on the above technical solution, and can be combined with each of the above preferred embodiments. Using the associated key to homomorphically encrypt the first element data specifically refers to calculating a first random number based on the associated key, and homomorphically encrypting the first element data based on the first random number.
[0028] In S201, the first element data is acquired, a first random number is calculated based on an associated key, and the associated key is mutually determined between the first participating node and the second participating node.
[0029] The first random number is used to homomorphically encrypt the original data. The first random number is a random number generated based on an associated key. Here, the first participating node generates the first random number based on the associated key, and similarly, the second participating node generates the first random number in the same manner based on the associated key. The original data may include at least one data. Correspondingly, the number of the first random numbers is the same as the number of data included in the original data.
[0030] In S202, the first original data is homomorphically encrypted based on the first random number to determine the first transmission data.
[0031] The first data is a data sequence, and the first random numbers are a data sequence. According to the order of data in the sequence, the first data in a certain order can be homomorphically encrypted based on the first random numbers in the same order. Exemplarily, the first data is N samples X i where i=1, 2, 3...N, and correspondingly, N random numbers R={r i |r i ∈Z}, where r i X i For example, the homomorphically encrypted first data is i *X i It is.
[0032] Similarly, the second participating node generates a first random number based on the associated key using the same random number generation method. This allows homomorphic encryption of the first-data and the second-data using the same first random number, and avoids a situation in which homomorphic computation cannot be realized due to different random numbers.
[0033] In addition, when two participating nodes generate the same first random number and use the first random number to homomorphically encrypt original data, this does not mean that they use the same encryption method to encrypt the data. For example, in the process of calculating the correlation coefficient, it is necessary to multiply the first elemental data and the second elemental data, and the encryption method of the first elemental data may be multiplying the first random number and the first elemental data, and the encryption method of the second elemental data may be multiplying the second elemental data and the inverse of the first random number, so that in the process of calculating the correlation coefficient, the product of the first random number and the inverse of the first random number is 1, and therefore the product of the first elemental data and the second elemental data is the same as the product of the encrypted first elemental data and the encrypted second elemental data, thereby realizing homomorphic operation.
[0034] In S203, the first transmission data is sent to the auxiliary node, so that the auxiliary node receives the first transmission data and performs homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data; and the second transmission data is determined by homomorphically encrypting the second original data by the second participating node using the associated key.
[0035] At S204, the correlation coefficient is received as feedback from the auxiliary node.
[0036] Preferably, the correlation coefficient obtaining method further includes selecting first original data in a sample dataset based on the correlation coefficient between the first original data and the second original data, the first original data being included in the sample dataset, and the sample dataset being used for training the association model.
[0037] The first raw data is included in the sample data set. The sample data set is a data set of training samples for the federation model. The federation model means an optimal model established by aggregating sample data of at least two participants, and when training the model, the participants' data do not need to provide their own data, so local data will not be leaked. The federation model may include a horizontal federation model, a vertical federation model, and an federation transition model, etc. Exemplarily, the selection of the first raw data may be selected and excluded from the sample data set with low correlation, or may be selected and excluded from the sample data set with high correlation. The selection manner may be specifically determined according to the performance needs information of the federation model to be trained.
[0038] In the application scenario of training a federated model, samples can be selected based on the correlation between the samples of two participants, which can improve the representativeness of the samples and enhance the detection accuracy of the federated model. Furthermore, by selecting samples, the amount of sample data can be simplified and the training efficiency of the federated model can be improved. In addition, when calculating the correlation, the original data can be encrypted to improve the security of the participant data and further enhance the data security of the federated model.
[0039] According to the technical solution disclosed in the present disclosure, a first random number is further generated by using an associated key, and the first original data is homomorphically encrypted based on the first random number, thereby increasing the randomness of the encrypted data, increasing the difficulty of decrypting the encrypted data, further improving the complexity of the encryption, and improving the security of the original data.
[0040] 3 is a flowchart of another method for obtaining a correlation coefficient according to an embodiment of the present disclosure, which can be further optimized and extended based on the above technical solution and combined with each of the above preferred embodiments. Using the associated key to homomorphically encrypt the first element data and determine the first transmission data specifically means: using the associated key to homomorphically encrypt the first element data to obtain the homomorphically encrypted first element data, calculating first intermediate data according to the first element data and a calculation formula for the correlation coefficient, using the associated key to homomorphically encrypt the first intermediate data to obtain the homomorphically encrypted first intermediate data, and determining the homomorphically encrypted first element data and the homomorphically encrypted first intermediate data as the first transmission data.
[0041] In S301, first original data is obtained, and the first original data is homomorphically encrypted using an associated key to obtain the homomorphically encrypted first original data, and the associated key is mutually determined between the first participating node and the second participating node.
[0042] In S302, first intermediate data is calculated based on the first original data and a calculation formula for the correlation coefficient.
[0043] Here, the first original data can be multi-layered calculated using the correlation coefficient calculation formula, and some calculation results can be determined as intermediate data. The first intermediate data is used to directly calculate the correlation coefficient. The first intermediate data means a calculation result obtained by calculating the original data based on a calculation formula related to the original data in the correlation coefficient calculation formula. For example, the first original data includes a plurality of samples, and the samples can be multi-layered calculated to obtain the variance or expectation of the first original data, and determined as the first intermediate data. Since the numerical values used for encryption between the plurality of data in the first original data are different from each other, the results of the expectation and variance calculated based on the original data are different from the results of the expectation and variance calculated based on the encrypted first original data, and homomorphic calculation cannot be realized. As a result, it is necessary to calculate the intermediate data based on the original data, which ensures the accuracy of the intermediate data for calculating the correlation coefficient and avoids affecting the homomorphic calculation of the correlation coefficient and the accuracy of the correlation coefficient.
[0044] Preferably, the first intermediate data comprises an expectation and / or a variance of the first raw data.
[0045] The usual expectation and / or variance are used in calculating the correlation coefficient, as the direct calculation data in the correlation coefficient calculation formula, and as the intermediate result of calculating the correlation coefficient with the first-dimensional data.
[0046] Illustratively, the formula for the Pearson correlation coefficient (Pearson) or the Spearman correlation coefficient (Spearman) is as follows:
number
[0047] As in the previous example, the first original data of the first participating node is X i The second data of the second participating node is Y i and a first random number r is generated based on the associated key. i The first data element and the second data element are homomorphically encrypted using the first random number. Each of the first data elements is multiplied by the first random number to generate homomorphically encrypted first data element X i *r i Then, each of the second-source data is multiplied by the inverse of the first random number to obtain the homomorphically encrypted second-source data Y i / r i Get the.
[0048] In response to this,
number
[0049] The first intermediate data of the first participating node is homomorphically encrypted with a second random number, and the second intermediate data of the second participating node is homomorphically encrypted with the second random number, where the intermediate data includes an expectation and a variance, and the second random number is a random number r corresponding to the expectation. e and r, which corresponds to the variance σ The first expectation included in the first intermediate data is multiplied by the second random number corresponding to the expectation to obtain the homomorphically encrypted first expectation E(X)*r e The second expectation included in the second intermediate data is multiplied by the inverse of the second random number corresponding to the expectation to obtain the homomorphically encrypted second expectation E(Y) / r σ The first distribution included in the first intermediate data is multiplied by the second random number corresponding to the expectation to obtain the homomorphically encrypted first distribution σ(X)*r σ The second expectation included in the second intermediate data is multiplied by the inverse of the second random number corresponding to the expectation to obtain the homomorphically encrypted second variance σ(Y) / r σ Get the.
[0050] In response to this,
number
[0051]
number
[0052] As a result, the correlation coefficient results do not change before and after homomorphic encryption.
[0053] By setting the first intermediate data to the expectation and variance of the first source data, it is possible to adapt to the application scenarios of correlation coefficients such as Pearson and Spearman, calculate the correlation coefficient using the same calculation method, increase the application scenarios of the correlation coefficient, and improve the security of the data required for calculating the correlation coefficient.
[0054] In S303, the first intermediate data is homomorphically encrypted using the associated key to obtain the homomorphically encrypted first intermediate data.
[0055] Similarly, the first intermediate data is homomorphically encrypted using the associated key. The first intermediate data calculated based on the first original data still needs to be encrypted, so as to avoid leaking privacy information of the original data.
[0056] Preferably, homomorphically encrypting the first intermediate data with the associated key to obtain the homomorphically encrypted first intermediate data includes calculating a second random number based on the associated key, and homomorphically encrypting the first intermediate data based on the second random number to obtain the homomorphically encrypted first intermediate data.
[0057] A second random number is calculated based on the associated key, where the first random number and the second random number are different. The second random number is used to homomorphically encrypt the first intermediate data. The first intermediate data is a data sequence, and the second random number is a data sequence, and according to the order of data in the sequence, the first intermediate data in a certain order is homomorphically encrypted based on the second random number in the same order. In practice, the first intermediate data may include multiple types of data, and the second random numbers corresponding to different types of data are different.
[0058] A second random number is further generated based on the associated key, and the first intermediate data is homomorphically encrypted based on the second random number, thereby increasing the randomness of the encrypted data, increasing the difficulty of decrypting the data encryption, further improving the complexity of the encryption, and improving the security of the intermediate data.
[0059] In S304, the homomorphically encrypted first original data and the homomorphically encrypted first intermediate data are determined as first transmission data.
[0060] In order to improve the security of the first transmission data, the homomorphically encrypted first original data and the homomorphically encrypted first intermediate data can be further encrypted to obtain the first transmission data. For example, a key pair formed of a public key (n, e) and a private key (n, d) can be generated by an RSA asymmetric encryption algorithm.
[0061] Preferably, determining the homomorphically encrypted first original data and the homomorphically encrypted first intermediate data as the first transmission data includes obtaining a public key transmitted from the auxiliary node, encrypting the homomorphically encrypted first intermediate data based on the public key, determining the homomorphically encrypted first original data and the public key encrypted first intermediate data as the first transmission data, and causing the auxiliary node to decrypt the public key encrypted first intermediate data with a private key, to obtain the homomorphically encrypted first intermediate data.
[0062] A public key and a private key constitute a key pair, which is generated by asymmetric encryption. The public key is made public and the private key is kept secret. The auxiliary node generates the key pair, sends the public key to each participating node, and keeps the private key locally. The participating nodes can encrypt data using the public key, and the auxiliary node can decrypt it using the private key to obtain the data.
[0063] The first participating node can further improve the security of the intermediate data by encrypting the homomorphically encrypted first intermediate data using the public key. Usually, the first intermediate data is a calculation result of the first original data, the number of data included in the first intermediate data is smaller than the number of data included in the first original data, and the homomorphically encrypted result of the first intermediate data is easier to decrypt than the homomorphically encrypted result of the first original data. Thus, the first intermediate data can be preferentially encrypted to improve the security of the first intermediate data, and the first intermediate data can be encrypted but not the first original data, thereby reducing the amount of data to be encrypted, reducing encryption costs, and improving encryption efficiency.
[0064] For example, the first intermediate data is an expectation of the first elemental data, and the homomorphic encryption method of the first elemental data is to encrypt data included in the first elemental data using a first random number. Here, since the encryption offset amount of each data included in the first elemental data is different, the homomorphically encrypted first elemental data is more difficult to decrypt and is more secure. Meanwhile, since the first intermediate data is only one data, if the data is encrypted using a second random number, only one encrypted data is obtained and it is easy to decrypt. As a result, the first intermediate data can be re-encrypted to further improve the security of the first intermediate data.
[0065] In one specific example, the public key (n, e) is used to encrypt the expectation E(X), and the encrypted expectation is (E(X)). e %n.
[0066] By performing public key encryption on the first intermediate data, the difficulty of decryption for devices other than the support node is increased, improving the security of the first intermediate data while reducing the amount of data to be encrypted, reducing encryption costs, and improving encryption efficiency.
[0067] In S305, the auxiliary node receives the first transmission data, and sends the first transmission data to the auxiliary node, so as to perform homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, and the second transmission data is determined by homomorphically encrypting the second original data by the second participating node using the associated key.
[0068] At S306, the correlation coefficient is received as feedback from the auxiliary node.
[0069] According to the technical solution disclosed herein, first intermediate data related to the calculation of the correlation coefficient is calculated based on the first original data using a correlation coefficient calculation formula, and the first intermediate data is homomorphically encrypted to ensure that the calculation of the correlation coefficient is a homomorphic calculation, realize the homomorphic calculation of the correlation coefficient, and improve the calculation accuracy of the correlation coefficient; furthermore, the homomorphic encryption improves the security of the first intermediate data and improves the security of the first transmission data.
[0070] 4 is a flow chart of a correlation coefficient acquisition method according to an embodiment of the present disclosure, and this embodiment is applied to the case of calculating the correlation between the original data of two participating nodes. The method of this embodiment can be implemented in a correlation coefficient acquisition device, which can be realized in the manner of software and / or hardware, specifically configured in an electronic device with a certain data computing ability, the electronic device is an auxiliary node, and the electronic device can be a client device or a server device, and the client device can be, for example, a mobile phone, a tablet computer, an in-vehicle terminal, a desktop computer, etc.
[0071] In S401, the first transmission data transmitted from the first participating node and the second transmission data transmitted from the second participating node are received.
[0072] The auxiliary node is used to perform homomorphic computation on the transmission data between two of the multiple participating nodes, calculate a correlation coefficient of the original data corresponding to the transmission data, and feed it back to the corresponding participating node. The correlation coefficient calculation system includes at least two participating nodes and an auxiliary node. The auxiliary node is used to calculate the correlation coefficient, and the participating node is used to provide homomorphically encrypted data for calculating the correlation coefficient. Since the first transmission data and the second transmission data are homomorphically encrypted data, the auxiliary node cannot obtain the original data, ensuring the security of the original data.
[0073] In S402, a homomorphic operation is performed on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, the first transmission data is determined by the first participating node homomorphically encrypting the first original data using an associated key, the second transmission data is determined by the second participating node homomorphically encrypting the second original data using the associated key, and the associated key is mutually determined by the first participating node and the second participating node.
[0074] In S403, the correlation coefficient is transmitted to the first participating node and the second participating node.
[0075] Here, in order to ensure the security of the transmission of the correlation coefficient, the correlation coefficient can be encrypted before transmission.
[0076] Preferably, performing homomorphic computing on the first transmission data and the second transmission data includes obtaining a key pair, decrypting public key encrypted first intermediate data in the first transmission data based on a private key in the key pair to obtain the homomorphically encrypted first intermediate data, decrypting public key encrypted second intermediate data in the second transmission data based on a private key in the key pair to obtain the homomorphically encrypted second intermediate data, and performing homomorphic computing on the homomorphically encrypted first intermediate data, the homomorphically encrypted first original data included in the first transmission data, the homomorphically encrypted second intermediate data, and the homomorphically encrypted second original data included in the second transmission data, wherein the public key in the key pair is transmitted to the first participating node and the second participating node and used to perform data encryption.
[0077] The intermediate data undergoes two encryption processes, firstly homomorphically encrypted by an associated key, and then public key encrypted. When the public key encrypted intermediate data is decrypted by a private key, the intermediate data homomorphically encrypted by an associated key can be obtained. The homomorphically encrypted first intermediate data, the homomorphically encrypted first element data, the homomorphically encrypted second intermediate data, and the homomorphically encrypted second element data are used to obtain a correlation coefficient between the first element data and the second element data through homomorphic calculation.
[0078] Exemplarily, the RSA algorithm can generate a key pair including a public key (n, e) and a private key (n, d). The expectation (E(X)) encrypted with the private key (n, d) e Decoding %n is ((E(X)) e %n) d %n=E(X) may also be true.
[0079] By performing public key encryption on the first intermediate data, the difficulty of decryption for devices other than the support node is increased, improving the security of the first intermediate data while reducing the amount of data to be encrypted, reducing encryption costs, and improving encryption efficiency.
[0080] According to the technical solution disclosed in the present disclosure, the auxiliary node performs homomorphic operation on the homomorphically encrypted first transmission data and second transmission data to obtain the correlation coefficient between the first original data and the second original data before homomorphic encryption, thereby realizing accurate calculation of the correlation coefficient between the original data when the auxiliary node cannot decrypt the transmission data, improving the security of the original data, protecting privacy information, enhancing the security of data transmission and the security of calculation, and improving the calculation accuracy of the correlation coefficient.
[0081] FIG. 5 is a scene diagram of a correlation coefficient obtaining method according to an embodiment of the present disclosure.
[0082] Here, the participants include k worker processes for processing the original data. The assistant node is an Arbiter node. In the federated learning framework, there are three types of nodes: participant nodes (Host), assistant nodes (Arbiter), and application nodes (Guest). The participant nodes are used to provide data, the assistant nodes are used to assist multi-party collaborative modeling, and the application nodes are used to initiate modeling operations.
[0083] The correlation coefficient acquisition method relates to a participating node and a supporting node, and specifically, the flow of the correlation coefficient acquisition method is as follows.
[0084] In S501, the participating node and the other participating nodes negotiate an associated key s using the DH protocol, and use it as a random seed.
[0085] Specifically, participants Pa and Pb generate a negotiation key s through the DH protocol, where a, b=1, 2, 3...d, a≠b, and d is the total number of participating nodes.
[0086] At S502, the auxiliary node generates a public key (n, e) and a private key (n, d).
[0087] A key pair can be generated based on the RSA algorithm.
[0088] In S503, the auxiliary node transmits the public key (n, e) to each participating node.
[0089] In S504, the participating node divides the source data into columns according to the number k of work processes to generate the first original data X jf Get the.
[0090] Here, the source data includes at least one original data, and one original data includes at least one data series. Here, the participants equally divide the source data according to the number k of work processes included, and X jfg Here, j=1,2,3...k, f=1,2,3...m, m is the column data to calculate the correlation coefficient, i.e., it is the same as the number of original data. In fact, one column of data is one original data, and g=1,2,3...N, N is the total number of samples contained in one original data. N X jfg One original data X jf Here, one work process can process at least one raw data.
[0091] In S505, the j-th work process of the participating node receives the first original data X jf , generate a first random number set R based on the associated key s, and encrypt the homomorphically encrypted first original data X jf *Calculate R.
[0092] The jth work process of the participating node generates N random numbers R={r i |r i ∈Z}, and jfg *r i Here, the number of random numbers is the same as the total number of samples included in the original data, both of which are N.
[0093] In S506, the jth work process of the participating node generates a second random number r based on the association key s. e and r σThen, we homomorphically encrypt the expectation and distribution, and continue encrypting it with the public key (n, e).
[0094] The jth work process of the participating node is X jfg Based on this, the expectation E(X jf ) and variance σ(X jf ) based on the associated key s. e and r σ Generate a second random number r e Using the expectation E(X jf ) is homomorphically encrypted and E(X jf )*r e Obtain the second random number r σ Using the variance σ(X jf ) is homomorphically encrypted, and σ(X jf )*r σ Here, we obtain two second random numbers r e andr σ It is different from E(X jf ) and encrypt it with (E(X jf )*r e ) e %n is obtained by homomorphically encrypting σ(X jf ) and encrypt (σ(X jf )*r σ ) e Get %n.
[0095] In S507, the joining node transmits the homomorphically encrypted first original data, the public-key encrypted expectation, and the public-key encrypted share to the auxiliary node.
[0096] At S508, the auxiliary node decodes the expectations and variances and homomorphically computes the correlation coefficients.
[0097] The auxiliary node uses its private key to decrypt the public-key encrypted expectation and the public-key encrypted share to obtain the homomorphically encrypted expectation and the homomorphically encrypted share. Based on the homomorphically encrypted original data, the homomorphically encrypted expectation, and the homomorphically encrypted share sent from the other participating node, the auxiliary node calculates a correlation coefficient between the original data of the two participating nodes.
[0098] The auxiliary node receives the first transmission data of the first participating node a, and jfg *r i , (E(X jf )*r e ) e %n and (σ(X jf )*r σ ) e %n. The second transmission data of the second participating node b is received, and Y hpq / r i , (E(Y hp ) / r σ ) e %n and (σ(Y hp ) / r σ ) e %n, where h=1,2,3...t, p=1,2,3...u, t is the number of work processes included in the second participating node, u is the column data to calculate the correlation coefficient, that is, it is the same as the number of original data. In fact, one column of data is one original data, and q=1,2,3...N, N is the total number of samples included in one original data. N Y hpq One source data Y hp Here, one work process can process at least one raw data.
[0099] Here, the correlation coefficient is mainly calculated in three parts, where the three parts are E(XY), E(X)*E(Y) and σ(X)*σ(Y) respectively.
[0100] Here, we first decrypt the expectation and distribution using the private key (n, d).
number
number
number
number
number
number
number
[0101] The calculation result of the above ciphertext is the same as that of the plaintext. Substitute it into the following formula and calculate.
[0102]
number
[0103] This results in the first source data X jf and the second data Y hp Accurately calculate the correlation coefficient between
[0104] At S509, the auxiliary node aggregates the correlation coefficients to obtain a global correlation coefficient.
[0105] The correlation coefficient at this time is the correlation coefficient between one original data and another original data. However, in reality, the source data contains multiple original data. Each of the multiple original data and the correlation coefficient between the corresponding original data can be combined to form a data set, which can be determined as a global correlation coefficient.
[0106] At S510, the supplemental node transmits the global correlation coefficient to the participating nodes.
[0107] The participating nodes filter the source data based on the global correlation coefficient, and apply the filtered source data to training the federated learning model.
[0108] Federated learning algorithms generally use cryptography to ensure data security, and the extra cryptography operations greatly reduce the efficiency of the algorithm. In addition, the federated learning process requires frequent communication between participants, which further reduces the learning efficiency. When the amount of business data is large, how to improve the efficiency of federated algorithms is particularly important.
[0109] In the embodiment of the present disclosure, multiple computation tasks (work processes) are launched on the same participant's server, and data participating in the participant's training is used to perform data division, parameter distribution, and aggregation of its own results, and the Worker work process reads data, calculates expectations and distributions, etc. Such a task parallel mechanism greatly improves the efficiency of federated learning. The parallelism of multiple Worker tasks can fully utilize the resources of the server, such as the CPU (Central Processor) and bandwidth. In addition, the memory allocation mechanism of the JVM and storage system allows multiple Worker tasks to fully utilize the memory resources of the server.
[0110] The algorithm of the embodiment of the present disclosure may be called the Parallel Federal Correlation Coefficient algorithm (PFCC), which uses DH and RSA protocols to ensure the secure aggregation of participant data by encrypting the original data with noise, where the encryption and decryption process is simple and has a small space-time complexity.
[0111] According to an embodiment of the present disclosure, Fig. 6 is a structural diagram of a correlation coefficient acquisition device in an embodiment of the present disclosure, which is applied to the case where the correlation between the original data of two participating nodes is calculated. The device is realized by software and / or hardware, specifically, configured in an electronic device with a certain data computing ability, and the electronic device is specifically a participating node.
[0112] The correlation coefficient acquisition device 600 shown in FIG. 6 includes a first data homomorphic encryption module 601, a first transmission data sending module 602, and a correlation coefficient acquisition module 603. the first-element data homomorphic encryption module 601 is used for obtaining the first element data, homomorphically encrypting the first element data using an associated key mutually determined by the first participating node and the second participating node, and determining the first transmission data; the first transmission data sending module 602 is used for sending the first transmission data to the auxiliary node, so that the auxiliary node receives the first transmission data, and performs homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data; the second transmission data is determined by the second participating node by homomorphically encrypting the second original data using the associated key; The correlation coefficient obtaining module 603 is used for receiving the correlation coefficient fed back from the supplemental node.
[0113] According to the technical solution disclosed herein, a first participating node participating in the calculation of the correlation coefficient homomorphically encrypts the first original data to determine the first transmission data, and sends the first transmission data to a third-party auxiliary node, and the auxiliary node performs homomorphic calculation on the first transmission data and the second transmission data, which corresponds to performing homomorphic calculation on the homomorphically encrypted first original data and the homomorphically encrypted second original data, and calculating the correlation coefficient between the homomorphically encrypted first original data and the homomorphically encrypted second original data to determine the correlation coefficient between the first original data and the second original data, which realizes accurate calculation of the correlation coefficient between the original data when the auxiliary node cannot decrypt the transmission data, improves the security of the original data, protects privacy information, enhances the security of data transmission and the security of calculation, and improves the calculation accuracy of the correlation coefficient.
[0114] Further, the first original data homomorphic encryption module 601 includes a first random number calculation unit for calculating a first random number based on the associated key, and a first random number encryption unit for homomorphically encrypting the first original data based on the first random number.
[0115] Furthermore, the first original data homomorphic encryption module 601 includes a data homomorphic encryption unit for homomorphically encrypting the first original data using the associated key to obtain the homomorphically encrypted first original data, a first intermediate data calculation unit for calculating first intermediate data based on the first original data and a calculation formula for a correlation coefficient, a first intermediate data homomorphic encryption unit for homomorphically encrypting the first intermediate data using the associated key to obtain the homomorphically encrypted first intermediate data, and a first transmission data confirmation unit for confirming the homomorphically encrypted first original data and first intermediate data as first transmission data.
[0116] Further, the first intermediate data homomorphic encryption unit includes a second random number calculation subunit for calculating a second random number based on the associated key, and a second random number homomorphic encryption subunit for homomorphically encrypting the first intermediate data based on the second random number.
[0117] Furthermore, the first intermediate data includes an expectation and / or a variance of the first raw data.
[0118] Furthermore, the first intermediate data addition subunit is specifically used for obtaining a public key sent from the auxiliary node, encrypting the homomorphically encrypted first intermediate data based on the public key, determining the homomorphically encrypted first original data and the public key encrypted first intermediate data as the first transmission data, and having the auxiliary node decrypt the public key encrypted first intermediate data with the private key to obtain the homomorphically encrypted first intermediate data.
[0119] Further, the correlation coefficient acquisition device further includes a sample data selection module for selecting first original data in a sample dataset based on a correlation coefficient between the first original data and the second original data, where the sample dataset includes the first original data, and the sample dataset is used for training the association model.
[0120] The above correlation coefficient acquisition device can execute the correlation coefficient acquisition method according to any embodiment of the present disclosure, and includes functional modules and beneficial effects corresponding to the execution of the correlation coefficient acquisition method.
[0121] According to an embodiment of the present disclosure, Fig. 7 is a structural diagram of a correlation coefficient acquisition device in an embodiment of the present disclosure, which is applied to the case where the correlation between the original data of two participating nodes is calculated. The device is realized by software and / or hardware, specifically, configured in an electronic device with a certain data computing ability, and the electronic device is specifically a participating node.
[0122] The correlation coefficient acquisition device 700 shown in FIG. 7 includes a transmission data acquisition module 701, a transmission data homomorphic calculation module 702, and a correlation coefficient transmission module 703. the transmission data acquisition module 701 is used to receive first transmission data transmitted from a first participating node and second transmission data transmitted from a second participating node; the transmission data homomorphic operation module 702 is used to perform homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, the first transmission data is determined by the first participating node using an associated key to homomorphically encrypt the first original data, the second transmission data is determined by the second participating node using an associated key to homomorphically encrypt the second original data, the associated key being mutually determined by the first participating node and the second participating node; The correlation coefficient sending module 703 is used for sending the correlation coefficient to the first participating node and the second participating node.
[0123] According to the technical solution disclosed in the present disclosure, the auxiliary node performs homomorphic operation on the homomorphically encrypted first transmission data and second transmission data to obtain the correlation coefficient between the first original data and the second original data before homomorphic encryption, thereby realizing accurate calculation of the correlation coefficient between the original data when the auxiliary node cannot decrypt the transmission data, improving the security of the original data, protecting privacy information, enhancing the security of data transmission and the security of calculation, and improving the calculation accuracy of the correlation coefficient.
[0124] Furthermore, the transmission data homomorphic calculation module 702 includes a key pair acquisition unit for acquiring a key pair, a first intermediate data decryption unit for decrypting the public key encrypted first intermediate data in the first transmission data based on the private key in the key pair to acquire the homomorphically encrypted first intermediate data, a second intermediate data decryption unit for decrypting the public key encrypted second intermediate data in the second transmission data based on the private key in the key pair to acquire the homomorphically encrypted second intermediate data, and a homomorphic calculation unit for homomorphically calculating the homomorphically encrypted first intermediate data, the homomorphically encrypted first original data included in the first transmission data, the homomorphically encrypted second intermediate data, and the homomorphically encrypted second original data included in the second transmission data, and the public key in the key pair is sent to the first participating node and the second participating node for use in performing data encryption.
[0125] The above correlation coefficient acquisition device can execute the correlation coefficient acquisition method according to any embodiment of the present disclosure, and includes functional modules and beneficial effects corresponding to the execution of the correlation coefficient acquisition method.
[0126] The collection, storage, use, processing, transmission, provision, disclosure and other processing of users' personal information in the technical solution disclosed herein all comply with the provisions of relevant laws and regulations and do not violate public order and morals.
[0127] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program.
[0128] FIG. 8 shows a schematic area diagram of an exemplary device 800 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various types of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various types of mobile devices, such as handheld terminals, mobile phones, smart phones, wearable devices, and other similar computing devices. The components, their connections, relationships, and their functions shown in this disclosure are merely exemplary and are not intended to limit the practice of the present disclosure as described and / or claimed herein.
[0129] 8, the device 800 includes a computing unit 801, and can execute various appropriate operations and processes based on a computer program stored in a read-only memory (ROM) 802 or loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may store various programs and data required for the operation of the device 800. The computing unit 801, the ROM 802 and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0130] The components in device 800 are connected to an I / O interface 805, which comprises input units 806 such as a keyboard, mouse, etc., output units 807 such as various displays, speakers, etc., storage units 808 such as magnetic disks, optical disks, etc., and communication units 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0131] The computing unit 801 may be a general-purpose and / or dedicated processing assembly having processing and computing capabilities. Some examples of the computing unit 801 may include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, computing units that execute various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 executes the above methods and processes, such as the correlation coefficient acquisition method. For example, in some embodiments, the correlation coefficient acquisition method can be realized as a computer software program and tangibly included in a device-readable medium such as the storage unit 808. In some embodiments, some or all of the computer program can be loaded and / or installed in the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the correlation coefficient acquisition method can be executed. Alternatively, in other embodiments, the calculation unit 801 may be configured to perform the correlation coefficient obtaining method in any other suitable manner (eg, via firmware).
[0132] Various embodiments of the systems and techniques described in this disclosure may be realized in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: embodied in one or more computer programs that can be executed and / or interpreted by a programmable system including at least one programmable processor, which may be a special purpose or general purpose programmable processor that can receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0133] The program codes for implementing the methods of the present disclosure can be coded in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that when the program codes are executed by the processor or controller, the functions / operations defined in the flowcharts and / or block diagrams are performed. The program codes can be executed entirely on the device, partially on the device, as a separate software package partially on the device and partially on a remote device, or entirely on a remote device or server.
[0134] In the specification of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program used in or in conjunction with an instruction execution system, apparatus or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. Further specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only disk (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0135] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) by which the user can provide input to the computer. Other types of devices can be used to provide further interaction with a user. For example, feedback provided to the user can be any form of sensing feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and can receive input from the user in any form (including sound input, speech input, or tactile input).
[0136] The systems and techniques described herein may be implemented in a computing system including a background component (e.g., a data server), or an intermediate component (e.g., an application server), or a front-end component (e.g., a user computer having a graphical user interface or network browser by which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, intermediate, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0137] A computing system may include a client and a server. The client and the server are generally remote from each other and typically interact with each other via a communication network. The relationship between the client and the server is created by computer programs running on corresponding computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0138] It should be understood that the above-described various types of flows can be used, and steps can be rearranged, added, or deleted. For example, each step described in the present disclosure can be performed in parallel, in sequence, or in a different order, and the present disclosure is not limited thereto, as long as the desired results of the technical solution of the present disclosure can be achieved.
[0139] The above specific embodiments do not limit the scope of protection of the present disclosure. Those skilled in the art can understand that various modifications, combinations, sub-combinations and substitutions are possible based on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present disclosure should be included within the scope of protection of the present disclosure.
Claims
1. A correlation coefficient obtaining method applied to a first participating node, comprising: obtaining first original data, and homomorphically encrypting the first original data using an associated key mutually determined by the first participating node and the second participating node to determine first transmission data; sending the first transmission data to an auxiliary node, such that an auxiliary node receives the first transmission data, and performs a homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data; and the second transmission data is determined by homomorphically encrypting the second original data by the second participating node using the associated key; receiving the correlation coefficient fed back from the supplemental node; homomorphically encrypting the first original data using the associated key to determine the first transmission data, homomorphically encrypting the first data element using an associated key to obtain homomorphically encrypted first data element; Calculating first intermediate data based on the first original data and a calculation formula for the correlation coefficient; homomorphically encrypting the first intermediate data using the associated key to obtain homomorphically encrypted first intermediate data; determining the homomorphically encrypted first original data and the homomorphically encrypted first intermediate data as first transmission data; How to obtain correlation coefficient.
2. homomorphically encrypting the first data element using an associated key includes: Calculating a first random number based on the associated key; and homomorphically encrypting the first original data based on the first random number. The method of claim 1.
3. Homomorphically encrypting the first intermediate data with an associated key to obtain homomorphically encrypted first intermediate data, calculating a second random number based on the associated key; and homomorphically encrypting the first intermediate data based on the second random number to obtain homomorphically encrypted first intermediate data. The method of claim 1.
4. The first intermediate data includes an expectation and / or a variance of the first raw data. The method of claim 1.
5. determining the homomorphically encrypted first original data and the homomorphically encrypted first intermediate data as first transmission data, Obtaining a public key transmitted from the auxiliary node; encrypting the homomorphically encrypted first intermediate data based on the public key, determining the homomorphically encrypted first original data and the public-key encrypted first intermediate data as first transmission data, and having the auxiliary node decrypt the public-key encrypted first intermediate data with a private key to obtain the homomorphically encrypted first intermediate data. The method according to claim 3.
6. In a sample dataset, the first original data is selected based on a correlation coefficient between the first original data and the second original data, and the first original data is included in the sample dataset, and the sample dataset is used to train an association model. The method of claim 1.
7. A correlation coefficient obtaining method applied to an auxiliary node, comprising: receiving first transmission data transmitted from a first participating node and second transmission data transmitted from a second participating node; performing a homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, the first transmission data being determined by homomorphically encrypting the first original data by the first participating node using an associated key, the second transmission data being determined by homomorphically encrypting the second original data by the second participating node using the associated key, and the associated key being mutually determined by the first participating node and the second participating node; transmitting the correlation coefficient to the first participating node and to the second participating node; The homomorphic operation on the first transmission data and the second transmission data includes: Obtaining a key pair; decrypting public-key encrypted first intermediate data in the first transmission data based on a private key in the key pair to obtain homomorphically encrypted first intermediate data; decrypting public-key encrypted second intermediate data in the second transmission data based on a private key in the key pair to obtain homomorphically encrypted second intermediate data; performing homomorphic operations on the homomorphically encrypted first intermediate data, the homomorphically encrypted first original data included in the first transmission data, the homomorphically encrypted second intermediate data, and the homomorphically encrypted second original data included in the second transmission data; a public key in the key pair is sent to the first participating node and the second participating node for use in performing data encryption; How to obtain correlation coefficient.
8. A correlation coefficient acquisition device disposed in a first participating node, a first-element data homomorphic encryption module for obtaining first element data, homomorphically encrypting the first element data using a related key mutually determined between the first participating node and the second participating node, and determining first transmission data; a first transmission data transmitting module for transmitting the first transmission data to an auxiliary node, so that the auxiliary node receives the first transmission data and performs a homomorphic operation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, the second transmission data being determined by the second participating node by homomorphically encrypting the second original data using the associated key; a correlation coefficient acquisition module for receiving the correlation coefficient fed back from the auxiliary node; The first original data homomorphic encryption module includes: a data homomorphic encryption unit for homomorphically encrypting the first data element using an associated key to obtain homomorphically encrypted first data element; a first intermediate data calculation unit for calculating first intermediate data based on the first original data and a calculation formula of the correlation coefficient; a first intermediate data homomorphic encryption unit for homomorphically encrypting the first intermediate data using the related key to obtain homomorphically encrypted first intermediate data; a first transmission data determination unit for determining the homomorphically encrypted first original data and the first intermediate data as first transmission data, Correlation coefficient acquisition device.
9. The first original data homomorphic encryption module includes: a first random number calculation unit for calculating a first random number based on the associated key; a first random number encryption unit for homomorphically encrypting the first original data based on the first random number; 9. The apparatus of claim 8.
10. The first intermediate data homomorphic encryption unit includes: a second random number calculation subunit for calculating a second random number based on the associated key; a second random number homomorphic encryption subunit for homomorphically encrypting the first intermediate data based on the second random number; 9. The apparatus of claim 8.
11. The first intermediate data includes an expectation and / or a variance of the first raw data.
9. The apparatus of claim 8.
12. The first intermediate data adding subunit: Obtaining a public key transmitted from the auxiliary node; encrypting the homomorphically encrypted first intermediate data based on the public key, determining the homomorphically encrypted first original data and the public-key encrypted first intermediate data as first transmission data, and having the auxiliary node decrypt the public-key encrypted first intermediate data with a private key to obtain the homomorphically encrypted first intermediate data; 11. The apparatus of claim 10.
13. A sample data selection module for selecting the first original data based on a correlation coefficient between the first original data and the second original data in a sample data set, the first original data being included in the sample data set, and the sample data set is used for training an association model.
9. The apparatus of claim 8.
14. A correlation coefficient acquisition device disposed in a supplementary node, a transmission data acquisition module for receiving first transmission data transmitted from a first participating node and second transmission data transmitted from a second participating node; a transmission data homomorphic calculation module for performing homomorphic calculation on the first transmission data and the second transmission data to obtain a correlation coefficient between the first original data and the second original data, wherein the first transmission data is determined by the first participating node homomorphically encrypting the first original data using an associated key, and the second transmission data is determined by the second participating node homomorphically encrypting the second original data using the associated key, and the associated key is mutually determined between the first participating node and the second participating node; a correlation coefficient transmission module for transmitting the correlation coefficient to the first participating node and to the second participating node; The transmission data homomorphic operation module includes: a key pair deriving unit for deriving a key pair; a first intermediate data decryption unit for decrypting public key encrypted first intermediate data in the first transmission data based on a private key in the key pair to obtain homomorphically encrypted first intermediate data; a second intermediate data decryption unit for decrypting public key encrypted second intermediate data in the second transmission data based on a private key in the key pair to obtain homomorphically encrypted second intermediate data; a homomorphic arithmetic unit for performing homomorphic arithmetic on the homomorphically encrypted first intermediate data, the homomorphically encrypted first original data included in the first transmission data, the homomorphically encrypted second intermediate data, and the homomorphically encrypted second original data included in the second transmission data; Equipped with a public key in the key pair is sent to the first participating node and the second participating node for use in performing data encryption; Correlation coefficient acquisition device.
15. At least one processor; a memory communicatively coupled to the at least one processor, the memory stores instructions executable by the at least one processor; The instructions are executed by the at least one processor such that the at least one processor is capable of executing the correlation coefficient obtaining method according to any one of claims 1 to 7. electronic equipment.
16. A non-transitory computer-readable storage medium having computer instructions stored thereon, comprising: The computer instructions are used to cause a computer to execute the correlation coefficient acquisition method according to any one of claims 1 to 7. A non-transitory computer-readable storage medium.
17. When executed by a processor, the method for obtaining a correlation coefficient according to any one of claims 1 to 7 is realized. Computer program.
Citation Information
Patent Citations
Program, information processing method and information processing apparatus
JP2013205796A
