Approximate connection aggregation query method and device based on secure multi-party computing and collaborative query system

By introducing an approximate connection aggregation query method in a collaborative query system with secure multi-party computing, using multiple iterations and offline secure sampling technology, the problem of inefficiency in existing systems in multi-table connection aggregation query is solved, and efficient data query and result reliability is achieved.

CN119884143AActive Publication Date: 2025-04-25BEIJING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411791879.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-25
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The existing collaborative query system based on secure multi-party computing is inefficient when processing join aggregation queries for multiple data relationship tables, and only supports querying of a single data relationship table, which cannot meet the needs of multi-table join aggregation.

Method used

A method of approximate connection aggregation query based on secure multi-party computing is proposed. By receiving approximate and connection aggregation query requests from multiple participants, multiple iterations are performed, and the connection aggregation steps based on approximate query are performed in each iteration round, and the sample block is generated using offline secure sampling to perform approximate query and connection aggregation processing is output, and the query result estimate value of the last iteration round is output.

Benefits of technology

While protecting data privacy, it significantly improves the efficiency of connection query and the reliability of query results of multiple data relationship tables, and can effectively handle multi-table connection aggregation queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884143A_ABST
    Figure CN119884143A_ABST
Patent Text Reader

Abstract

The invention provides an approximate connection aggregation query method and device based on secure multi-party computing and a collaborative query system, and the method comprises the steps: executing multiple iterations for a data relation table corresponding to each participant specified by an approximate and connection aggregation query request, in each iteration round, selecting one of sample blocks corresponding to each data relation table generated by offline safe sampling of each participant as a target sample block of each data relation table; performing approximate query and connection aggregation processing on each target sample block to obtain a query result estimation value and a semi-confidence interval length; and outputting a query result estimation value obtained by the last iteration round after iteration is stopped. According to the method and the device, approximate query and connection aggregation query based on secure multi-party computing for multiple data relation tables can be realized, individual privacy can be protected in the query process, and meanwhile, the query efficiency is remarkably improved through a small amount of precision loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data collaborative query based on secure multi-party computing, and in particular to an approximate connection aggregation query method, device and collaborative query system based on secure multi-party computing. Background Art

[0002] With the rapid development of the Internet, the amount of data is growing exponentially. Institutions want to conduct joint queries on data and mine the value in the data. One of the important tasks is to connect and aggregate queries. For example, to count the insurance reimbursement amount of patients with a certain disease in a hospital, it is necessary to connect the patient table with the table in the insurance company and then find the corresponding aggregate function SUM. However, there is a lot of privacy in the data. Direct query in plain text may cause serious privacy leakage. For example, in the above example, the insurance company may know the detailed condition of the patient, which is what the data owner does not want to see. In order to protect data privacy, in terms of technology, the emergence of secure multi-party computing (MPC) solves the problem of leakage of original data and intermediate calculation results. MPC stipulates that multiple participants are allowed to jointly perform agreed computing tasks without exposing their original data and intermediate results. The collaborative query system based on MPC is used to solve the privacy leakage problem in the collaborative query process of private data by multiple participants. Each participant can only obtain the final calculation result, but not the private data of other participants.

[0003] The existing MPC-based collaborative query system is used for complete data, and the results obtained are completely correct, but the time required is huge, especially for queries with join operations. Approximate query processing provides a solution to improve query efficiency. The field of approximate query includes a variety of technologies, the most widely used of which is sampling technology, which uses sample blocks to perform query operations, sacrificing a certain degree of accuracy in exchange for improved efficiency. Approximate query is mainly used in scenarios that require rapid response and allow certain errors in results. For example, in the financial field, some financial institutions need to monitor and analyze customers' credit scores, transaction behaviors and market risks in real time. Without leaking user privacy, approximate query can be used to quickly calculate risk indicators and market trends, so as to adjust investment portfolios and risk management strategies in a timely manner. Therefore, combining approximate query with MPC-based collaborative query can improve the query operation efficiency while ensuring data security. The existing MPC-based collaborative approximate query system solves the problems of security and efficiency brought about by the sampling process for a single data relationship table. The join operation is very important and also the most expensive operation. However, the existing MPC-based collaborative approximate query system only supports the query of a single data relationship table, and does not support the join aggregation operation of multiple data relationship tables. Therefore, the efficiency of the join aggregation query for multiple data relationship tables is still limited. Summary of the invention

[0004] In view of this, embodiments of the present application provide an approximate connection aggregation query method, device and collaborative query system based on secure multi-party computing to eliminate or improve one or more defects existing in the prior art.

[0005] One aspect of the present application provides an approximate connection aggregation query method based on secure multi-party computing, including:

[0006] Receiving a proximity and connection aggregation query request for a plurality of parties participating in a secure multi-party computation;

[0007] Perform multiple iterations on the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to respectively perform the preset connection aggregation steps based on approximate query in each iteration round; wherein the connection aggregation steps based on approximate query include: selecting one of the sample blocks corresponding to each of the data relationship tables corresponding to each of the participants generated by offline security sampling as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain the corresponding query result estimation value and semi-confidence interval length;

[0008] After the iteration stops, the estimated value of the query result obtained in the last iteration round is output.

[0009] In some embodiments of the present application, each of the participants respectively performs a preset offline security sampling step locally for each data relationship table corresponding to itself in advance, so as to obtain each of the sample blocks corresponding to each of the data relationship tables of each of the participants;

[0010] Correspondingly, selecting one of the sample blocks corresponding to the data relationship tables generated by offline secure sampling from the respective participants as the current target sample block of the respective data relationship tables includes:

[0011] Sending a target sample block request to each of the participants specified by the approximate and connected aggregation query request, so that each of the participants selects one of the sample blocks corresponding to each of the data relationship tables generated by offline secure sampling as the current target sample block and returns the target sample block according to the received target sample request;

[0012] The target sample blocks respectively sent by each of the participants are received.

[0013] In some embodiments of the present application, the offline safety sampling step includes:

[0014] The data relationship table is processed into blocks to obtain respective block relationship tables corresponding to the data relationship table, wherein the block relationship table is used to store the corresponding relationship between a preset number of tuples in the data relationship table and a sample number corresponding to the sample block;

