Secure data fusion method and apparatus

By employing privacy-preserving intersection, secure scrambling, and data table shuffling operations, the privacy leakage problem of data table joins in multi-party secure computation is solved, and a secure data fusion process is achieved.

CN116257525BActive Publication Date: 2026-03-06ANT 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
Filing Date
2023-02-16
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

In secure multi-party computation, participating parties cannot securely perform inner joins on data tables, leading to privacy data leaks and security risks.

Method used

By performing privacy-preserving intersection, secure scrambling, and data table shuffling operations, the scrambling indicator sequence is restored, and prohibited rows are deleted locally to obtain the local fragment of the intermediate data table, and finally the local fragment of the target data table is obtained.

Benefits of technology

It enables secure inner joins of data tables without revealing field values ​​under predefined fields, reducing the risk of individual participants knowing the construction process of the target data table.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257525B_ABST
    Figure CN116257525B_ABST
Patent Text Reader

Abstract

This specification provides a secure data fusion method and apparatus for performing inner joins on N data tables held by N participating parties to obtain a target data table. The method performed by any participating party includes: performing privacy intersection with the other participating parties on the field values ​​of predetermined fields in the N data tables to obtain a fragment of the party's own data table containing N indicator sequences, where the j-th element in the i-th indicator sequence indicates whether the j-th field value of the predetermined field in the i-th data table is common to all N data tables; performing the same shuffling operation on the i-th data table and the i-th indicator sequence to obtain a fragment of the party's own data table and the i-th scrambled indicator sequence; restoring and deleting rows prohibited from being used to construct the target data table from the fragment of the party's own data table according to the i-th scrambled indicator sequence to obtain a fragment of the party's own data table containing the i-th intermediate data table; and obtaining a fragment of the party's own data table containing the target data table based on the fragments of the party's own data table containing the N intermediate data tables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to one or more embodiments in the field of computers, and more particularly to a secure data fusion method and apparatus. Background Technology

[0002] Secure multi-party computation, also known as secure multi-party computation, refers to multiple parties collaboratively calculating the result of a function without disclosing their input data. The result is disclosed to one or more of the parties. In transaction processing based on secure multi-party computation, it may involve the secure merging of multiple data tables held by multiple participants. This involves performing inner joins on these data tables to obtain a target data table. Each participant can obtain a shared shard of the target data table, and the private data within each participant's data table cannot be accessed by other participants. Summary of the Invention

[0003] This specification provides a secure data fusion method and apparatus in one or more embodiments.

[0004] In a first aspect, a secure data fusion method is provided for performing an inner join on N data tables held by N participants to obtain a target data table, wherein the method is executed by any first participant among the N participants. The method includes: performing privacy intersection with the other N-1 participants on the field values ​​under predetermined fields in the N data tables to obtain N local fragments of indicator sequences, wherein any j-th element in any i-th indicator sequence is used to indicate whether the j-th field value under the predetermined field in the i-th data table is common to the predetermined field in the N data tables; jointly with the other N-1 participants, performing the same shuffling operation on the i-th data table and the i-th indicator sequence to obtain local fragments of the i-th disordered data table and the i-th disordered indicator sequence; jointly with the other N-1 participants, restoring the i-th disordered indicator sequence, and locally deleting row data prohibited from being used to construct the target data table from the local fragment of the i-th disordered data table according to the i-th disordered indicator sequence to obtain local fragments of the i-th intermediate data table; and jointly with the other N-1 participants, obtaining local fragments of the target data table based on the local fragments of the N intermediate data tables.

[0005] In one possible implementation, the N participants are the first participant and the second participant; when the i-th data table is held by the first participant, the first participant also holds a perturbation item and a reference item, and the second participant holds a permutation item and a balancing item. Specifically, the step of jointly performing the same shuffling operation on the i-th data table and the i-th indicator sequence with the remaining N-1 participants includes: determining the reference item as the local fragment of the i-th shuffled data table; perturbing the i-th data table according to the perturbation item, obtaining the perturbation result, and providing the perturbation result to the second participant, so that the second participant determines the local fragment of the i-th shuffled data table based on the permutation item, the balancing item, and the perturbation result.

[0006] In one possible implementation, the allowed values ​​of any j-th element in the i-th indicator sequence include at least a first numerical value, used to indicate that the corresponding field value is shared by a predetermined field in the N data tables. Specifically, deleting rows of data prohibited from being used to construct the target data table from the local partition of the i-th disordered data table according to the i-th disordered indicator sequence includes: deleting the k-th row of data from the local partition of the i-th disordered data table when the value of any k-th element in the i-th disordered indicator sequence is not the first numerical value.

[0007] In one possible implementation, the step of collaborating with the other N-1 participants to obtain the local shard of the target data table based on the local shards in the N intermediate data tables specifically includes: collaborating with the other N-1 participants to perform secure sorting of each row of data in the N intermediate data tables according to predetermined fields to obtain local shards of the N sorted data tables; and concatenating the local shards of the N sorted data tables according to fields to form the local shard of the target data table.

[0008] In one possible implementation, the step of collaborating with the other N-1 participants to securely sort the data in each row of the N intermediate data tables according to a predetermined field to obtain a local fragment of the N sorted data tables specifically includes: for the i-th intermediate data table, collaborating with the other N-1 participants to perform a merge sort on the i-th intermediate data table based on a secure comparison of the values ​​of each field under the predetermined field, using the comparison results in plaintext, to obtain a local fragment of the i-th sorted data table.

