WO2020038098A1 - 数据查询方法和装置 - Google Patents

数据查询方法和装置 Download PDF

Info

Publication number
WO2020038098A1
WO2020038098A1 PCT/CN2019/092676 CN2019092676W WO2020038098A1 WO 2020038098 A1 WO2020038098 A1 WO 2020038098A1 CN 2019092676 W CN2019092676 W CN 2019092676W WO 2020038098 A1 WO2020038098 A1 WO 2020038098A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
query
identifier
weight
encryption
Prior art date
Application number
PCT/CN2019/092676
Other languages
English (en)
French (fr)
Inventor
应鹏飞
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2020038098A1 publication Critical patent/WO2020038098A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6263Protecting personal data, e.g. for financial or medical purposes during internet communication, e.g. revealing personal data from cookies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules

Definitions

  • This specification relates to the field of Internet technologies, and in particular, to a data query method and device.
  • this specification provides a data query method and device.
  • the data holder holds a number of data, each of which corresponds to a different data identifier, and the method is applied to a data query party, including:
  • Determining a number of data identifiers used in this query the plurality of data identifiers including a target data identifier and an interference data identifier;
  • a data query method is applied to a data holder.
  • the data holder holds a plurality of data, each of which corresponds to a different data identifier.
  • the method includes:
  • the number of data identifiers including the target data identifier and the interference data identifier, and the encryption weights are the querying weights of the data identifier by the data querying party It is obtained after performing homomorphic encryption, the query weight of the target data identifier is 1, and the query weight of the interference data identifier is 0;
  • a data query method is applied to data query oriented to a data holder.
  • the data holder holds a number of data, and the plurality of data respectively correspond to different data identifiers.
  • the method includes:
  • the data querying party determines a number of data identifiers used in the query, and the plurality of data identifiers include a target data identifier and an interference data identifier;
  • the data querying party performs homomorphic encryption on the query weight of each data identifier to obtain the encryption weight of each data identifier, wherein the query weight of the target data identifier is 1, and the query of the interference data identifier Weight is 0;
  • the data querying party sends the data identifiers and their encryption weights to the data holder;
  • the data holder weights data corresponding to the data identifier according to the encryption weight
  • the data holder returns the weighted result to the data querying party
  • the data querying party performs homomorphic decryption on the weighted result to obtain the query result.
  • a data query device is applied to a data query oriented to a data holder.
  • the data holder holds a number of data, each of which corresponds to a different data identifier.
  • the device is applied to a data query device and includes:
  • a determining unit that determines a plurality of data identifiers used in the query, and the plurality of data identifiers include a target data identifier and an interference data identifier;
  • the encryption unit performs homomorphic encryption on the query weight of each data identifier to obtain the encryption weight of each data identifier, wherein the query weight of the target data identifier is 1, and the query weight of the interference data identifier Is 0
  • a sending unit sending the data identifiers and their encryption weights to the data holder for the data holder to weight the data corresponding to the data identifiers according to the encryption weights;
  • the decryption unit receives a weighted result returned by the data holder, and performs homomorphic decryption on the weighted result to obtain a query result.
  • a data query device is applied to a data holder.
  • the data holder holds a number of data, and the numbers of data correspond to different data identifiers.
  • the device includes:
  • a receiving unit that receives a number of data identifiers and encryption weights sent by the data querying party, where the data identifiers include a target data identifier and an interference data identifier, and the encryption weights are The query weight is obtained after homomorphic encryption, the query weight of the target data identifier is 1, and the query weight of the interference data identifier is 0;
  • a weighting unit that weights data corresponding to the data identifier according to the encryption weight
  • a returning unit returns the weighted result to the data querying party for the data querying party to perform homomorphic decryption on the weighted result to obtain the query result.
  • a data query device includes:
  • Memory for storing machine-executable instructions
  • the processor is caused to:
  • Determining a number of data identifiers used in this query the plurality of data identifiers including a target data identifier and an interference data identifier;
  • this specification when performing data query, this specification can set the query weight of the target data identifier to 1, set the query weight of the interference data identifier to 0, and then use the homomorphic encryption algorithm to implement the target data
  • the identification query can ensure the query privacy of the data query party and the data privacy and security of the data holder.
  • FIG. 1 is a schematic flowchart of a data query method according to an exemplary embodiment of the present specification.
  • Fig. 2 is a block diagram of a data query device according to an exemplary embodiment of the present specification.
  • Fig. 3 is a block diagram of another data query apparatus according to an exemplary embodiment of the present specification.
  • first, second, third, etc. may be used in this specification to describe various information, the information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word “if” as used herein can be interpreted as “at” or "when” or "in response to determination”.
  • P2P peer-to-peer, Internet finance peer-to-peer lending
  • P2P platform provide personal loan services to users.
  • the P2P platform will go to the bank to query the user's loan amount. Then the user's other credit conditions are combined to decide whether to borrow and the borrowing amount.
  • the bank is the data holder
  • the user's loan amount is the data held by the data holder
  • the user ID number is the data identification of the data
  • the P2P platform is the data queryer.
  • Zhang San applied for a loan on the P2P platform.
  • FIG. 1 is a schematic flowchart of a data query method according to an exemplary embodiment of the present specification.
  • the data query method may include the following steps:
  • Step 102 The data querying party determines a number of data identifiers used in the query, and the plurality of data identifiers include a target data identifier and an interference data identifier.
  • the target data identifier is the data identifier that the data queryer really wants to query
  • the interference data identifier is not the data identifier that the data queryer wants to query.
  • the data querying party may select one or more interference data identifiers when performing data query, and mix the target data identifier and the interference data identifier to hide the target data identifier that the data querying party really wants to query.
  • the number of interference data identifiers may be randomly determined by the data querying party, or a fixed number may be set in advance, which is not specifically limited in this specification.
  • Step 104 The data querying party performs homomorphic encryption on the query weight of each data identifier to obtain the encryption weight of each data identifier, where the query weight of the target data identifier is 1, and the interference data identifier The query weight is 0.
  • the data querying party may generate a public-private key pair for homomorphic encryption and decryption, and then use the public key to encrypt the query weight of each data identifier to obtain the encryption weight of the data identifier.
  • the target data identifier that the data querying party really wants to query is ID1
  • the data querying party randomly selects four interference data identifiers, which are ID2 to ID5.
  • Table 1 to generate the encryption shown in Table 1.
  • Step 106 The data querying party sends the data identifiers and their encryption weights to the data holder.
  • the data querying party may first send the data identifiers determined in step 102 to the data holder, and then send the encryption weights of the data identifiers to the data holder.
  • the data querying party may randomly sort the plurality of data identifiers, and then send the corresponding data identifier sequence to the data holder. Still using Table 1 as an example, the data querying party may first send the data identification sequence (ID1, ID2, ID3, ID4, ID5).
  • the data querying party can sort the encryption weights of each data identifier according to the order of the data identifiers, generate a sequence of encryption weights, and then send the encryption weight sequence to the data holder. Still using Table 1 as an example, the data querying party can then send the encryption weight sequence (Enc (1), Enc (0), Enc (0), Enc (0), Enc (0)).
  • the data identifier and its encryption weight are sent in the form of a sequence, the transmission volume is small, and the data holder can obtain the correspondence between the data identifier and its encryption weight according to the order of the sequence elements, which is simple to implement.
  • the data querying party may send the data identifiers and their encryption weights to the data holder together, which is not specifically limited in this specification.
  • Step 108 The data holder weights the data corresponding to the data identifier according to the encryption weight.
  • the data holder may separately find data corresponding to each data identifier, and then weight the data corresponding to the data identifier according to the encryption weight. To get weighted results.
  • the data holder can use the public key of the data querying party to encrypt the data corresponding to the data identifier to obtain the corresponding encrypted data, and multiply the encrypted data by the corresponding encryption weight. Then add up to get the weighted result.
  • the public key of the data querying party may be sent by the data querying party to the data holder separately, or may be sent along with the data identification and its encryption weight, which is not particularly limited in this specification.
  • Step 110 The data holder returns the weighted result to the data querying party.
  • Step 112 The data querying party performs homomorphic decryption on the weighted result to obtain the query result.
  • the data queryer performs homomorphic decryption on the weighted result of the data holder.
  • the weighted result is homomorphically decrypted, and the decryption result can be obtained: 1 ⁇ X1 + 0 ⁇ X2 + 0 ⁇ X3 + 0 ⁇ X4 + 0 ⁇ X5,
  • the decryption result is X1, which is the data corresponding to the target data identifier ID1.
  • the decrypted result is the query result.
  • the data querying party can query the data corresponding to the target data identifier, and at the same time, it cannot know the data corresponding to each interference data identifier, thereby achieving effective protection of the data privacy and security of the data holder.
  • this embodiment when performing data query, this embodiment can set the query weight of the target data identifier to 1, set the query weight of the interference data identifier to 0, and then use the homomorphic encryption algorithm to achieve the target.
  • the query of data identification can ensure the query privacy of the data querying party and the data privacy and security of the data holder.
  • the data querying scheme described in this specification can also realize the query of the sum of data corresponding to multiple target data identifiers.
  • Li Si applies for a loan on a P2P platform, and the P2P platform has to check the total amount of borrowings of Li Si and his lover Wang Wu in the bank.
  • the identification number of Li Si is ID6
  • the identification number of Wang Wu is ID7
  • ID6 and ID7 are both target data identifiers.
  • the P2P platform also selects two interference users, whose ID numbers are ID8 and ID9, respectively.
  • the P2P platform can generate the encryption weight examples shown in Table 3.
  • the P2P platform can then send the data identification and encryption weight shown in Table 3 to the bank.
  • the P2P platform decrypts the above weighted results, and the decryption results can be obtained: 1 ⁇ X6 + 0 ⁇ X8 + 1 ⁇ X7 + 0 ⁇ X9
  • the decryption result is X6 + X7, which is the total amount borrowed by Li Si and Wang Wu.
  • the P2P platform can query the total loan amount of Li Si and Wang Wu, but cannot know the amount of borrowing that interferes with the user. At the same time, the bank does not know that the person inquired by the P2P platform is Li Si and Wang Wu. Safety.
  • this specification also provides an embodiment of a data query device.
  • the data query device 200 of this specification is applied to data query oriented to a data holder.
  • the data holder holds several data, and the several data respectively correspond to different data identifiers.
  • the device is applied to data.
  • the querying party, the device 200 may include:
  • the determining unit 201 determines a plurality of data identifiers used in the query, where the plurality of data identifiers include a target data identifier and an interference data identifier;
  • the encryption unit 202 performs homomorphic encryption on the query weight of each data identifier to obtain the encryption weight of each data identifier, wherein the query weight of the target data identifier is 1, and the query right of the interference data identifier The number is 0;
  • the sending unit 203 sends the data identifiers and their encryption weights to the data holder for the data holder to weight the data corresponding to the data identifiers according to the encryption weights;
  • the decryption unit 204 receives the weighted result returned by the data holder, and performs homomorphic decryption on the weighted result to obtain a query result.
  • the data query device 300 of this specification is applied to a data holder and may include:
  • the receiving unit 301 receives a plurality of data identifiers and encryption weights sent by the data querying party, where the plurality of data identifiers include a target data identifier and an interference data identifier, and the encryption weight is the data identifier of the data querying party.
  • the query weight obtained by homomorphic encryption is obtained, the query weight of the target data identifier is 1, and the query weight of the interference data identifier is 0;
  • the weighting unit 302 weights data corresponding to the data identifier according to the encryption weight
  • the returning unit 303 returns the weighted result to the data querying party, so that the data querying party can homomorphically decrypt the weighted result to obtain the querying result.
  • the weighting unit 302 is
  • the relevant part may refer to the description of the method embodiment.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, may be located One place, or it can be distributed across multiple network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.
  • the system, device, module, or unit described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or a product with a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
  • the present specification also provides a data query device, which includes a processor and a memory for storing machine-executable instructions.
  • the processor and the memory are usually connected to each other through an internal bus.
  • the device may further include an external interface to enable communication with other devices or components.
  • the processor by reading and executing machine-executable instructions corresponding to query logic stored in the memory, the processor is caused to:
  • Determining a number of data identifiers used in this query the plurality of data identifiers including a target data identifier and an interference data identifier;
  • the query result is data corresponding to the target data identifier
  • the query result is a summation result of data corresponding to the multiple target data identifiers.
  • the present specification also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, and the program implements the following steps when executed by a processor:
  • Determining a number of data identifiers used in this query the plurality of data identifiers including a target data identifier and an interference data identifier;
  • the query result is data corresponding to the target data identifier
  • the query result is a summation result of data corresponding to the multiple target data identifiers.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

