Multi-party data querying method, computing node and tee device

By preprocessing the data on the computing node to generate a small amount of initial data and sending it to the TEE device for querying, the problems of large data transmission volume and low efficiency in multi-party data query are solved, and efficient and secure multi-party data query is achieved.

CN116450689BActive Publication Date: 2026-08-04ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
Filing Date
2023-04-20
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

When querying data from multiple sources, existing technologies involve large data transmission volumes, resulting in low query efficiency and an inability to effectively protect data privacy.

Method used

The target data is preprocessed by the computing nodes, including column pruning, row pruning, and privacy intersection operations, to generate a small amount of initial data. This initial data is then sent to the TEE device for querying, where the TEE device performs the final query operation.

Benefits of technology

It reduces the amount of data transmitted, improves query efficiency, and enables efficient multi-party data query while protecting data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450689B_ABST
    Figure CN116450689B_ABST
Patent Text Reader

Abstract

A multi-party data query method, a computing node and a TEE device, the method is executed by a computing node of a first data party, comprising: obtaining a query request, the query request is used to request to query a plurality of target data respectively stored by a plurality of data parties; preprocessing target data of the first data party according to the query request to obtain first data, the data amount of the first data is less than the data amount of the target data of the first data party; sending the first data to a trusted execution environment (TEE) device, so that the TEE device obtains a query result corresponding to the query request based on the first data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of computer technology, and more specifically, to a multi-party data query method, a computing node, and a TEE device. Background Technology

[0002] In today's big data era, the internet is filled with massive amounts of data from various sources, such as travel records, consumption records, web pages browsed, and sent messages. When performing joint queries on data from multiple data providers, to protect the privacy of each provider's data, each provider can upload its raw data to a Trusted Execution Environment (TEE). The TEE then performs queries based on the data from each provider, obtains the query results, and returns the results to the querying party. Summary of the Invention

[0003] The embodiments in this specification aim to provide a method for multi-party data query, which reduces the amount of data transmission and improves query efficiency.

[0004] This specification provides a multi-party data query method, executed by a computing node of a first data party among multiple data parties, comprising: obtaining a query request, the query request being used to request a query for multiple target data stored by the multiple data parties respectively; preprocessing the target data of the first data party according to the query request to obtain first data, the data volume of the first data being less than the data volume of the target data of the first data party; and sending the first data to a Trusted Execution Environment (TEE) device, so that the TEE device obtains a query result corresponding to the query request based on the first data.

[0005] In one implementation, the target data includes a target data table, and the first data includes a first data table.

[0006] In one implementation, the first data is generated based on at least one of the following included in the query request: connection conditions between the target data table of the first data party and the target data tables of other data parties, column identifiers in the target data table of the first data party, and filtering conditions for the data in the columns of the target data table of the first data party.

[0007] In one embodiment, the method further includes: generating an execution plan for the plurality of target data according to the query request, the execution plan including query operations for the plurality of target data and their execution order; the preprocessing of the target data of the first data party according to the query request includes: determining a plurality of preprocessing operations included in the preprocessing and their execution order according to the execution plan.

[0008] In one implementation, the target data table of the first data party includes a first column and a second column. The preprocessing of the target data of the first data party according to the query request includes: performing row pruning on the data in the target data table of the first data party according to the filtering conditions for the data in the first column included in the query request to obtain a second data table; performing privacy intersection method with other data parties according to the connection conditions based on the second column between the target data table of the first data party and the target data tables of other data parties included in the query request to obtain the intersection of the second column in the second data table and the target column in the target data table of other data parties; and performing row pruning on the second data table according to the intersection.

[0009] In one implementation, the result field of the query request includes the identifier of the first column, the result of row pruning of the second data table includes a third data table, and the preprocessing of the target data of the first data table according to the query request further includes: deleting the column corresponding to the second column in the third data table according to the result field of the query request.

[0010] In one implementation, obtaining the query request includes: generating the query request; sending the first data to the TEE device includes: sending the first data and the query request to the TEE device; the method further includes: receiving query results corresponding to the query request from the TEE device.

[0011] A second aspect of this specification provides a multi-party data query method, executed by a TEE device, comprising: receiving a query request, the query request being used to request a query for target data stored separately by multiple data parties; receiving first data from computing nodes of at least two of the multiple data parties, wherein the first data of any data party is generated based on the query request and the target data of that data party, and the first data of any data party is less than the target data of that data party; and processing the received first data according to the query request to obtain a query result.