[0009] In one possible implementation, the field values ​​under a predetermined field in the i-th intermediate data table include a first field value and a second field value. The step of collaborating with the remaining N-1 participants to perform a merge sort on the i-th intermediate data table based on a secure comparison of the field values ​​under the predetermined field, using the plaintext comparison results, includes: securely comparing the size of the first field value and the second field value with the remaining N-1 participants to obtain a fragment of the secure comparison result; receiving the remaining N-1 fragments of the secure comparison result from the remaining N-1 participants; and fusing the N fragments of the secure comparison result according to a predetermined method to obtain a comparison result in plaintext indicating the size relationship between the first field value and the second field value.

[0010] Secondly, a secure data fusion device is provided for performing inner joins on N data tables held by N participating parties to obtain a target data table. The device is deployed on any first participating party among the N participating parties. The device includes: a privacy intersection unit, used to perform privacy intersection with the other N-1 participating parties on field values ​​under predetermined fields in the N data tables to obtain a fragment of N indicator sequences, wherein any j-th element in any i-th indicator sequence is used to indicate whether the j-th field value under a predetermined field in the i-th data table is common to the predetermined field in the N data tables; and a secure scrambling unit, used in conjunction with the other N-1 participating parties to perform the same scrambling operation on the i-th data table and the i-th indicator sequence to obtain an i-th scrambling number. The update processing unit, in conjunction with the remaining N-1 participants, recovers the i-th out-of-order indication sequence and, locally based on the i-th out-of-order indication sequence, deletes row data prohibited from being used to construct the target data table from the local fragment of the i-th out-of-order data table, thereby obtaining the local fragment of the i-th intermediate data table; the connection processing unit, in conjunction with the remaining N-1 participants, obtains the local fragment of the target data table based on the local fragments of the N intermediate data tables.

[0011] In one possible implementation, the N participants are the first participant and the second participant; when the i-th data table is held by the first participant, the first participant also holds a perturbation item and a reference item, and the second participant holds a permutation item and a balancing item. The secure out-of-order unit is used to determine the reference item as its own fragment of the i-th out-of-order data table; perturb the i-th data table according to the perturbation item, obtain a perturbation result, and provide the perturbation result to the second participant, so that the second participant determines its own fragment of the i-th out-of-order data table based on the permutation item, the balancing item, and the perturbation result.

[0012] In one possible implementation, the allowed values ​​of any j-th element in the i-th indicator sequence include at least a first numerical value, used to indicate that the corresponding field value is shared by a predetermined field in the N data tables. The update processing unit is configured to delete the k-th row of data from the local shard of the i-th disordered data table when the value of any k-th element in the i-th disordered indicator sequence is not the first numerical value.

[0013] In one possible implementation, the connection processing unit is configured to collaborate with the remaining N-1 participants to perform secure sorting of each row of data in the N intermediate data tables according to predetermined fields, thereby obtaining local fragments of the N sorted data tables; and to concatenate the local fragments of the N sorted data tables according to fields to form local fragments of the target data table.

[0014] In one possible implementation, the connection processing unit is configured to, in conjunction with the other N-1 participants, perform a merge sort on the i-th intermediate data table based on a secure comparison of the values ​​of each field under a predetermined field, using the comparison results in plaintext, to obtain the local fragment of the i-th sorted data table.

[0015] In one possible implementation, the field values ​​under a predetermined field in the i-th intermediate data table include a first field value and a second field value. The connection processing unit is configured to securely compare the first field value and the second field value with the remaining N-1 participants to obtain its own fragment representing the secure comparison result; receive the remaining N-1 fragments representing the secure comparison result from the remaining N-1 participants; and fuse the N fragments representing the secure comparison result based on a predetermined method to obtain a comparison result that explicitly indicates the relationship between the first field value and the second field value.

[0016] Thirdly, a computer-readable storage medium is provided having a computer program / instructions stored thereon, wherein when the computer program / instructions are executed in a computing device, the computing device implements the method described in any one of the first aspects.

[0017] Fourthly, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method described in any one of the first aspects.

[0018] Using the methods and apparatus provided in one or more embodiments of this specification, for a single participant among N participants, it can first jointly perform privacy intersection on the field values ​​of predetermined fields in N data tables with the other participants to obtain a local fragment of N indicator sequences, where the j-th element in the i-th indicator sequence is used to indicate whether the j-th field value of the predetermined field in the i-th data table is common to all N data tables; then, jointly perform the same shuffling operation on the i-th data table and the i-th indicator sequence with the other participants to obtain a local fragment of the i-th disordered data table and the i-th disordered indicator sequence; then, jointly perform the restoration of the i-th disordered indicator sequence with the other participants, and locally execute the deletion of row data prohibited from being used to construct the target data table from the local fragment of the i-th disordered data table according to the i-th disordered indicator sequence to obtain a local fragment of the i-th intermediate data table; finally, jointly perform the acquisition of the local fragment of the target data table based on the local fragments of the N intermediate data tables held by the participant with the other participants. In this way, when N participants perform secure data fusion on N data tables held by N participants according to predetermined fields, no single participant can accurately know which field values ​​under the predetermined fields are used to construct the target data table, thus enabling more secure data fusion on N data tables according to predetermined fields. Attached Figure Description