[0015] Adding a block number corresponding to each sample block in each of the block relationship tables, so that the block relationship table is used to store the corresponding relationship between a preset number of tuples in the data relationship table, the block number and the sample number;

[0016] Randomly extract each of the block numbers and the sample numbers corresponding to each of the randomly extracted block numbers from each of the corresponding block relationship tables in the data relationship table to form a sampling auxiliary table for storing the corresponding relationship between each of the randomly extracted block numbers and the sample numbers;

[0017] In the order of the block numbers from small to large, the sampling auxiliary table is safely sorted based on the block numbers;

[0018] Based on the block number, the block relationship table is connected with the sampling auxiliary table after the security sorting by using a preset security connection algorithm to obtain corresponding connection result data;

[0019] The connection result data are sorted based on the sampling numbers in an ascending order of the sampling numbers, and the corresponding sorted result data are used as sample blocks.

[0020] In some embodiments of the present application, the performing of approximate query and connection aggregation processing on each of the current target sample blocks to obtain a corresponding query result estimation value and a semi-confidence interval length includes:

[0021] Approximate query and connection aggregation processing are performed on each of the current target sample blocks in a cross multiplication manner to obtain the corresponding query result estimation value and semi-confidence interval length, and when it is determined that the number of corresponding query results is less than a preset number threshold during the execution of the approximate query and the connection aggregation query, a preset safe connection algorithm is used to accelerate the approximate query and the connection aggregation query process.

[0022] In some embodiments of the present application, the connection aggregation step based on approximate query further includes:

[0023] Before performing the approximate query and the connection aggregation processing on each of the current target sample blocks, the target sample blocks are sorted respectively according to the association attributes between the target sample blocks.

[0024] In some embodiments of the present application, before outputting the corresponding query result estimation value after the iteration stops, the method further includes:

[0025] After executing the approximate query-based join aggregation step in each iteration round to obtain the corresponding query result estimate and semi-confidence interval length, it is determined whether the ratio of the semi-confidence interval length to the query result estimate is less than a preset expected error; if so, the iteration is stopped; if not, the next iteration round is executed.

[0026] Another aspect of the present application provides an approximate connection aggregation query device based on secure multi-party computing, including:

[0027] A request receiving module, used to receive approximate and connection aggregation query requests for multiple participants participating in secure multi-party computing;

[0028] An iterative query module is used to perform multiple iterations on the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to respectively perform the preset connection aggregation steps based on approximate query in each iteration round; wherein the connection aggregation steps based on approximate query include: selecting one of the sample blocks corresponding to each of the data relationship tables corresponding to each of the participants generated by offline security sampling as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain the corresponding query result estimation value and semi-confidence interval length;

[0029] The result output module is used to output the estimated value of the query result obtained in the last iteration round after the iteration stops.

[0030] The third aspect of the present application provides a collaborative query system based on secure multi-party computing, comprising: an approximate connection aggregation query device based on secure multi-party computing, and an offline secure sampling device corresponding to each participant that is communicatively connected to the approximate connection aggregation query device based on secure multi-party computing;

[0031] The approximate connection aggregation query device based on secure multi-party computing is used to execute the approximate connection aggregation query method based on secure multi-party computing;

[0032] The offline security sampling device is used to generate offline unique sample blocks corresponding to each of the data relationship tables of the participants.

[0033] The fourth aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the approximate connection aggregation query method based on secure multi-party computing when executing the computer program.

[0034] The fifth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the approximate connection aggregation query method based on secure multi-party computing.

[0035] The sixth aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the approximate connection aggregation query method based on secure multi-party computing.

[0036] The present application provides an approximate connection aggregation query method based on secure multi-party computing, which receives an approximate and connection aggregation query request for multiple participants for participating in secure multi-party computing; performs multiple iterations for the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to respectively perform a preset connection aggregation step based on approximate query in each iteration round; wherein the connection aggregation step based on approximate query includes: selecting one of the sample blocks corresponding to each of the data relationship tables generated by offline secure sampling corresponding to each of the participants as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain a corresponding query result estimation value and a semi-confidence interval length; and outputting the query result estimation value obtained in the last iteration round after the iteration stops, so as to realize approximate query and connection aggregation query based on secure multi-party computing for multiple data relationship tables, and can protect individual privacy during the query process, while significantly improving the query efficiency with a small amount of precision loss, that is, it can effectively improve the efficiency of connection query based on secure multi-party computing for multiple data relationship tables and the reliability of query results.

[0037] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.

[0038] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:

[0040] Figure 1 This is a schematic diagram of the first flow chart of an approximate connection aggregation query method based on secure multi-party computing in one embodiment of the present application.

[0041] Figure 2The present invention is a flowchart of the connection aggregation step based on approximate query in the approximate connection aggregation query method based on secure multi-party computing in one embodiment of the present application.

[0042] Figure 3 The present invention is a flowchart of the offline secure sampling step in the approximate connection aggregation query method based on secure multi-party computing in one embodiment of the present application.

[0043] Figure 4 This is a second flow chart of an approximate connection aggregation query method based on secure multi-party computing in one embodiment of the present application.

[0044] Figure 5 A schematic diagram of the execution architecture of an approximate connection aggregation query method based on secure multi-party computing provided for an application example of the present application.

[0045] Figure 6 A schematic diagram showing an example of executing a secure block batch sampling algorithm provided for an application example of the present application.

[0046] Figure 7 A schematic diagram showing an example of executing a cross-product process provided for an application example of the present application.

[0047] Figure 8 A schematic diagram of an example of executing an independent process provided for an application example of the present application.

[0048] Fig. 9 A schematic diagram of an example of executing the Scape secure connection algorithm for ordered samples provided in an application example of the present application.

[0049] Fig.10 A graph showing the error variation over time of estimated values ​​of different sampling sizes provided for an application example of the present application.

[0050] Fig.11 A schematic diagram of the efficiency of Q3 query with a data size of 400MB under the INDEP process and the cross product (CP) process provided for an application example of this application.

[0051] Fig.12 A schematic diagram of the time required for Q3 to reach a 1% error on TPC-H datasets of different sizes provided for an application example of the present application.