[0012] In one embodiment, processing the received first data according to the query request includes: performing statistical processing on the received first data according to the query request to obtain query results.

[0013] A third aspect of this specification provides a data-side computing node, comprising: an acquisition unit for acquiring a query request, the query request being used to request a query for multiple target data stored separately by multiple data sides; a preprocessing unit for preprocessing the target data of the first data side according to the query request to obtain first data, the data volume of the first data being less than the data volume of the target data of the first data side; and a sending unit for sending the first data to a TEE device, so that the TEE device obtains a query result corresponding to the query request based on the first data.

[0014] This specification provides a TEE device in a fourth aspect, comprising: a receiving unit for receiving a query request, the query request being used to request a query for target data stored by multiple data parties respectively; receiving first data from computing nodes of at least two of the multiple data parties, wherein the first data of any data party is generated based on the query request and the target data of that data party, and the first data of any data party is less than the target data of that data party; and a processing unit for processing the received first data according to the query request to obtain a query result.

[0015] A fifth aspect of this specification provides a computing node including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in the first aspect.

[0016] A sixth aspect of this specification provides a TEE device, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described in the second aspect.

[0017] A seventh aspect of this specification provides a computer-readable storage medium storing a computer program that, when executed in a computer or processor, causes the computer or processor to perform the method described in the first or second aspect.

[0018] This specification provides an eighth aspect of a computer program product comprising a computer program that, when run in a computer or processor, causes the computer or processor to perform the method described in the first or second aspect.

[0019] The cloud-based multi-party data query scheme provided in the embodiments of this specification can be a server or server cluster that provides a TEE, and the endpoints can be computing nodes corresponding to each data party. Each computing node can preprocess the data according to the query request to obtain pruned data, and send the pruned data to the TEE for query operations. This can greatly reduce the amount of data uploaded by the computing nodes to the TEE and improve the efficiency of data query. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram illustrating a scenario of the multi-party data query method in the embodiments of this specification;

[0022] Figure 2 This is a flowchart of a multi-party data query method in one of the embodiments of this specification;

[0023] Figure 3 This is an architecture diagram of a data computing node in one of the embodiments of this specification;

[0024] Figure 4 This is an architecture diagram of a TEE device in one of the embodiments of this specification. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0026] A database is a system that organizes, stores, and manages data according to a specific data structure. In database technology, a queryer can retrieve data from a database by sending a query request. This database may be, for example, a Structured Query Language (SQL) database, and the query request may be in the form of an SQL query statement. It is understood that the solutions described in the embodiments of this specification are not limited to SQL databases; for example, they may also be non-relational databases, key-value pair databases, etc. This specification does not limit these; however, it uses an SQL database as an example for description in the embodiments of this specification.

[0027] A basic SQL query has the following form: `SELECT column_name1, column_name2, column_nameN FROM table_t1_name WHERE condition`. This SQL query is used to retrieve data from table t1 that meets the conditions specified in columns 1, 2, and N. These conditions are used to filter data in table t1 and can also be called filtering conditions. Additionally, SQL queries can include join conditions with other tables. Join conditions indicate that a query operation combining multiple tables is performed through a join operation, which involves finding the intersection of data in specified columns of the multiple tables. For example, the SQL query could be:

[0028] Select

[0029] max(t1.col1_3,t2.col2_2),

[0030] from t1 join t2 on t1.id=t2.id,

[0031] where t1.col1_2<50

[0032] The SQL query statement includes: a result field `max(t1.col1_3, t2.col2_2)`; a join condition `t1.id = t2.id`; and a filter condition `t1.col1_2 < 50`. Specifically, this SQL query statement instructs the following query operations: retrieve rows from table `t1` where the value in column `col1_2` is less than 50; retrieve the intersection of the `id` values ​​in the rows retrieved from table `t1` and the `id` values ​​in table `t2`; and retrieve the maximum value between the `col1_3` value in table `t1` and the `col2_2` value in table `t2` corresponding to the `id` in the `id` transaction.