[0019] 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 of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a secure data fusion method provided in the embodiments of this specification;

[0021] Figure 2 This is a schematic diagram illustrating the process of safely reordering an exemplary data table in an embodiment of this specification;

[0022] Figure 3 This is a schematic diagram of the structure of a secure data fusion device provided in the embodiments of this specification. Detailed Implementation

[0023] The various non-limiting embodiments provided in this specification will now be described in detail with reference to the accompanying drawings.

[0024] Secure Multi-Party Computation (SMPC) addresses the problem of privacy-preserving collaborative computation among a group of distrustful participants. SMPC ensures the independence of inputs and the correctness of computation while preventing the disclosure of input data to other participants. Secret Sharing (SS) is a common technique used to support the implementation of Secure Multi-Party Computation. The idea behind Secret Sharing is to divide private data as a secret in an appropriate manner. Each share / shard is managed by a different participant. A single participant cannot recover the private data; only through collaboration among several participants in a specific way can the private data be recovered.

[0025] In some technical scenarios, it may be necessary to perform secure data fusion on N data tables held by N participants according to predetermined fields. For example, the N participants include two participants, participant A and participant B. Participant A holds data table x1 as shown in Table 1 below, and participant B holds data table y1 as shown in Table 2 below. By performing an inner join on data tables x1 and y1 according to the field Id (predetermined field), the target data table shown in Table 3 below can be obtained. When performing secure data fusion on the aforementioned data tables x1 and y1 according to the field Id, participant A and participant B each obtain one shard of the target data table as shown in Table 3 below. During this process, participant A cannot know the field value under the Age field in data table y1 held by participant B, and participant B cannot know the field value under the Income field in data table x1 held by participant A.

[0026] Id Income 1 1000 2 2000 3 3000 7 4000

[0027] Table 1

[0028] Id Age 1 1 2 1 3 2 11 4 12 6

[0029] Table 2

[0030] Id Income Age 1 1000 1 2 2000 1 3 3000 2

[0031] Table 3

[0032] When performing secure data fusion on N data tables held by N participants according to predetermined fields, the participants may learn which field values ​​under the predetermined fields are used to construct the target data table, thus posing a security risk to transactions implemented based on the target data table. For example, when participants A and B use relevant technologies to perform secure data fusion on data tables x1 and y1 in the aforementioned example according to the field Id, both participants A and B may know that field values ​​1, 2, and 3 under the Id field are used to construct the target data table. Assuming that the field value under the Id field is a user identifier, both participants A and B may know which user data is applied to transactions implemented using the target data table.

[0033] This specification provides a secure data fusion method and apparatus for performing secure data fusion on N data tables held by N participating parties according to predetermined fields, that is, for performing inner joins on N data tables held by N participating parties to obtain a target data table. For a single participant among N participants, it can first collaborate with the other participants to perform privacy intersection on the field values ​​of predetermined fields in the N data tables, obtaining its own fragment of N indicator sequences. The j-th element in the i-th indicator sequence is used to indicate whether the j-th field value of the predetermined field in the i-th data table is common to all N data tables. Next, it collaborates with the other participants to perform the same shuffling operation on the i-th data table and the i-th indicator sequence, obtaining its own fragment of the i-th scrambled data table and the i-th scrambled indicator sequence. Then, it collaborates with the other participants to restore the i-th scrambled indicator sequence, and locally executes the deletion of row data that is prohibited from being used to construct the target data table from its own fragment of the i-th scrambled data table according to the i-th scrambled indicator sequence, obtaining its own fragment of the i-th intermediate data table. Finally, it collaborates with the other participants to obtain its own fragment of the target data table based on its own fragments of the N intermediate data tables. Thus, in the process of achieving secure data fusion of N data tables held by N participants according to predetermined fields, no single participant can accurately know which field values ​​under the predetermined fields are used to construct the target data table, thereby enabling more secure data fusion of N data tables according to predetermined fields.

[0034] Figure 1 This is a flowchart illustrating a secure data fusion method provided in the embodiments of this specification. The method involves N participants, each of which can be implemented as any device, equipment, platform, or cluster of devices with computing / processing capabilities. These N participants can hold N data tables, with different data tables held by different participants. Each of the N data tables can include predetermined fields for inner joins. The field values ​​under fields other than the predetermined fields in the data tables represent the privacy data of the respective participants. This method can be executed by any first participant among the N participants.

[0035] See Figure 1 As shown, the method may include, but is not limited to, some or all of the following steps S11 to S17.

[0036] Step S11: Perform privacy intersection with the other N-1 participants on the field values ​​under the predetermined fields in the N data tables to obtain the party's fragment of N indicator sequences. The j-th element in any i-th indicator sequence is used to indicate whether the j-th field value under the predetermined field in the i-th data table is shared by the predetermined fields in the N data tables.

[0037] The allowed values ​​of any j-th element in any i-th indicator sequence include at least the first value, which is used to indicate that the corresponding field value is common to predetermined fields of N data tables. For example, the allowed values ​​of the j-th element include the single-bit values ​​1 and 0 in the modulo-2 space. When the value is 1, it indicates that the corresponding field value is common to predetermined fields of N data tables, and when the value is 0, it indicates that the corresponding field value is not common to predetermined fields of N data tables.

