WO2023040432A1 - 数据查询方法、装置及多方安全数据库 - Google Patents

数据查询方法、装置及多方安全数据库 Download PDF

Info

Publication number
WO2023040432A1
WO2023040432A1 PCT/CN2022/104422 CN2022104422W WO2023040432A1 WO 2023040432 A1 WO2023040432 A1 WO 2023040432A1 CN 2022104422 W CN2022104422 W CN 2022104422W WO 2023040432 A1 WO2023040432 A1 WO 2023040432A1
Authority
WO
WIPO (PCT)
Prior art keywords
query
databases
interface
central node
database
Prior art date
Application number
PCT/CN2022/104422
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 WO2023040432A1 publication Critical patent/WO2023040432A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • 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

Definitions

  • One or more embodiments of this specification relate to the field of computers, and in particular to a data query method, device, and multi-party security database.
  • Multi-party security databases usually include multiple databases and central nodes for providing data query services to users. Data from different institutions are stored in different databases, and the data in different databases are not visible to each other, that is, one database cannot directly access another. data in the database.
  • One or more embodiments of this specification provide a data query method, device and multi-party security database, which can improve the scalability of the multi-party security database.
  • a multi-party security database including a central node and a plurality of databases, the central node has a public first interface, and a plurality of query engines corresponding to the plurality of databases all include an interaction with the first interface the second interface.
  • the central node can determine a plurality of target databases involved in the query request from the plurality of databases according to the query request; and send a query instruction to a plurality of target query engines corresponding to the plurality of target databases through its first interface
  • multiple target query engines can receive the query instructions from the second interface, and execute the query instructions to obtain query results; and send the query results to the first interface of the central node through their second interfaces.
  • the multiple databases belong to multiple groups; databases belonging to the same group have the same privacy algorithm.
  • the databases belonging to the same group are provided by the same service provider.
  • Metadata is stored in the central node, which is used to indicate groups to which the multiple databases respectively belong, and to indicate data information stored in the multiple databases.
  • the central node can receive a registration request from the current database, the registration request at least indicates the group to which the current database belongs, and the registration request is issued by the current database through its first sent by two interfaces; and, the central node updates the metadata according to the registration request.
  • the query request includes a query sentence and a first group identifier of the first group; the central node can determine several groups belonging to the first group according to the first group identifier. databases, and determine multiple target databases from the several databases according to the query statement.
  • the first interface sends the query instruction to the second interface of the target query engine through a remote procedure call; the second interface sends the query result to the first interface of the central node through a remote procedure call.
  • the privacy algorithms of the plurality of target databases include secure multi-party computing (Multi-Party Computation, MPC) methods corresponding to several operation modes allowed by them; the query request involves the several at least one of the modes of operation.
  • MPC Multi-Party Computation
  • a data query method for a multi-party security database includes a central node and multiple databases, the central node has a public first interface, and the multiple databases correspond to multiple
  • the query engines each include a second interface that interacts with the first interface.
  • the method includes: the central node determines from the plurality of databases according to the query request a plurality of target databases involved in the query request; the central node sends a query to a plurality of target query engines corresponding to the plurality of target databases through its first interface instructions; multiple target query engines receive the query instructions through their second interfaces, and execute the query instructions to obtain query results; multiple target query engines send query results to the first interface of the central node through their second interfaces.
  • the multiple databases belong to multiple groups; databases belonging to the same group have the same privacy algorithm.
  • the databases belonging to the same group are provided by the same service provider.
  • Metadata is stored in the central node, which is used to indicate groups to which the multiple databases respectively belong, and to indicate data information stored in the multiple databases.
  • the central node receives a registration request from the current database, the registration request at least indicates the group to which the current database belongs, and the registration request is issued by the current database through sent by its second interface; the central node updates the metadata according to the registration request.
  • the query request includes a query statement and a first group identifier of the first group.
  • the central node determines from the multiple databases the multiple target databases involved in the query request according to the query request, specifically including: the central node determines several databases belonging to the first group according to the first group identifier, And determine a plurality of target databases from the plurality of databases according to the query statement.
  • the first interface sends the query instruction to the second interface of the target query engine through a remote procedure call; the second interface sends the query result to the first interface of the central node through a remote procedure call.
  • the privacy algorithms of the multiple target databases include secure multi-party computing (MPC) methods corresponding to several operation modes allowed by them; the query request involves at least one of the several operation modes .
  • MPC secure multi-party computing
  • a data query method for a multi-party security database includes a central node and multiple databases, the central node has a public first interface, and the multiple databases correspond to multiple
  • the query engines each include a second interface for interacting with the first interface, and the method is applied to the central node.
  • the method includes: determining a plurality of target databases involved in the query request from the plurality of databases according to the query request; sending query instructions to a plurality of target query engines corresponding to the plurality of target databases through the first interface, Making multiple target query engines execute the query instruction to obtain query results; receiving query results sent by multiple target query engines through their second interfaces through the first interface.
  • the query request includes a query statement and a first group identifier of the first group.
  • the determining the plurality of target databases involved in the query request from the plurality of databases according to the query request specifically includes: determining a number of databases belonging to the first group according to the first group identifier, and determining a plurality of databases belonging to the first group according to the The query statement determines a plurality of target databases from the plurality of databases.
  • the method further includes: receiving a registration request from the current database, where the registration request at least indicates the group to which the current database belongs, and the registration request is issued by the current database through its first Sent by two interfaces; update the metadata stored in the central node according to the registration request.
  • a data query device for a multi-party security database includes a central node and multiple databases, the central node has a public first interface, and the multiple databases correspond to multiple
  • the query engines each include a second interface interacting with the first interface, and the device is applied to the central node.
  • the device further includes: a task processing unit configured to determine, from the plurality of databases, a plurality of target databases involved in the query request according to the query request; the first interface is configured to correspond to the plurality of target databases
  • the multiple target query engines send query instructions, so that the multiple target query engines execute the query instructions to obtain query results; and receive the query results sent by the multiple target query engines through their second interfaces.
  • the query request includes a query statement and a first group identifier of the first group; the task processing unit is specifically configured to determine the a plurality of databases in the first group, and determine a plurality of target databases from the plurality of databases according to the query statement.
  • the first interface is further configured to receive a registration request from the current database, where the registration request at least indicates the group to which the current database belongs, and the registration request is issued by the The current database is sent through its second interface; the task processing unit is further configured to update the metadata stored in the central node according to the registration request.
  • a computer-readable storage medium on which a computer program is stored.
  • the computing device executes the method described in any one of the third aspect.
  • a computing device including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the third aspects is implemented .
  • each service provider can follow its own business It is required to provide a database using a certain privacy algorithm.
  • the database can join the multi-party security database to which the central node belongs and Communicate with the central node so that the database receives from the central node the query indication corresponding to the query request related to the database, and use the privacy algorithm adopted by it to jointly execute the query indication with other databases in the multi-party security database to obtain After querying the results, return the query results to the central node.
  • the multi-party security database does not require a single service provider to provide the central node and multiple databases, and does not require all databases in the multi-party security database to use the same privacy algorithm, nor does it need to fully disclose the central node
  • the software code actually used by the nodes and each database is conducive to expanding the existing multi-party security database, that is, the multi-party security database has better scalability.
  • FIG. 1 is an architectural diagram of a multi-party security database exemplarily provided in an embodiment of this specification
  • FIG. 2 is a schematic diagram of a newly added database in the multi-party security database in the embodiment of this specification;
  • FIG. 3 is a schematic diagram of a data query method for a multi-party security database provided in the embodiment of this specification;
  • FIG. 4 is a schematic diagram of a data query device for a multi-party secure database provided in the embodiment of this specification.
  • each database involved in the query request can perform corresponding security multi-party processing on the multiple data. Calculate, obtain the query result and return the query result to the user through the central node.
  • the multi-party security database provides data query services to users through the central node, and multiple databases involved in the query request need to perform secure multi-party calculations to obtain corresponding query results, it can also be said that the multi-party security database is in Logically constitutes a new type of virtual database.
  • Embodiments of the present specification at least provide a multi-party security database and a data query method and device for the multi-party security database.
  • the multi-party security database has better scalability.
  • FIG. 1 is an architectural diagram of a multi-party security database exemplarily provided in an embodiment of this specification.
  • the multi-party security database includes a central node 10 and multiple databases.
  • the central node 10 has a public first interface (ie interface P1 ), which is used to support the central node 10 to interact with multiple databases.
  • Multiple query engines corresponding to multiple databases all include a second interface (ie, interface P2) for interacting with interface P1; for example, the multiple databases include database A1, database A2, database A3, database B1, and database B2, as mentioned
  • the query engines Q1-Q5 corresponding to multiple databases in the example all include the interface P2.
  • each service provider can provide a database using a certain privacy algorithm according to its own business needs. For a single database, its service provider only needs to ensure that the query engine corresponding to the database has been configured with the interface P2 for interacting with the interface P1, and the database can join the multi-party security database to which the central node 10 belongs and communicate with The central node 10 communicates so that the database receives the query indication corresponding to the query request related to the database from the central node 10, and uses the privacy algorithm adopted by it to jointly execute the query indication with other databases in the multi-party security database to After the query result is obtained, the corresponding query result is returned to the central node 10 .
  • Public Protocol Public Protocol
  • the multi-party security database does not require a single service provider to provide the central node and multiple databases, and does not require all databases in the multi-party security database to use the same privacy algorithm, nor does it need to fully disclose the central node
  • the software code actually used by the nodes and each database is conducive to expanding the multi-party security database, that is, the multi-party security database has better scalability.
  • the interface P1 can specifically communicate with the query engine corresponding to the database through a remote procedure call, for example, the interface P1 can send a query instruction to the interface P2 of the target query engine through a remote procedure call.
  • the interface P2 can communicate with the central node 10 through a remote procedure call, for example, the interface P2 can send a query result to the interface P2 of the central node through a remote procedure call.
  • the remote procedure call depends on the session (session) established between the central node 10 and the query engine, and the service provider of the database can deploy the interface for establishing the session in the query engine corresponding to the database based on the public interface P1.
  • the actual business requirement of 10 calls the interface function in the interface P2, and the interface P2 calls back the interface P1 according to the business requirement of the query engine to which it belongs.
  • different databases may have different privacy algorithms, and databases with the same privacy algorithm may be divided into the same group.
  • the database A1, database A2, and database A3 in the aforementioned example have the same privacy algorithm and can be divided into the same group A; the database B1 and database B2 in the aforementioned example have the same privacy algorithm and can be divided into the same group b.
  • the privacy algorithm of a single database may specifically include MPC methods corresponding to several operation modes allowed by the database.
  • the same operation mode may correspond to different MPC methods.
  • the operation modes allowed by the databases in group A and group B both include the IN operation.
  • the query plan that needs to be jointly executed by multiple target databases may include logical operations that belong to the IN operation, and multiple target databases need to use the Private Set Intersection (PSI) technology to complete this logical operation; however, the group
  • PSI Private Set Intersection
  • the databases in group A and group B may use different PSI, for example, the database in group A may use PSI based on naive hash, and the database in group B may use PSI based on DH on finite fields, based on ellipse PSI of DH or other forms of PSI on the curve.
  • all databases in a single group may be provided by the same service provider, so as to ensure that multiple databases in a single group use exactly the same privacy algorithm.
  • the group identifier of a single group may specifically include an identifier of a service provider for providing the database in the group, for example, the name of the service provider.
  • a single service provider may provide multiple databases with different privacy algorithms, for example, the databases in group A and group B may have the same service provider, but the database in group A and the database in group B use Different privacy algorithms; assuming that databases using the same privacy algorithm correspond to the same version number, and databases using different privacy algorithms correspond to different version numbers, the group ID of a single group is not only the ID of the corresponding service provider, but also Version numbers corresponding to databases in the group may be included.
  • the central node 10 may process the query request from the data requester to obtain a query plan, and send a query instruction obtained based on the query plan to multiple target databases involved in the query request through the interface P1. More specifically, the central node 10 may analyze the query request to obtain a query plan corresponding to the query statement in the query request.
  • the query plan may include several logical operations to be executed and the corresponding execution sequence of the several logical operations.
  • the query statement may specifically be implemented using Structured Query Language (SQL), and of course may also be implemented using other language formats supported by the multi-party security database.
  • SQL Structured Query Language
  • the central node 10 stores metadata of multi-party security databases, and the metadata is at least used to indicate the groups to which multiple databases in the multi-party security database belong to and the information stored in the multiple databases.
  • data information is, for example, the table names of several database tables stored in multiple databases, the content information of each database table and the security information of each database table, etc.; wherein the content information of a single database table is, for example, several database tables included in the database table
  • the field name of each field, the security information of a single database table is, for example, the operation mode allowed by several fields included in the database table.
  • the central node 10 when the central node 10 receives a query request from a data requester, it can determine multiple target databases involved in the query request from multiple groups according to its stored metadata.
  • the query request may include the group ID of the group involved, and the central node 10 may use the group ID to determine several databases belonging to the group involved in the query request, for example, according to the stored metadata Data and the group identifier determine several databases belonging to the group involved in the query request; then determine multiple target databases from several databases according to the query statement, for example, determine multiple target databases from several databases according to their stored metadata and query statements target database.
  • database A1 stores data tables named ant1 and ant2
  • database A2 stores data tables named isv1 and isv2
  • database A3 stores data tables named special_item_list1
  • database B1 A data table named L1 is stored in database B2, and a data table named L2 is stored in database B2;
  • the metadata stored in the central node 10 can be, for example, the mapping relationship shown in Table 1 below.
  • the central node 10 can perform grammatical analysis on the query statement to obtain the table names ant1, isv1 and special_item_list from the query statement, and then based on the mapping relationship of the aforementioned Table 1 example and the group in the query request.
  • the identifier "A" determines database A1, database A2 and database A3 belonging to group A, and then determines database A1, database A2 and database A3 as the target databases involved in the query request based on the aforementioned table names obtained therefrom.
  • Table names of the various data tables in the aforementioned Table 1 example are different from each other, but because the data of different organizations are stored in different databases, there may be tables with the same table name but not the same data in different databases.
  • the content data table for example, database B1 may also contain a data table named ant1, but this data table may have completely different data content from the data table stored in database A1 and named ant1.
  • the metadata stored in the central node 10 can also define that the table name of the data table corresponds to the mapping table name in the query statement, that is, the aforementioned data information can also include that the table name of the data table corresponds to the name of the mapping table in the query statement.
  • the name of the mapping table in the query statement in this way, there is no need to include the group identifier of the group involved in the query request, but the central node 10 directly selects the group ID from multiple groups according to the query statement and its stored metadata Multiple target databases in the group involved in the query request are determined.
  • mapping table names can be defined as L3, L4, and L5.
  • the query statement contains the mapping table names L3, L4, and L5 but does not include the table names ant1, isv1, and special_item_list;
  • the central node 10 can be based on the mapping relationship between L3 and ant1 defined in the metabase , the mapping relationship between L4 and isv1, the mapping relationship between L5 and special_item_list, the database A1, the database A2 and the database A3 which store the data tables whose table names are ant1, isv1 and special_item_list in turn are determined as the target databases.
  • the central node 10 when there is a new database request to join the multi-party security database, or when there is a new data table or a deleted data table in a certain database in the multi-party security database, the central node 10 can carry out its renew.
  • the central node 10 may receive a registration request from the database C1, which at least indicates the group to which the database C1 belongs, for example, the registration The request includes the group ID of the group to which the database C1 belongs or indicates the privacy algorithm of the database C1; the query engine corresponding to the database C1 has deployed the corresponding interface P2 according to the interface P1 disclosed in the central node 10, and the registration request is sent by the database C1 through the interface P2 in its corresponding query engine.
  • the central node 10 may update its stored metadata according to the registration request from the database C1, for example, adding a mapping relationship between the identifier of the database C1 and the group identifier of the group it belongs to in the metadata.
  • the service provider Before the service provider adds the database provided by it to the multi-party security database, it can also pre-register the corresponding group with the central node 10 .
  • the service provider of the central node 10 is the service provider M1, and the service provider M2 expects to add the aforementioned database C1 using a certain privacy algorithm to the multi-party security database, and the service provider M2 is providing Database C1 has not added other databases using this privacy algorithm to the multi-party security database before; then service provider M2 can use any possible implementation methods, such as negotiating with service provider M1 and having service provider M1
  • the central node 10 configures, or the service provider M2 calls other interfaces disclosed by the central node 10 to realize the registration of the group to which the database C1 belongs to the central node 10, specifically for example, the registration of the group to which the database C1 belongs to the central node 10
  • the central node 10 when the central node 10 receives a registration request from the database C1, it may perform the registration from the database C1 only when it is determined based on the registration request that the group to which the database C1 belongs has been registered in the central node 10. Request to update its stored metadata, so as to complete the addition of database C1 in the multi-party security database.
  • the query instruction may be a single message containing the query plan and sent to multiple target databases; or the query instruction may decompose the query plan based on predetermined rules, so as to obtain the corresponding and different messages, the multiple messages are correspondingly sent to multiple target databases.
  • the query result may be determined by one of the multiple target query engines.
  • the target query engine that obtains the query result can send the query result to the central node 10 through its configured interface P2, so that the central node 10 returns the query result to the data requester that sent the query request.
  • different query results may be obtained respectively by multiple target query engines, and multiple target query engines send query results to the central node 10 respectively through their interface P2, and the query results from multiple target query engines are combined by the central node 10 processing, and return the merged and processed query results to the data requester that sent the query request.
  • the multi-party security database provided in the embodiment of this specification is described in conjunction with FIG. 1, it can be understood that the multi-party security database illustrated in FIG. 1 is only used to assist in describing the multi-party security database in the embodiment of this specification. According to the technical solution provided, the multi-party security database in the actual business scenario can obviously include more or less groups, and a single group can include more or less databases.
  • the embodiments of this specification also provide a data query method for a multi-party security database
  • the multi-party security database includes a central node and multiple databases
  • the central node has a public interface P1
  • multiple The multiple query engines corresponding to each database include an interface P2 for interacting with the interface P1.
  • the method may include part or all of the following steps 301 to 307 , for example, the data query method performed by the central node may be the following steps 301 , 203 and 307 .
  • the central node 10 determines a plurality of target databases involved in the query request from a plurality of databases according to the query request.
  • the multiple target databases are exemplified as database A1 , database A2 and database A3 belonging to group A in FIG. 3 .
  • step 303 the central node 10 sends query instructions to multiple target query engines corresponding to multiple target databases through its interface P1.
  • step 305 the plurality of target query engines receive query instructions through their interfaces P2, and execute the query instructions to obtain query results.
  • step 307 the central node 10 receives query results from multiple target query engines through its interface P1. Among them, the query results are sent by multiple target query engines through their interface P2.
  • the embodiment of this specification also provides a data query device for a multi-party security database.
  • the multi-party security database includes a central node 10 and multiple databases.
  • the central node 10 has the disclosed first An interface 401 , multiple query engines corresponding to multiple databases each include a second interface that interacts with the first interface 401 , and the device is deployed in the central node 10 . As shown in FIG.
  • the device further includes: a task processing unit 403 configured to determine, from the plurality of databases according to the query request, a plurality of target databases involved in the query request; the first interface 401 is configured to provide Multiple target query engines corresponding to multiple target databases send query instructions, so that multiple target query engines receive query instructions through their second interfaces, and execute the query instructions to obtain query results; and, configured to receive multiple target query engines Query results sent through its second interface.
  • a task processing unit 403 configured to determine, from the plurality of databases according to the query request, a plurality of target databases involved in the query request
  • the first interface 401 is configured to provide Multiple target query engines corresponding to multiple target databases send query instructions, so that multiple target query engines receive query instructions through their second interfaces, and execute the query instructions to obtain query results
  • the device further includes: a task processing unit 403 configured to determine, from the plurality of databases according to the query request, a plurality of target databases involved in the query request; the first interface 401 is configured to provide Multiple target query engines corresponding to multiple target
  • the query request includes a query statement and a first group identifier of the first group.
  • the task processing unit 403 is specifically configured to determine several databases belonging to the first group according to the first group identifier, and determine a plurality of target databases from the several databases according to the query statement.
  • the first interface 401 is further configured to receive a registration request from the current database, where the registration request at least indicates the group to which the current database belongs, and the registration request is issued by the The above-mentioned current database is sent through its second interface.
  • the task processing unit 403 is further configured to update the metadata stored in the central node according to the registration request.
  • the functions described in this specification may be implemented by hardware, software, firmware or any combination thereof.
  • the computer programs corresponding to these functions can be stored in a computer-readable medium or transmitted as one or more instructions/codes on a computer-readable medium, so that the computer programs corresponding to these functions can be read by the computer During execution, the method described in any one of the embodiments of this specification is realized by a computer.
  • the embodiments of this specification also provide a computer-readable storage medium on which computer programs/instructions are stored.
  • the computing device executes the The method executed by the central node 10.
  • the embodiments of this specification also provide a computing device, including a memory and a processor, the memory stores computer programs/instructions, and when the processor executes the computer programs/instructions, any one of the embodiments of this specification is realized A method executed by the central node 10 in the middle.