[0033] In scenarios involving collaborative data queries, such as data table t1 containing data from data provider A and data table t2 containing data from data provider B, the querying party can be data provider A, data provider B, or other third parties, without limitation. The following description uses data provider A as the querying party. To protect the data privacy of data providers A and B while performing the query operation corresponding to the aforementioned SQL query statement, in one implementation, after generating the SQL query statement, data provider A can send the SQL query statement to data provider B and the TEE (Transaction Execution Environment) used for data query operations. Data provider A can send data table t1 to the TEE, and data provider B can send data table t2 to the TEE according to the SQL query statement. The TEE can then query data tables t1 and t2 according to the aforementioned SQL query statement, obtain the query results, and return the results to data provider A. However, when the data volume of data tables t1 and t2 is large, uploading the data tables from data provider A or B to the TEE in this implementation takes a considerable amount of time, affecting the efficiency of data querying.

[0034] Therefore, this specification provides a cloud-based multi-party data query solution, where the cloud can be a server or server cluster providing a TEE (hereinafter referred to as a TEE device), and the endpoints are computing nodes corresponding to each data party. Each computing node can preprocess and trim the data table to be queried according to the SQL query statement, and send the trimmed data table to the TEE for querying, thereby greatly reducing the amount of data uploaded by the data parties to the TEE and improving the efficiency of data query.

[0035] Figure 1 This is a schematic diagram illustrating a scenario of the multi-party data query method in the embodiments of this specification. For example... Figure 1 As shown, this scenario includes a TEE device 10, a computing node 21 corresponding to data party A, and a computing node 22 corresponding to data party B. It is understandable that, although... Figure 1 Only compute nodes 21 and 22 are shown in this specification. This specification is not limited to these. For example, three or more compute nodes may be included to participate in multi-party data query.

[0036] TEE (Trusted Execution Environment) is a secure extension of CPU hardware, completely isolated from the outside world. TEE acts as a black box; code and data executed within it cannot be viewed even at the operating system level. Operations can only be performed through predefined interfaces within the code. In terms of efficiency, due to the black-box nature of TEE, computations are performed on plaintext data, rather than the complex cryptographic operations of homomorphic encryption, resulting in almost no loss of efficiency. Therefore, using TEE technology can largely meet the computational requirements of query operations with relatively minimal performance loss.

[0037] TEE device 10 can utilize newly added processor instructions in the CPU to allocate a portion of memory as an EPC (Enclave Page Cache) to create enclaves (enclaves or enclaves) as TEEs. The memory region corresponding to the EPC is encrypted by the CPU's internal Memory Encryption Engine (MEE). The contents of this memory region (code and data within the enclave) can only be decrypted within the CPU core, and the encryption / decryption keys are generated and stored in the CPU only when the EPC is started. Therefore, the security boundary of the enclave only includes itself and the CPU. Neither privileged nor non-privileged software can access the enclave. Even operating system administrators and VMMs (Virtual Machine Monitors; or Hypervisors) cannot affect the code and data within the enclave, thus providing extremely high security. With this security guarantee, the CPU can process data within the enclave with extremely high computational efficiency, thus balancing data security and computational efficiency.

[0038] refer to Figure 1 Taking compute node 21 as an example, when an SQL query statement queries data table t1 of data party A, compute node 21 can first perform at least one of the following preprocessing operations on data table t1 through the preprocessing module: column trimming, data filtering, and private set intersection (PSI) with data party B, thereby obtaining data table t1′. The amount of data in data table t1′ is greatly reduced compared to data table t1. Compute node 21 uploads data table t1′ to TEE device 10. After that, the TEE in TEE device 10 can perform the query corresponding to the SQL query statement, which can greatly reduce the amount of data transmission between compute node and TEE device, and at the same time, reduce the operation of TEE device and improve query efficiency.

[0039] Figure 2 This is a flowchart of a multi-party data query method in an embodiment of this specification.

[0040] like Figure 2 As shown, in S201, compute node 21 generates a query request.

[0041] When data party A wishes to perform a multi-party data query with data party B, it can generate a query request. Since data party A and data party B store data using the same data structure (e.g., the same type of database), data party A can generate a query request corresponding to that database. This query request may be, for example, an SQL query statement as shown above. It is understood that the embodiments in this specification are not limited to the query being initiated by one of the multiple data parties. For example, a query party independent of the data parties can initiate the query. In this case, the query party can generate a query request and send it to the computing nodes and TEE devices of each data party.