[0038] For any i-th data table among N data tables, a single participant can perform privacy-preserving intersection of field values ​​under predetermined fields in the N data tables by jointly executing the general circuit protocol with the other N-1 participants. This allows each of the N participants to obtain a slice of the i-th indicator sequence. Alternatively, other methods can be used. For example, when there are two participants among the N participants, they can perform pairwise equality checks on the elements under predetermined fields in the two data tables, ultimately allowing each participant to obtain its own slice of the two indicator sequences. Other methods include privacy-preserving intersection based on polynomial interpolation, privacy-preserving intersection based on Vole, and so on.

[0039] Taking N participants, including two participants such as participant A (first participant) and participant B (second participant), as an example, participant A holds data table x1 as shown in Table 1 above, and participant B holds data table y1 as shown in Table 2 above. Through the execution of the aforementioned step S11, participant A can obtain its own fragment m of the indication sequence m1 corresponding to data table x1. 1A The local segment n of the indicator sequence n1 corresponding to data table y1 1A Participant B can obtain its own fragment m of the indicator sequence m1 corresponding to data table x1. 1B The local segment n of the indicator sequence n1 corresponding to data table y1 1BThe indicator sequence m1 is, for example, [1, 1, 1, 0], and the indicator sequence n1 is, for example, [1, 1, 1, 0, 0]. Participant A and Participant B each obtain their own fragments of indicator sequence m1 and indicator sequence n1, but cannot obtain the complete indicator sequences m1 and n1. Therefore, Participant A and Participant B cannot know which field values ​​under field Id will be used to construct the target data table.

[0040] Step S13: In conjunction with the remaining N-1 participants, perform the same shuffling operation on the i-th data table and the i-th indicator sequence to obtain the local fragment of the i-th shuffled data table and the local fragment of the i-th shuffled indicator sequence. That is, in conjunction with the remaining N-1 participants, perform secure shuffling on the i-th data table and the i-th indicator sequence based on the same permutation terms to obtain the local fragment of the i-th shuffled data table and the local fragment of the i-th shuffled indicator sequence.

[0041] Secure shuffling refers to a secure operation where multiple participants shuffle the order of data in an original data table without disclosing local privacy data, and the participants cannot know the new data order after the shuffling. By securely shuffling the i-th data table containing multiple rows of data / the i-th indicator sequence containing multiple elements, N participants can obtain a fragment of the i-th shuffled data table / the i-th shuffled indicator sequence. The N fragments of the i-th shuffled data table / the i-th shuffled indicator sequence form a shared form of the i-th shuffled data table / the i-th shuffled indicator sequence. More specifically, a single participant can obtain a fragment of each element in the i-th shuffled data table / the i-th shuffled indicator sequence. The corresponding elements in each fragment can be used to recover the elements in the i-th shuffled data table / the i-th shuffled indicator sequence according to the sharing method (e.g., arithmetic sharing, Boolean sharing, etc.).

[0042] A single secure shuffling operation typically uses a secure permutation tuple with four parameters. The secure permutation tuple consists of a permutation term p and three random datasets a, b, and d. Permutation p represents a data permutation operation or permutation relation, random number set a is the perturbation term, random number set b is the reference term, and random number set d is the balance term. When permutation p is applied to dataset a (denoted as pa), pa - b = d. As an example of permutation p, suppose the permutation p = [1, 3, 2, 4], meaning that the first element after the permutation remains the first element of the original dataset, the second element after the permutation becomes the third element of the original dataset, and so on. If dataset a is a = [11, 13, 54, 12], then permutation p applied to dataset a can be pa = [11, 54, 13, 12]. If two parties jointly perform a secure shuffling operation on the original dataset, the permutation term p and the balance term d are held by the party that does not hold the original dataset, while the perturbation term a and the reference term b are held by the party that holds the original dataset.

[0043] The following description uses a specific example of secure out-of-order processing. The example describes how participant A and participant B jointly perform secure out-of-order processing on data table x1, enabling participant A to obtain a fragment x of the out-of-order data table x2 corresponding to data table x1. 2A Participant B obtains a fragment x of the out-of-order data table x2 corresponding to data table x1. 2B The specific process.

[0044] See Figure 2 As shown, for example, a secure permutation tuple Z1 corresponding to data table x1 can be obtained through a trusted third party. This trusted third party can send the permutation term p and the balance term d from the secure permutation tuple Z1 to participant B, and the perturbation term a and the reference term b from the secure permutation tuple Z1 to participant A, who holds data table x1. Participant A can then determine the reference term b as its own fragment x of the out-of-order data table x2 corresponding to data table x1. 2A Participant A can perturb data table x1 based on perturbation term a, obtain perturbation result x1-a, and send perturbation result x1-a to participant B; Participant B can apply permutation term p to perturbation result x1-a, obtain permutation result p(x1-a), and then calculate p(xa)+d based on permutation result p(x1-a) and balance term d to obtain its own fragment x of the disordered data table x2 corresponding to data table x1. 2B It is not difficult to verify that x 2A +x 2B =px1.