Landscapes

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

Abstract

本说明书实施例中提供了一种多方安全数据库、针对该多方安全数据库的数据查询方法和装置。多方安全数据库包括中心节点和多个数据库,中心节点具有公开的第一接口,多个数据库对应的多个查询引擎均包括用于与第一接口进行交互的第二接口。其中,该中心节点能根据查询请求从多个数据库中确定出该查询请求涉及的多个目标数据库,并通过第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示;多个目标查询引擎能从其第二接口接收查询指示,执行该查询指示以获得查询结果,并通过其第二接口向中心节点的第一接口发送该查询结果。

Description

数据查询方法、装置及多方安全数据库
本申请要求于2021年9月18日提交中国国家知识产权局、申请号为202111126949.2、申请名称为“数据查询方法、装置及多方安全数据库”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本说明书一个或多个实施例涉及计算机领域,尤其涉及一种数据查询方法、装置及多方安全数据库。
背景技术
部分业务场景中存在利用多个机构的数据共同构建数据库的需求,各个机构的数据可能包括或属于隐私数据。其中为了解决基于多个机构的数据构建的数据库的数据安全问题和隐私保护问题,对应的提出了多方安全数据库的概念。多方安全数据库通常包括多个数据库和用于向用户提供数据查询服务的中心节点,不同机构的数据存储于不同的数据库中,而且不同数据库中的数据互不可见,即一个数据库不能直接访问另一个数据库中的数据。
希望有一种新的技术方案,以期使得多方安全数据库具有更好的可扩展性。
发明内容
本说明书一个或多个实施例中提供了一种数据查询方法、装置及多方安全数据库,可提高多方安全数据库的可扩展性。
第一方面,提供了一种多方安全数据库,包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口。其中,中心节点能根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;以及,通过其第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示;多个目标查询引擎能从第二接口接收所述查询指示,并执行所述查询指示以获得查询结果;以及,通过其第二接口向中心节点的第一接口发送查询结果。
在一种可能的实施方式中,所述多个数据库属于多个群组;属于相同群组的数据库具有相同的隐私算法。
在一种可能的实施方式中,属于相同群组的数据库由相同的服务提供方提供。
在一种可能的实施方式中,中心节点中存储有元数据,用于指示所述多个数据库分别所属的群组,以及指示所述多个数据库存储的数据信息。
在一种可能的实施方式中,中心节点能接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;以及,该中心节点根据所述注册请求更新所述元数据。
在一种可能的实施方式中,所述查询请求中包括查询语句和第一群组的第一群组标识;中心节点能根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
在一种可能的实施方式中,第一接口通过远程过程调用向目标查询引擎的第二接口发送所述查询指示;第二接口通过远程过程调用向中心节点的第一接口发送所述查询结果。
在一种可能的实施方式中,所述多个目标数据库具有的隐私算法包括其允许的若干操作方式分别对应的安全多方计算(Multi-Party Computation,MPC)方法;所述查询请求涉及所述若干操作方式中的至少一种。
第二方面,提供了一种针对多方安全数据库的数据查询方法,所述多方安全数据库包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口。该方法包括:中心节点根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;中心节点通过其第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示;多个目标查询引擎通过其第二接口接收所述查询指示,并执行所述查询指示以获得查询结果;多个目标查询引擎通过其第二接口向中心节点的第一接口发送查询结果。
在一种可能的实施方式中,所述多个数据库属于多个群组;属于相同群组的数据库具有相同的隐私算法。
在一种可能的实施方式中,属于相同群组的数据库由相同的服务提供方提供。
在一种可能的实施方式中,中心节点中存储有元数据,用于指示所述多个数据库分别所属的群组,以及指示所述多个数据库中存储的数据信息。
在一种可能的实施方式中,还包括:中心节点接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;中心节点根据所述注册请求更新所述元数据。
在一种可能的实施方式中,所述查询请求中包括查询语句和第一群组的第一群组标识。中心节点根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库, 具体包括:中心节点根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
在一种可能的实施方式中,第一接口通过远程过程调用向目标查询引擎的第二接口发送所述查询指示;第二接口通过远程过程调用向中心节点的第一接口发送所述查询结果。
在一种可能的实施方式中,所述多个目标数据库具有的隐私算法包括其允许的若干操作方式分别对应的安全多方计算MPC方法;所述查询请求涉及所述若干操作方式中的至少一种。
第三方面,提供了一种针对多方安全数据库的数据查询方法,所述多方安全数据库包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口,所述方法应用于中心节点。所述方法包括:根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;通过所述第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示,使多个目标查询引擎执行所述查询指示以获得查询结果;通过所述第一接口接收多个目标查询引擎通过其第二接口发送的查询结果。
在一种可能的实施方式中,所述查询请求中包括查询语句和第一群组的第一群组标识。所述根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库,具体包括:根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
在一种可能的实施方式中,还包括:接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;根据所述注册请求更新所述中心节点中存储的元数据。
第四方面,提供了一种针对多方安全数据库的数据查询装置,所述多方安全数据库包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口,所述装置应用于中心节点。所述装置还包括:任务处理单元,配置为根据查询请求确定从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;所述第一接口,配置为向多个目标数据库对应的多个目标查询引擎发送查询指示,使多个目标查询引擎执行所述查询指示以获得查询结果;以及,接收多个目标查询引擎通过其第二接口发送的查询结果。
在一种可能的实施方式中,所述查询请求中包括查询语句和第一群组的第一群组标识;所述任务处理单元,具体配置为根据所述第一群组标识确定属于所述第一群组的若干数据 库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
在一种可能的实施方式中,所述第一接口,还配置为接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;所述任务处理单元,还配置为根据所述注册请求更新所述中心节点中存储的元数据。
第五方面,提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算设备中执行时,计算设备执行第三方面中任一项所述的方法。
第六方面,提供了一种计算设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器在执行所述计算机程序时,实现第三方面中任一项所述的方法。
通过本说明书一个或多个实施例中提供的方法及装置,通过将中心节点中用于与数据库进行交互的第一接口作为公共协议层并且对外公开,各个服务提供商则可以按照其自身的业务需求提供采用某种隐私算法的数据库。对于单个数据库而言,其服务提供商仅需要确保该数据库所对应的查询引擎中已经配置用于与第一接口进行交互的第二接口,该数据库即可加入该中心节点所属的多方安全数据库并与中心节点进行通信,以便该数据库从中心节点接收到涉及该数据库的查询请求所对应的查询指示,并且在利用其采用的隐私算法与该多方安全数据库中的其它数据库联合执行该查询指示以获得查询结果之后,向中心节点返回查询结果。换而言之,该多方安全数据库并不要求必须由单个服务提供商来提供中心节点和多个数据库,并不要求多方安全数据库中的全部数据库必须采用相同的隐私算法,更不需要完全公开中心节点和各个数据库实际使用的软件代码,有利于扩展既有的多方安全数据库,即该多方安全数据库具有更好的可扩展性。
附图说明
为了更清楚地说明本说明书实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本说明书实施例中示例性提供的多方安全数据库的架构图;
图2为本说明书实施例中在多方安全数据库中新增数据库的示意图;
图3为本说明书实施例中提供的一种针对多方安全数据库的数据查询方法的示意图;
图4为本说明书实施例中提供的一种针对多方安全数据库的数据查询装置的示意图。
具体实施方式
下面结合附图,对本说明书所提供的各个非限制性实施例进行详细描述。
多方安全数据库的中心节点接收到用户发起的数据查询请求,而且该查询请求涉及存储于多个数据库中的多个数据时,该查询请求涉及的各个数据库可以对该多个数据进行相应的安全多方计算,获得查询结果并通过中心节点将该查询结果返回给用户。其中需要特别说明的是,由于多方安全数据库通过中心节点向用户提供数据查询服务,而且需要由查询请求涉及的多个数据库进行安全多方计算来获得相应的查询结果,因此也可以说多方安全数据库在逻辑意义上构成新型的虚拟数据库。
多方安全数据库的可扩展性如果比较好的话,那么其应用的广泛性将会大大提高。
本说明书实施例中至少提供了一种多方安全数据库以及针对该多方安全数据库的数据查询方法和装置,该多方安全数据库具有更好的可扩展性。
图1为本说明书实施例中示例性提供的多方安全数据库的架构图。如图1所示,该多方安全数据库包括中心节点10和多个数据库。中心节点10具有公开的第一接口(即接口P1),其用于支持中心节点10与多个数据库进行交互。多个数据库对应的多个查询引擎均包括用于与接口P1进行交互的第二接口(即接口P2);例如该多个数据库包括数据库A1、数据库A2、数据库A3、数据库B1和数据库B2,前述示例的多个数据库对应的查询引擎Q1-查询引擎Q5均包括接口P2。
通过将中心节点10中用于与数据库进行交互的接口P1作为公共协议(Public Protocol)层并且对外公开,各个服务提供商则可以按照其自身的业务需求提供采用某种隐私算法的数据库。对于单个数据库而言,其服务提供商仅需要确保该数据库所对应的查询引擎中已经配置用于与接口P1进行交互的接口P2,该数据库即可加入该中心节点10所属的多方安全数据库并与中心节点10进行通信,以便该数据库从中心节点10接收到涉及该数据库的查询请求所对应的查询指示,并且在利用其采用的隐私算法与该多方安全数据库中的其它数据库联合执行该查询指示以获得查询结果之后,向中心节点10返回相应查询结果。换而言之,该多方安全数据库并不要求必须由单个服务提供商来提供中心节点和多个数据库,并不要求多方安全数据库中的全部数据库必须采用相同的隐私算法,更不需要完全公开中心节点和各个数据库实际使用的软件代码,有利于在扩展多方安全数据库,即该多方安全数据库具有更好的可扩展性。
在一个较为具体的示例中,接口P1具体可以通过远程过程调用与数据库对应的查询引擎进行通信,例如接口P1可以通过远程过程调用向目标查询引擎的接口P2发送查询指 示。类似的,接口P2可以通过远程过程调用与中心节点10进行通信,例如接口P2可以通过远程过程调用向中心节点的接口P2发送查询结果。更具体地,远程过程调用依赖于中心节点10和查询引擎间建立的会话(session),数据库的服务提供商可以基于公开的接口P1,在数据库对应的查询引擎中部署包含用于建立会话的接口函数message start session、用于激活会话的接口函数message run session dag以及用于结束会话的接口函数message end session等等,形成包含前述示例的各个接口函数在内的接口P2,以便接口P1按照中心节点10的实际业务需求对接口P2中的接口函数进行调用,接口P2按照其所属查询引擎的业务需求对接口P1进行回调。
在一个较为具体的示例中,不同的数据库可能具有不同的隐私算法,具有相同隐私算法的数据库可以被划分到相同的群组中。例如,前述示例的数据库A1、数据库A2、数据库A3具有相同隐私算法,其可以被划分到相同的群组A;前述示例的数据库B1和数据库B2具有相同隐私算法,可以被划分到相同的群组B。其中单个数据库所具有的隐私算法,具体可以包括该数据库允许的若干操作方式分别对应的MPC方法,该若干操作方式可以包括但不限于以下各种操作方式中的一种或多种:连接操作、比较运算、IN操作以及聚合操作;其中连接操作例如为“inner join”或者“cross join”,比较运算例如为“<”、“<=”、“=”、“!=”、“>=”或者“>”,聚合操作例如为“MIN”、“MAX”、“SUM”或者“AVG”等等。
对于属于不同群组的任意两个数据库各自具有的隐私算法中,相同的操作方式可能对应不同的MPC方法。例如,群组A和群组B中的数据库允许的操作方式均包括IN操作,当群组A中的多个目标数据库或者群组B中的多个目标数据库各自执行其接收的查询指示时,实际需要由多个目标数据库联合执行的查询计划中可能包括属于IN操作的逻辑操作,而且多个目标数据库需要采用隐私保护集合求交(Private Set Intersection,PSI)技术来完成该逻辑操作;然而群组A和群组B中的数据库可能采用不同的PSI,具体如群组A中的数据库可能采用基于朴素哈希的PSI,群组B中的数据库可能采用基于有限域上DH的PSI、基于椭圆曲线上DH的PSI或者其它形式的PSI。
单个群组中的全部数据库具体可以由相同的服务提供商来提供,从而确保单个群组中的多个数据库采用完全相同的隐私算法。与之相应的是,为了实现对不同群组进行区别,单个群组的群组标识具体可以包括用于提供该群组中的数据库的服务提供商的标识,例如是该服务提供商的名称。此外单个服务提供商可能提供采用不同隐私算法的多个数据库,例如群组A和群组B中的数据库可能具有相同的服务提供商,但是群组A中的数据库和群组B中的数据库采用互不相同的隐私算法;假定采用相同隐私算法的数据库对应相同的 版本号,采用不同隐私算法的数据库对应不同的版本号,则单个群组的群组标识除了相应服务提供商的标识外,还可以包括该群组中的数据库对应的版本号。
中心节点10具体可以对来自数据请求方的查询请求进行处理以获得查询计划,并通过接口P1将基于该查询计划获得的查询指示发送至该查询请求涉及的多个目标数据库。更具体地,中心节点10可以通过对查询请求进行解析,获得查询请求中的查询语句对应的查询计划,该查询计划可以包括待执行的若干逻辑操作以及该若干逻辑操作对应的执行顺序。其中该查询语句具体可以采用结构化查询语言(Structured Query Language,SQL)实现,当然也可能采用多方安全数据库支持的其它语言格式来实现。
在一种可能的实施方式中,中心节点10中存储有多方安全数据库的元数据,该元数据至少用于指示该多方安全数据库中的多个数据库分别所属的群组以及该多个数据库中存储的数据信息。该数据信息例如多个数据库中分别存储的若干数据库表的表名,各个数据库表的内容信息以及各个数据库表的安全信息等等;其中单个数据库表的内容信息例如为该数据库表所包括的若干字段各自的字段名,单个数据库表的安全信息例如为该数据库表所包括的若干字段分别允许的操作方式。与之相应的,当中心节点10接收到来自数据请求方的查询请求时,可以根据其存储的元数据从多个群组中确定出查询请求涉及的多个目标数据库。
在一个较为具体的示例中,查询请求中可以包括其涉及的群组的群组标识,中心节点10可以该群组标识确定属于该查询请求涉及的群组的若干数据库,例如根据其存储的元数据和该群组标识确定属于该查询请求涉及的群组的若干数据库;然后根据查询语句从若干数据库中确定多个目标数据库,例如根据其存储的元数据和查询语句从若干数据库中确定多个目标数据库。举例来说,假设数据库A1中存储有表名为ant1和ant2的数据表,数据库A2中存储有表名为isv1和isv2的数据表,数据库A3中存储有表名为special_item_list1的数据表,数据库B1中存储有表名为L1的数据表,数据库B2中存储有表名为L2的数据表;那么中心节点10中存储的元数据例如可以为如下表1所示的映射关系。
Figure PCTCN2022104422-appb-000001
Figure PCTCN2022104422-appb-000002
表1
继续假设查询请求中具体包括如下示例的查询语句:
Figure PCTCN2022104422-appb-000003
对于前述示例的查询语句,中心节点10可以对该查询语句进行语法分析,实现从该查询语句中获得表名ant1、isv1和special_item_list,然后基于前述表1示例的映射关系和查询请求中的群组标识“A”确定出属于群组A的数据库A1、数据库A2和数据库A3,进而基于其获得的前述各个表名将数据库A1、数据库A2和数据库A3确定为该查询请求涉及的目标数据库。此外需要特别说明的是,前述表1示例的各个数据表的表名互不相同,但是因不同机构的数据存储在不同的数据库中,不同数据库中可能存在具有相同表名而并不具有相同数据内容的数据表,例如数据库B1中也可能包含表名为ant1的数据表,但是该数据表与数据库A1中存储的并且表名为ant1的数据表可能具有完全不同的数据内容。
在另一个较为具体的示例中,中心节点10存储的元数据中还可以定义数据表的表名对应在查询语句中的映射表名,即前述的数据信息还可以包括数据表的表名对应在查询语句中的映射表名;如此则无需在查询请求中包含其涉及的群组的群组标识,而是由中心节点10根据查询语句和其存储的元数据,从多个群组中直接的确定出查询请求涉及的群组中的多个目标数据库。例如,对于表名ant1、isv1、special_item_list,可以在前述表1的基础上定义其依次对应的映射表名为L3、L4、L5,中心节点10可以对外公开映射表名而并不公开存储于各个数据库中的数据表的表名,则查询语句中包含映射表名L3、L4、L5而并不包含表名ant1、isv1、special_item_list;中心节点10可以基于元数据库中定义的L3与ant1的映射关系、L4与isv1的映射关系、L5与special_item_list的映射关系,将存储有 表名依次为ant1、isv1、special_item_list的数据表的数据库A1、数据库A2和数据库A3确定为目标数据库。
对于中心节点10中存储的元数据,当存在新的数据库请求加入多方安全数据库,或者多方安全数据库中的某个数据库中存在新增数据表或删除数据表时,中心节点10均能够对其进行更新。在一个较为具体的示例中,当存在新的数据库C1请求加入多方安全数据库时,中心节点10可以接收来自数据库C1的注册请求,该注册请求中至少指示了数据库C1所属的群组,例如该注册请求中包括数据库C1所属的群组的群组标识或者指示了数据库C1具有的隐私算法;其中数据库C1对应的查询引擎已根据中心节点10中公开的接口P1部署了对应的接口P2,该注册请求是由数据库C1通过其对应的查询引擎中的接口P2发送的。与之相应的是,中心节点10可以根据来自数据库C1的注册请求更新其存储的元数据,例如在元数据中新增数据库C1的标识与其所属的群组的群组标识间的映射关系。
服务提供商将其提供的数据库加入多方安全数据库之前,还可以预先向中心节点10注册相应的群组。例如,请参考图2,中心节点10的服务提供商为服务提供商M1,服务提供商M2期望在多方安全数据库中新增采用了某种隐私算法的前述数据库C1,而且服务提供商M2在提供数据库C1之前并未向多方安全数据库中新增采用该种隐私算法的其它数据库;那么服务提供商M2可以通过任何可能的实现方式,比如通过与服务提供商M1进行协商并且由服务提供商M1对中心节点10进行配置,或者由服务提供商M2对中心节点10公开的其它接口进行调用,实现向中心节点10注册数据库C1所属的群组,具体例如向中心节点10注册数据库C1所属的群组的群组标识或者数据库C1采用的隐私算法。与之相应的是,中心节点10从数据库C1接收到注册请求时,可以在基于该注册请求确定中心节点10中已经注册了数据库C1所属的群组的情况下,才执行根据来自数据库C1的注册请求更新其存储的元数据,从而完成在多方安全数据库中新增数据库C1。
对于前述的查询指示,其是基于查询请求对应的查询计划得到的,其是用于指示多个目标数据库联合执行该查询计划的指示性消息。更具体地,该查询指示可以是包含查询计划并被发送至多个目标数据库的单条消息;或者该查询指示可以是基于预定的规则对查询计划进行任务分解,从而获得的与多个目标数据库相对应且互不相同的多条消息,该多条消息被对应的发送至多个目标数据库。
对于前述的查询结果,取决于多个目标查询引擎执行查询指示的过程,即取决于多个目标查询引擎联合执行查询计划的过程,查询结果具体可能由多个目标查询引擎中的一个目标查询引擎获得,其中获得查询结果的目标查询引擎可通过其配置的接口P2向中心节 点10发送该查询结果,以便中心节点10将该查询结果返回给发送查询请求的数据请求方。或者,可能由多个目标查询引擎各自获得不同的查询结果,多个目标查询引擎通过其接口P2分别向中心节点10发送查询结果,由中心节点10将来自多个目标查询引擎的查询结果进行合并处理,并将合并处理后的查询结果返回给发送查询请求的数据请求方。
需要特别说明的是,前文中虽然结合图1对本说明书实施例中提供的多方安全数据库进行了示例性描述,然而可以理解的是图1示例的多方安全数据库仅用于辅助描述本说明书实施例中提供的技术方案,实际业务场景中的多方安全数据库显然可以包括更多或更少的群组,单个群组中可以包括更多或更少的数据库。
与前述方法实施例基于相同的构思,本说明书实施例中还提供了一种针对多方安全数据库的数据查询方法,该多方安全数据库包括中心节点和多个数据库,中心节点具有公开的接口P1,多个数据库对应的多个查询引擎均包括与接口P1进行交互的接口P2。如图3所示,该方法可以包括如下步骤301-步骤307中的部分或全部,例如对于由中心节点执行的数据查询方法可以如下各个步骤中的步骤301、步骤203和步骤307。
首先,在步骤301,中心节点10根据查询请求从多个数据库中确定出查询请求涉及的多个目标数据库。其中在图3中将多个目标数据库示例为属于群组A的数据库A1、数据库A2和数据库A3。
接着,在步骤303,中心节点10通过其接口P1向多个目标数据库对应的多个目标查询引擎发送查询指示。
接着,在步骤305,多个目标查询引擎通过其接口P2接收查询指示,并执行查询指示以获得查询结果。
最后,在步骤307,中心节点10通过其接口P1接收来自多过目标查询引擎的查询结果。其中,查询结果是由多个目标查询引擎通过其接口P2发送的。
与前述各个实施例基于相同的构思,本说明书实施例中还提供了一种针对多方安全数据库的数据查询装置,该多方安全数据库包括中心节点10和多个数据库,该中心节点10具有公开的第一接口401,多个数据库对应的多个查询引擎均包括与第一接口401进行交互的第二接口,该装置部署于中心节点10中。如图4所示,该装置还包括:任务处理单元403,配置为根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;该第一接口401,配置为向多个目标数据库对应的多个目标查询引擎发送查询指示,使多个目标查询引擎通过其第二接口接收查询指示,并执行该查询指示以获得查询结果;以及,配置为接收多个目标查询引擎通过其第二接口发送的查询结果。
在一种可能的实施方式中,所述查询请求中包括查询语句和第一群组的第一群组标识。所述任务处理单元403,具体配置为根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
在一种可能的实施方式中,所述第一接口401还配置为接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的。所述任务处理单元403,还配置为根据所述注册请求更新所述中心节点中存储的元数据。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本说明书所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能所对应的计算机程序存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令/代码进行传输,以便这些功能所对应的计算机程序被计算机执行时,通过计算机实现本说明书任意一个实施例中所述的方法。
本说明书实施例中还提供了一种计算机可读存储介质,其上存储有计算机程序/指令,当所述计算机程序/指令在计算设备中执行时,计算设备执行本说明书任意一个实施例中由中心节点10执行的方法。
本说明书实施例中还提供了一种计算设备,包括存储器和处理器,所述存储器中存储有计算机程序/指令,所述处理器执行所述计算机程序/指令时,实现本说明书任意一个实施例中由中心节点10执行的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例中相同、相似的部分互相参见即可,每个实施例中重点说明的都是与其他实施例的不同之处。因此部分实施例可能描述的比较简单,相关之处参见其它实施例的部分说明即可。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (24)

  1. 一种多方安全数据库,包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口;其中,
    中心节点能根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;以及,通过其第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示;
    多个目标查询引擎能从第二接口接收所述查询指示,并执行所述查询指示以获得查询结果;以及,通过其第二接口向中心节点的第一接口发送查询结果。
  2. 根据权利要求1所述的多方安全数据库,其中,所述多个数据库属于多个群组;属于相同群组的数据库具有相同的隐私算法。
  3. 根据权利要求2所述的多方安全数据库,其中,属于相同群组的数据库由相同的服务提供方提供。
  4. 根据权利要求1所述的多方安全数据库,其中,中心节点中存储有元数据,用于指示所述多个数据库分别所属的群组,以及指示所述多个数据库存储的数据信息。
  5. 根据权利要求4所述的多方安全数据库,其中,中心节点能接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;以及,该中心节点根据所述注册请求更新所述元数据。
  6. 根据权利要求1所述的多方安全数据库,其中,所述查询请求中包括查询语句和第一群组的第一群组标识;中心节点能根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
  7. 根据权利要求1-6中任一项所述的多方安全数据库,其中,第一接口通过远程过程调用向目标查询引擎的第二接口发送所述查询指示;第二接口通过远程过程调用向中心节点的第一接口发送所述查询结果。
  8. 根据权利要求1-6中任一项所述的多方安全数据库,其中,所述多个目标数据库具有的隐私算法包括其允许的若干操作方式分别对应的安全多方计算MPC方法;所述查询请求涉及所述若干操作方式中的至少一种。
  9. 一种针对多方安全数据库的数据查询方法,所述多方安全数据库包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口,包括:
    中心节点根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;
    中心节点通过其第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示;
    多个目标查询引擎通过其第二接口接收所述查询指示,并执行所述查询指示以获得查询结果;
    多个目标查询引擎通过其第二接口向中心节点的第一接口发送查询结果。
  10. 根据权利要求9所述的方法,其中,所述多个数据库属于多个群组;属于相同群组的数据库具有相同的隐私算法。
  11. 根据权利要求10所述的方法,其中,属于相同群组的数据库由相同的服务提供方提供。
  12. 根据权利要求9所述的方法,其中,中心节点中存储有元数据,用于指示所述多个数据库分别所属的群组,以及指示所述多个数据库中存储的数据信息。
  13. 根据权利要求12所述的方法,还包括:
    中心节点接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;
    中心节点根据所述注册请求更新所述元数据。
  14. 根据权利要求9所述的方法,其中,所述查询请求中包括查询语句和第一群组的第一群组标识;中心节点根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库,具体包括:中心节点根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
  15. 根据权利要求9-14中任一项所述的方法,其中,第一接口通过远程过程调用向目标查询引擎的第二接口发送所述查询指示;第二接口通过远程过程调用向中心节点的第一接口发送所述查询结果。
  16. 根据权利要求9-14中任一项所述的方法,其中,所述多个目标数据库具有的隐私算法包括其允许的若干操作方式分别对应的安全多方计算MPC方法;所述查询请求涉及所述若干操作方式中的至少一种。
  17. 一种针对多方安全数据库的数据查询方法,所述多方安全数据库包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口,所述方法应用于中心节点,包括:
    根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;
    通过所述第一接口向多个目标数据库对应的多个目标查询引擎发送查询指示,使多个目标查询引擎执行所述查询指示以获得查询结果;
    通过所述第一接口接收多个目标查询引擎通过其第二接口发送的查询结果。
  18. 根据权利要求17所述的方法,其中,所述查询请求中包括查询语句和第一群组的第一群组标识;所述根据查询请求从所述多个数据库中确定出所述查询请求涉及的多个目标数据库,具体包括:根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
  19. 根据权利要求17所述的方法,还包括:
    接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;
    根据所述注册请求更新所述中心节点中存储的元数据。
  20. 一种针对多方安全数据库的数据查询装置,所述多方安全数据库包括中心节点和多个数据库,所述中心节点具有公开的第一接口,所述多个数据库对应的多个查询引擎均包括与第一接口进行交互的第二接口,所述装置应用于中心节点,所述装置还包括:
    任务处理单元,配置为根据查询请求确定从所述多个数据库中确定出所述查询请求涉及的多个目标数据库;
    所述第一接口,配置为向多个目标数据库对应的多个目标查询引擎发送查询指示,使多个目标查询引擎执行所述查询指示以获得查询结果;以及,接收多个目标查询引擎通过其第二接口发送的查询结果。
  21. 根据权利要求20所述的装置,其中,所述查询请求中包括查询语句和第一群组的第一群组标识;所述任务处理单元,具体配置为根据所述第一群组标识确定属于所述第一群组的若干数据库,并根据所述查询语句从所述若干数据库中确定多个目标数据库。
  22. 根据权利要求20所述的装置,其中,
    所述第一接口,还配置为接收来自当前数据库的注册请求,所述注册请求中至少指示了所述当前数据库所属的群组,所述注册请求是由所述当前数据库通过其第二接口发送的;
    所述任务处理单元,还配置为根据所述注册请求更新所述中心节点中存储的元数据。
  23. 一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算设备中执行时,计算设备执行权利要求17-19中任一项所述的方法。
  24. 一种计算设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器在执行所述计算机程序时,实现权利要求17-19中任一项所述的方法。