说明书披露一种数据查询方法和装置。所述方法包括:确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。

Description

数据查询方法和装置 技术领域
本说明书涉及互联网技术领域,尤其涉及一种数据查询方法和装置。
背景技术
在商业合作中,通常会保护数据持有方的数据隐私安全,然而,数据查询方的隐私也是重要的商业信息,需要被保护。如何在充分保护双方数据隐私的前提下,完成数据查询,成为一个亟待解决的问题。
发明内容
有鉴于此,本说明书提供一种数据查询方法和装置。
具体地,本说明书是通过如下技术方案实现的:
一种数据查询方法,应用于面向数据持有方的数据查询,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述方法应用于数据查询方,包括:
确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
一种数据查询方法,应用于数据持有方,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述方法包括:
接收数据查询方发送的若干数据标识及其加密权数,所述若干数据标识中包括目标数据标识和干扰数据标识,所述加密权数是所述数据查询方对所述数据标识的查询权数进行同态加密后得到,所述目标数据标识的查询权数是1,所述干扰数据标识的查询权 数是0;
根据所述加密权数对所述数据标识对应的数据进行加权;
将加权结果返回给所述数据查询方,以供所述数据查询方对所述加权结果进行同态解密,得到查询结果。
一种数据查询方法,应用于面向数据持有方的数据查询,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述方法包括:
数据查询方确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
所述数据查询方分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
所述数据查询方发送所述若干数据标识及其加密权数至所述数据持有方;
所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
所述数据持有方将加权结果返回给所述数据查询方;
所述数据查询方对所述加权结果进行同态解密,得到查询结果。
一种数据查询装置,应用于面向数据持有方的数据查询,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述装置应用于数据查询方,包括:
确定单元,确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
加密单元,分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
发送单元,发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
解密单元,接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
一种数据查询装置,应用于数据持有方,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述装置包括:
接收单元,接收数据查询方发送的若干数据标识及其加密权数,所述若干数据标识中包括目标数据标识和干扰数据标识,所述加密权数是所述数据查询方对所述数据标识的查询权数进行同态加密后得到,所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
加权单元,根据所述加密权数对所述数据标识对应的数据进行加权;
返回单元,将加权结果返回给所述数据查询方,以供所述数据查询方对所述加权结果进行同态解密,得到查询结果。
一种数据查询装置,包括:
处理器;
用于存储机器可执行指令的存储器;
其中,通过读取并执行所述存储器存储的与数据查询逻辑对应的机器可执行指令,所述处理器被促使:
确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
由以上描述可以看出,在进行数据查询时,本说明书可将目标数据标识的查询权数设置为1,将干扰数据标识的查询权数设置为0,然后利用同态加密算法实现对目标数据标识的查询,既可确保数据查询方的查询隐私,又可确保数据持有方的数据隐私安全。
附图说明
图1是本说明书一示例性实施例示出的一种数据查询方法的流程示意图。
图2是本说明书一示例性实施例示出的一种数据查询装置的框图。
图3是本说明书一示例性实施例示出的另一种数据查询装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书的一些方面相一致的装置和方法的例子。
在本说明书使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书。在本说明书和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
在大数据时代,不同的服务提供商可能持有同一查询对象的不同业务数据,在这种情况下,服务提供商在处理用户业务时,可能需要到其他服务提供商处查询该用户的业务数据。然而,由于不同企业之间的竞争关系或者隐私保护的考虑,在查询过程中既要保护数据持有方的数据隐私,又要保护数据查询方的数据隐私。
例如,银行持有各用户的借款数额,P2P(peer-to-peer,互联网金融点对点借贷)平台面向用户提供个人借款业务,用户在P2P平台借款时,P2P平台会去银行查询用户的借款数额,然后综合用户的其他信贷情况决定是否借款以及借款额度。
在这个例子中,银行是数据持有方,用户的借款数额是数据持有方持有的数据,用户身份证号是所述数据的数据标识,P2P平台是数据查询方。假设张三申请在P2P平台借款,在本例中,要确保P2P平台可以从银行查询到张三的借款数额,但是银行并不知晓P2P平台要查询的人是张三,同时又不会泄露其他用户在银行的借款数额。
图1是本说明书一示例性实施例示出的一种数据查询方法的流程示意图。
请参考图1,所述数据查询方法可以包括以下步骤:
步骤102,数据查询方确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识。
在本实施例中,目标数据标识是数据查询方真正想要查询的数据标识,而干扰数据标识不是数据查询方要查询的数据标识。
数据查询方在进行数据查询时,可选取一个或多个干扰数据标识,将目标数据标识和干扰数据标识混合在一起,以隐藏数据查询方真正想要查询的目标数据标识。
其中,干扰数据标识的数量可以由数据查询方随机确定,也可预先设置固定的数量,本说明书对此不作特殊限制。
步骤104,数据查询方分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0。
在本实施例中,数据查询方可生成用于同态加解密的公私钥对,然后用公钥加密各个数据标识的查询权数,得到所述数据标识的加密权数。
在本实施例中,假设数据查询方真正要查询的目标数据标识是ID1,数据查询方随机挑选4个干扰数据标识,分别为ID2至ID5,请参考表1,可生成表1所示的加密权数示例。
数据标识 查询权数 加密权数
ID1 1 Enc(1)
ID2 0 Enc(0)
ID3 0 Enc(0)
ID4 0 Enc(0)
ID5 0 Enc(0)
表1
步骤106,数据查询方发送所述若干数据标识及其加密权数至所述数据持有方。
在一个例子中,数据查询方可先发送前述步骤102确定的若干数据标识至数据持有方,然后再发送所述若干数据标识的加密权数至数据持有方。
例如,数据查询方可随机将所述若干数据标识进行排序,然后发送对应的数据标识序列至数据持有方。仍以表1为例,数据查询方可先发送数据标识序列(ID1,ID2,ID3,ID4,ID5)。
接着,数据查询方可将各个数据标识的加密权数按照数据标识的排序进行排序,生成加密权数序列,然后将该加密权数序列发送至数据持有方。仍以表1为例,数据查询方接着可发送加密权数序列(Enc(1),Enc(0),Enc(0),Enc(0),Enc(0))。
采用序列的形式发送数据标识及其加密权数,传输量较小,并且数据持有方根据序列元素的排列顺序即可获知数据标识及其加密权数之间的对应关系,实现简单。
在另一个例子中,数据查询方可将所述若干数据标识及其加密权数一同发送给数据持有方,本说明书对此不作特殊限制。
步骤108,数据持有方根据所述加密权数对所述数据标识对应的数据进行加权。
在本实施例中,数据持有方在接收到数据标识及其加密权数之后,可分别查找每个数据标识对应的数据,然后根据所述加密权数对所述数据标识对应的数据进行加权,得到加权结果。
例如,依据使用的同态加密算法,数据持有方可采用数据查询方的公钥分别对数据标识对应的数据进行加密处理,得到对应的加密数据,并用加密数据乘以对应的加密权数,然后再求和,得到加权结果。
其中,所述数据查询方的公钥可由数据查询方单独发送给数据持有方,也可随同数据标识及其加密权数一同发送,本说明书对此不作特殊限制。
数据标识 查询权数 加密权数 数据 加密数据
ID1 1 Enc(1) X1 Enc(X1)
ID2 0 Enc(0) X2 Enc(X2)
ID3 0 Enc(0) X3 Enc(X3)
ID4 0 Enc(0) X4 Enc(X4)
ID5 0 Enc(0) X5 Enc(X5)
表2
仍以表1的示例为例,请参考表2,假设数据标识1对应的数据是X1,数据标识2对应的数据是X2,以此类推,数据持有方在本步骤可计算得到加权结果:Enc(1)×Enc(X1)+Enc(0)×Enc(X2)+Enc(0)×Enc(X3)+Enc(0)×Enc(X4)+Enc(0)×Enc(X5)。
步骤110,数据持有方将加权结果返回给所述数据查询方。
步骤112,数据查询方对所述加权结果进行同态解密,得到查询结果。
在本实施例中,数据查询方对数据持有方的加权结果进行同态解密,以表2为例,对加权结果进行同态解密,可得到解密结果:1×X1+0×X2+0×X3+0×X4+0×X5,
即解密结果是X1,是目标数据标识ID1对应的数据。换言之,解密结果就是查询结果。
由此,数据查询方可查询到目标数据标识对应的数据,同时,无法获知各个干扰数据标识对应的数据,实现对数据持有方的数据隐私安全的有效保护。
值得注意的是,对0进行同态加密之后得到的是随机数,因此即便所有干扰数据标识的查询权数都是0,数据持有方也无法区分目标数据标识和干扰数据标识,从而有效保护数据查询方所要查询的数据。
由以上描述可以看出,在进行数据查询时,本实施例可将目标数据标识的查询权数设置为1,将干扰数据标识的查询权数设置为0,然后利用同态加密算法实现对目标数据标识的查询,既可确保数据查询方的查询隐私,又可确保数据持有方的数据隐私安全。
本说明书记载的数据查询方案还可实现对多个目标数据标识对应数据总和的查询。
例如,李四申请在P2P平台借款,P2P平台要在银行查询李四及其爱人王五的借款总数额。
在本例中,假设李四的身份证号是ID6,王五的身份证号是ID7,ID6和ID7都是目标数据标识。P2P平台又选取两个干扰用户,其身份证号分别为ID8和ID9。
  数据标识 查询权数 加密权数