[0045] For the indicator sequence m1 corresponding to data table x1, it can be safely shuffled using the permutation terms in the safe permutation tuple Z1. For example, the safe permutation tuple Z1 can be used to shuffle the fragment m of the indicator sequence m1 held by participant A. 1A Perform a safe out-of-order process so that participant A obtains fragment m. 1A sub-segment m 1AA Participant B receives segment m 1A sub-segment m 1AB Among them, participant A can divide the sub-shard m 1AA As a fragment m of the disordered indicator sequence m2 corresponding to the obtained indicator sequence m1 2A Participant B can obtain the fragment m. 1B and fragments m 1A sub-segment m 1AB Merging is performed to obtain a fragment m of the disordered indicator sequence m2 corresponding to the indicator sequence m1. 2B .

[0046] The preceding text described in detail the process of securely scrambling data table x1 and its corresponding indicator sequence m1 held by participant A. For data tables and their corresponding indicator sequences held by other participants, such as data table y1 and its corresponding indicator sequence n1 held by participant B, a similar process can be used to securely scramble data table y1 and indicator sequence n1. Thus, participant A can obtain a fragment y of the scrambled data table y2 corresponding to data table y1. 2A And a fragment n of the disordered indicator sequence n2 corresponding to the indicator sequence n1. 2A Participant B can obtain a fragment of the out-of-order data table y2 corresponding to data table y1. 2B And a fragment n of the disordered indicator sequence n2 corresponding to the indicator sequence n1. 2B It is important to note that for different data tables held by different participants, different secure permutation tuples should be used to securely shuffle them.

[0047] For example, if the permutation item p in the safe permutation tuple Z1 used to safely shuffle the data table x1 is [1, 3, 2, 4], and the permutation item p in the safe permutation tuple Z2 used to safely shuffle the data table y1 is [1, 3, 4, 2, 5], then the shuffled data table x2 and shuffled data table y2 mentioned above are the data tables shown in Table 4 and Table 5 below, respectively.

[0048] Id Income 1 1000 3 3000 2 2000 7 4000

[0049] Table 4

[0050] Id Age 1 1 3 2 11 4 2 1 12 6

[0051] Table 5

[0052] Based on the safe scrambling of data table x1 and data table y1 using the aforementioned safe permutation tuples Z1 and Z2 respectively, the aforementioned scrambling indicator sequence m2 can be, for example, [1, 1, 1, 0], and the aforementioned scrambling indicator sequence n2 can be, for example, [1, 1, 0, 1, 0].

[0053] Depends on the other three random datasets in the safe permutation tuple Z1, the shards x of the out-of-order data table x2 2A and fragments x 2B For example, the data tables might be as shown in Tables 6 and 7 below.

[0054] Id Income 23 1023 19 3045 11 3096 8 4055

[0055] Table 6

[0056] Id Income -22 -23 -16 -45 -9 -1096 -1 -55

[0057] Table 7

[0058] Based on the other three random datasets in the safe permutation tuple Z2, the shards y of the out-of-order data table y2 2A and fragments y 2B For example, the data tables might be as shown in Tables 8 and 9 below.

[0059] Id Age 7 3 9 7 13 -1 3 9 8 2

[0060] Table 8

[0061] Id Age -6 -2 -6 -5 -2 5 -1 -8 4 4

[0062] Table 9

[0063] The process of safely reordering a data table / indicator sequence described above is merely an example. For instance, other safe reordering algorithms, such as g-modules, can also be used to safely reorder a data table / indicator sequence.

[0064] Step S15: In conjunction with the remaining N-1 participants, restore the i-th disordered indication sequence, and locally, based on the i-th disordered indication sequence, delete the row data that is prohibited from being used to construct the target data table from the local fragment of the i-th disordered data table, and obtain the local fragment of the i-th intermediate data table.

[0065] A single participant can receive the remaining N-1 fragments of the i-th out-of-order indicator sequence from the other N-1 participants, and then recover the i-th out-of-order indicator sequence based on the N fragments of the i-th out-of-order indicator sequence it obtained. When the value of any k-th element in the i-th out-of-order indicator sequence is not the first value, the k-th row of data is deleted from the participant's own fragment of the i-th out-of-order data table, thereby obtaining the participant's own fragment of the i-th intermediate data table.

[0066] For example, based on the out-of-order data table x2, out-of-order data table y2, out-of-order indicator sequence m2, and out-of-order indicator sequence n2, through the aforementioned step S15: participant A can obtain a fragment x of the intermediate data table x3 corresponding to the out-of-order data table x2. 3A A partition y of the intermediate data table y3 corresponding to the disordered data table y2. 3B Participant B can obtain a shard x of the intermediate data table x3 corresponding to the out-of-order data table x2. 3B A fragment x of the intermediate data table y3 corresponding to the disordered data table y2 3B The intermediate data tables x3 and y3 are shown in Tables 10 and 11 below.

[0067] Id Income 1 1000 3 3000 2 2000

[0068] Table 10

[0069] Id Age 1 1 3 2 2 1

[0070] Table 11