PCT/CN2022/104422 2021-09-18 2022-07-07 数据查询方法、装置及多方安全数据库 WO2023040432A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111126949.2A CN113868295A (zh) 2021-09-18 2021-09-18 数据查询方法、装置及多方安全数据库
CN202111126949.2 2021-09-18

Publications (1)

Publication Number Publication Date
WO2023040432A1 true WO2023040432A1 (zh) 2023-03-23

Family

ID=78994259

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/104422 WO2023040432A1 (zh) 2021-09-18 2022-07-07 数据查询方法、装置及多方安全数据库

Country Status (2)

Country Link
CN (1) CN113868295A (zh)
WO (1) WO2023040432A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116208666A (zh) * 2023-05-06 2023-06-02 鹏城实验室 一种支持多源数据中心联合安全计算数据处理方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868295A (zh) * 2021-09-18 2021-12-31 支付宝(杭州)信息技术有限公司 数据查询方法、装置及多方安全数据库
CN114090638B (zh) * 2022-01-20 2022-04-22 支付宝(杭州)信息技术有限公司 基于隐私保护的联合数据查询方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3627348A1 (en) * 2018-09-24 2020-03-25 Nokia Technologies Oy Apparatus and method for decentralised personalised search
CN111382174A (zh) * 2018-12-28 2020-07-07 百度在线网络技术(北京)有限公司 多方数据联合查询方法、装置、服务器和存储介质
CN112860738A (zh) * 2021-04-23 2021-05-28 支付宝(杭州)信息技术有限公司 针对多方安全数据库的查询优化方法、装置和系统
CN112860752A (zh) * 2021-04-23 2021-05-28 支付宝(杭州)信息技术有限公司 针对多方安全数据库的数据查询方法、装置及系统
CN113094744A (zh) * 2021-03-29 2021-07-09 华控清交信息科技(北京)有限公司 信息处理方法、服务平台、用于信息处理的装置和多方安全计算系统
CN113868295A (zh) * 2021-09-18 2021-12-31 支付宝(杭州)信息技术有限公司 数据查询方法、装置及多方安全数据库

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1867906B (zh) * 2003-08-11 2010-06-16 蒂蒙系统公司 提供多层可扩展协议接口的通信系统及相关方法
US11100106B1 (en) * 2018-08-16 2021-08-24 Amazon Technologies, Inc. Query engine virtualization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3627348A1 (en) * 2018-09-24 2020-03-25 Nokia Technologies Oy Apparatus and method for decentralised personalised search
CN111382174A (zh) * 2018-12-28 2020-07-07 百度在线网络技术(北京)有限公司 多方数据联合查询方法、装置、服务器和存储介质
CN113094744A (zh) * 2021-03-29 2021-07-09 华控清交信息科技(北京)有限公司 信息处理方法、服务平台、用于信息处理的装置和多方安全计算系统
CN112860738A (zh) * 2021-04-23 2021-05-28 支付宝(杭州)信息技术有限公司 针对多方安全数据库的查询优化方法、装置和系统
CN112860752A (zh) * 2021-04-23 2021-05-28 支付宝(杭州)信息技术有限公司 针对多方安全数据库的数据查询方法、装置及系统
CN113868295A (zh) * 2021-09-18 2021-12-31 支付宝(杭州)信息技术有限公司 数据查询方法、装置及多方安全数据库

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116208666A (zh) * 2023-05-06 2023-06-02 鹏城实验室 一种支持多源数据中心联合安全计算数据处理方法及装置