[0052] Fig.13 It is a structural diagram of an approximate connection aggregation query device based on secure multi-party computing in one embodiment of the present application.

[0053] Fig.14 It is a structural diagram of a collaborative query system based on secure multi-party computing in one embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.

[0055] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.

[0056] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0057] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0058] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0059] In order to solve the problem that the existing MPC-based collaborative approximate query method only supports queries on a single data relationship table, the embodiments of the present application respectively provide an approximate connection aggregation query method based on secure multi-party computing, an approximate connection aggregation query device based on secure multi-party computing for executing the approximate connection aggregation query method based on secure multi-party computing, a collaborative query system based on secure multi-party computing, a physical device, a computer-readable storage medium and a computer program product, which can realize approximate queries and connection aggregation queries based on secure multi-party computing for multiple data relationship tables.

[0060] The details are described in detail through the following examples.

[0061] Based on this, the embodiment of the present application provides an approximate connection aggregation query method based on secure multi-party computing that can be implemented by an approximate connection aggregation query device based on secure multi-party computing, see Figure 1 The approximate connection aggregation query method based on secure multi-party computing specifically includes the following contents:

[0062] Step 100: Receive an approximate and connection aggregation query request for a plurality of parties participating in a secure multi-party computation.

[0063] In one or more embodiments of the present application, a join aggregation query refers to a query process for data from multiple tables that are associated through a join operation (JOIN), and then performing aggregation operations (such as sum, count, average, etc.) on the join result set. For example, "select sum(B.age)from A, B where A.id=B.id", from A, B is a join, and sum(B.age) is an aggregation operation. An approximate join aggregation query refers to a process of collecting a sample for the relationship table involved in the query through multiple iterations, storing it in memory, and performing a join aggregation query in the form of a cross product with the existing samples to obtain multiple sample values, that is, the multiple sample values ​​are summed and averaged to obtain an estimated value of the query result, and this estimated value is the estimated result of executing the exact join aggregation query result (Note: the sample value needs to be amplified to a certain extent. The process of obtaining a sample value through a join aggregation query for a sample is as follows: collecting samples of sizes r and s for the relationship tables R, S, executing a join query Q(r, s) to obtain a result v, where we need to expand v, and the expansion ratio is That is, it can be a sample value, and the estimated value can be obtained by summing and averaging multiple sample values, and the sample value can be used to calculate complex confidence intervals); approximate connection aggregation query based on secure multi-party computing refers to a connection aggregation method based on approximate query for multiple data relationship tables based on secure multi-party computing, which is designed on the basis of the existing approximate query method for a single data relationship table based on secure multi-party computing. The approximate and connection aggregation query request refers to a connection aggregation request based on approximate query for at least one data relationship table corresponding to each of multiple parameter parties, and the requested content is the estimated value of the query result. It can be understood that the query result estimate refers to the estimated result of executing the exact connection aggregation query result.

[0064] Step 200: Perform multiple iterations on the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to execute the preset connection aggregation steps based on approximate query in each iteration round; wherein the connection aggregation steps based on approximate query include: selecting one from each sample block corresponding to each of the data relationship tables corresponding to each of the participants generated by offline security sampling as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain the corresponding query result estimate and semi-confidence interval length.

[0065] In one or more embodiments of the present application, the half confidence interval length refers to the half length of a preset confidence interval.

[0066] In step 200, the data relationship table may also be referred to as a relationship table for short. The data relationship table is used to store each attribute and the data corresponding to each attribute. Each row in the data relationship table (ie, each record in the database) is a tuple, and each column is an attribute.

[0067] Step 300: After the iteration stops, output the estimated value of the query result obtained in the last iteration round.

[0068] From the above description, it can be seen that the approximate connection aggregation query method based on secure multi-party computing provided in the embodiment of the present application can realize approximate query and connection aggregation query based on secure multi-party computing for multiple data relationship tables, and can protect individual privacy during the query process while exchanging a small amount of precision loss for a significant improvement in query efficiency, that is, it can effectively improve the efficiency of connection queries based on secure multi-party computing for multiple data relationship tables and the reliability of query results.

[0069] In order to further improve the effectiveness and wide applicability of approximate connection aggregation query based on secure multi-party computing, in an approximate connection aggregation query method based on secure multi-party computing provided in an embodiment of the present application, each of the participants respectively performs a preset offline secure sampling step locally for each data relationship table corresponding to itself, so as to obtain each of the sample blocks corresponding to each of the data relationship tables of each of the participants; see Figure 2 The connection aggregation step based on approximate query in the approximate connection aggregation query method based on secure multi-party computing specifically includes the following contents:

[0070] Step 210: Send a target sample block request to each of the participants specified in the approximate and connected aggregation query request, so that each of the participants can select one of the sample blocks corresponding to each of the data relationship tables generated by offline secure sampling as the current target sample block based on the received target sample request and return the target sample block.

[0071] Step 220: Receive the target sample blocks respectively sent by each of the participants.

[0072] In one or more embodiments of the present application, the participant may also be a data provider, specifically a computer device such as a server or a client device.

[0073] In order to further improve the effectiveness and efficiency of offline secure sampling, in an approximate connection aggregation query method based on secure multi-party computing provided in an embodiment of the present application, see Figure 3 The offline secure sampling step in the approximate connection aggregation query method based on secure multi-party computing specifically includes the following contents:

[0074] Step 01: block processing is performed on the data relationship table to obtain each block relationship table corresponding to the data relationship table, wherein the block relationship table is used to store the correspondence between a preset number of tuples in the data relationship table and the sample number corresponding to the sample block.

[0075] Step 02: Adding the block number corresponding to each sample block to each block relationship table, so that the block relationship table is used to store the corresponding relationship between a preset number of tuples in the data relationship table, the block number and the sample number.

[0076] Step 03: Randomly extract each block number and the sample number corresponding to each randomly extracted block number from each corresponding block relationship table in the data relationship table to form a sampling auxiliary table for storing the corresponding relationship between each randomly extracted block number and the sample number.

[0077] Step 04: In the order of the block numbers from small to large, the sampling auxiliary table is safely sorted based on the block numbers.