[0071] Referring back to the previous text, let's continue to assume that the shards x of the out-of-order data table x2 are... 2A and fragments x 2B The data tables shown in Tables 6 and 7 above, and the fragments y of the out-of-order data table y2. 2A and fragments y 2B These are the data tables shown in Tables 8 and 9 above. Therefore, through the aforementioned step S15, participant A can obtain the shards x shown in Tables 12 and 13 below. 3A and fragments y 3A Participant B can obtain the shards x shown in Tables 14 and 15 below. 3B and fragments y 3B .

[0072] Id Income 23 1023 19 3045 11 3096

[0073] Table 12

[0074] Id Age 7 3 9 7 3 9

[0075] Table 13

[0076] Id Income -22 -23 -16 -45 -9 -1096

[0077] Table 14

[0078] Id Age -6 -2 -6 -5 -1 -8

[0079] Table 15

[0080] Step S17: In conjunction with the other N-1 participants, obtain the local shard of the target data table based on the local shards of the N intermediate data tables. More specifically, in conjunction with the other N-1 participants, perform a secure sorting of each row of data in the N intermediate data tables according to predetermined fields to obtain local shards of the N sorted data tables. Then, concatenate the local shards of the N sorted data tables according to the fields to form the local shard of the target data table.

[0081] To perform sorting, elements of a predetermined field can be compared using a safe comparison method. Safe comparisons can be implemented in various conventional and feasible ways, which will not be elaborated upon here. A single safe comparison determines the relative size of two elements. Typically, the result of a safe comparison is shared between the two data providers.

[0082] After secure scrambling, since no single participant can know the correspondence between rows in the scrambled data table and rows in the initial data table, even if the size relationship between any two elements under a predetermined field in the intermediate data table is made public, a single participant cannot determine the field values ​​under the predetermined fields in the N data tables for the two rows corresponding to the larger and smaller data. Under this technical concept, to reduce computational complexity, the comparison results of secure comparisons can be made public based on secure scrambling. With the comparison results of the corresponding elements made public, the secure comparison process can be optimized to reduce the number of secure comparisons performed. For example, an optimized sorting method such as merge sort can be used.

[0083] Taking sorting an array as an example, in merge sort, the array can be divided into two parts, sorted separately, and then merged according to the sorting results of the two parts. When sorting a single part of the array (which is also an array), it can also be divided into two parts, each part sorted first, and then merged. This process continues until a certain level of fineness is reached, where each part may contain only one element. In this case, no sorting is needed; a simple merge is sufficient. Starting from the finest granularity, the merge is performed level by level upwards until the merge is complete.

[0084] As a concrete example, in descending order, the intermediate data table (assuming it contains 3 elements) can be divided into two parts: one part contains the first two elements, and the second part contains the third element. First, compare the two elements in the first part. Assuming the second element q2 is greater than the first element q1, each participant swaps the corresponding segments of the rows containing the first and second elements, thus achieving the swap of their positions. Then, merge the third element q3 from the other part with that part. At this point, compare the third element q3 with the second element q2. Assuming the third element q3 is greater than the second element q2, the data row corresponding to the third element can be moved before the second element q2, completing the data row sorting.

[0085] For a single participant, when adjusting the order of data rows, only the shards of the local intermediate data table need to be adjusted. For example, participant A can adjust the shard x of intermediate data table x3. 3A To obtain the shards x of sorted data table x4 4A Adjust the sharding of intermediate data table y3. 3A To obtain the shards y of the sorted data table y4 4A Participant B can adjust the sharding of intermediate data table x3. 3B To obtain the shards x of sorted data table x4 4B Adjust the sharding of intermediate data table y3. 3A To obtain the shards y of the sorted data table y4 4B Participant A can obtain the shards x shown in Tables 16 and 17 below. 4A and fragments y 4A Participant B can obtain the shards x shown in Tables 18 and 19 below. 4B and fragments y 4B .

[0086]

[0087]

[0088] Table 16

[0089] Id Age 7 3 3 9 9 7

[0090] Table 17

[0091] Id Income -22 -23 -9 -1096 -16 -45

[0092] Table 18

[0093] Id Age -6 -2 -1 -8 -6 -5

[0094] Table 19

[0095] A safe sorting algorithm based on element size comparison results can also be used to further reduce communication volume.

[0096] When a single participant concatenates its own shards from N sorted data tables locally, it can use the field values ​​of predetermined fields in its own shard of a single sorted data table as the field values ​​of predetermined fields in its own shard of the target data table. For example, participant A can choose shard x 4A The field value under the Id field is used as the shard A of the target data table. XY The field values ​​under the ID field; at the same time, participant B can choose shard x 4B The field value under the Id field is used as the shard B of the target data table. XY The field values ​​under the Id field. Thus, participant A can, for example, obtain shard A as shown in Table 20 below. XY For example, participant B can obtain the shards shown in Table 21 below. XY .

[0097] Id Income Age 23 1023 3 11 3096 9 19 3054 7

[0098] Table 20

[0099]

[0100]

[0101] Table 21

[0102] Other methods can also be used to determine the field values ​​under predetermined fields in a single shard of the target data table. For example, for participant A, it can calculate the shard x it holds. 4A and fragments y 4A The average value of the field at the same position under the Id field is used as the partition A. XY The field value at the corresponding position under the Id field. The same applies to participant B.

