Data sharing method, device, equipment and storage medium
Through sample-level equality policy filtering conditions and hash function encryption technology, combined with the privacy transfer algorithm, the risk of data demanding party's intentions being identified during the data sharing process is solved, and data sharing with high accuracy and information security is achieved.
Patent Information
- Application Number
- CN202211219741.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-09-30
AI Technical Summary
During the data sharing process, the query intention of the data demander is at risk of being identified by the data provider, which affects information security, especially when the frequency and data volume of data increase and the complexity of query conditions increase.
The data is filtered using sample-level equality policy filtering conditions, and multiple processing is carried out through hash functions and encryption technology. The privacy transfer algorithm is used to protect data privacy, ensuring that the data demander can accurately obtain samples that meet the conditions, while preventing the filtering conditions and Sample features leaked.
It improves the accuracy of sample matching and the information security of the data sharing process, prevents data leakage, and ensures the privacy protection of both parties' data.
Smart Images

Figure CN115599959B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of information security and big data, and in particular to a data sharing method, apparatus, device, storage medium and program product. Background Art
[0002] With the rapid development of the economy, multiple institutions usually need to share some business data in order to complete business activities such as customer qualification authentication and risk level evaluation based on relatively complete business data. In order to protect the query intentions or privacy data of each institution from being leaked, data demanders and data providers can usually share business data based on privacy data provision methods such as hidden queries. However, with the continuous increase in data query frequency and query data volume, as well as the increase in the complexity of data query conditions, the query intentions of data demanders are at risk of being effectively identified by other data providers during the data sharing process, which has a significant negative impact on information security during the data sharing process. Summary of the invention
[0003] In view of the above problems, the present disclosure provides a data sharing method, apparatus, device, storage medium and program product.
[0004] According to a first aspect of the present disclosure, a data sharing method is provided, which is applied to a data demander, and includes:
[0005] Using the sample-level equality strategy screening condition to screen the original first sample set provided by the data demander, to obtain a first set of samples to be matched, wherein the first set of samples to be matched includes at least one group of first elements, and each group of the first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched;
[0006] Calling a hash function to calculate the hash value of each group of the first elements to obtain a first hash set to be matched;
[0007] Sending the encrypted first set of samples to be matched to the data provider, so that the data provider encrypts the encrypted first set of samples to be matched based on the second private key to obtain a re-encrypted first set of samples to be matched, wherein the encrypted first set of samples to be matched is obtained by encrypting the first set of hashes to be matched using the first private key;
[0008] Using the first private key, encrypt the encrypted second set of samples to be matched sent by the data provider to obtain a re-encrypted second set of samples to be matched;
[0009] The privacy intersection algorithm is used to intersect the re-encrypted first set of samples to be matched and the re-encrypted second set of samples to be matched to obtain a data intersection.
[0010] According to an embodiment of the present disclosure, the data sharing method further includes:
[0011] Receiving the encrypted second to-be-matched sample set sent by the data provider;
[0012] Among them, the above-mentioned encrypted second set of samples to be matched is obtained by encrypting the second hash set to be matched based on the second private key of the above-mentioned data provider, and the above-mentioned second hash set to be matched is obtained by processing the second element in the above-mentioned second set of samples to be matched by the above-mentioned hash function, and each group of the above-mentioned second elements includes the second sample to be matched and the sample features corresponding to the above-mentioned second sample to be matched.
[0013] According to an embodiment of the present disclosure, the data sharing method further includes:
[0014] Using each first to-be-matched hash value in the first to-be-matched hash set and the shared key to construct a first array element, to obtain a first array set; and
[0015] Each first array element in the first array set is encrypted using the first private key to obtain the encrypted first set of samples to be matched.
[0016] According to an embodiment of the present disclosure, the data demander and the data provider jointly negotiate to determine an elliptic curve encryption protocol, and the elliptic curve encryption protocol includes a random elliptic point generation function;
[0017] Wherein, using the first private key to encrypt each first array element in the first array set includes:
[0018] Calling the random ellipse point generation function to process the first array element to generate a first random ellipse point calculation result;
[0019] Calculate a power operation result with the calculation result of the first random elliptic point as the base and the first private key as the exponent to obtain an encrypted first element corresponding to the first array element; and
[0020] The encrypted first to-be-matched sample set is constructed based on the encrypted first element.
[0021] According to an embodiment of the present disclosure, the above elliptic curve cryptographic protocol further includes an elliptic curve and an elliptic curve generator;
[0022] The above data sharing methods also include:
[0023] Generate the first private key according to the elliptic curve;
[0024] Generate a first public key matching the first private key according to the elliptic curve generator and the first private key;
[0025] Based on a key negotiation mechanism determined with the data provider, generating the shared key using the second public key from the data provider and the first private key; and
[0026] The first public key is sent to the data provider so that the data provider generates the shared key based on the key agreement mechanism using the first public key and the second private key, wherein the second private key is generated according to the elliptic curve.
[0027] According to an embodiment of the present disclosure, the data sharing method further includes:
[0028] According to the data intersection, target samples that meet the sample-level equality strategy screening conditions and are stored in the data provider are screened out from the first set of samples to be matched.
[0029] A second aspect of the present disclosure also provides a data sharing method, applied to a data provider, comprising:
[0030] Using the sample-level equality strategy screening condition to screen the original second sample set provided by the data provider, to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of the second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched;
[0031] Calling a hash function to calculate the hash value of each group of the second elements to obtain a second hash set to be matched;
[0032] Sending the encrypted second set of samples to be matched to the data demander, so that the data demander encrypts the encrypted second set of samples to be matched based on the first private key to obtain a second set of samples to be matched again, wherein the encrypted second set of samples to be matched is obtained by encrypting the second set of hashes to be matched using the second private key;
[0033] Encrypting the encrypted first set of samples to be matched from the data demander based on the second private key to obtain a re-encrypted first set of samples to be matched; and
[0034] The re-encrypted first to-be-matched sample set is sent to the data demander.
[0035] According to an embodiment of the present disclosure, the data sharing method further includes:
[0036] Receiving the encrypted first to-be-matched sample set sent by the data demander;
[0037] Among them, the above-mentioned encrypted first set of samples to be matched is obtained by encrypting the first set of hashes to be matched via the above-mentioned first private key, and the above-mentioned first set of hashes to be matched is obtained by processing each first element in the first set of samples to be matched by the above-mentioned hash function, and each group of the above-mentioned first elements includes the first sample to be matched and the screening condition corresponding to the above-mentioned first sample to be matched.
[0038] According to an embodiment of the present disclosure, the data sharing method further includes:
[0039] Using each second to-be-matched hash value in the second to-be-matched hash set and the shared key to construct a second array element, to obtain a second array set; and
[0040] Each second array element in the second array set is encrypted using the second private key to obtain the encrypted second set of samples to be matched.
[0041] According to an embodiment of the present disclosure, the data demander and the data provider jointly negotiate to determine an elliptic curve encryption protocol, and the elliptic curve encryption protocol includes a random elliptic point generation function;
[0042] Wherein, using the second private key to encrypt each second array element in the second array set includes:
[0043] Calling the random ellipse point generation function to process the second array element to generate a second random ellipse point calculation result;
[0044] Calculate a power operation result with the second random elliptic point calculation result as the base and the second private key as the exponent to obtain an encrypted second element corresponding to the second array element; and
[0045] The encrypted second to-be-matched sample set is constructed based on the encrypted second element.
[0046] According to an embodiment of the present disclosure, the data sharing method said elliptic curve encryption protocol also includes an elliptic curve and an elliptic curve generator;
[0047] The above data sharing methods also include:
[0048] Generate the second private key according to the elliptic curve;
[0049] Generate a second public key matching the second private key according to the elliptic curve generator and the second private key;
[0050] Based on a key negotiation mechanism determined with the data demander, generating the shared key using the first public key and the second private key from the data demander; and
[0051] The second public key is sent to the data demander so that the data demander can generate the shared key using the second public key and the first private key based on the key agreement mechanism, wherein the first private key is generated according to the elliptic curve.
[0052] The third aspect of the present disclosure further provides a data sharing device, which is applied to a data demander, comprising:
[0053] A first screening module, configured to screen the original first sample set provided by the data demander using the sample-level equality strategy screening condition to obtain a first set of samples to be matched, wherein the first set of samples to be matched includes at least one group of first elements, and each group of the first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched;
[0054] A first hash processing module, used for calling a hash function to calculate the hash value of each group of the first elements to obtain a first hash set to be matched;
[0055] A first sending module is used to send the encrypted first sample set to be matched to the data provider, so that the data provider encrypts the encrypted first sample set to be matched based on the second private key to obtain a re-encrypted first sample set to be matched, wherein the encrypted first sample set to be matched is obtained by encrypting the first hash set to be matched via the first private key;
[0056] A first encryption module, configured to encrypt the encrypted second set of samples to be matched sent by the data provider using the first private key to obtain a re-encrypted second set of samples to be matched;
[0057] The privacy intersection module is used to use a privacy intersection algorithm to intersect the re-encrypted first set of samples to be matched and the re-encrypted second set of samples to be matched to obtain a data intersection.
[0058] A fourth aspect of the present disclosure further provides a data sharing device, applied to a data provider, comprising:
[0059] A second screening module is used to screen the original second sample set provided by the data provider using the sample-level equal strategy screening condition to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of the second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched;
[0060] A second hash processing module is used to call a hash function to calculate the hash value of each group of the second elements to obtain a second hash set to be matched;
[0061] A second sending module is used to send the encrypted second to-be-matched sample set to the data demander, so that the data demander encrypts the encrypted second to-be-matched sample set based on the first private key to obtain a second encrypted second to-be-matched sample set, wherein the encrypted second to-be-matched sample set is obtained by encrypting the second to-be-matched hash set via the second private key;
[0062] A second encryption module is used to encrypt the encrypted first to-be-matched sample set from the data demander based on the second private key to obtain a re-encrypted first to-be-matched sample set; and
[0063] The third sending module is used to send the re-encrypted first to-be-matched sample set to the data demander.
[0064] A fifth aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.
[0065] The sixth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.
[0066] The seventh aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0067] According to the data sharing method, apparatus, device, medium and program product provided by the present disclosure, the first sample to be matched in the original first sample set and the screening condition corresponding to the first sample to be matched are embedded into the first element by adopting the sample-level equality strategy screening condition, and the first sample set to be matched is multi-processed by using the hash function and the first private key, so that the screening condition and the first sample to be matched can be effectively processed for privacy, so as to avoid leakage of important data of the data demander, and then the encrypted second sample set to be matched of the data provider is encrypted based on the first private key, and the privacy intersection is performed based on the obtained re-encrypted second sample set to be matched and the re-encrypted first sample set to be matched provided by the data provider, so that the data of both parties can be protected from being leaked, and the data demander can accurately obtain the sample that satisfies the sample-level equality strategy screening condition and is the same as the second sample to be matched in the second sample set to be matched shared by the data provider, thereby realizing sample data sharing based on the sample-level equality strategy screening condition, improving the accuracy of sample matching, and ensuring that the sample and the screening condition are not leaked, thereby improving the information security of the data sharing interaction process. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0069] Figure 1 The following schematically shows an application scenario diagram of the data sharing method and device according to an embodiment of the present disclosure;
[0070] Figure 2 A flowchart schematically shows a data sharing method applied to a data demander according to an embodiment of the present disclosure;
[0071] Figure 3 A flowchart schematically shows a data sharing method applied to a data demander according to another embodiment of the present disclosure;
[0072] Figure 4 A flowchart schematically shows a data sharing method applied to a data provider according to an embodiment of the present disclosure;
[0073] Figure 5 A flowchart of a data sharing method applied to a data provider according to another embodiment of the present disclosure is schematically shown;
[0074] Figure 6 The structure block diagram of the data sharing device according to the embodiment of the present disclosure is schematically shown;
[0075] Figure 7 The structure block diagram of the data sharing device according to the embodiment of the present disclosure is schematically shown;
[0076] Figure 8 A block diagram of an electronic device suitable for implementing a data sharing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0077] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0078] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0079] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0080] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0081] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of the data involved (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0082] It should be noted that the names and English abbreviations of technical terms appearing in this scheme can be explained based on the following contents.
[0083] Message: A bit string of arbitrary length.
[0084] Asymmetric encryption system: Asymmetric encryption algorithms are different from traditional symmetric encryption algorithms. They are based on the asymmetry of the computational complexity in the encryption and decryption process to ensure security. In an asymmetric encryption system, the encrypting party must generate a private key and a public key pair. The private key is retained by the encryptor, and the public key can be sent to the other party.
[0085] Hash function: also known as hash function, it can convert input characters of any length into a random number output of fixed length, and has security features such as randomness, irreversibility and anti-collision. Common hash functions include SHA3, SHA256, SM3, etc.
[0086] Hash to point function: A type of elliptic curve random element generation algorithm with similar properties to hash functions. p , given an input τ of arbitrary length, the output is a Elements It also has pseudo-randomness, irreversibility and collision resistance, and is widely used in public key cryptographic protocols.
[0087] Private set intersection (PSI): also known as privacy intersection, a type of cryptographic algorithm or protocol, whose input is the sample set of both parties (data demander and data provider), and output is the intersection sample set of both parties. During the intersection process, no other information other than the intersection of the samples of both parties will be leaked, while ensuring forward security. The privacy set intersection protocol includes technical routes based on RSA blind signature, elliptic curve, and extended oblivious transfer (OT-Extension).
[0088] Multi-strategy Private set intersection (Ms-PSI): A special type of private intersection protocol that can add certain privacy strategies (intersection triggering conditions or requirements) during the intersection process. The input is the sample sets and privacy strategies of both parties, and the output is the intersection sample set that satisfies the strategy. The privacy information in the strategy is not leaked during the intersection process, which can achieve a more accurate and efficient intersection calculation process and better protect the privacy of all parties.
[0089] Data sharing, interaction and collaboration help to better leverage the value of data. It has a broad application prospect in different application scenarios, such as data sharing and interaction application scenarios among different institutions. As the requirements for data security and privacy protection continue to increase, data leakage and other security risks must be avoided in the process of data sharing and collaboration among institutions. In the process of sharing lists, samples and other data among institutions, privacy set intersection and other technologies can be used to extract and screen samples shared by both parties, and protect data outside the intersection of samples from being leaked. This type of data sharing, interaction and collaboration is widely used in various application scenarios such as joint marketing, federated learning, and advertising.
[0090] However, the traditional privacy set intersection technology can only perform intersection screening in a single dimension of the sample set, and cannot use other features and screening conditions contained in the sample as the screening basis. Taking the sample screening scenario between the data demander and the data provider as an example, when the data demander wants to intersect its sample set with the samples in the data provider's sample set that meet the screening condition of "education = master's degree", it can only send additional screening conditions to the data provider, which will cause the leakage of screening conditions and is not conducive to the privacy protection of the data demander. In actual scenarios, taking commercial banks as an example, the screening conditions proposed to the other party often contain the core parameters of the bank's risk decision-making, which in turn harms the interests of the bank.
[0091] In summary, it is necessary to study and implement privacy set intersection technology and algorithms that can support multi-strategy filtering conditions (the strategy can, for example, include "equality strategy", that is, the filtering condition "=" sample features), and support sample-level equal filtering conditions, so as to effectively protect the sample set and filtering condition privacy of the data demander. The data provider cannot identify any valid information about the filtering conditions, thereby achieving a higher level of privacy protection effect and realizing safer, more accurate and more effective sample intersection and sharing.
[0092] The embodiment of the present disclosure provides a data sharing method applied to a data demander, including:
[0093] The original first sample set provided by the data demander is screened using the sample-level equality strategy screening condition to obtain a first sample set to be matched, wherein the first sample set to be matched includes at least one group of first elements, and each group of first elements includes the first sample to be matched and the screening condition corresponding to the first sample to be matched; a hash function is called to calculate the hash value of each group of first elements to obtain a first hash set to be matched; the encrypted first sample set to be matched is sent to the data provider so that the data provider encrypts the encrypted first sample set to be matched based on the second private key to obtain a re-encrypted first sample set to be matched, which is obtained by encrypting the first hash set to be matched with the first private key; the encrypted second sample set to be matched sent by the data provider is encrypted using the first private key to obtain a re-encrypted second sample set to be matched; a privacy intersection algorithm is used to intersect the re-encrypted first sample set to be matched and the re-encrypted second sample set to be matched to obtain a data intersection.
[0094] According to the embodiments of the present disclosure, since the first sample to be matched in the original first sample set and the screening condition corresponding to the first sample to be matched are embedded into the first element by adopting the sample-level equality strategy screening condition, and the first sample set to be matched is multi-processed by using the hash function and the first private key, the screening condition and the first sample to be matched can be effectively privacy processed to avoid leakage of important data of the data demander, and then the encrypted second sample set to be matched of the data provider is encrypted based on the first private key, and the privacy intersection is performed based on the obtained re-encrypted second sample set to be matched and the re-encrypted first sample set to be matched provided by the data provider, which can protect the data of both parties from being leaked, so that the data demander can accurately obtain the sample that not only meets the sample-level equality strategy screening condition, but also is the same as the second sample to be matched in the second sample set to be matched shared by the data provider, thereby realizing sample data sharing based on the sample-level equality strategy screening condition, improving the accuracy of sample matching, and ensuring that the sample and the screening condition are not leaked, thereby improving the information security of the data sharing interaction process.
[0095] The embodiment of the present disclosure also provides a data sharing method applied to a data provider, comprising:
[0096] The original second sample set provided by the data provider is screened using the sample-level equality strategy screening condition to obtain a second sample set to be matched, wherein the second sample set to be matched includes at least one group of second elements, and each group of second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched; a hash function is called to calculate the hash value of each group of second elements to obtain a second hash set to be matched; the encrypted second sample set to be matched is sent to the data demander so that the data demander encrypts the encrypted second sample set to be matched based on the first private key to obtain a re-encrypted second sample set to be matched, which is obtained by encrypting the second hash set to be matched via the second private key; the encrypted first sample set to be matched from the data demander is encrypted based on the second private key to obtain a re-encrypted first sample set to be matched; and the re-encrypted first sample set to be matched is sent to the data demander.
[0097] According to the embodiments of the present disclosure, since the second sample to be matched in the original second sample set and the sample features corresponding to the second sample to be matched are embedded into the second element by using the sample-level equality strategy screening condition, and the first sample set to be matched is multi-processed by using the hash function and the second private key, the sample features of the same type as the screening condition can be effectively screened out, and the sample features and the second sample to be matched are privacy processed to avoid leakage of important data of the data provider, and then the encrypted first sample set to be matched of the data demander is encrypted based on the second private key, and the obtained re-encrypted first sample set to be matched is sent to the data demander, which can effectively protect the data of the data sharing party from being leaked, and allow the data demand method to perform privacy intersection based on the re-encrypted first sample set to be matched and the re-encrypted second sample set to be matched, thereby realizing sample data sharing based on the sample-level equality strategy screening condition of the data demander, while improving the accuracy of sample matching, ensuring that the sample and the screening condition are not leaked, thereby improving the information security of the data sharing interaction process.
[0098] Figure 1 The application scenario diagram of the data sharing method and device according to the embodiments of the present disclosure is schematically shown.
[0099] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, a first server 105, and a second server 106. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the first server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0100] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0101] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0102] The first server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0103] The second server 106 can also be a server that provides various services, for example, data request sending and receiving services, data computing services, etc.
[0104] It should be noted that the first server 105 may be a server used by a data demander, and the second server 106 may be a server used by a data provider.
[0105] It should be noted that the data sharing method applied to the data demander provided in the embodiment of the present disclosure can generally be executed by the first server 105. Accordingly, the data sharing device applied to the data demander provided in the embodiment of the present disclosure can generally be set in the first server 105. The data sharing method applied to the data demander provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the first server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the first server 105. Accordingly, the data sharing device applied to the data demander provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the first server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the first server 105.
[0106] Accordingly, the data sharing method applied to the data provider provided in the embodiment of the present disclosure can generally be executed by the second server 106. Accordingly, the data sharing device applied to the data provider provided in the embodiment of the present disclosure can generally be set in the second server 106. Alternatively, the data sharing method applied to the data provider provided in the embodiment of the present disclosure can also be executed by a server and / or terminal device that is different from the second server 106 and can communicate with the second server 106. Accordingly, the data sharing device applied to the data provider provided in the embodiment of the present disclosure can also be set in a server and / or terminal device that is different from the second server 106 and can communicate with the second server 106 for execution.
[0107] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0108] The following will be based on Figure 1 The scene described by Figure 2 to Figure 5 The data sharing method of the disclosed embodiment is described in detail.
[0109] Figure 2 The flowchart of the data sharing method applied to a data demander according to an embodiment of the present disclosure is schematically shown.
[0110] like Figure 2 As shown, the data sharing method of this embodiment can be applied to a data demander, and the data sharing method includes operations S210 to S250.
[0111] In operation S210, the original first sample set provided by the data demander is screened using the sample-level equality strategy screening condition to obtain a first set of samples to be matched, wherein the first set of samples to be matched includes at least one group of first elements, and each group of first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched.
[0112] In operation S220, a hash function is called to calculate a hash value of each group of first elements to obtain a first hash set to be matched.
[0113] In operation S230, the encrypted first set of samples to be matched is sent to the data provider, so that the data provider encrypts the encrypted first set of samples to be matched based on the second private key to obtain a re-encrypted first set of samples to be matched, which is obtained by encrypting the first hash set to be matched via the first private key.
[0114] In operation S240, the encrypted second set of samples to be matched sent by the data provider is encrypted using the first private key to obtain a re-encrypted second set of samples to be matched.
[0115] In operation S250, a privacy intersection algorithm is used to intersect the re-encrypted first set of samples to be matched and the re-encrypted second set of samples to be matched, to obtain a data intersection.
[0116] According to an embodiment of the present disclosure, the sample-level equality strategy screening condition can be to set a corresponding screening condition for each first sample to be matched, and the screening condition needs to be equal to the sample characteristics of the data provider. By using the sample-level equality strategy screening condition to screen the original first sample set provided by the data demander, the screening condition corresponding to each first sample to be matched can be effectively embedded into the first element, so that the conditions in the first sample set to be matched can be queried in a fine-grained manner to improve the accuracy of sample data interaction.
[0117] It should be noted that the screening condition may be condition information for characterizing the attribute characteristics of the first sample to be matched, for example, it may include educational level conditions, etc. The embodiments of the present disclosure do not limit the specific condition types of the screening condition, and those skilled in the art may select according to actual needs.
[0118] According to an embodiment of the present disclosure, the first private key and the second private key are keys held by the data demander and the data provider respectively, and the first private key and the second private key can be generated based on the same privacy intersection protocol, so that the encrypted first set of samples to be matched cannot be decrypted at the data provider, and the encrypted second set of samples to be matched cannot be decrypted at the data demander, thereby ensuring that the samples to be matched of the data demander and the data provider will not be leaked, and at the same time ensuring that the screening conditions will not be obtained by the data provider.
[0119] It should be noted that the first private key and the second private key of the embodiment of the present disclosure can be generated based on any type of privacy intersection protocol, for example, they can be generated based on the privacy intersection protocol of the elliptic curve cryptography algorithm, but are not limited thereto, and can also be generated based on other privacy intersection protocols, such as the privacy intersection protocol based on the oblivious transfer algorithm, etc. The present disclosure does not limit the specific type of the privacy intersection protocol, and those skilled in the art can select it according to actual needs.
[0120] According to the embodiments of the present disclosure, since the first private key and the second private key can be generated based on the same privacy intersection protocol, the first set of samples to be matched and the second set of samples to be matched are encrypted again, and both are processed by the first private key and the second private key, and the data intersection can be obtained based on the privacy intersection algorithm. In this way, the privacy data sharing interaction between the data demander and the data provider can be realized through the data intersection, thereby realizing the data privacy sharing of the sample-level equality policy screening conditions.
[0121] According to the embodiments of the present disclosure, since the first sample to be matched in the original first sample set and the screening condition corresponding to the first sample to be matched are embedded into the first element by adopting the sample-level equality strategy screening condition, and the first sample set to be matched is multi-processed by using the hash function and the first private key, the screening condition and the first sample to be matched can be effectively privacy processed to avoid leakage of important data of the data demander, and then the encrypted second sample set to be matched of the data provider is encrypted based on the first private key, and the privacy intersection is performed based on the obtained re-encrypted second sample set to be matched and the re-encrypted first sample set to be matched provided by the data provider, which can protect the data of both parties from being leaked, so that the data demander can accurately obtain the sample that not only meets the sample-level equality strategy screening condition, but also is the same as the second sample to be matched in the second sample set to be matched shared by the data provider, thereby realizing sample data sharing based on the sample-level equality strategy screening condition, improving the accuracy of sample matching, and ensuring that the sample and the screening condition are not leaked, thereby improving the information security of the data sharing interaction process.
[0122] According to an embodiment of the present disclosure, the data sharing method may further include the following operations:
[0123] Using each first to-be-matched hash value in the first to-be-matched hash set and the shared key to construct a first array element, to obtain a first array set; and using the first private key to encrypt each first array element in the first array set, to obtain an encrypted first to-be-matched sample set.
[0124] According to the embodiments of the present disclosure, the shared key may be data disclosed to the data query party and the data provider. The shared key may be disclosed to the data query party and the data provider based on a third trusted authority, or may be generated by the data query party and the data provider based on the same key generation mechanism, or may be disclosed after one party generates the shared key and sends it to the other party. The embodiments of the present disclosure do not limit the method for generating the shared key, and the method for the data query party and the data provider to obtain the shared key respectively, and those skilled in the art may make a choice according to actual needs.
[0125] According to an embodiment of the present disclosure, by constructing each first hash value to be matched and a shared key into a first array element, the encrypted first element integrated with the shared key in the encrypted first sample set to be matched can help the data demander and the data provider to identify each other's data sharing interaction needs, avoid third parties from participating in the data sharing interaction process between the data demander and the data provider to obtain corresponding data information, so as to further improve data security.
[0126] According to an embodiment of the present disclosure, a data demander and a data provider jointly negotiate to determine an elliptic curve cryptographic protocol, and the elliptic curve cryptographic protocol includes a random elliptic point generation function;
[0127] In the above operation, encrypting each first array element in the first array set by using the first private key may include the following operations:
[0128] Calling a random ellipse point generation function to process a first array element to generate a first random ellipse point calculation result; calculating a power operation result with the first random ellipse point calculation result as a base and a first private key as an exponent to obtain an encrypted first element corresponding to the first array element; and constructing an encrypted first set of samples to be matched based on the encrypted first element.
[0129] According to the embodiment of the present disclosure, the data demander and the data provider can jointly negotiate to determine the elliptic curve And the random ellipse point generating function H p (), so we can use the random ellipse point generation function H p () Process the first array element c i , the calculation result of the first random ellipse point can be expressed as H p (c i , K), and then get the encrypted first element Among them sk A May represent the first private key.
[0130] The two parties determine the elliptic curve through negotiation and a random elliptic point generator, and determine an elliptic curve generator
[0131] According to an embodiment of the present disclosure, the elliptic curve cryptographic protocol further includes an elliptic curve and an elliptic curve generator.
[0132] Figure 3 The flowchart of a data sharing method applied to a data demander according to another embodiment of the present disclosure is schematically shown.
[0133] like Figure 3 As shown, the data sharing method in this embodiment may further include operations S310 to S340.
[0134] In operation S310, a first private key is generated according to an elliptic curve.
[0135] In operation S320, a first public key matching the first private key is generated according to the elliptic curve generator and the first private key.
[0136] In operation S330, based on a key negotiation mechanism determined with the data provider, a shared key is generated using the second public key and the first private key from the data provider.
[0137] In operation S340, the first public key is sent to the data provider so that the data provider generates a shared key using the first public key and the second private key based on a key agreement mechanism, wherein the second private key is generated according to an elliptic curve.
[0138] According to the embodiment of the present disclosure, the two parties determine the elliptic curve through negotiation. and a random elliptic point generator, and determine an elliptic curve generator in, Can represent elliptic curve groups.
[0139] According to the embodiment of the present disclosure, the data demander and the data provider can each generate their own matching private key Among them sk A It is the first private key of the data demander, sk B is the second private key of the data provider. Both parties can calculate their own public keys, that is, the first public key is expressed as The second private key can be expressed as
[0140] According to the embodiment of the present disclosure, both parties can calculate the shared key K of this data sharing task according to the key negotiation mechanism. For example, the shared key can be calculated using the key negotiation algorithm based on Diffie-Hellman. That is, the data demander calculates the shared key The data provider calculates the shared key
[0141] According to an embodiment of the present disclosure, the data sharing method may further include the following operations:
[0142] Receive an encrypted second set of samples to be matched sent by a data provider; wherein the encrypted second set of samples to be matched is obtained by encrypting a second hash set to be matched based on a second private key of the data provider, and the second hash set to be matched is obtained by processing the second element in the second set of samples to be matched by a hash function, and each group of second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched.
[0143] According to an embodiment of the present disclosure, the encrypted second set of samples to be matched can be obtained by the data provider technology using the same or similar method as mentioned above, by processing the second set of hashes to be matched using a second private key and a shared key. The second element in the second set of samples to be matched can contain sample features of a type corresponding to the screening conditions in the first element.
[0144] According to an embodiment of the present disclosure, the data sharing method may further include the following operations:
[0145] According to the data intersection, target samples that meet the sample-level equality strategy screening conditions and are stored in the data provider are screened out from the first set of samples to be matched.
[0146] According to an embodiment of the present disclosure, a data intersection may include an intersection of a re-encrypted first set of samples to be matched and the re-encrypted second set of samples to be matched. The data elements in the data intersection may have data element identifiers corresponding to the first elements in the first set of samples to be matched. Therefore, through the data element identifiers of each data element in the data intersection, the first sample to be matched that meets the sample-level equality policy screening condition, that is, the target sample, can be determined, thereby enabling privacy data sharing between data demanders and data providers.
[0147] Figure 4 The flowchart of the data sharing method applied to the data provider according to the embodiment of the present disclosure is schematically shown.
[0148] like Figure 4 As shown, the data sharing method of this embodiment can be applied to a data provider, and the data sharing method includes operations S410 to S450.
[0149] In operation S410, the original second sample set provided by the data provider is screened using the sample-level equality strategy screening condition to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched.
[0150] In operation S420, a hash function is called to calculate a hash value of each group of second elements to obtain a second hash set to be matched.
[0151] In operation S430, the encrypted second set of samples to be matched is sent to the data demander, so that the data demander encrypts the encrypted second set of samples to be matched based on the first private key to obtain a second set of samples to be matched, which is encrypted by encrypting the second hash set to be matched with the second private key.
[0152] In operation S440, the encrypted first set of samples to be matched from the data demander is encrypted based on the second private key to obtain a re-encrypted first set of samples to be matched.
[0153] In operation S450, the re-encrypted first to-be-matched sample set is sent to the data demander.
[0154] According to the embodiments of the present disclosure, since the second sample to be matched in the original second sample set and the sample features corresponding to the second sample to be matched are embedded into the second element by using the sample-level equality strategy screening condition, and the first sample set to be matched is multi-processed by using the hash function and the second private key, the sample features of the same type as the screening condition can be effectively screened out, and the sample features and the second sample to be matched are privacy processed to avoid leakage of important data of the data provider, and then the encrypted first sample set to be matched of the data demander is encrypted based on the second private key, and the obtained re-encrypted first sample set to be matched is sent to the data demander, which can effectively protect the data of the data sharing party from being leaked, and allow the data demand method to perform privacy intersection based on the re-encrypted first sample set to be matched and the re-encrypted second sample set to be matched, thereby realizing sample data sharing based on the sample-level equality strategy screening condition of the data demander, while improving the accuracy of sample matching, ensuring that the sample and the screening condition are not leaked, thereby improving the information security of the data sharing interaction process.
[0155] According to an embodiment of the present disclosure, the data sharing method may further include the following operations:
[0156] Receive an encrypted first set of samples to be matched sent by a data demander; wherein the encrypted first set of samples to be matched is obtained by encrypting the first hash set to be matched via a first private key, and the first hash set to be matched is obtained by processing each first element in the first set of samples to be matched by a hash function, and each group of first elements includes the first sample to be matched and a screening condition corresponding to the first sample to be matched.
[0157] According to an embodiment of the present disclosure, the data sharing method may further include the following operations:
[0158] Using each second to-be-matched hash value in the second to-be-matched hash set and the shared key to construct a second array element to obtain a second array set; and using the second private key to encrypt each second array element in the second array set to obtain an encrypted second to-be-matched sample set.
[0159] According to an embodiment of the present disclosure, a data demander and a data provider jointly negotiate to determine an elliptic curve encryption protocol, and the elliptic curve encryption protocol includes a random elliptic point generation function.
[0160] Among them, in the above operation, encrypting each second array element in the second array set by using the second private key may include the following operations:
[0161] Calling a random ellipse point generation function to process the second array element and generate a second random ellipse point calculation result; calculating a power operation result with the second random ellipse point calculation result as the base and the second private key as the exponent to obtain an encrypted second element corresponding to the second array element; and constructing an encrypted second set of samples to be matched based on the encrypted second element.
[0162] According to an embodiment of the present disclosure, the elliptic curve cryptographic protocol further includes an elliptic curve and an elliptic curve generator.
[0163] Figure 5 The flowchart schematically shows a data sharing method applied to a data provider according to another embodiment of the present disclosure.
[0164] like Figure 5 As shown, the data sharing method in this embodiment may further include operations S510 to S540.
[0165] In operation S510, a second private key is generated according to an elliptic curve.
[0166] In operation S520, a second public key matching the second private key is generated according to the elliptic curve generator and the second private key.
[0167] In operation S530 , based on a key negotiation mechanism determined with the data demander, a shared key is generated using a first public key and a second private key from the data demander.
[0168] In operation S540, the second public key is sent to the data demander so that the data demander generates a shared key using the second public key and the first private key based on a key agreement mechanism, wherein the first private key is generated according to an elliptic curve.
[0169] It should be noted that in the data sharing method applied to the data provider in the embodiment of the present disclosure, the technical features of the same technical terms may be the same as the technical features of the same technical terms in the above-mentioned data sharing method applied to the data demander, and the embodiments of the present disclosure will not be repeated.
[0170] It should be noted that in the disclosed embodiments, data information such as the first sample to be matched, the second sample to be matched, and sample features are obtained after obtaining authorization from relevant individuals, institutions and other users. The use of the data information complies with the provisions of relevant laws and regulations and the authorization provisions of relevant users, and does not violate relevant laws and regulations and public order and good customs.
[0171] The above method is described below in conjunction with a specific embodiment. However, it should be noted that the specific embodiment is only for better illustrating the present specification and does not constitute an improper limitation on the present specification.
[0172] Data preparation process: The data demander prepares its own original first sample set: A = {ID1, ID2, ..., ID m}, and the screening conditions {a1,…,a m}. Among them, ID i represents the first sample to be matched, a i Indicates the screening condition corresponding to the first sample to be matched.
[0173] The data provider prepares its own original second sample set And the sample feature set {x1, ..., x m}.in, represents the second sample to be matched, x k Indicates the sample feature corresponding to the second sample to be matched.
[0174] Data preprocessing process: Use the sample-level equal strategy screening conditions to screen the original first sample set and the original second sample set respectively, and you can get the first set of samples to be matched The second set of samples to be matched
[0175] The sample-level equality strategy filter condition can be expressed as:
[0176] That satisfies ID k ∈A∩B and x k =a k ,in That is, the sample intersection symbol under the sample-level equality strategy screening condition.
[0177] According to an embodiment of the present disclosure, the first sample to be matched and the second sample to be matched may include a user identification of a user, that is, an identification code that can be bound one-to-one with an identified object (i.e., a user), such as an identification code, etc. The sample feature may be attribute information of the user, such as a credit rating, etc.
[0178] It should be noted that the use and sharing of samples to be matched and sample features in real time in this disclosure are authorized by users and comply with relevant legal provisions.
[0179] The data demander then uses the hash function H() to calculate the first set of samples to be matched The hash value of each first element in each group, that is, each first to-be-matched hash value c in the first to-be-matched hash set can be obtained by formula (1). i .
[0180] c i =H(ID i , a i ), i=1, 2,...,m; (1)
[0181] Therefore, according to formula (1), the first to-be-matched hash set S1 = {c1, c2, ..., c m}.
[0182] The data provider uses a hash function to process the second set of samples to be matched in a similar manner. The same hash function is used to calculate the second to-be-matched hash set S2. The second to-be-matched hash value in the second to-be-matched hash set S2 It can be calculated by formula (2).
[0183]
[0184] Therefore, the second hash set to be matched can be obtained according to formula (2):
[0185] It should be noted that in the related technology, the data demander and the data provider can calculate the intersection information of sets S1 and S2, and the data demander obtains the intersection result. (Assume that there are l elements in the intersection). Then the data demander compares the intersection result C with the first to-be-matched hash set S1 = {c1, c2, ..., c m}, that is, the intersection samples under the privacy intersection conditions of the current level of equal strategy screening can be output.
[0186] However, if we do not use the privacy set intersection algorithm to calculate the intersection of S1 and S2, but directly use the hash database collision method (that is, the data provider directly sends S2 to the data demander, and then the data demander completes the intersection calculation locally), although the original data information of the data provider will not be leaked during the transmission process (because All are hash values, which will not cause plaintext inversion attacks), but the risk is: if the data demander keeps it for a long time The information that is not hit in this intersection, but in the subsequent business, more second hash sets S2 to be matched and corresponding feature information are collected, and according to The hash value in is matched in real time.
[0187] For example, the data demander collects a new ID and the corresponding feature x later, and directly calculates c locally i =H(ID i , a i ), and with By comparing the elements in , we can know the additional information of the data demander beyond the current data sharing interaction, thereby achieving the amount of information acquisition that exceeds that of a single privacy request. For the data provider, it causes information leakage, thus failing to meet the requirement of "forward security" in cryptography.
[0188] According to the requirements of forward security, a privacy set intersection cryptographic protocol that meets forward security must be used to protect the data security of both parties. Accordingly, both parties can choose a privacy intersection protocol based on encryption technology routes including but not limited to RSA encryption algorithm, elliptic curve encryption algorithm, and extended oblivious transfer encryption algorithm.
[0189] The embodiments of the present disclosure do not limit the selection of a specific privacy intersection algorithm protocol, as long as the algorithm protocol satisfies data security under a semi-honest attack model and satisfies forward security.
[0190] In one embodiment of the present disclosure, a subsequent privacy intersection process is completed based on a privacy set intersection algorithm of an elliptic curve to help those skilled in the art better understand the present solution.
[0191] Privacy request process:
[0192] Initialization phase: The data demander and the data provider determine the elliptic curve through negotiation and the random ellipse point generating function H p (), and determine an elliptic curve generator Among them, the doubling operation of the elliptic curve is expressed in the form of power operation.
[0193] Both parties (data demander and data provider) generate their own private key, namely the first private key sk A and the second private key sk A ,
[0194] Both parties calculate the public key that matches the private key, that is, calculate the first public key Second public key
[0195] In one embodiment of the present disclosure, both parties calculate the shared key K of this data sharing task according to the key negotiation mechanism.
[0196] For example, a shared key can be calculated using a key agreement algorithm based on Diffie-Hellman Among them, data demand side calculation Data provider calculation
[0197] The first round of communication: For S1 = {c1, c2, ..., c m}, the data demander can encrypt the first to-be-matched sample set S′1 according to formula (3).
[0198]
[0199] The data provider targets the second hash set to be matched The encrypted second to-be-matched sample set S′2 can be calculated by formula (4).
[0200]
[0201] Then, the data demander sends the encrypted first to-be-matched sample set S′1 to the data provider, and the data provider sends the encrypted second to-be-matched sample set S′2 to the data demander.
[0202] Second round of communication phase: After receiving the encrypted first set of samples to be matched S′1, the data provider can re-encrypt the first set of samples to be matched S″1 according to formula (5).
[0203]
[0204] The data provider will then re-encrypt the first to-be-matched sample set S″1 and send it to the data demander.
[0205] At the same time, the data demander receives the encrypted second set of samples to be matched S′2 and can re-encrypt the second set of samples to be matched S″2 according to formula (6) without sending it again.
[0206]
[0207] Privacy intersection result acquisition stage: After the data demander receives the re-encrypted first to-be-matched sample set S″1, it can perform privacy intersection on the re-encrypted second to-be-matched sample set S″2 and the re-encrypted first to-be-matched sample set S″1 through the privacy intersection algorithm to obtain the data intersection Then according to The data elements and S1 = {c1, c2, ..., c m}, determine the intersection Then the target sample can be obtained.
[0208] It should be noted that, for the case of multiple screening conditions, that is, the case where each second sample to be matched corresponds to multiple sample features, the first set of samples to be matched and the second set of samples to be matched can be determined based on the following method.
[0209]
[0210]
[0211] The sample-level equality strategy filter condition can be expressed as:
[0212] satisfy And x k =a k ,y k =b k .
[0213] In view of the above situation, the data sharing process in the above embodiment may be referred to to obtain the data intersection, and then complete the data sharing task.
[0214] Based on the above data sharing method, the present disclosure also provides a data sharing device. Figure 6 and Figure 7 The device is described in detail.
[0215] Figure 6 The structure block diagram of a data sharing device according to an embodiment of the present disclosure is schematically shown.
[0216] like Figure 6 As shown, the data sharing device 600 of this embodiment is applied to a data demander, and the data sharing device 600 includes a first screening module 610 , a first hash processing module 620 , a first sending module 630 , a first encryption module 640 and a privacy intersection module 650 .
[0217] The first screening module 610 is used to screen the original first sample set provided by the data demander using the sample-level equality strategy screening conditions to obtain a first set of samples to be matched, wherein the first set of samples to be matched includes at least one group of first elements, and each group of first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched.
[0218] The first hash processing module 620 is used to call a hash function to calculate the hash value of each group of first elements to obtain a first hash set to be matched.
[0219] The first sending module 630 is used to send the encrypted first set of samples to be matched to the data provider, so that the data provider encrypts the encrypted first set of samples to be matched based on the second private key to obtain a re-encrypted first set of samples to be matched, which is obtained by encrypting the first hash set to be matched via the first private key.
[0220] The first encryption module 640 is used to encrypt the encrypted second set of samples to be matched sent by the data provider using the first private key to obtain a re-encrypted second set of samples to be matched.
[0221] The privacy intersection module 650 is used to use a privacy intersection algorithm to intersect the re-encrypted first set of samples to be matched and the re-encrypted second set of samples to be matched to obtain a data intersection.
[0222] According to an embodiment of the present disclosure, the data sharing device further includes: a first receiving module.
[0223] The first receiving module is used to receive the encrypted second to-be-matched sample set sent by the data provider.
[0224] Among them, the encrypted second set of samples to be matched is obtained by encrypting the second hash set to be matched based on the second private key of the data provider, and the second hash set to be matched is obtained by processing the second element in the second set of samples to be matched by the hash function, and each group of second elements includes the second sample to be matched and the sample feature corresponding to the second sample to be matched.
[0225] According to an embodiment of the present disclosure, the data sharing device further includes: a first construction module and an encrypted first to-be-matched sample set generation module.
[0226] The first construction module is used to use each first to-be-matched hash value in the first to-be-matched hash set to construct a first array element with a shared key to obtain a first array set.
[0227] The encrypted first to-be-matched sample set generation module is used to encrypt each first array element in the first array set using a first private key to obtain an encrypted first to-be-matched sample set.
[0228] According to an embodiment of the present disclosure, a data demander and a data provider jointly negotiate to determine an elliptic curve encryption protocol, and the elliptic curve encryption protocol includes a random elliptic point generation function.
[0229] The encrypted first to-be-matched sample set generation module includes a first calculation unit, a second calculation unit and a first construction unit.
[0230] The first calculation unit is used to call a random ellipse point generation function to process the first array element and generate a first random ellipse point calculation result.
[0231] The second calculation unit is used to calculate a power operation result using the first random elliptic point calculation result as a base and the first private key as an exponent to obtain an encrypted first element corresponding to the first array element.
[0232] The first construction unit is used to construct an encrypted first to-be-matched sample set based on the encrypted first element.
[0233] According to an embodiment of the present disclosure, the elliptic curve cryptography protocol further includes an elliptic curve and an elliptic curve generator.
[0234] The data sharing device also includes: a first private key generation module, a first public key generation module, a first shared key generation module and a first public key sending module.
[0235] The first private key generation module is used to generate a first private key according to an elliptic curve.
[0236] The first public key generation module is used to generate a first public key matching the first private key according to the elliptic curve generator and the first private key.
[0237] The first shared key generation module is used to generate a shared key based on a key negotiation mechanism determined with the data provider and using a second public key and a first private key from the data provider.
[0238] The first public key sending module is used to send the first public key to the data provider, so that the data provider generates a shared key based on a key agreement mechanism using the first public key and the second private key, wherein the second private key is generated according to an elliptic curve.
[0239] According to an embodiment of the present disclosure, the data sharing device further includes: a target sample screening module.
[0240] The target sample screening module is used to screen out target samples that meet the sample-level equality strategy screening conditions and are stored in the data provider from the first set of samples to be matched according to the data intersection.
[0241] Figure 7 The structure block diagram of a data sharing device according to an embodiment of the present disclosure is schematically shown.
[0242] like Figure 7 As shown, the data sharing device 700 of this embodiment is applied to a data provider, and the data sharing device 700 includes a second screening module 710 , a second hash processing module 720 , a second sending module 730 , a second encryption module 740 and a third sending module 750 .
[0243] The second screening module 710 is used to screen the original second sample set provided by the data provider using the sample-level equality strategy screening conditions to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched.
[0244] The second hash processing module 720 is used to call a hash function to calculate the hash value of each group of second elements to obtain a second hash set to be matched.
[0245] The second sending module 730 is used to send the encrypted second set of samples to be matched to the data demander, so that the data demander encrypts the encrypted second set of samples to be matched based on the first private key to obtain a second set of samples to be matched again, and the encrypted second set of samples to be matched is obtained by encrypting the second hash set to be matched via the second private key.
[0246] The second encryption module 740 is used to encrypt the encrypted first to-be-matched sample set from the data demander based on the second private key to obtain a re-encrypted first to-be-matched sample set.
[0247] The third sending module 750 is used to send the re-encrypted first to-be-matched sample set to the data demander.
[0248] According to an embodiment of the present disclosure, the data sharing device further includes: a second receiving module.
[0249] The second receiving module is used to receive the encrypted first to-be-matched sample set sent by the data demander.
[0250] Among them, the encrypted first sample set to be matched is obtained by encrypting the first hash set to be matched via the first private key, and the first hash set to be matched is obtained by processing each first element in the first sample set to be matched by a hash function, and each group of first elements includes the first sample to be matched and the screening condition corresponding to the first sample to be matched.
[0251] According to an embodiment of the present disclosure, the data sharing device further includes a second construction module and an encrypted second to-be-matched sample set generation module.
[0252] The second construction module is used to use each second to-be-matched hash value in the second to-be-matched hash set to construct a second array element with the shared key to obtain a second array set.
[0253] The encrypted second to-be-matched sample set generation module is used to encrypt each second array element in the second array set using a second private key to obtain an encrypted second to-be-matched sample set.
[0254] According to an embodiment of the present disclosure, a data demander and a data provider jointly negotiate to determine an elliptic curve encryption protocol, and the elliptic curve encryption protocol includes a random elliptic point generation function.
[0255] The encrypted second to-be-matched sample set generation module includes: a third calculation unit, a fourth calculation unit and a second construction unit.
[0256] The third calculation unit is used to call the random ellipse point generation function to process the second array elements and generate a second random ellipse point calculation result.
[0257] The fourth calculation unit is used to calculate a power operation result using the second random elliptic point calculation result as a base and the second private key as an exponent to obtain an encrypted second element corresponding to the second array element.
[0258] The second construction unit is used to construct an encrypted second to-be-matched sample set based on the encrypted second element.
[0259] According to an embodiment of the present disclosure, the elliptic curve cryptography protocol further includes an elliptic curve and an elliptic curve generator.
[0260] The data sharing device also includes: a second private key generation module, a second public key generation module, a second shared key generation module and a second public key sending module.
[0261] The second private key generation module is used to generate a second private key according to an elliptic curve.
[0262] The second public key generation module is used to generate a second public key matching the second private key according to the elliptic curve generator and the second private key.
[0263] The second shared key generation module is used to generate a shared key based on a key negotiation mechanism determined with the data demander, using a first public key and a second private key from the data demander.
[0264] The second public key sending module is used to send the second public key to the data demander, so that the data demander can generate a shared key based on the key agreement mechanism using the second public key and the first private key, wherein the first private key is generated according to the elliptic curve.
[0265] According to an embodiment of the present disclosure, any multiple modules among the first screening module 610, the first hash processing module 620, the first sending module 630, the first encryption module 640 and the privacy intersection module 650, or the second screening module 710, the second hash processing module 720, the second sending module 730, the second encryption module 740 and the third sending module 750 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, the first screening module 610, the first hash processing module 620, the first sending module 630, the first encryption module 640 and the privacy intersection module 650, or at least one of the second screening module 710, the second hash processing module 720, the second sending module 730, the second encryption module 740 and the third sending module 750 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or can be implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, the first screening module 610, the first hash processing module 620, the first sending module 630, the first encryption module 640 and the privacy intersection module 650, or at least one of the second screening module 710, the second hash processing module 720, the second sending module 730, the second encryption module 740 and the third sending module 750 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.
[0266] Figure 8 A block diagram of an electronic device suitable for implementing a data sharing method according to an embodiment of the present disclosure is schematically shown.
[0267] like Figure 8 As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0268] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0269] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.
[0270] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0271] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.
[0272] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.
[0273] The above functions defined in the system / device of the embodiment of the present disclosure are executed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0274] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0275] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0276] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0277] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0278] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0279] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data sharing method, applied to data demanders, include: Using the sample-level equality strategy screening condition to screen the original first sample set provided by the data demander, a first set of samples to be matched is obtained, wherein the first set of samples to be matched includes at least one group of first elements, each group of the first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched, and the sample-level equality strategy screening condition indicates that the screening condition of each of the first samples to be matched is the same as the sample feature of the data provider; Calling a hash function to calculate the hash value of each group of the first elements to obtain a first hash set to be matched; Sending the encrypted first set of samples to be matched to the data provider, so that the data provider encrypts the encrypted first set of samples to be matched based on the second private key to obtain a re-encrypted first set of samples to be matched, wherein the first private key and the second private key are generated based on the same privacy intersection protocol, and the encrypted first set of samples to be matched is obtained by encrypting the first set of hashes to be matched via the first private key; Using the first private key to encrypt the encrypted second set of samples to be matched sent by the data provider, to obtain a second set of samples to be matched again, wherein the encrypted second set of samples to be matched is obtained by encrypting the second set of hashes to be matched by the data provider using the second private key; Using a privacy intersection algorithm, intersecting the re-encrypted first set of samples to be matched and the re-encrypted second set of samples to be matched, to obtain a data intersection; The second to-be-matched hash set is generated by the data provider based on the following operations: Using the sample-level equal strategy screening condition to screen the original second sample set provided by the data provider, to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of the second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched; A hash function is called to calculate the hash value of each group of the second elements to obtain a second hash set to be matched.
2. The method according to claim 1, further comprising: include: Receiving an encrypted second set of samples to be matched sent by the data provider; Among them, the encrypted second set of samples to be matched is obtained by encrypting the second hash set to be matched based on the second private key of the data provider, and the second hash set to be matched is obtained by processing the second element in the second set of samples to be matched by the hash function, and each group of the second elements includes the second sample to be matched and the sample feature corresponding to the second sample to be matched.
3. The method according to claim 1, further comprising: include: Using each first to-be-matched hash value in the first to-be-matched hash set and the shared key to construct a first array element, to obtain a first array set; as well as Each first array element in the first array set is encrypted using the first private key to obtain the encrypted first to-be-matched sample set.
4. The method according to claim 3, in, The data demander and the data provider jointly negotiate and determine an elliptic curve encryption protocol, wherein the elliptic curve encryption protocol includes a random elliptic point generation function; Wherein, using the first private key to encrypt each first array element in the first array set includes: Calling the random ellipse point generation function to process the first array element to generate a first random ellipse point calculation result; Calculate a power operation result with the first random elliptic point calculation result as a base and the first private key as an exponent to obtain an encrypted first element corresponding to the first array element; and The encrypted first to-be-matched sample set is constructed based on the encrypted first element.
5. The method according to claim 4, in, The elliptic curve encryption protocol also includes an elliptic curve and an elliptic curve generator; The data sharing method further includes: Generate the first private key according to the elliptic curve; Generate a first public key matching the first private key according to the elliptic curve generator and the first private key; generating the shared key using a second public key from the data provider and the first private key based on a key agreement mechanism determined with the data provider; and The first public key is sent to the data provider so that the data provider generates the shared key based on the key agreement mechanism by using the first public key and the second private key, wherein the second private key is generated according to the elliptic curve.
6. The method according to any one of claims 1 to 5, further comprising: include: According to the data intersection, target samples that meet the sample-level equality policy screening conditions and are stored in the data provider are screened out from the first set of samples to be matched.
7. A data sharing method, applied to a data provider, include: Using the sample-level equal strategy screening condition to screen the original second sample set provided by the data provider, to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of the second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched; Calling a hash function to calculate the hash value of each group of the second elements to obtain a second hash set to be matched; Sending the encrypted second set of samples to be matched to the data demander, so that the data demander encrypts the encrypted second set of samples to be matched based on the first private key to obtain a second set of samples to be matched, wherein the first private key and the second private key are generated based on the same privacy intersection protocol, and the encrypted second set of samples to be matched is obtained by encrypting the second set of hashes to be matched via the second private key; Encrypting the encrypted first to-be-matched sample set from the data demander based on the second private key to obtain a re-encrypted first to-be-matched sample set, wherein the encrypted first to-be-matched sample set is obtained by the data demander encrypting the first to-be-matched hash set using the first private key; as well as Sending the re-encrypted first to-be-matched sample set to the data demander; The first to-be-matched hash set is generated by the data demander based on the following operations: Using the sample-level equality strategy screening condition to screen the original first sample set provided by the data demander, a first set of samples to be matched is obtained, wherein the first set of samples to be matched includes at least one group of first elements, each group of the first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched, and the sample-level equality strategy screening condition indicates that the screening condition of each of the first samples to be matched is the same as the sample feature of the data provider; A hash function is called to calculate the hash value of each group of the first elements to obtain a first hash set to be matched.
8. The method according to claim 7, further comprising: include: Receiving an encrypted first set of samples to be matched sent by the data demander; Among them, the encrypted first set of samples to be matched is obtained by encrypting the first hash set to be matched via the first private key, and the first hash set to be matched is obtained by processing each first element in the first set of samples to be matched by the hash function, and each group of the first elements includes the first sample to be matched and the screening condition corresponding to the first sample to be matched.
9. The method according to claim 7, further comprising: include: Using each second to-be-matched hash value in the second to-be-matched hash set and the shared key to construct a second array element, to obtain a second array set; as well as Each second array element in the second array set is encrypted using the second private key to obtain the encrypted second set of samples to be matched.
10. The method according to claim 9, in, The data demander and the data provider jointly negotiate and determine an elliptic curve encryption protocol, wherein the elliptic curve encryption protocol includes a random elliptic point generation function; Wherein, encrypting each second array element in the second array set by using the second private key includes: Calling the random ellipse point generation function to process the second array element to generate a second random ellipse point calculation result; Calculate a power operation result with the second random elliptic point calculation result as a base and the second private key as an exponent to obtain an encrypted second element corresponding to the second array element; and The encrypted second to-be-matched sample set is constructed based on the encrypted second element.
11. The method according to claim 10, in, The elliptic curve encryption protocol also includes an elliptic curve and an elliptic curve generator; The data sharing method further includes: Generate the second private key according to the elliptic curve; Generate a second public key matching the second private key according to the elliptic curve generator and the second private key; Based on a key negotiation mechanism determined with the data demander, generating the shared key using the first public key and the second private key from the data demander; and The second public key is sent to the data demander so that the data demander generates the shared key by using the second public key and the first private key based on the key agreement mechanism, wherein the first private key is generated according to the elliptic curve.
12. A data sharing device, used for data demanders, include: A first screening module, configured to screen the original first sample set provided by the data demander using a sample-level equal strategy screening condition to obtain a first set of samples to be matched, wherein the first set of samples to be matched includes at least one group of first elements, each group of the first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched, and the sample-level equal strategy screening condition indicates that the screening condition of each of the first samples to be matched is the same as the sample feature of the data provider; A first hash processing module, used for calling a hash function to calculate the hash value of each group of the first elements to obtain a first hash set to be matched; A first sending module is used to send the encrypted first set of samples to be matched to a data provider, so that the data provider encrypts the encrypted first set of samples to be matched based on a second private key to obtain a re-encrypted first set of samples to be matched, wherein the first private key and the second private key are generated based on the same privacy intersection protocol, and the encrypted first set of samples to be matched is obtained by encrypting the first set of hashes to be matched via the first private key; A first encryption module, configured to encrypt the encrypted second set of samples to be matched sent by the data provider using the first private key to obtain a second set of samples to be matched again, wherein the encrypted second set of samples to be matched is obtained by encrypting the second set of hashes to be matched by the data provider using the second private key; A privacy intersection module, used to use a privacy intersection algorithm to intersect the re-encrypted first to-be-matched sample set and the re-encrypted second to-be-matched sample set to obtain a data intersection; The second to-be-matched hash set is generated by the data provider based on the following operations: Using the sample-level equal strategy screening condition to screen the original second sample set provided by the data provider, to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of the second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched; A hash function is called to calculate the hash value of each group of the second elements to obtain a second hash set to be matched.
13. A data sharing device, applied to a data provider, include: A second screening module, configured to screen the original second sample set provided by the data provider using the sample-level equal strategy screening condition to obtain a second set of samples to be matched, wherein the second set of samples to be matched includes at least one group of second elements, and each group of the second elements includes a second sample to be matched and a sample feature corresponding to the second sample to be matched; A second hash processing module, used for calling a hash function to calculate the hash value of each group of the second elements to obtain a second hash set to be matched; A second sending module is used to send the encrypted second to-be-matched sample set to the data demander, so that the data demander encrypts the encrypted second to-be-matched sample set based on the first private key to obtain a second encrypted second to-be-matched sample set, wherein the first private key and the second private key are generated based on the same privacy intersection protocol, and the encrypted second to-be-matched sample set is obtained by encrypting the second to-be-matched hash set via the second private key; A second encryption module is used to encrypt the encrypted first to-be-matched sample set from the data demander based on the second private key to obtain a re-encrypted first to-be-matched sample set, where the encrypted first to-be-matched sample set is obtained by the data demander encrypting the first to-be-matched hash set using the first private key; as well as A third sending module, configured to send the re-encrypted first to-be-matched sample set to the data demander; The first to-be-matched hash set is generated by the data demander based on the following operations: Using the sample-level equality strategy screening condition to screen the original first sample set provided by the data demander, a first set of samples to be matched is obtained, wherein the first set of samples to be matched includes at least one group of first elements, each group of the first elements includes a first sample to be matched and a screening condition corresponding to the first sample to be matched, and the sample-level equality strategy screening condition indicates that the screening condition of each of the first samples to be matched is the same as the sample feature of the data provider; A hash function is called to calculate the hash value of each group of the first elements to obtain a first hash set to be matched.
14. An electronic device, include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 11.
15. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 11.
16. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