[0078] Step 05: Based on the block number, the block relationship table and the sampling auxiliary table after the security sorting are connected using a preset security connection algorithm to obtain corresponding connection result data.

[0079] Step 06: Sort the connection result data based on the sampling numbers in ascending order of the sampling numbers, and use the corresponding sorted result data as sample blocks.

[0080] In order to further improve the efficiency of the connection aggregation step based on approximate query, in an approximate connection aggregation query method based on secure multi-party computing provided in an embodiment of the present application, see Figure 2 The connection aggregation step based on approximate query in the approximate connection aggregation query method based on secure multi-party computing further specifically includes the following contents after step 220:

[0081] Step 230: Perform approximate query and connection aggregation processing on each of the current target sample blocks in a cross-product manner to obtain a corresponding query result estimate and a semi-confidence interval length, and when it is determined that the number of corresponding query results is less than a preset number threshold during the execution of the approximate query and the connection aggregation query, use a preset safe connection algorithm to accelerate the approximate query and the connection aggregation query process.

[0082] In one or more embodiments of the present application, the preset quantity threshold may be set according to actual application requirements.

[0083] In order to further improve the efficiency of the connection aggregation step based on approximate query, in an approximate connection aggregation query method based on secure multi-party computing provided in an embodiment of the present application, see Figure 2 The connection aggregation step based on approximate query in the approximate connection aggregation query method based on secure multi-party computing further specifically includes the following contents before step 210:

[0084] Step 201: before performing approximate query and connection aggregation processing on each of the current target sample blocks, sort each of the target sample blocks according to the associated attributes between the target sample blocks.

[0085] It can be understood that the associated attribute refers to an attribute contained in at least two of the target sample blocks.

[0086] In order to further improve the efficiency of the connection aggregation step based on approximate query, in an approximate connection aggregation query method based on secure multi-party computing provided in an embodiment of the present application, see Figure 4 The connection aggregation step based on approximate query in the approximate connection aggregation query method based on secure multi-party computing further specifically includes the following contents between step 200 and step 300:

[0087] Step 010: After executing the approximate query-based connection aggregation step in each iteration round to obtain the corresponding query result estimate and semi-confidence interval length, determine whether the ratio of the semi-confidence interval length to the query result estimate is less than a preset expected error; if so, stop the iteration; if not, execute the next iteration round.

[0088] In order to further illustrate the above technical solution, the present application also provides a specific application example of an approximate connection aggregation query method based on secure multi-party computing. With the rapid development of the Internet, the amount of data has increased dramatically, and institutions hope to mine data value through joint queries. However, plaintext queries have the risk of privacy leakage. For example, an insurance company may know the patient's condition. Secure multi-party computing (MPC) allows multiple participants to jointly calculate without exposing their own data, effectively solving the problem of privacy leakage. The collaborative query system based on MPC can protect the private data of each participant and only return the final calculation result. Although the existing MPC-based collaborative query system has a large overhead when processing complete data, especially in the query of connection operations, approximate queries (such as sampling technology) provide a solution to improve efficiency. This technology is suitable for scenarios that require rapid response and allow certain errors in the results, such as real-time monitoring of customer credit scores and market risks by financial institutions. Combining approximate queries and MPC-based collaborative queries can improve query efficiency while ensuring data security. The current solution solves the security and efficiency problems caused by sampling, but only supports aggregation queries of a single table, and query operations are still limited.

[0089] This application example designs an approximate connection aggregation query method based on secure multi-party computation, which efficiently completes secure connection aggregation query through iterative estimation. The method includes two stages: in the offline stage, a batch of sample blocks are obtained using a secure block batch sampling algorithm, and in the online stage, multiple iterations are performed and the estimated amount of query results is continuously updated. The specific process of each iteration in the online stage is: first, each relationship table selects a sample block from the sample blocks pre-collected in the offline stage; second, a connection aggregation query is performed on the selected sample block to obtain the query result; then, the query result obtained by this iteration calculation is used together with the query result obtained by the previous iteration to calculate the estimated value and confidence interval of the true query result; finally, in order to ensure the privacy of the data, the user needs to set the expected error in advance. When the error reaches the expected error in the iterative process, the iteration is terminated and the final query result is returned. This application example can significantly improve the query efficiency at the cost of a small amount of precision loss while protecting individual privacy.

[0090] See also Figure 5 The approximate and connected aggregation query request can be referred to as query Q, and when the user issues the query Q, he or she can also send the confidence level a and the expected error E for calculating the length of the semi-confidence interval. Figure 5 In the figure, Tupleblock1 to Tuple block5 represent tuple blocks obtained by block processing of the original relational table; Sample 1 to Sample 5 represent different sample blocks, and send Tn represents sending an estimated value that meets the user's expected error to the user.

[0091] Based on this, the approximate connection aggregation query method based on secure multi-party computing specifically includes the following contents:

[0092] S1: In the offline phase, a large number of sample blocks are obtained using the secure block batch sampling algorithm proposed in this application example. Specifically:

[0093] Perform secure batch sampling on the relation table R of size n, with a block size of s. The first step is initialization. Initialize [R 1 (i)]←([x i ], [i / s]), where x i is the i-th tuple, i / s is the block number. This step is actually to generate two tables R 1 (x,eid),R 2 (eid,sid),R 1 The eid of each tuple x i The corresponding block number, and R 2 The eid in represents the randomly generated block number. Note that all the attributes are stored in the form of secret sharing among the three parties. Initialize [R 2 (j)]←([eid],[sid]), R 2 The eid in the code is the randomly generated block number, and sid is the sample number. If you want to collect n / s sample blocks, then R 2 The size of is n / s. The second step is to connect by 1 With R 2 Perform a secure join operation on the attribute eid to obtain the sample table T (i.e. the join result data mentioned above). The join here uses Scape, and the required complexity is The third step is sorting. Finally, the sids are sorted to obtain a batch of sample blocks. When using sampling-based approximate queries, it is necessary to ensure that the data is stored randomly, so the data needs to be randomly arranged. In the plaintext scenario, the overhead of random arrangement is huge, while in the MPC scenario, the complexity required for random arrangement is O(n), which is much lower than the overhead required for connection during the sampling process.