李四 ID6 1 Enc(1)
干扰用户 ID8 0 Enc(0)
王五 ID7 1 Enc(1)
干扰用户 ID9 0 Enc(0)
表3
请参考表3,P2P平台可生成表3所示的加密权数示例。P2P平台进而可将表3所示的数据标识及其加密权数发送给银行。
  数据标识 查询权数 加密权数 数据 加密数据
李四 ID6 1 Enc(1) X6 Enc(X6)
干扰用户 ID8 0 Enc(0) X8 Enc(X8)
王五 ID7 1 Enc(1) X7 Enc(X7)
干扰用户 ID9 0 Enc(0) X9 Enc(X9)
表4
请参考表4,假设李四的借款数额是X6,干扰用户ID8的借款数额是X8,王五的借款数额是X7,干扰用户ID9的借款数额是X9,数据持有方在本步骤可计算得到加权结果:Enc(1)×Enc(X6)+Enc(0)×Enc(X8)+Enc(1)×Enc(X7)+Enc(0)×Enc(X9)。
P2P平台对上述加权结果进行解密,可得到解密结果:1×X6+0×X8+1×X7+0×X9
即解密结果是X6+X7,是李四和王五借款的总数额。
由此,P2P平台可查询到李四和王五的借款总数额,但无法获知干扰用户的借款数额,同时银行并不知晓P2P平台查询的人是李四和王五,实现查询双方的数据隐私安全。
与前述数据查询方法的实施例相对应,本说明书还提供了数据查询装置的实施例。
请参考图2,本说明书数据查询装置200应用于面向数据持有方的数据查询,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述装置应用于数据查询方,所述装置200可包括:
确定单元201,确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
加密单元202,分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
发送单元203,发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
解密单元204,接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
请参考图3,本说明书数据查询装置300应用于数据持有方,可包括:
接收单元301,接收数据查询方发送的若干数据标识及其加密权数,所述若干数据标识中包括目标数据标识和干扰数据标识,所述加密权数是所述数据查询方对所述数据标识的查询权数进行同态加密后得到,所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
加权单元302,根据所述加密权数对所述数据标识对应的数据进行加权;
返回单元303,将加权结果返回给所述数据查询方,以供所述数据查询方对所述加权结果进行同态解密,得到查询结果。
可选的,所述加权单元302:
采用所述数据查询方的公钥分别对所述数据标识对应的数据进行加密,得到加密数据;
根据所述加密权数对所述数据标识对应的加密数据进行加权,得到加权结果。
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
与前述数据查询方法的实施例相对应,本说明书还提供一种数据查询装置,该装置包括:处理器以及用于存储机器可执行指令的存储器。其中,处理器和存储器通常借由内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够 与其他设备或者部件进行通信。
在本实施例中,通过读取并执行所述存储器存储的与查询逻辑对应的机器可执行指令,所述处理器被促使:
确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
可选的,当所述若干数据标识中包括1个目标数据标识时,所述查询结果是所述目标数据标识对应的数据;
当所述若干数据标识中包括多个目标数据标识时,所述查询结果是所述多个目标数据标识对应数据的求和结果。
与前述数据查询方法的实施例相对应,本说明书还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现以下步骤:
确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
可选的,当所述若干数据标识中包括1个目标数据标识时,所述查询结果是所述目标数据标识对应的数据;
当所述若干数据标识中包括多个目标数据标识时,所述查询结果是所述多个目标数据标识对应数据的求和结果。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (10)

  1. 一种数据查询方法,应用于面向数据持有方的数据查询,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述方法应用于数据查询方,包括:
    确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
    分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
    发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
    接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
  2. 根据权利要求1所述的方法,
    当所述若干数据标识中包括1个目标数据标识时,所述查询结果是所述目标数据标识对应的数据;
    当所述若干数据标识中包括多个目标数据标识时,所述查询结果是所述多个目标数据标识对应数据的求和结果。
  3. 一种数据查询方法,应用于数据持有方,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述方法包括:
    接收数据查询方发送的若干数据标识及其加密权数,所述若干数据标识中包括目标数据标识和干扰数据标识,所述加密权数是所述数据查询方对所述数据标识的查询权数进行同态加密后得到,所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
    根据所述加密权数对所述数据标识对应的数据进行加权;
    将加权结果返回给所述数据查询方,以供所述数据查询方对所述加权结果进行同态解密,得到查询结果。
  4. 根据权利要求3所述的方法,所述根据所述加密权数对所述数据标识对应的数据进行加权,包括:
    采用所述数据查询方的公钥分别对所述数据标识对应的数据进行加密,得到加密数据;
    根据所述加密权数对所述数据标识对应的加密数据进行加权,得到加权结果。
  5. 一种数据查询方法,应用于面向数据持有方的数据查询,所述数据持有方持有 若干数据,所述若干数据分别对应不同的数据标识,所述方法包括:
    数据查询方确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
    所述数据查询方分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
    所述数据查询方发送所述若干数据标识及其加密权数至所述数据持有方;
    所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
    所述数据持有方将加权结果返回给所述数据查询方;
    所述数据查询方对所述加权结果进行同态解密,得到查询结果。
  6. 一种数据查询装置,应用于面向数据持有方的数据查询,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述装置应用于数据查询方,包括:
    确定单元,确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
    加密单元,分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
    发送单元,发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
    解密单元,接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
  7. 根据权利要求6所述的装置,
    当所述若干数据标识中包括1个目标数据标识时,所述查询结果是所述目标数据标识对应的数据;
    当所述若干数据标识中包括多个目标数据标识时,所述查询结果是所述多个目标数据标识对应数据的求和结果。
  8. 一种数据查询装置,应用于数据持有方,所述数据持有方持有若干数据,所述若干数据分别对应不同的数据标识,所述装置包括:
    接收单元,接收数据查询方发送的若干数据标识及其加密权数,所述若干数据标识中包括目标数据标识和干扰数据标识,所述加密权数是所述数据查询方对所述数据标识的查询权数进行同态加密后得到,所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
    加权单元,根据所述加密权数对所述数据标识对应的数据进行加权;
    返回单元,将加权结果返回给所述数据查询方,以供所述数据查询方对所述加权结果进行同态解密,得到查询结果。
  9. 根据权利要求8所述的装置,所述加权单元:
    采用所述数据查询方的公钥分别对所述数据标识对应的数据进行加密,得到加密数据;
    根据所述加密权数对所述数据标识对应的加密数据进行加权,得到加权结果。
  10. 一种数据查询装置,包括:
    处理器;
    用于存储机器可执行指令的存储器;
    其中,通过读取并执行所述存储器存储的与数据查询逻辑对应的机器可执行指令,所述处理器被促使:
    确定本次查询所使用的若干数据标识,所述若干数据标识中包括目标数据标识和干扰数据标识;
    分别对每个数据标识的查询权数进行同态加密,得到每个数据标识的加密权数,其中所述目标数据标识的查询权数是1,所述干扰数据标识的查询权数是0;
    发送所述若干数据标识及其加密权数至所述数据持有方,以供所述数据持有方根据所述加密权数对所述数据标识对应的数据进行加权;
    接收所述数据持有方返回的加权结果,并对所述加权结果进行同态解密,得到查询结果。