[0042] In S203, compute node 21 sends the query request to the TEE device and compute node 22.

[0043] Computing node 21 sends a query request to the TEE device and computing node 22, enabling computing node 21 and computing node 22 to preprocess the raw data according to the query request, and enabling the TEE device to perform a query operation according to the query request.

[0044] In S205, each computing node preprocesses the target data according to the query request to obtain processed data. The preprocessing involves deleting data from the target data in the first data node that is irrelevant to the query request.

[0045] Each compute node can preprocess the target data according to the operations on the data of each data party indicated in the query request (such as the SQL query statement mentioned above). Taking compute node 21 as an example, this preprocessing may include at least one of the following three:

[0046] (1) When the query request includes a connection condition between data table t1 and other data tables (e.g., data table t2), the computing node 21 can perform the PSI algorithm with the computing node 22 based on the connection condition to obtain the intersection between the values ​​of the specified column of data table t1 and the values ​​of the specified column of data table t2. Based on the intersection, the rows in data table t1 other than the row corresponding to the intersection are deleted.

[0047] (2) Based on the columns in the data table t1 involved in the query request, the columns in the data table t1 not involved in the query request can be trimmed.

[0048] (3) Filter the column of data table t1 according to the filtering conditions in the query request.

[0049] After performing any of the above preprocessing steps, the amount of data in the resulting data table will be less than the amount of data in the original data table t1, thereby reducing the amount of data transmitted from computing node 21 to the TEE device.

[0050] In the first embodiment, for the above SQL query statement, the computing node 21 can perform the above operations (2) and (3) on the data table t1 according to the SQL query statement, so as to reduce the data to be uploaded to the TEE device.

[0051] Specifically, based on the columns col1_3, id, and col1_2 in the data table t1 involved in the SQL query statement, compute node 21 can delete (prun) other columns in data table t1 except for columns col1_3, id, and col1_2 to reduce the amount of data to be uploaded to the TEE device.

[0052] For the filtering condition t1.col1_2<50 in the SQL query, compute node 21 can filter the data table t1 (which has undergone column pruning) based on this condition, deleting rows in data table t1 where the value of column col1_2 is ≥50 (row pruning), thus obtaining data table t1′ for uploading to the TEE device. This data table t1′ includes three columns: col1_3, id, and col1_2, and rows in these three columns satisfy col1_2<50.

[0053] Through the above operations, the columns and rows in data table t1 have been pruned. The pruned data will not affect the TEE's query operations based on query requests after being uploaded to the TEE device, and at the same time, the amount of data uploaded to the TEE device has been reduced.

[0054] Computation node 22 can similarly perform column trimming on data table t2 to obtain data table t2′, where data table t2′ includes the data from the id and col2_2 columns of data table t2.

[0055] In the second embodiment, for the above SQL query statement, the computing node 21 can perform the above operations (1), (2), and (3) on the data table t1 according to the SQL query statement, so as to reduce the data to be uploaded to the TEE device.

[0056] Specifically, after computing node 21 obtains data table t1′ by performing operations (2) and (3) as described in the first embodiment above, computing node 21 and computing node 22 can execute the PSI algorithm to find the intersection of the id column in data table t1′ and the id column in data table t2′ according to the join condition t1.id = t2.id in the SQL query statement. Then, computing node 21 can delete the rows other than the rows corresponding to the intersection in data table t1′ to obtain data table t1″, so as to further reduce the amount of data to be uploaded to the TEE device.

[0057] The PSI algorithm can be any existing PSI algorithm. This PSI algorithm allows technical node 21 and computing node 22 to know the rows in their respective data tables whose id columns intersect with the id column of each other's data tables without revealing any other data of the other party. For example, PSI can be implemented using any of the following techniques: Diffie-Hellman (DH) algorithm, unintentional transmission (OT) algorithm, homomorphic encryption (HE) algorithm, circuit PSI, etc.

[0058] In another implementation, the compute node can determine the order in which to perform various preprocessing steps based on the query request.

[0059] For example, for the SQL query statement above, since the computation cost of PSI between computing nodes is high, computing nodes can first filter the data in the columns based on the filtering conditions, and then perform the PSI algorithm on the remaining data. Because the number of rows after filtering is reduced, the computation cost of performing the PSI algorithm is lowered. Taking computing node 21 as an example, the SQL query statement includes filtering the data in column col1_2 of data table t1. Therefore, computing node 21 can first delete rows in column col1_2 of data table t1 with values ​​≥50 based on the filtering conditions, and then perform the PSI algorithm on the id columns of the remaining rows in data table t1 and data table t2. This can greatly reduce the computational load when computing nodes 21 and 22 perform the PSI algorithm.