[0094] It should be noted that the unified [x] represents secret sharing. Three-party secret sharing divides the data x into three parts x 1 +x 2 +x 3 = x, here x 1 , x 2 Send to the first party, x 2 , x 3 Send to the second party, x 3 , x 1Send to the third party. No party can know the real data x. Similarly, the relationship table of the data owner can also be sent to the three computing parties in this form. Secure multi-party computing has some basic arithmetic operations such as addition, subtraction, multiplication, division, Boolean operations and XOR. For example, ([x]+[y], [x]·[y]), etc. Combining these basic operations, algorithms such as secure comparison, secure sorting, and secure arrangement (security can be replaced by carelessness in secure multi-party computing) can be derived. In order to meet the casualness, in other words, when the computer executes the casual algorithm, the operation performed on any input must be the same, that is, any intermediate results cannot be leaked. For example, in the case of plain text (non-MPC scenario), a sample of size s is collected and directly selected from the first s positions. However, in order to meet the casualness, directly selecting the first s position tuples will let the participants know where the sample comes from. Unless this information is rigorously proven, no one will know whether the information of the original table can be deduced in combination with the query results. In order to meet the requirement of casualness, the simplest sampling method is to perform a random shuffle on the original table and then select samples from the first s positions, so that the calculation party will not know where the samples were selected from. Therefore, most algorithms designed to meet the requirement of casualness need to traverse the original table once to get the result.

[0095] Consider optimizations such as Figure 6 As shown, R 1 eid is ordered, and R 2 The eids are out of order. (1) First, 2 Sorting is performed first, and the required cost is (2) Then R 1 With R 2 To perform the connection, since the eids are all in order, the required complexity is (3) Finally, to sort the sids, we can use the characteristics of Scape connection. After the connection operation is completed, the result table will be arranged in an ordered order according to the eid. At this time, the sid attributes will be similar to (0, 0, 0, 3, 3, 3, 2, 2, 2, 1, 1, 1), that is, the same sid will be adjacent, and the total number is s. We only need to calculate [sid()] = ([sid()]-[1)]*[s]+([i%s]), and we can use this characteristic to calculate the sorted arrangement π = (0, 1, 2, 9, 10, 11, 6, 7, 8, 3, 4, 5). Finally, the result obtained by Oblivious permutation is the result of sorting the sids. The required complexity is O(n), which is much lower than the time overhead O(nlog s) required to directly sort the sids. 2n). In general, when facing large-scale data, the size of s will reach 1000 or even more, so the optimization scheme will bring logn performance improvement, reducing the amortized complexity of each sample block to O(slogn), approximating the sampling time in the plaintext case, and greatly reducing the overhead of the offline stage.

[0096] It should be noted that oblivious sorting, oblivious join (Scape) and oblivious permutation are already quite mature algorithms in MPC-based collaborative query. Among them, oblivious sorting uses bitonic sorting. For an unordered table, it takes O(nlog 2 n), while for two ordered lists it takes O(nlog n) time. The oblivious join operation (Scape) is the most efficient algorithm known to date. Its main idea is sort merge join. In the Sort sorting step, bitonic sorting is used to sort the two tables involved in the connection. The Merge operation will merge the two ordered lists into one ordered list in order to make the same elements adjacent, so that the number of occurrences of each tuple can be safely calculated by traversal. Finally, the join operation uses a safe expansion operation on the two relational tables (safe expansion operation: for example, for X=(x 1 , x 2 , x 3 , x 4 ), number D = (1, 2, 0, 2), expansion size 6, after executing the expansion operation, (x1, x2, x2, x4, x4, ⊥) will be obtained, where ⊥ is redundant (since the sum of the elements in D is unknown, the expansion size is set manually, generally set to the sum of the sizes of the two tables to be connected. If the size of the connection result exceeds the manually set expansion size, the algorithm terminates and the user resets the expansion size). For tuples with a quantity of 0, directly remove them, and the complexity is linear) and then merge them to get the final connection result. Oblivious permutation, for the arrangement π, can make x arranged according to π, the complexity is linear O(n). The object data of the above operations are all stored in the three computing parties in the form of secret sharing.

[0097] That is to say, S1 divides the original relational table R into blocks, and adds the attribute eid to indicate the block number to which the current tuple belongs, and obtains the processed block relational table R1(x, eid). Construct the sampling auxiliary table R2(eid, sid), where eid is the randomly generated block number and sid is the number of the sample block (i.e., the sample number). Safely sort the sampling auxiliary table R2(eid, sid) according to eid. This operation ensures that R1 and R2 are both ordered in the attribute eid. Use Scape to connect R1(x, eid) and R2(eid, sid) according to eid. Since eid is ordered, the required complexity is O(nlogn). Sort according to sid to obtain the last batch of sample blocks.

[0098] S2: In the online phase, the method of updating the estimator by multiple iterations is used. Specifically, the cross-product process is used to reuse sample blocks to reduce the impact of sampling on iteration efficiency. During the connection process, the Scape secure connection algorithm is used for queries with a small number of valid query results. Specifically:

[0099] Figure 7 The cross-product process is given. In each iteration, each relation table involved in the connection selects a sample block B from the batch sample blocks obtained in the offline phase. i,k , represents the sample block selected by the i-th relation table in the k-th iteration. In one or more embodiments of the present application, Tuple represents a tuple, followed by a number to distinguish different tuples; Block represents a block, followed by a number to distinguish different blocks.

[0100] Using the cross-product method, consider two relational tables R 1 With R 2 , sample block B is selected in the i-th iteration 1,i With B 2,i , execute Q({B 1,i , B 2,j}), Q({B 1,j , B 2,i})(Another way to express it is Q({B 1,p , B 2,q}), that is, for B 1,p , B 2,q Execute a join aggregation query where at least one of p∈(1, i) and q∈(1, i) is equal to i. ) where j∈(1, i). After i iterations, we can get i 2 Sample values, and Figure 8In the independent process shown in the figure (in the independent process, each relational table selects a sample block in each iteration, and performs a join aggregation query on the sample block to obtain the sample value. The difference from the cross-product solution is that the sample is discarded after use. The purpose of using the independent process as a comparison is to highlight the efficiency improvement brought by the use of sample blocks (cp is reused and indep is directly discarded) to the approximate join aggregation query), only i sample values ​​can be obtained after i iterations. This shows that the cross-product solution can save more time overhead caused by sampling.