PCT/CN2019/092676 2018-08-22 2019-06-25 数据查询方法和装置 WO2020038098A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810958246.8A CN110858251B (zh) 2018-08-22 2018-08-22 数据查询方法和装置
CN201810958246.8 2018-08-22

Publications (1)

Publication Number Publication Date
WO2020038098A1 true WO2020038098A1 (zh) 2020-02-27

Family

ID=69592366

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092676 WO2020038098A1 (zh) 2018-08-22 2019-06-25 数据查询方法和装置

Country Status (3)

Country Link
CN (1) CN110858251B (zh)
TW (1) TWI697803B (zh)
WO (1) WO2020038098A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116730A (zh) * 2013-01-21 2013-05-22 厦门市美亚柏科信息股份有限公司 一种dpapi加密数据的解密方法和系统
CN106326721A (zh) * 2015-06-19 2017-01-11 上海高清数字科技产业有限公司 终端加密解密系统及方法
CN108140097A (zh) * 2015-10-09 2018-06-08 微软技术许可有限责任公司 组织数据的被动加密

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7689547B2 (en) * 2006-09-06 2010-03-30 Microsoft Corporation Encrypted data search
CN103442334B (zh) * 2013-08-30 2016-08-24 南京大学 一种适用于位置查询服务的双向隐私保护方法
CN104079659B (zh) * 2014-07-14 2017-06-13 清华大学 一种基于随机代理的位置服务匿名查询系统及其使用方法
CN104394509B (zh) * 2014-11-21 2018-10-30 西安交通大学 一种高效的差分扰动位置隐私保护系统及方法
US9917820B1 (en) * 2015-06-29 2018-03-13 EMC IP Holding Company LLC Secure information sharing
CN105303121B (zh) * 2015-09-30 2018-05-25 西安电子科技大学 一种高维空间数据的安全查询方法、装置及系统
CN105491519B (zh) * 2015-11-24 2019-03-01 西安电子科技大学 基于位置服务中连续实时查询场景下的隐私保护方法
CN105468986B (zh) * 2015-12-02 2018-11-13 深圳大学 一种保密信息检索方法及系统
US10303893B2 (en) * 2015-12-14 2019-05-28 Panasonic Intellectual Property Corporation Of America Search method, search device, search system, and program
CN106357839B (zh) * 2016-09-28 2019-11-19 中国互联网络信息中心 一种dns查询方法及装置
CN106844599B (zh) * 2017-01-13 2019-06-21 华东师范大学 一种基于数据映射的个性化隐私信息检索方法
CN106951411B (zh) * 2017-03-24 2019-10-15 福州大学 一种云计算中保护数据隐私的快速多关键词语义排序搜索方法
CN107292189B (zh) * 2017-05-15 2018-12-25 温州大学瓯江学院 面向文本检索服务的用户隐私保护方法
CN107547525B (zh) * 2017-08-14 2020-07-07 复旦大学 一种大数据查询处理的隐私保护方法
CN107770722B (zh) * 2017-10-13 2020-03-17 中南大学 基于边信息约束的双隐形区域的位置服务的隐私保护方法
CN107659892A (zh) * 2017-11-01 2018-02-02 中原智慧城市设计研究院有限公司 一种基于用户位置隐私保护的室内定位方法
CN108388807B (zh) * 2018-02-28 2020-05-22 华南理工大学 一种支持偏好搜索和逻辑搜索的高效可验证的多关键字排序可搜索加密方法
CN108416037B (zh) * 2018-03-14 2021-07-23 安徽大学 云环境中基于两级索引的中心关键词密文搜索方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116730A (zh) * 2013-01-21 2013-05-22 厦门市美亚柏科信息股份有限公司 一种dpapi加密数据的解密方法和系统
CN106326721A (zh) * 2015-06-19 2017-01-11 上海高清数字科技产业有限公司 终端加密解密系统及方法
CN108140097A (zh) * 2015-10-09 2018-06-08 微软技术许可有限责任公司 组织数据的被动加密