Also Published As

Publication number Publication date
CN113868295A (zh) 2021-12-31

Similar Documents

Publication Publication Date Title
WO2023040432A1 (zh) 数据查询方法、装置及多方安全数据库
CN113039568B (zh) 多租户区块链网络中的轻量级节点
US11856065B2 (en) Data transmission for service integration between a virtual private cloud and an intranet
WO2017088358A1 (zh) 一种分布式数据库处理的方法和设备
US10311077B2 (en) Database table conversion
US8112537B2 (en) Trickle sync protocol
WO2019072280A2 (en) EXECUTION OF MULTI-PARTY TRANSACTIONS USING INTELLIGENT CONTRACTS
US7606813B1 (en) Model consolidation in a database schema
WO2019028992A1 (zh) 多模块版本依赖关系构建方法、装置、服务器和存储介质
US20240054129A1 (en) Query optimization methods, apparatuses, and systems for secure multi-party database
JPH11232226A (ja) 協同作業支援システム及び記録媒体
US9830333B1 (en) Deterministic data replication with conflict resolution
US8380787B2 (en) Federation of master data management systems
WO2017113962A1 (zh) 访问分布式数据库的方法和分布式数据服务的装置
US10855637B2 (en) Architecture for large data management in communication applications through multiple mailboxes
US20200125453A1 (en) Systems and methods for cross-regional back up of distributed databases on a cloud service
CN110188114A (zh) 一种数据操作的优化方法、装置、系统、设备和存储介质
CN111984663B (zh) Redis数据库更新方法、装置、计算机设备、存储介质
JP2014518417A (ja) インタプリター型ランタイム・アプリケーションを多数のクライアントに適応させる技法
US11100129B1 (en) Providing a consistent view of associations between independently replicated data objects
WO2022222825A1 (zh) 针对多方安全数据库的数据查询的方法、装置及系统
US20240273077A1 (en) Fine-Grained Custom Sharding Of Databases
US20140379634A1 (en) Application-to-repository data mapping in data repositories, and related methods, systems, and computer-readable media
WO2019062156A1 (zh) 存储过程的执行方法、装置及存储介质
CN118043797A (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: 22868809

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: 22868809

Country of ref document: EP

Kind code of ref document: A1