[0103] Based on the same concept as the aforementioned method embodiments, this specification also provides a secure data fusion device for performing inner joins on N data tables held by N participating parties to obtain a target data table. The device is deployed on the first participating party among the N participating parties. Figure 3As shown, the device includes: a privacy intersection unit 31, used to perform privacy intersection with the other N-1 participants on the field values ​​under predetermined fields in the N data tables to obtain the local fragments of N indicator sequences, wherein any j-th element in any i-th indicator sequence is used to indicate whether the j-th field value under the predetermined field in the i-th data table is common to the predetermined field in the N data tables; and a secure scrambling unit 33, used to cooperate with the other N-1 participants to perform the same scrambling operation on the i-th data table and the i-th indicator sequence to obtain the i-th scrambling sequence. The local fragment of the ordered data table and the local fragment of the i-th out-of-order indicator sequence; update processing unit 35, used to cooperate with the other N-1 participants to restore the i-th out-of-order indicator sequence, and locally delete row data that is prohibited from being used to construct the target data table from the local fragment of the i-th out-of-order data table according to the i-th out-of-order indicator sequence, to obtain the local fragment of the i-th intermediate data table; connection processing unit 37, used to cooperate with the other N-1 participants to obtain the local fragment of the target data table according to the local fragments of the N intermediate data tables.

[0104] In one possible implementation, the N participants are the first participant and the second participant; when the i-th data table is held by the first participant, the first participant also holds a perturbation item and a reference item, and the second participant holds a permutation item and a balancing item; wherein, the secure out-of-order unit 33 is used to determine the reference item as the local fragment of the i-th out-of-order data table; perturb the i-th data table according to the perturbation item, obtain the perturbation result and provide the perturbation result to the second participant, so that the second participant determines the local fragment of the i-th out-of-order data table according to the permutation item, the balancing item and the perturbation result.

[0105] In one possible implementation, the allowed values ​​of any j-th element in the i-th indicator sequence include at least a first value, used to indicate that the corresponding field value is shared by a predetermined field of the N data tables; wherein, the update processing unit 35 is used to delete the k-th row of data from the local shard of the i-th disordered data table when the value of any k-th element in the i-th disordered indicator sequence is not the first value.

[0106] In one possible implementation, the connection processing unit 37 is used to collaborate with the other N-1 participants to perform secure sorting of each row of data in the N intermediate data tables according to predetermined fields to obtain the local fragments of the N sorted data tables; and to concatenate the local fragments of the N sorted data tables according to fields to form the local fragment of the target data table.

[0107] In one possible implementation, the connection processing unit 37 is configured to, in conjunction with the other N-1 participants, perform a merge sort on the i-th intermediate data table based on a secure comparison of the values ​​of each field under a predetermined field, using the comparison results in plaintext, to obtain the local fragment of the i-th sorted data table.

[0108] In one possible implementation, the field values ​​under a predetermined field in the i-th intermediate data table include a first field value and a second field value; wherein, the connection processing unit 37 is used to securely compare the size of the first field value and the second field value with the remaining N-1 participants to obtain its own fragment of the secure comparison result; receive the remaining N-1 fragments of the secure comparison result from the remaining N-1 participants; and fuse the N fragments of the secure comparison result based on a predetermined method to obtain a comparison result that clearly indicates the size relationship between the first field value and the second field value.

[0109] Those skilled in the art will recognize that, in one or more of the examples above, the functions described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, the computer program corresponding to these functions can be stored in a computer-readable medium or transmitted as one or more instructions / code on a computer-readable medium so that when the computer program corresponding to these functions is executed by a computer, the methods described in any embodiment of this specification can be implemented by the computer.

[0110] This specification also provides a computer-readable storage medium storing a computer program, which, when executed in a computing device, performs method steps provided in any of the N participants in any embodiment of this specification.

[0111] This specification also provides a computing device in its embodiments, including a memory and a processor. The memory stores executable code, and when the processor executes the executable code, it implements the method steps provided in any embodiment of this specification, which are performed by any of the N participants.

[0112] The various embodiments in this specification are described in a progressive manner. Similar or identical parts in each embodiment can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0113] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0114] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A secure data fusion method for inner joining N data tables held by N participants to obtain a target data table, the method being performed by a first participant of the N participants, the method comprising: privately intersecting, with the remaining N-1 participants, field values under a predetermined field in the N data tables to obtain N local shards of indication sequences, wherein any jth element in any ith indication sequence is used to indicate whether a jth field value under the predetermined field in the ith data table is common to the predetermined field of the N data tables; jointly with the remaining N-1 participants, performing the same shuffling operation on the ith data table and the ith indication sequence to obtain a local shard of an ith shuffled data table and a local shard of an ith shuffled indication sequence; jointly with the remaining N-1 participants, recovering the ith shuffled indication sequence and locally deleting, according to the ith shuffled indication sequence, row data that is prohibited from being used to construct the target data table from the local shard of the ith shuffled data table to obtain a local shard of an ith intermediate data table; jointly with the remaining N-1 participants, obtaining a local shard of the target data table according to the N local shards of the intermediate data tables.