Also Published As

Publication number Publication date
CN110858251B (zh) 2020-07-21
TW202009772A (zh) 2020-03-01
TWI697803B (zh) 2020-07-01
CN110858251A (zh) 2020-03-03

Similar Documents

Publication Publication Date Title
US11295381B2 (en) Data auditing method and device
US11750591B2 (en) Key attestation statement generation providing device anonymity
EP3816918A1 (en) Blockchain-based invoice access method and apparatus, and electronic device
US20170170960A1 (en) Data analytics on encrypted data elements
US20130151540A1 (en) Privacy-preserving collaborative filtering
CN109214201B (zh) 一种数据共享方法、终端设备及计算机可读存储介质
CN109299149B (zh) 数据查询方法、计算设备以及系统
CN109726563B (zh) 一种数据统计的方法、装置以及设备
EP3308496B1 (en) System, apparatus and method for secure coordination of a rendezvous point for distributed devices using entropy multiplexing
US20170279786A1 (en) Systems and methods to protect sensitive information in data exchange and aggregation
WO2022217714A1 (zh) 数据碰撞方法、装置、设备及计算机可读存储介质
WO2021114885A1 (zh) 敏感信息保护方法、装置、计算设备及存储介质
CN108170753B (zh) 一种共有云中Key-Value数据库加密与安全查询的方法
CN113886418B (zh) 一种数据处理方法、装置、电子设备及机器可读存储介质
CN112800479B (zh) 利用可信第三方的多方联合数据处理方法及装置
JP4594078B2 (ja) 個人情報管理システムおよび個人情報管理プログラム
CN113434555A (zh) 一种基于可搜索加密技术的数据查询方法和装置
US11133926B2 (en) Attribute-based key management system
WO2020038098A1 (zh) 数据查询方法和装置
CN116647567A (zh) 隐私保护集合求交方法和装置
US10762228B2 (en) Transaction scheduling method and apparatus
CN111125753A (zh) 一种信用数据的确定方法和装置
CN114793156B (zh) 一种数据处理方法、装置、设备及存储介质
CN113127535B (zh) 基于区块链的数据处理方法、装置和电子设备
TWI706370B (zh) 資料統計方法和裝置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19852568

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19852568

Country of ref document: EP

Kind code of ref document: A1