[0060] In another implementation, compute node 21 can generate an execution plan based on an SQL query statement. This execution plan includes multiple data query operations and their execution order. The data query operations can be operations on data table t1 or data table t2, and may include reading operations on the data tables, combining operations on the read results (e.g., finding the intersection), etc. The reading operation may include the name of the data table to be read, column names, filtering conditions, etc. Compute node 21 can execute the above-mentioned operations (2) and / or (3) based on the reading operation on data table t1 in the execution plan, and can execute the above-mentioned operation (1) based on the combining operation in the execution plan. The execution order of operations (1), (2), and (3) can be determined based on the execution order of the combining operation and the reading operation in the execution plan.

[0061] For example, compute node 21 can generate an execution plan for the above SQL query statement, including the following operations: ① Query the rows in data table t1 where the value of col1_2 is < 50; ② Query the id column in data table t2; ③ Calculate the intersection of the query results for data table t1 and the query results for data table t2 based on the id column; ④ Obtain the values ​​of col1_3 and col2_2 in the intersection, and find the maximum value of all col1_3 and col2_2 values. The execution order of these four operations is as follows: ① and ② can be executed in parallel, ③ is executed after ① and ②, and ④ is executed after ③.

[0062] According to the execution plan, computing node 21 can filter the data in data table t1 according to the filtering condition col1_2<50 through the third operation mentioned above, and then perform the PSI algorithm on the filtered data table according to the join condition through the first operation mentioned above to further reduce the data.

[0063] In addition, before performing the third operation on data table t1, the second operation mentioned above can be performed on data table t1 first, trimming the columns in data table t1 except for columns col1_3, id, and col1_2, and then performing the third operation on the data table obtained after column trimming. In this way, after completing the first operation, compute node 21 obtains a data table t1″ including columns col1_3, id, and col1_2, where the id column includes the intersection with the id column of data table t2, and the value in column col1_2 is <50. Compute node 21 can also delete the id and col1_2 columns in data table t1″ according to the result field in the SQL query statement, keeping only the col1_3 column, to obtain a data table for uploading to the TEE device.

[0064] Compute node 22 can similarly execute S205, preprocessing the target data according to the query request to obtain the processed data.

[0065] In S207, each computing node sends the processed data to the TEE device.

[0066] Computing nodes 21 and 22 can respectively send the processed data obtained through S205 to the TEE device for uploading to the TEE. Taking computing node 21 as an example, after obtaining the processed data as described above, computing node 21 can also encrypt the processed data based on the pre-acquired public key of the TEE to obtain ciphertext data, and send the ciphertext data to the TEE. The TEE can then decrypt the ciphertext data based on the pre-stored private key to obtain the processed data.

[0067] In S209, the TEE device performs a query operation based on the query request and the processed data received from each computing node.

[0068] The TEE device can generate an execution plan based on the query request, and determine the remaining processing in the execution plan that it needs to perform based on the processing performed by the pre-agreed computing nodes.

[0069] Specifically, in the first embodiment described above, the TEE receives data tables t1′ and t2′ after row and column pruning from compute node 21 and compute node 22, respectively. Then, the TEE can find the intersection of the id values ​​in data table t1′ and data table t2′ based on the join condition t1.id = t2.id. It then retrieves the col1_3 value corresponding to the id in the intersection from data table t1′, and the col2_2 value corresponding to the id in the intersection from data table t2′, and determines the maximum value among the retrieved col1_3 and col2_2 values, which is the query result. The intersection may include one or more ids, each corresponding to one or more col1_3 values ​​and one or more col2_2 values.

[0070] In the second method described above, as mentioned earlier, after preprocessing the data table t1, compute node 21 obtains the col1_3 value that satisfies the join and filter conditions, and uploads this col1_3 value to the TEE. Similarly, compute node 22 obtains the col2_2 value that satisfies the join conditions and uploads this col2_2 value to the TEE. Thus, the TEE can determine the maximum value from the received col1_3 and col2_2 values ​​as the query result.