[0101] When executing Q({B 1,i , B 2,j}), Q({B 1,j , B 2,i}) When j∈(1, i), the Scape algorithm is used to speed up queries with fewer valid query results. When the number of valid query results is large, the error converges faster, so its efficiency is not considered.

[0102] That is, in each iteration, each relation table involved in the connection selects a sample block B from the batch sample blocks obtained in the offline phase. i,k , represents the sample block selected by relation i in the kth iteration. Using the cross-product process, consider two relation tables R 1 With R 2 , sample block B is selected in the i-th iteration 1,i With B 2,i , execute Q({B 1,i , B 2,j}), Q({B 1,j , B 2,i}) where j∈(1,i). After i iterations, we can get i 2 Sample values. When executing Q({B 1,i , B 2,j}), Q({B 1,j , B 2,i}) When j∈(1, i), the Scape algorithm is used to accelerate the case where there are fewer valid query results. When the number of valid query results is large, the error converges faster, so its efficiency is not considered.

[0103] S3: We observed the characteristics of repeated use of sample blocks and the fact that the efficiency of the Scape secure connection algorithm is related to whether the input relationship table is ordered. We sorted the selected sample blocks each time to further improve the efficiency of the algorithm. Specifically:

[0104] In each iteration, the selected sample blocks are first sorted according to the connection attributes. In the case of two tables being connected, for example Only R 1 With R 2 The collected sample blocks can be sorted according to attribute B. In the case of multiple table joins, for example For R 1 With R 3 Only the attribute K 1 With K 2 Sort, and table R 2 Cannot guarantee the property K at the same time 1 With K 2 Orderly.

[0105] Solution: If Fig. 9 As shown, first, attribute K 2 Sort, and increase attribute S in parallel c ={0, 1, 2, 3, 4}, then attribute K 1 Sort. R 1 With R 2 Perform Scape connection. After the merge operation, calculate R 2 With attribute a l , indicating R 1 How many tuples of attributes K are there in 1 Same as the current tuple, you can get R 2 With attribute aL, it means R 1 How many tuples of attributes K are there in 1 Same as the current tuple. (1) First, according to attribute P, 2 (2) Add attribute g, which indicates how many tuples will be before the current tuple after the expansion operation. Calculate [g(i)] = [g(i-1)] + ([a l (i-1)] =? [0]) + [a l (i-1)].

[0106] (3) Reverse the order according to attribute P to return to the initial state, and perform the expansion operation according to aL.

[0107] (4) Finally, this application example can calculate the expanded attribute g′ and the final attribute G. Here we need a temporary variable [c] to calculate:

[0108] a)[g′(i)]=([g′(i)]+1)′([g(i)]=?[g(i+1)])

[0109] b)[c(i)]=([R(i)]=?[⊥])

[0110] c)[G(i)]=(1-[c(i)])·([g(i)]+[g′(i)])+[c(i)]·[i]

[0111] Among them, [A]=? [B] indicates a safe comparison operation, [A] and [B] respectively represent the parameter expressions of the equal sign scale; it will return [0] or [1] to indicate whether they are equal.

[0112] After the above process, this application example can arrange the table by [g] so that it can be arranged according to K 2 For k tables, after n iterations, the sample block size is m each time, and the time complexity before optimization is O(n K mlog 2 m), and the optimized time complexity is O(knmlog 2 m+n K mlogm). Compared with the original method, this optimization achieves log m If the sample block size is 1000, this will result in a 10x speedup, which is not available in the independent process.

[0113] This application example also observed that the efficiency is positively correlated with the size of the sample block. Assume that when the size of the two blocks is s 1 With s 2 The sample block connection requires a total of O((s1+s2)log 2 (s1+s2)) overhead, assuming that t valid results can be obtained. When the size of the sample block increases a times, a total of O(a(s1+s2)log 2 (a(s1+s2))) overhead, but can obtain a 2 t valid results, only a times more time was spent but a 2 times the effective result. Fig.10 As shown in the figure, the efficiency graphs for sample blocks with a proportion of 1% and 2% respectively, it can be observed that the larger the sample size, the higher the efficiency. Among them, sampling rate represents the sampling rate, CI represents the confidence level, and estimate represents the estimated value. Fig.10 The efficiency diagrams of the two processes are shown (excluding the amortized time for sampling), where the estimated error represents 1-estimated value / true result; error (%) represents the ratio.

[0114] S4: The user sets the expected error E. If the error calculated after the current iteration is lower than the user's expected error, the iteration ends and the estimated value is returned. Specifically:

[0115] In the independent scheme, each sample value is independent, so calculating the sample variance is very simple. However, in the cross-product scheme, the samples are not independent. For the sum and count aggregation operations, after n iterations, let M k , n Represents the relationship R k The set of sample blocks selected in . Definition: μ v,k,i =v(M 1,n , …, M k-1,n , B k,i , M k+1,n , …, M K,n ), which means that for the aggregation operation v, the result of connecting the i-th tuple block of relation table k with all sample blocks selected from other relation tables. Sample mean definition:

[0116]

[0117] Sample variance definition:

[0118]

[0119] Variance σ 2 The estimate of can be expressed as:

[0120] For the average aggregation operation,

[0121] Sample mean definition:

[0122]

[0123] Sample variance definition:

[0124]

[0125] The final variance estimate is:

[0126] According to the above formula, after n iterations, we can get the estimated value T of the final result corresponding to different aggregation operations: n (v) and the estimate of the variance The half-width of the confidence interval is calculated as (for a confidence level threshold α): The user gives the expected error E, and at the end of each iteration, the calculation Is the value of less than the expected error E. When the expected error is reached, the iteration ends and the estimated value T of the final result is returned. n According to Fig.10 and Fig.11 ,|true value - estimated value| / |true value|, that is, the estimate error is in The CI error range is within the range, which shows the feasibility of the solution. The privacy of the data is not leaked, and the practicality of this application example is improved.