2. The method of claim 1, wherein the N participants are the first participant and a second participant; when the ith data table is held by the first participant, the first participant also holds a perturbation term and a reference term, the second participant holds a permutation term and a balancing term; wherein, The shuffling operation on the ith data table and the ith indication sequence specifically comprises: determining the reference item as the local shard of the ith shuffled data table; disturbing the ith data table according to the disturbance item to obtain a disturbance result and providing the disturbance result to the second participant, so that the second participant determines the local shard of the ith shuffled data table according to the permutation item, the balance item and the disturbance result. 3.The method of claim 1, wherein the allowed values of any jth element in the ith indication sequence at least include a first numerical value, which is used to indicate that the corresponding field value is common to the predetermined field of the N data tables. wherein The deleting of row data from the local shard of the ith shuffled data table according to the ith shuffled indication sequence comprises: when the value of any kth element in the ith shuffled indication sequence is not the first numerical value, deleting the kth row data from the local shard of the ith shuffled data table. 4.The method of any one of claims 1-3, wherein the obtaining of the local shard of the target data table according to the local shards of the N intermediate data tables specifically comprises: jointly with the remaining N-1 participants, securely sorting, according to the predetermined field, row data in the N intermediate data tables to obtain N local shards of sorted data tables; splicing the N local shards of sorted data tables according to fields to form the local shard of the target data table.

5. The method of claim 4, wherein the N-1 other parties are combined to securely sort each row of data in the N intermediate data tables according to a predetermined field to obtain N sorted data tables, each of which is a local shard of the party, and wherein the method further comprises: For the ith intermediate data table, jointly with the remaining N-1 participants, based on a secure comparison between each field value under the predetermined field, performing a merge sort on the ith intermediate data table using a comparison result of the plaintext to obtain a local shard of an ith sorted data table. ​ 6. The method of claim 5, wherein the field value under the predetermined field in the ith intermediate data table comprises a first field value and a second field value; and wherein, The first field value and the second field value are compared in size with the remaining N-1 participants to obtain a local shard of the secure comparison result. The first field value and the second field value are compared in size with the remaining N-1 participants to obtain a local shard of the secure comparison result. The N shards of the secure comparison result are fused based on a predetermined manner to obtain a comparison result indicating the size relationship between the first field value and the second field value.

7. A secure data fusion apparatus for performing an inner join on N data tables held by N participants to obtain a target data table, the apparatus being deployed at a first participant among the N participants, the apparatus comprising: a private intersection unit configured to perform a private intersection on field values under a predetermined field in the N data tables with the remaining N-1 participants to obtain N local shards of indication sequences, wherein any jth element in any ith indication sequence is configured to indicate whether a jth field value under the predetermined field in an ith data table is common to the predetermined field in the N data tables; a secure disorder unit configured to perform a same disorder operation on an ith data table and an ith indication sequence with the remaining N-1 participants to obtain a local shard of an ith disorder data table and a local shard of an ith disorder indication sequence; an update processing unit configured to restore the ith disorder indication sequence with the remaining N-1 participants and delete, locally, row data prohibited from being used to construct the target data table from the local shard of the ith disorder data table according to the ith disorder indication sequence to obtain a local shard of an ith intermediate data table; a connection processing unit configured to obtain a local shard of the target data table from the N local shards of the intermediate data tables with the remaining N-1 participants. The secure disorder unit is configured to determine the reference item as the local shard of the ith disorder data table, disturb the ith data table according to the disturbance item to obtain a disturbance result and provide the disturbance result to the second participant, so that the second participant determines the local shard of the ith disorder data table according to the permutation item, the balance item and the disturbance result.

8. The apparatus of claim 7, wherein the N participants are the first participant and a second participant; when the ith data table is held by the first participant, the first participant also holds a perturbation term and a reference term, the second participant holds a permutation term and a balancing term; wherein, The update processing unit is configured to delete kth row data from the local shard of the ith disorder data table when a value of any kth element in the ith disorder indication sequence is not the first numerical value.

9. The apparatus of claim 7, wherein the allowed values of any jth element in the ith indication sequence include at least a first value indicating that the corresponding field value is common to the predetermined field of the N data tables.

10. The apparatus according to any one of claims 7-9, wherein the connection processing unit is configured to perform a secure sorting on row data in the N intermediate data tables according to a predetermined field with the remaining N-1 participants to obtain N local shards of sorted data tables, and splice the N local shards of sorted data tables according to a field to form the local shard of the target data table. ​ 11.The apparatus of claim 10, wherein the connection processing unit is configured to, for the i th intermediate data table, jointly with the remaining N-1 participants, perform a merge sort on the i th intermediate data table based on a secure comparison between each field value under a predetermined field, and obtain a local shard of the i th sorted data table using a comparison result of the plaintext.

12. The apparatus of claim 11, wherein the field value under the predetermined field in the ith intermediate data table comprises a first field value and a second field value; and wherein, The connection processing unit is configured to securely compare the first field value and the second field value with the remaining N-1 participants to obtain a local shard of a secure comparison result; and receive the remaining N-1 shards of the secure comparison result from the remaining N-1 participants. The connection processing unit is configured to fuse the N shards of the secure comparison result based on a predetermined manner to obtain a comparison result indicating a size relationship between the first field value and the second field value. 13.A computer readable storage medium having stored thereon a computer program, which, when executed in a computing device, causes the computing device to perform the method of any one of claims 1-6. 14.A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Sorting sequence merging method and system based on secret sharing

    CN114282255A

  • Data query method and device based on multi-party security computing

    CN115080615A