[0071] In other words, after the data table has already undergone row and column pruning and PSI (Power-In-Search) with other data tables on the compute node side, the TEE device only needs to perform statistical processing on the processed data uploaded by each compute node according to the query request. This statistical processing includes operations such as summation, finding the maximum value, finding the minimum value, and calculating the average value.

[0072] It is understood that although this describes the TEE receiving trimmed data from the compute nodes of two data parties and performing data query operations based on the trimmed data, this specification is not limited to this. For example, when a query request targets n (n≥3) data parties, depending on the query request, the TEE may receive trimmed data from at least two compute nodes corresponding to at least two of the n data parties and perform data query operations based on the received data.

[0073] In S211, the TEE returns the query results to the querying device, which is, for example, compute node 21.

[0074] Specifically, taking computing node 21 as an example, the TEE can use the pre-obtained public key of computing node 21 to encrypt the query result, obtain the ciphertext query result, and return the ciphertext query result to computing node 21. After receiving the ciphertext query result, computing node 21 can use its own private key to decrypt the ciphertext query result, thereby obtaining the plaintext query result.

[0075] In this embodiment, the computing node of the data party first preprocesses the target data according to the query request, thereby reducing the amount of data uploaded to the TEE, greatly shortening the time for data to be uploaded to the TEE, reducing the computing load of the TEE, and improving the efficiency of data query.

[0076] Figure 3 This is an architecture diagram of a data computing node in one embodiment of this specification. This computing node is used to execute... Figure 2 The method shown includes:

[0077] The acquisition unit 31 is used to acquire a query request, which is used to request a query for multiple target data stored by multiple data providers respectively;

[0078] Preprocessing unit 32 is used to preprocess the target data of the first data party according to the query request to obtain first data, wherein the amount of the first data is less than the amount of the target data of the first data party.

[0079] The sending unit 33 is used to send the first data to the TEE device so that the TEE device can obtain the query result corresponding to the query request based on the first data.

[0080] Figure 4 This is an architectural diagram of a TEE device according to an embodiment of this specification. The TEE device is used to perform tasks such as... Figure 2 The method shown includes:

[0081] The receiving unit 41 is configured to receive a query request, the query request being used to request a query for target data stored by multiple data parties respectively; and to receive first data from the computing nodes of at least two of the multiple data parties, wherein the first data of any data party is generated based on the query request and the target data of that data party, and the first data of any data party is less than the target data of that data party.

[0082] The processing unit 42 is used to process the received first data according to the query request to obtain the query result.

[0083] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform actions such as... Figure 2 The method shown.

[0084] This specification also provides a computing node, including a memory and a processor. The memory stores executable code, and when the processor executes the executable code, it implements... Figure 2 The method shown.

[0085] This specification also provides a TEE device, including a memory and a processor. The memory stores executable code, and when the processor executes the executable code, it implements... Figure 2 The method shown.

[0086] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a server system. Of course, this application does not exclude the possibility that, with the future development of computer technology, the computer implementing the functions of the above embodiments can be, for example, a personal computer, a laptop computer, an in-vehicle human-machine interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0087] While one or more embodiments of this specification provide the operational steps of the methods described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps listed in the embodiments is merely one possible order of execution among many steps and does not represent the only possible order. In actual device or end product execution, the methods shown in the embodiments or drawings may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes the elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.

[0088] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, when implementing one or more of these specifications, the functions of each module can be implemented in one or more software and / or hardware components, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0089] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0090] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0092] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0093] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0094] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0095] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0097] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, system embodiments are basically similar to method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0098] The above description is merely an embodiment of one or more embodiments of this specification and is not intended to limit the scope of these embodiments. Various modifications and variations can be made to these embodiments by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims.

Claims

1. A multi-party data query method, executed by the computing node of the first data party among multiple data parties, comprising: Obtain a query request, the query request being used to request a query for multiple target data stored by the multiple data providers respectively, the target data including a target data table; An execution plan is generated based on the query request for the multiple target data, and the execution plan includes the query operations for the multiple target data and their execution order; According to the execution plan and the query request, the target data of the first data party is preprocessed to obtain the first data. The first data includes a first data table and the data volume of the first data is less than the data volume of the target data of the first data party. The preprocessing is used to delete data in the target data of the first data party that is not related to the query request, and to determine several preprocessing operations included in the preprocessing and their execution order according to the execution plan. The first data is sent to a Trusted Execution Environment (TEE) device, wherein the query request is sent by the querying party to the TEE device, so that the TEE device obtains a query result corresponding to the query request based on the first data and the query request received from the querying party.