[0127] exist Fig.11 In the figure, CI error represents the ratio of the length of the semi-confidence interval to the estimated value, INDEP estimate represents the estimated error using the Independent process, cross-product estimate represents the estimated error using the cross-product process, INDEP CI represents the CI error using the Independent process, CP CI represents the CI error using the cross-product process, and CP estimate represents the estimated error using the cross-product process. It can be seen that the Cross-product scheme has been optimized and is still more efficient than the independent scheme without considering the sampling time.

[0128] That is to say, in order to protect data privacy, the estimated value is not returned after each iteration. When using it, the user sets the expected error E = |real result - estimated value| / |real result| in advance, and updates two variables [∈ n ] and [T n ], respectively representing the length of the semi-confidence interval and the estimated value, judging Is it true? If true, the iteration terminates and returns the estimated value T n .

[0129] at last Fig.12 It is shown that the time cost of the independent process becomes larger when the amortized sampling time (INDEP_S and CP_S) is taken into account. In addition, the time cost of the join algorithm of scape to query the entire relation is shown for comparison. It can be seen that in query Q3 with a data size of 400MB, the efficiency of the cross product process is almost 3 times faster than scape when reaching 1% error. In addition, it can be observed that as the data size increases, the time complexity of the scape algorithm decreases by O(n log 2 As n) grows, the time required for the approximate query solution shows a slightly less than linear growth.

[0130] Consider a chain connection between k relations, where each relation contains N tuples. Assume that for each relation R i , i = 1, ..., k-1, each tuple t∈R i Can be used with R i+1Then, the probability of randomly selecting a tuple from each k relation is If we select n tuples from each relation, the expected number of valid join results is For most queries in the TPC-H benchmark, joins are primary key-foreign key joins, which means a = 1. To obtain s valid join results, the number of tuples required for each relation is If the data size increases from N to P*N, the number of tuples required for each relation to obtain the same s valid connection results will become This is why the approximate query scheme shows slightly less than linear growth. Therefore, the performance improvement becomes more significant as the data size increases.

[0131] It can be seen from the above tests that the approximate connection aggregation query method based on secure multi-party computing in this application example can ensure the security of any intermediate data except the final result, while sacrificing a small amount of accuracy in exchange for a significant improvement in efficiency.

[0132] From the software level, the present application also provides an approximate connection aggregation query device based on secure multi-party computing for executing all or part of the approximate connection aggregation query method based on secure multi-party computing, see Fig.13 The approximate connection aggregation query device based on secure multi-party computing specifically includes the following contents:

[0133] A request receiving module 10, for receiving approximate and connection aggregation query requests for multiple participants participating in secure multi-party computation;

[0134] The iterative query module 20 is used to perform multiple iterations on the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to respectively perform the preset connection aggregation steps based on the approximate query in each iteration round; wherein the connection aggregation steps based on the approximate query include: selecting one of the sample blocks corresponding to each of the data relationship tables corresponding to each of the participants generated by offline security sampling as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain the corresponding query result estimation value and semi-confidence interval length;

[0135] The result output module 30 is used to output the query result estimation value obtained in the last iteration round after the iteration stops.

[0136] The embodiment of the approximate connection aggregation query device based on secure multi-party computing provided in the present application can be specifically used to execute the processing flow of the embodiment of the approximate connection aggregation query method based on secure multi-party computing in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the embodiment of the approximate connection aggregation query method based on secure multi-party computing.

[0137] The part of the approximate connection aggregation query based on secure multi-party computing performed by the approximate connection aggregation query device based on secure multi-party computing can be completed in the server or client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application is not limited to this. If all operations are completed in the client device, the client device may also include a processor for specific processing of the approximate connection aggregation query based on secure multi-party computing.

[0138] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0139] The server and the client device may communicate with each other using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocols may include, for example, TCP / IP, UDP / IP, HTTP, HTTPS, etc. Of course, the network protocols may also include, for example, RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols used on top of the above protocols.

[0140] From the above description, it can be seen that the approximate connection aggregation query device based on secure multi-party computing provided in the embodiment of the present application can realize approximate query and connection aggregation query based on secure multi-party computing for multiple data relationship tables, and can protect individual privacy during the query process while exchanging a small amount of precision loss for a significant improvement in query efficiency, that is, it can effectively improve the efficiency of connection queries based on secure multi-party computing for multiple data relationship tables and the reliability of query results.

[0141] Based on the aforementioned embodiments of the approximate connection aggregation query method based on secure multi-party computing and / or the approximate connection aggregation query device based on secure multi-party computing, the present application also provides a collaborative query system based on secure multi-party computing, see Fig.14 The collaborative query system based on secure multi-party computing specifically includes the following contents:

[0142] An approximate connection aggregation query device based on secure multi-party computing, and an offline secure sampling device corresponding to each participant that is communicatively connected to the approximate connection aggregation query device based on secure multi-party computing;

[0143] The approximate connection aggregation query device based on secure multi-party computing is used to execute the approximate connection aggregation query method based on secure multi-party computing provided in the above embodiment;

[0144] The offline safety sampling device is used to generate offline the sample blocks corresponding to the data relationship tables of the parameter parties that are uniquely corresponding to each other.

[0145] The embodiment of the present application also provides an electronic device, which may include a processor, a memory, a receiver and a transmitter, wherein the processor is used to execute the approximate connection aggregation query method based on secure multi-party computing mentioned in the above embodiment, wherein the processor and the memory may be connected via a bus or other means, such as by bus connection. The receiver may be connected to the processor and the memory via wired or wireless means.

[0146] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0147] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the approximate connection aggregation query method based on secure multi-party computing in the embodiment of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the approximate connection aggregation query method based on secure multi-party computing in the above method embodiment.

[0148] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0149] The one or more modules are stored in the memory, and when executed by the processor, perform the approximate connection aggregation query method based on secure multi-party computing in the embodiment.

[0150] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit, which may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.

[0151] As an implementation method, the functions of the receiver and the transmitter in the present application can be considered to be implemented through a transceiver circuit or a dedicated chip for transceiver, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit or a general chip.