2. The method according to claim 1, wherein the first data is generated based on at least one of the following included in the query request: The connection conditions between the target data table of the first data party and the target data tables of other data parties, the column identifiers in the target data table of the first data party, and the filtering conditions for the data in the columns of the target data table of the first data party.

3. The method according to claim 1 or 2, wherein the target data table of the first data party includes a first column and a second column, and the preprocessing of the target data of the first data party according to the query request includes: Based on the filtering conditions for the data in the first column included in the query request, the data in the target data table of the first data table is pruned to obtain the second data table; Based on the connection conditions of the first data party's target data table and other data parties' target data tables included in the query request, a privacy intersection method is performed with other data parties to obtain the intersection of the second column in the second data table and the target column in the other data party's target data table. Row pruning is then performed on the second data table based on the intersection.

4. The method according to claim 3, wherein the result field of the query request includes the identifier of the first column, the result of row pruning of the second data table includes the third data table, and the preprocessing of the target data of the first data table according to the query request further includes: Based on the result fields of the query request, delete the column in the third data table that corresponds to the second column.

5. The method of claim 1, said obtaining a query request comprising: Generate the query request. Sending the first data to the TEE device includes: sending the first data and the query request to the TEE device; The method further includes: Receive the query result corresponding to the query request from the TEE device.

6. A multi-party data query method, executed by a TEE device, comprising: Receive a query request sent by a querying party, the query request being used to request a query for target data stored separately by multiple data parties; The target data includes a target data table; The query request is also used to generate an execution plan for the plurality of target data, the execution plan including query operations for the plurality of target data and their execution order; First data is received from the computing nodes of at least two of the plurality of data parties, wherein the first data of any data party is generated based on the execution plan, the query request, and the target data of the data party, and the first data of any data party includes a first data table and the first data is smaller than the target data of the data party. The first data of any data party is obtained by deleting data unrelated to the query request from the target data of the data party, and several preprocessing operations and their execution order are determined according to the execution plan. The received first data is processed according to the query request to obtain the query result.

7. The method according to claim 6, wherein the first data is generated based on at least one of the following included in the query request: join conditions between the target data table of the first data party and the target data tables of other data parties, column identifiers in the target data table of the first data party, and filtering conditions for the data in the columns of the target data table of the first data party. The process of processing the received first data according to the query request includes: The received first data is statistically processed according to the query request to obtain the query result.

8. A computing node, comprising: The acquisition unit is used to acquire a query request, which is used to request a query for multiple target data stored by multiple data providers, and the target data includes a target data table. An execution plan is generated based on the query request for the multiple target data, and the execution plan includes the query operations for the multiple target data and their execution order; A preprocessing unit is configured to preprocess the target data of the first data party according to the execution plan and the query request to obtain first data. The first data includes a first data table and the amount of the first data is less than the amount of the target data of the first data party. The preprocessing is configured to delete data in the target data of the first data party that is irrelevant to the query request, and to determine several preprocessing operations included in the preprocessing and their execution order according to the execution plan. A sending unit is configured to send the first data to a TEE device, wherein the query request is sent by the querying party to the TEE device, so that the TEE device obtains a query result corresponding to the query request based on the first data and the query request received from the querying party.

9. A TEE device, comprising: The receiving unit is used to receive a query request sent by the querying party, the query request being used to request a query for target data stored by multiple data parties respectively; The target data includes a target data table; The query request is further used to generate an execution plan for the plurality of target data, the execution plan including query operations for the plurality of target data and their execution order; receiving first data from the computing nodes of at least two of the plurality of data parties, wherein the first data of any data party is generated based on the execution plan, the query request, and the target data of that data party, and the first data of any data party includes a first data table and the first data is smaller than the target data of that data party, the first data of any data party is obtained by deleting data unrelated to the query request from the target data of that data party, and determining several preprocessing operations and their execution order for deletion according to the execution plan; The processing unit is used to process the received first data according to the query request to obtain the query result.

10. A computing node comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-5.

11. A TEE device, comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of claim 6 or 7.