[0152] As another implementation method, it is possible to use a general-purpose computer to implement the server provided in the embodiment of the present application, that is, to store the program code for implementing the functions of the processor, receiver, and transmitter in a memory, and the general-purpose processor implements the functions of the processor, receiver, and transmitter by executing the code in the memory.

[0153] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned approximate connection aggregation query method based on secure multi-party computing are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0154] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the aforementioned approximate connection aggregation query method based on secure multi-party computing.

[0155] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0156] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0157] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0158] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for approximate connection aggregation query based on secure multi-party computing, characterized in that: include: Receiving a proximity and connection aggregation query request for a plurality of parties participating in a secure multi-party computation; Perform multiple iterations on the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to respectively perform the preset connection aggregation steps based on approximate query in each iteration round; wherein the connection aggregation steps based on approximate query include: selecting one of the sample blocks corresponding to each of the data relationship tables corresponding to each of the participants generated by offline security sampling as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain the corresponding query result estimation value and semi-confidence interval length; After the iteration stops, the estimated value of the query result obtained in the last iteration round is output.

2. The approximate connection aggregation query method based on secure multi-party computing according to claim 1 is characterized in that: Each of the participants respectively performs a preset offline security sampling step locally for each data relationship table corresponding to itself in advance, so as to obtain each of the sample blocks corresponding to each of the data relationship tables of each of the participants; Correspondingly, selecting one of the sample blocks corresponding to the data relationship tables generated by offline secure sampling from the respective participants as the current target sample block of the respective data relationship tables includes: Sending a target sample block request to each of the participants specified by the approximate and connected aggregation query request, so that each of the participants selects one of the sample blocks corresponding to each of the data relationship tables generated by offline secure sampling as the current target sample block and returns the target sample block according to the received target sample request; The target sample blocks respectively sent by each of the participants are received.

3. The approximate connection aggregation query method based on secure multi-party computing according to claim 2 is characterized in that: The offline safety sampling step includes: The data relationship table is processed into blocks to obtain respective block relationship tables corresponding to the data relationship table, wherein the block relationship table is used to store the corresponding relationship between a preset number of tuples in the data relationship table and a sample number corresponding to the sample block; Adding a block number corresponding to each sample block in each of the block relationship tables, so that the block relationship table is used to store the corresponding relationship between a preset number of tuples in the data relationship table, the block number and the sample number; Randomly extract each of the block numbers and the sample numbers corresponding to each of the randomly extracted block numbers from each of the corresponding block relationship tables in the data relationship table to form a sampling auxiliary table for storing the corresponding relationship between each of the randomly extracted block numbers and the sample numbers; In the order of the block numbers from small to large, the sampling auxiliary table is safely sorted based on the block numbers; Based on the block number, the block relationship table is connected with the sampling auxiliary table after the security sorting by using a preset security connection algorithm to obtain corresponding connection result data; The connection result data are sorted based on the sampling numbers in an ascending order of the sampling numbers, and the corresponding sorted result data are used as sample blocks.

4. The approximate connection aggregation query method based on secure multi-party computing according to claim 1 is characterized in that: The performing of approximate query and connection aggregation processing on each of the current target sample blocks to obtain a corresponding query result estimation value and a semi-confidence interval length includes: Approximate query and connection aggregation processing are performed on each of the current target sample blocks in a cross multiplication manner to obtain the corresponding query result estimation value and semi-confidence interval length, and when it is determined that the number of corresponding query results is less than a preset number threshold during the execution of the approximate query and the connection aggregation query, a preset safe connection algorithm is used to accelerate the approximate query and the connection aggregation query process.

5. The approximate connection aggregation query method based on secure multi-party computing according to claim 1 is characterized in that: The connection aggregation step based on approximate query also includes: Before performing the approximate query and the connection aggregation processing on each of the current target sample blocks, the target sample blocks are sorted respectively according to the association attributes between the target sample blocks.

6. The approximate connection aggregation query method based on secure multi-party computing according to claim 1 is characterized in that: Before outputting the corresponding query result estimation value after the iteration stops, the method further includes: After executing the approximate query-based join aggregation step in each iteration round to obtain the corresponding query result estimate and semi-confidence interval length, it is determined whether the ratio of the semi-confidence interval length to the query result estimate is less than a preset expected error; if so, the iteration is stopped; if not, the next iteration round is executed.

7. A device for approximate connection aggregation query based on secure multi-party computing, characterized in that: include: A request receiving module, used to receive approximate and connection aggregation query requests for multiple participants participating in secure multi-party computing; An iterative query module is used to perform multiple iterations on the data relationship tables for participating in the connection corresponding to each of the participants specified in the approximate and connection aggregation query request, so as to respectively perform the preset connection aggregation steps based on approximate query in each iteration round; wherein the connection aggregation steps based on approximate query include: selecting one of the sample blocks corresponding to each of the data relationship tables corresponding to each of the participants generated by offline security sampling as the current target sample block of each of the data relationship tables; performing approximate query and connection aggregation processing on each of the current target sample blocks to obtain the corresponding query result estimation value and semi-confidence interval length; The result output module is used to output the estimated value of the query result obtained in the last iteration round after the iteration stops.

8. A collaborative query system based on secure multi-party computing, characterized in that: include: An approximate connection aggregation query device based on secure multi-party computing, and an offline secure sampling device corresponding to each participant that is communicatively connected to the approximate connection aggregation query device based on secure multi-party computing; The approximate connection aggregation query device based on secure multi-party computing is used to execute the approximate connection aggregation query method based on secure multi-party computing as described in any one of claims 1 to 6; The offline security sampling device is used to generate offline unique sample blocks corresponding to each of the data relationship tables of the participants.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the approximate connection aggregation query method based on secure multi-party computing as described in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the approximate connection aggregation query method based on secure multi-party computing as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Multi-party security computing method and system

    CN114692201A

  • Method and device for determining correlation between object features of large-scale data

    CN114781000A

  • Data aggregation system and method based on multi-party security computing

    CN115994161A

  • Join synopsis-based approximate query answering

    US20030084043A1