Privacy intersection method, device and related products in low-bandwidth environment
By sharding the data in a low-bandwidth environment and adopting full-duplex mode for privacy intersection calculation, the problem of low efficiency of privacy intersection calculation in a low-bandwidth environment is solved, and efficient data intersection calculation is achieved.
Patent Information
- Application Number
- CN202211463598.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-11-17
AI Technical Summary
In low-bandwidth environments, the efficiency of privacy intersection calculations is low, and existing technologies make it difficult to efficiently perform data intersection calculations.
By sharding the data set to form multiple data shard groups, and using full-duplex mode for privacy intersection operations, the combination of full-duplex mode and data sharding can reduce instantaneous communication volume and improve computing efficiency.
In low-bandwidth environments, the efficiency of privacy intersection calculations is significantly improved, network congestion is reduced, and the efficient operation of the protocol is ensured.
Smart Images

Figure CN115834189B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of privacy computing technology and computer technology, and specifically to a privacy intersection method, device, and related products in a low-bandwidth environment. Background Art
[0002] Private intersection primarily refers to a situation where two parties, each holding a local set X and Y, wish to compute the intersection of these two sets, X∩Y, without exposing any information beyond the intersection. Currently, private intersection is widely used in scenarios such as risk management and marketing federation modeling, crowd identification, advertising effectiveness, password verification, and address book matching. However, the computational efficiency of private intersection is currently low, particularly in low-bandwidth environments. Therefore, improving the efficiency of private intersection in low-bandwidth environments is an urgent issue. Summary of the Invention
[0003] The embodiments of the present application provide a privacy intersection method, device, and related products in a low-bandwidth environment, which can improve the efficiency of privacy intersection calculation in a low-bandwidth environment.
[0004] In a first aspect, embodiments of the present application provide a privacy intersection method in a low-bandwidth environment, applied to a two-party computing system, wherein the two-party computing system includes a sender and a result party, wherein the sender has a first local data set and the result party has a second local data set; the method includes:
[0005] The sender slices the first local data set to obtain n first data slices, and divides the n first data slices into two groups to obtain a first data slice group and a second data slice group, wherein the first data slice group includes p first data slices, and the second data slice group includes np first data slices, where p is a positive integer and np is also a positive integer;
[0006] Slice the second local data set using the result processor to obtain n second data slices, divide the n second data slices into two groups to obtain a third data slice group and a fourth data slice group, wherein the third data slice group includes p second data slices, and the fourth data slice group includes np second data slices;
[0007] The sender and the result party use a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result.
[0008] In a second aspect, an embodiment of the present application provides a privacy intersection device in a low-bandwidth environment, which is applied to a two-party computing system, wherein the two-party computing system includes a sender and a result party, wherein the sender has a first local data set and the result party has a second local data set; the device includes: a first shard processing unit, a second shard processing unit, and a computing unit, wherein:
[0009] The first shard processing unit is configured to shard the first local data set through the sender to obtain n first data shards, and divide the n first data shards into two groups to obtain a first data shard group and a second data shard group, wherein the first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer;
[0010] The second shard processing unit is configured to shard the second local data set using the result method to obtain n second data shards, and divide the n second data shards into two groups to obtain a third data shard group and a fourth data shard group, wherein the third data shard group includes p second data shards and the fourth data shard group includes np second data shards;
[0011] The operation unit, wherein the sending party and the result party adopt a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group and the fourth data slice group to obtain a target intersection result.
[0012] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the steps in the first aspect of the embodiment of the present application.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application.
[0014] In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
[0015] The implementation of the embodiments of this application has the following beneficial effects:
[0016] It can be seen that the privacy intersection method, device and related products in a low-bandwidth environment described in the embodiments of the present application are applied to a two-party computing system, which includes a sender and a result party. The sender has a first local data set, and the result party has a second local data set. The sender shards the first local data set to obtain n first data shards, and divides the n first data shards into two groups to obtain a first data shard group and a second data shard group. The first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer. The result party shards the second local data set to obtain n second data shards, and divides the n second data shards into two groups to obtain a first data shard group and a second data shard group. The first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer. The shards are divided into two groups to obtain a third data shard group and a fourth data shard group. The third data shard group includes p second data shards, and the fourth data shard group includes np second data shards. The sender and the result party adopt full-duplex mode to perform privacy intersection operation on the first data shard group, the second data shard group, the third data shard group and the fourth data shard group to obtain the target intersection result. On the one hand, by using the full-duplex mode, a large amount of data that needs to be transmitted in one direction is changed to two-way transmission, which ensures the efficient operation of the protocol. On the other hand, by starting the data shards, the instantaneous communication volume is reduced, the network congestion is reduced, and it helps to improve the efficiency of the privacy intersection operation, especially in a low-bandwidth environment, the effect of improving the privacy intersection is more obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 This is a schematic diagram of the architecture of a two-party computing system for implementing a privacy intersection method in a low-bandwidth environment, provided in an embodiment of the present application;
[0019] Figure 2 This is a flowchart of a privacy intersection method in a low-bandwidth environment provided by an embodiment of the present application;
[0020] Figure 3 This is a flowchart of another privacy intersection method in a low-bandwidth environment provided by an embodiment of the present application;
[0021] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0022] Figure 5 This is a block diagram of the functional units of a privacy intersection device in a low-bandwidth environment provided by an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0025] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0026] The computing nodes (such as senders and result parties) described in the embodiments of the present application may be electronic devices, which may include smartphones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, PDAs, driving recorders, servers, laptops, mobile Internet devices (MIDs) or wearable devices (such as smart watches, Bluetooth headsets), etc. The above are only examples and not exhaustive, including but not limited to the above electronic devices. The electronic device may also be a cloud server, or the electronic device may also be a computer cluster.
[0027] The following is a detailed introduction to the embodiments of the present application.
[0028] See also Figure 1 , Figure 1This is a schematic diagram of the architecture of a two-party computing system for implementing a privacy-preserving intersection method in a low-bandwidth environment, provided in an embodiment of the present application. As shown in the figure, the two-party computing system includes a sender and a resulter. The sender has a first local data set, and the resulter has a second local data set. The system can implement the following functions:
[0029] The sender slices the first local data set to obtain n first data slices, and divides the n first data slices into two groups to obtain a first data slice group and a second data slice group, wherein the first data slice group includes p first data slices, and the second data slice group includes np first data slices, where p is a positive integer and np is also a positive integer;
[0030] Slice the second local data set using the result processor to obtain n second data slices, divide the n second data slices into two groups to obtain a third data slice group and a fourth data slice group, wherein the third data slice group includes p second data slices, and the fourth data slice group includes np second data slices;
[0031] The sender and the result party use a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result.
[0032] Optionally, the sending party and the result party adopt a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result, including:
[0033] The sender and the result party perform an intersection operation on the first data shard group and the third data shard group using a first data channel to obtain a first intersection result, wherein the communication role of the sender is a server and the communication role of the result party is a client;
[0034] The sender and the result party perform an intersection operation on the second data shard group and the fourth data shard group using a second data channel to obtain a second intersection result, wherein the communication role of the sender is a client and the communication role of the result party is a server;
[0035] The target intersection result is determined by the sending party and the result party according to the first intersection result and the second intersection result.
[0036] Optionally, the performing an intersection operation on the first data slice group and the third data slice group by the sender and the result provider using the first data channel to obtain a first intersection result includes:
[0037] Performing a first data compression on the first data slice group by the sender to obtain a reference first data slice group;
[0038] Performing a second data compression on the third data slice group using the result method to obtain a reference third data slice group;
[0039] The first intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference first data slice group and the reference third data slice group using the first data channel.
[0040] Optionally, the performing an intersection operation on the second data slice group and the fourth data slice group by the sending party and the result party using a second data channel to obtain a second intersection result includes:
[0041] performing a third data compression on the second data slice group by the sender to obtain a reference second data slice group;
[0042] Performing fourth data compression on the fourth data slice group according to the result to obtain a reference fourth data slice group;
[0043] The second intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference second data slice group and the reference fourth data slice group using the second data channel.
[0044] Optionally, the sharding the first local data set by the sender to obtain n first data shards includes:
[0045] Determining network resource parameters between the sender and the resultant;
[0046] Determine a fragment processing parameter according to the network resource parameter, wherein the fragment processing parameter includes the number of fragments n;
[0047] The first local data set is fragmented according to the fragmentation processing parameters to obtain the n first data fragments.
[0048] Optionally, the system can also implement the following functions:
[0049] Determine, by the sender and the result party, the network bandwidth between the sender and the result party;
[0050] When the network bandwidth is less than a preset threshold, the step of sharding the first local data set by the sender to obtain n first data shards is performed.
[0051] See also Figure 2 , Figure 2 This is a flow chart of a privacy intersection method in a low-bandwidth environment provided by an embodiment of the present application, which is applied to Figure 1 The two-party computing system shown in the figure includes a sender and a result party, the sender has a first local data set, and the result party has a second local data set. As shown in the figure, the privacy intersection method in the low-bandwidth environment includes:
[0052] 201. The sender fragments the first local data set to obtain n first data fragments, and divides the n first data fragments into two groups to obtain a first data fragment group and a second data fragment group, wherein the first data fragment group includes p first data fragments, and the second data fragment group includes np first data fragments, where p is a positive integer and np is also a positive integer.
[0053] In an embodiment of the present application, the sender may have a first local data set, the first local data set may include N first data groups, each first data group may include P first data, each first data may correspond to a tag information, and each data may be understood as an information field, which is used to express the content of the tag information. The tag information may include at least one of the following: ID number, identity card number (ID-CARD), telephone number (Phone Number), bank card number (Bank Card), social security account number, social account number, student number, work number, etc., which are not limited here.
[0054] In a specific implementation, for example, a first local data set is provided as shown in Table 1 below:
[0055] Table 1
[0056]
[0057] Among them, ID-CARD, Phone Number, and Bank Card all represent tag information. The first local data set can include three first data groups. {1234, 66666, AAAA} can represent a data group, 1234 can represent the first data, and ID-CARD is the tag information of 1234.
[0058] In a specific implementation, the sender can shard part or all of the data in the first local data set to obtain n first data shards, which can be stored in the sender's data queue. The n first data shards can then be divided into two groups to obtain a first data shard group and a second data shard group. The first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer.
[0059] In the embodiments of the present application, data fragmentation is used to start the process, which reduces instantaneous communication traffic, reduces network congestion, and helps improve communication efficiency. In related technologies, executing all data at the same time can lead to excessive instantaneous communication traffic, causing TCP connections to wait for a long time and retransmit. In the embodiments of the present application, data can be fragmented and executed in parts at a time, reducing instantaneous communication traffic and TCP congestion.
[0060] Optionally, the above step 201, in which the sender performs sharding processing on the first local data set to obtain n first data shards, may include the following steps:
[0061] 21. Determine network resource parameters between the sender and the result party;
[0062] 22. Determine a fragmentation processing parameter based on the network resource parameter, wherein the fragmentation processing parameter includes the number of fragments n;
[0063] 23. Shard the first local data set according to the shard processing parameters to obtain the n first data shards.
[0064] In the embodiment of the present application, the network resource parameters between the sender and the result party may include at least one of the following: network bandwidth, network communication quality evaluation parameters, network packet loss rate, server resource parameters, etc., which are not limited here.
[0065] The fragment processing parameters may include at least one of the following: number of fragments, fragment size, fragment rate, etc., which are not limited here.
[0066] Among them, the sender can pre-store the mapping relationship between the preset network resource parameters and the sharding processing parameters, and then determine the sharding processing parameters corresponding to the network resource parameters between the sender and the result party based on the mapping relationship. The sharding processing parameters include the number of shards n, and then the first local data set is sharded according to the sharding processing parameters to obtain n first data shards. In this way, a sharding effect that matches the channel can be obtained, which helps to improve the efficiency of subsequent data intersection operations.
[0067] 202. Shard the second local data set using the result method to obtain n second data shards, and divide the n second data shards into two groups to obtain a third data shard group and a fourth data shard group, wherein the third data shard group includes p second data shards, and the fourth data shard group includes np second data shards.
[0068] In an embodiment of the present application, the result party may have a second local data set, the second local data set may include M second data groups, each second data group may include Q second data, each second data may correspond to a label information, and each data may be understood as an information field, which is used to express the content of the label information. The label information may include at least one of the following: ID number, identity card number (ID-CARD), telephone number (Phone Number), bank card number (Bank Card), social security account number, social account number, student number, work number, etc., which are not limited here.
[0069] In an embodiment of the present application, part or all of the data in the second local data set can be sharded by the result party to obtain n second data shards, and the n second data shards can be stored in a data queue corresponding to the result party. The n second data shards can then be divided into two groups to obtain a third data shard group and a fourth data shard group, wherein the third data shard group includes p second data shards, and the fourth data shard group includes np second data shards.
[0070] In an embodiment of the present application, both parties can send data to the task management thread, which will then be responsible for sharding the data. The number of shards can be changed in real time according to the network bandwidth, and subsequent protocols will rely on the sharded data to perform intersection tasks.
[0071] In the specific implementation, the result party can pre-store the mapping relationship between the preset network resource parameters and the sharding processing parameters, and then determine the sharding processing parameters corresponding to the network resource parameters between the sender and the result party based on the mapping relationship. The sharding processing parameters include the number of shards n, and then the second local data set is sharded according to the sharding processing parameters to obtain n second data shards. In this way, a sharding effect that matches the channel can be obtained, which helps to improve the efficiency of subsequent data intersection operations.
[0072] In the embodiment of the present application, the data is pre-segmented and started in batches, thereby optimizing the communication architecture, reducing instantaneous communication volume, improving congestion such as TCP retransmission, and being able to operate efficiently in a low-bandwidth environment.
[0073] 203. The sender and the result party use a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result.
[0074] In an embodiment of the present application, the sender and the result party can adopt the full-duplex mode, and the first data slice group, the second data slice group, the third data slice group and the fourth data slice group can be subjected to a privacy intersection operation to obtain a target intersection result. Since the full-duplex mode is adopted, the communication pressure of the network can be reduced by half, thereby achieving a huge performance improvement in an environment with a small network bandwidth.
[0075] In the embodiment of the present application, the result party and the sender can run a special oblivious pseudo-random function (OPRF)-private set intersection (PSI) function, referred to as the OPRF-PSI function.
[0076] In this embodiment of the present application, the sharded data is input to the computation management thread, which then performs full-duplex processing. In full-duplex mode, both parties simultaneously run two PSI protocols, each taking half of the data for computation. Furthermore, the two parties swap communication roles within the two PSI protocols, thereby completing full-duplex communication.
[0077] In specific implementation, a batch startup method can be adopted when executing the PSI protocol, and the next batch of data will be started after the previous batch of data is completed.
[0078] In the related art, when the protocol is executed, a half-duplex communication architecture is adopted. A large amount of data will be sent between the result party and the sender, but the data cannot be transmitted at the same time. It is necessary to wait for one party to completely transmit the data before the other party can start transmitting, which puts a lot of pressure on the network environment. In the embodiment of the present application, by dividing the original data into two parts, each node acts as both the sender and the result party. At this time, a full-duplex communication architecture can be adopted, and data can be transmitted in two directions at the same time, which can reduce half of the network communication pressure.
[0079] Optionally, step 203, in which the sender and the result provider use a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result, may include the following steps:
[0080] 31. The sender and the result provider perform an intersection operation on the first data shard group and the third data shard group using a first data channel to obtain a first intersection result, wherein the sender acts as a server and the result provider acts as a client.
[0081] 32. The sender and the result provider perform an intersection operation on the second data shard group and the fourth data shard group using a second data channel to obtain a second intersection result, wherein the sender acts as a client and the result provider acts as a server.
[0082] 33. Determine the target intersection result by the sending party and the result party according to the first intersection result and the second intersection result.
[0083] In the embodiment of the present application, in full-duplex mode, dual data transmission channels can be used for simultaneous data intersection, and the dual data transmission channels can include a first data channel and a second data channel. In the first data channel, the communication role of the sender is the server, and the communication role of the result party is the client; in the second data transmission channel, the communication role of the sender is the client, and the communication role of the result party is the server.
[0084] In a specific implementation, the sender and the result party can use the first data channel to perform an intersection operation based on the first data shard group and the third data shard group to obtain a first intersection result, wherein the communication role of the sender is the server, the communication role of the result party is the client, and the amount of data in the first data shard group and the third data shard group can be the same or different.
[0085] In addition, the sender and the result party can also use the second data channel to perform an intersection operation based on the second data shard group and the fourth data shard group to obtain a second intersection result, wherein the communication role of the sender is the client, the communication role of the result party is the server, and the amount of data in the second data shard group and the fourth data shard group can be the same or different.
[0086] Next, the sender and the result recipient can determine the target intersection result based on the first and second intersection results. Specifically, the first and second intersection results can be combined to obtain the target intersection result. Data compression reduces the total communication traffic, ensuring efficient intersection operations in low-bandwidth environments, thus improving intersection efficiency.
[0087] Further, optionally, step 31, in which the sending party and the result receiving party perform an intersection operation on the first data slice group and the third data slice group using the first data channel to obtain a first intersection result, may include the following steps:
[0088] 311. The sender performs first data compression on the first data slice group to obtain a reference first data slice group;
[0089] 312. Perform a second data compression on the third data shard group using the result method to obtain a reference third data shard group.
[0090] 313. The sender and the result provider use the first data channel to perform an intersection operation based on the reference first data slice group and the reference third data slice group to obtain the first intersection result.
[0091] In an embodiment of the present application, the sender may use a first data compression parameter to perform first data compression on the first data segment group to obtain a reference first data segment group, wherein the first data compression parameter may include a data compression algorithm type parameter and an algorithm control parameter corresponding to the data compression algorithm, wherein the data compression algorithm type parameter is used to call the corresponding data compression algorithm, and the data compression algorithm may include at least one of the following: Zlib data compression algorithm, Gzip data compression algorithm, Bzip2 data compression algorithm, Deflater data compression algorithm, Lz4 data compression algorithm, Lzo data compression algorithm, Snappy data compression algorithm, etc., which are not limited here. Different data compression algorithms correspond to different algorithm control parameters, and the algorithm control parameters are used to adjust the compression efficiency or compression effect of the data compression algorithm.
[0092] Then, the third data shard group can be subjected to second data compression using the second data compression parameter through the result side to obtain a reference third data shard group. The second data compression parameter can include a data compression algorithm type parameter and an algorithm control parameter corresponding to the data compression algorithm. The data compression algorithm type parameter is used to call the corresponding data compression algorithm. The data compression algorithm can include at least one of the following: Zlib data compression algorithm, Gzip data compression algorithm, Bzip2 data compression algorithm, Deflater data compression algorithm, Lz4 data compression algorithm, Lzo data compression algorithm, Snappy data compression algorithm, etc., which are not limited here. Different data compression algorithms correspond to different algorithm control parameters, and the algorithm control parameters are used to adjust the compression efficiency or compression effect of the data compression algorithm.
[0093] Next, the sender and the result recipient can use the first data channel to perform an intersection operation based on the reference first data shard group and the reference third data shard group to obtain a first intersection result. Specifically, in this intersection operation, embodiments of the present application can employ an OT-based privacy intersection protocol, namely, an oblivious transfer (OT) protocol. The full-duplex communication structure significantly improves the runtime of the OT-based privacy intersection protocol in low-bandwidth environments.
[0094] In a specific implementation, the sent data packets are compressed by using a data compression algorithm. Since data compression can reduce the total communication volume, it can ensure the efficient operation of intersection operations in a low-bandwidth environment, which helps to improve the efficiency of intersection operations.
[0095] Furthermore, the above step 32, in which the sending party and the result party perform an intersection operation on the second data slice group and the fourth data slice group using the second data channel to obtain a second intersection result, may include the following steps:
[0096] 321. Perform a third data compression on the second data fragment group by the sender to obtain a reference second data fragment group;
[0097] 322. Perform a fourth data compression on the fourth data shard group using the result method to obtain a reference fourth data shard group.
[0098] 323. The sending party and the result party use the second data channel to perform an intersection operation based on the reference second data slice group and the reference fourth data slice group to obtain the second intersection result.
[0099] In an embodiment of the present application, the sender may use a third data compression parameter to perform a third data compression on the second data segment group to obtain a reference second data segment group. The third data compression parameter may include a data compression algorithm type parameter and an algorithm control parameter corresponding to the data compression algorithm. The data compression algorithm type parameter is used to call the corresponding data compression algorithm. The data compression algorithm may include at least one of the following: Zlib data compression algorithm, Gzip data compression algorithm, Bzip2 data compression algorithm, Deflater data compression algorithm, Lz4 data compression algorithm, Lzo data compression algorithm, Snappy data compression algorithm, etc., which are not limited here. Different data compression algorithms correspond to different algorithm control parameters, and the algorithm control parameters are used to adjust the compression efficiency or compression effect of the data compression algorithm.
[0100] Next, the fourth data shard group can be subjected to fourth data compression using a fourth data compression parameter through the result side to obtain a reference fourth data shard group. The fourth data compression parameter may include a data compression algorithm type parameter and an algorithm control parameter corresponding to the data compression algorithm, wherein the data compression algorithm type parameter is used to call the corresponding data compression algorithm, and the data compression algorithm may include at least one of the following: Zlib data compression algorithm, Gzip data compression algorithm, Bzip2 data compression algorithm, Deflater data compression algorithm, Lz4 data compression algorithm, Lzo data compression algorithm, Snappy data compression algorithm, etc., which are not limited here. Different data compression algorithms correspond to different algorithm control parameters, and the algorithm control parameters are used to adjust the compression efficiency or compression effect of the data compression algorithm.
[0101] Next, the sending party and the result party may use the second data channel to perform an intersection operation based on the reference second data slice group and the reference fourth data slice group to obtain a second intersection result.
[0102] In the embodiment of the present application, the first data compression parameter, the second data compression parameter, the third data compression parameter and the fourth data compression parameter may be the same or different.
[0103] Optionally, the following steps may also be included:
[0104] A1. Determine, by the sender and the result party, the network bandwidth between the sender and the result party;
[0105] A2. When the network bandwidth is less than a preset threshold, execute the step of sharding the first local data set by the sender to obtain n first data shards.
[0106] The preset threshold value may be pre-set or set by the system by default.
[0107] In a specific implementation, the network bandwidth between the sender and the result party can be determined by the sender and the result party. When the network bandwidth is less than a preset threshold, it means that the sender and the result party are in a low-bandwidth environment, and then the step of sharding the first local data set by the sender to obtain n first data shards can be executed.
[0108] For example, Figure 3 As shown, in the embodiment of the present application, the two participants may include a sender (Sender) and a receiver (Receiver), and the specific steps are as follows:
[0109] 1. Both parties send data to the task management thread, which is responsible for sharding the data. The number of shards can be changed in real time based on network bandwidth. Subsequent protocols will rely on the sharded data to perform intersection tasks. Specifically, assume that the data in the sender's data queue after sharding is: Sender_bucket 1, Sender_bucket 2, ..., Sender_bucket n, and the data in the resultant party's data queue after sharding is: Receiver_bucket 1, Receiver_bucket 2, ..., Receiver_bucket n.
[0110] 2. The sharded data is input into the computing management thread, which executes full-duplex processing. In full-duplex mode, both parties run two PSI protocols simultaneously. In each protocol, both parties take half of the data, compress it, and then participate in the calculation. In addition, the two parties will exchange communication roles in the two PSI protocols to complete the full-duplex communication mode.
[0111] Among them, when executing the PSI protocol, a batch startup method is adopted, and the next batch of data is started after the previous batch of data is executed. In addition, in the embodiment of the present application, after the execution of the PSI protocol is completed, the result processing thread can also perform result processing, including result extraction, result merging and other operations, and finally perform result statistics to obtain the final target intersection result.
[0112] In the embodiment of the present application, a modular processing method is adopted for the entire privacy intersection process. Each module can adopt multiple algorithms, which is convenient for replacement according to different usage scenarios. The full-duplex mode is adopted to reduce the communication pressure of the network by half, and there is a huge performance improvement in an environment with small network bandwidth. The data is pre-segmented and started in batches, the communication architecture is optimized, the instantaneous communication volume is reduced, and congestion such as transmission control protocol (TCP) retransmission is improved. It can run efficiently in a low-bandwidth environment and adopts the currently more advanced communication compression algorithm to reduce the total communication volume.
[0113] It can be seen that the privacy intersection method in a low-bandwidth environment described in the embodiment of the present application is applied to a two-party computing system, which includes a sender and a result party. The sender has a first local data set, and the result party has a second local data set. The sender shards the first local data set to obtain n first data shards, and divides the n first data shards into two groups to obtain a first data shard group and a second data shard group. The first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer. The result party shards the second local data set to obtain n second data shards, and divides the n second data shards into Two groups, a third data shard group and a fourth data shard group are obtained, the third data shard group includes p second data shards, and the fourth data shard group includes np second data shards. The sender and the result party adopt full-duplex mode to perform privacy intersection operation on the first data shard group, the second data shard group, the third data shard group and the fourth data shard group to obtain the target intersection result. On the one hand, by using the full-duplex mode, a large amount of data that needs to be transmitted in one direction is changed to two-way transmission, which ensures the efficient operation of the protocol. On the other hand, by starting the data shards, the instantaneous communication volume is reduced, the network congestion is reduced, and it is helpful to improve the efficiency of the privacy intersection operation, especially in a low-bandwidth environment, the effect of improving the privacy intersection is more obvious.
[0114] In accordance with the above embodiment, please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface, and one or more programs. The one or more programs are stored in the memory and configured to be executed by the processor and are applied to a two-party computing system. The two-party computing system includes a sender and a result party. The sender has a first local data set, and the result party has a second local data set. In the embodiment of the present application, the program includes instructions for performing the following steps:
[0115] The sender slices the first local data set to obtain n first data slices, and divides the n first data slices into two groups to obtain a first data slice group and a second data slice group, wherein the first data slice group includes p first data slices, and the second data slice group includes np first data slices, where p is a positive integer and np is also a positive integer;
[0116] Slice the second local data set using the result processor to obtain n second data slices, divide the n second data slices into two groups to obtain a third data slice group and a fourth data slice group, wherein the third data slice group includes p second data slices, and the fourth data slice group includes np second data slices;
[0117] The sender and the result party use a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result.
[0118] Optionally, in the aspect of performing a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group by the sender and the result party in full-duplex mode to obtain a target intersection result, the program includes instructions for executing the following steps:
[0119] The sender and the result party perform an intersection operation on the first data shard group and the third data shard group using a first data channel to obtain a first intersection result, wherein the communication role of the sender is a server and the communication role of the result party is a client;
[0120] The sender and the result party perform an intersection operation on the second data shard group and the fourth data shard group using a second data channel to obtain a second intersection result, wherein the communication role of the sender is a client and the communication role of the result party is a server;
[0121] The target intersection result is determined by the sending party and the result party according to the first intersection result and the second intersection result.
[0122] Further, optionally, in the aspect of performing an intersection operation on the first data slice group and the third data slice group by the sending party and the result party using the first data channel to obtain a first intersection result, the program includes instructions for executing the following steps:
[0123] Performing a first data compression on the first data slice group by the sender to obtain a reference first data slice group;
[0124] Performing a second data compression on the third data slice group using the result method to obtain a reference third data slice group;
[0125] The first intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference first data slice group and the reference third data slice group using the first data channel.
[0126] Further, optionally, in the aspect of performing an intersection operation on the second data slice group and the fourth data slice group by the sending party and the result party using the second data channel to obtain a second intersection result, the program includes instructions for executing the following steps:
[0127] performing a third data compression on the second data slice group by the sender to obtain a reference second data slice group;
[0128] Performing fourth data compression on the fourth data slice group according to the result to obtain a reference fourth data slice group;
[0129] The second intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference second data slice group and the reference fourth data slice group using the second data channel.
[0130] Optionally, in the aspect of sharding the first local data set by the sender to obtain n first data shards, the program includes instructions for executing the following steps:
[0131] Determining network resource parameters between the sender and the resultant;
[0132] Determine a fragment processing parameter according to the network resource parameter, wherein the fragment processing parameter includes the number of fragments n;
[0133] The first local data set is fragmented according to the fragmentation processing parameters to obtain the n first data fragments.
[0134] Optionally, the program further includes instructions for executing the following steps:
[0135] Determine, by the sender and the result party, the network bandwidth between the sender and the result party;
[0136] When the network bandwidth is less than a preset threshold, the step of sharding the first local data set by the sender to obtain n first data shards is performed.
[0137] Figure 5 This is a block diagram of the functional units of a privacy-enforcing device 500 for a low-bandwidth environment involved in an embodiment of the present application. The device 500 is applied to a two-party computing system, wherein the two-party computing system includes a sender and a result party, wherein the sender has a first local data set and the result party has a second local data set; the device 500 includes: a first shard processing unit 501, a second shard processing unit 502, and a computing unit 503, wherein:
[0138] The first shard processing unit 501 is configured to shard the first local data set through the sender to obtain n first data shards, and divide the n first data shards into two groups to obtain a first data shard group and a second data shard group, wherein the first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer;
[0139] The second shard processing unit 502 is configured to shard the second local data set using the result method to obtain n second data shards, and divide the n second data shards into two groups to obtain a third data shard group and a fourth data shard group, wherein the third data shard group includes p second data shards and the fourth data shard group includes np second data shards;
[0140] The operation unit 503, wherein the sending party and the result party adopt a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group and the fourth data slice group to obtain a target intersection result.
[0141] Optionally, in the aspect of performing a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group by the sender and the result party in full-duplex mode to obtain a target intersection result, the operation unit 503 is specifically configured to:
[0142] The sender and the result party perform an intersection operation on the first data shard group and the third data shard group using a first data channel to obtain a first intersection result, wherein the communication role of the sender is a server and the communication role of the result party is a client;
[0143] The sender and the result party perform an intersection operation on the second data shard group and the fourth data shard group using a second data channel to obtain a second intersection result, wherein the communication role of the sender is a client and the communication role of the result party is a server;
[0144] The target intersection result is determined by the sending party and the result party according to the first intersection result and the second intersection result.
[0145] Optionally, in the aspect of performing an intersection operation on the first data slice group and the third data slice group by the sending party and the result party using the first data channel to obtain a first intersection result, the operation unit 503 is specifically configured to:
[0146] Performing a first data compression on the first data slice group by the sender to obtain a reference first data slice group;
[0147] Performing a second data compression on the third data slice group using the result method to obtain a reference third data slice group;
[0148] The first intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference first data slice group and the reference third data slice group using the first data channel.
[0149] Optionally, in the aspect of performing an intersection operation on the second data slice group and the fourth data slice group by the sending party and the result party using the second data channel to obtain a second intersection result, the operation unit 503 is specifically configured to:
[0150] performing a third data compression on the second data slice group by the sender to obtain a reference second data slice group;
[0151] Performing fourth data compression on the fourth data slice group according to the result to obtain a reference fourth data slice group;
[0152] The second intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference second data slice group and the reference fourth data slice group using the second data channel.
[0153] Optionally, in the aspect of sharding the first local data set by the sender to obtain n first data shards, the first shard processing unit 501 is specifically configured to:
[0154] Determining network resource parameters between the sender and the resultant;
[0155] Determine a fragment processing parameter according to the network resource parameter, wherein the fragment processing parameter includes the number of fragments n;
[0156] The first local data set is fragmented according to the fragmentation processing parameters to obtain the n first data fragments.
[0157] Optionally, the device 500 is further specifically configured to:
[0158] Determine, by the sender and the result party, the network bandwidth between the sender and the result party;
[0159] When the network bandwidth is less than a preset threshold, the step of sharding the first local data set by the sender to obtain n first data shards is performed.
[0160] It can be understood that the functions of each program module of the privacy intersection device in a low-bandwidth environment of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0161] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0162] The present application also provides a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may comprise an electronic device.
[0163] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0164] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0165] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0166] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0168] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program code.
[0169] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing related hardware. The program can be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0170] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A privacy intersection method in a low-bandwidth environment, characterized in that: Applied to a two-party computing system, the two-party computing system includes a sender and a result party, the sender owns a first local data set, and the result party owns a second local data set; the method includes: The sender slices the first local data set to obtain n first data slices, and divides the n first data slices into two groups to obtain a first data slice group and a second data slice group, wherein the first data slice group includes p first data slices, and the second data slice group includes np first data slices, where p is a positive integer and np is also a positive integer; The result party performs sharding processing on the second local data set to obtain n second data shards, and divides the n second data shards into two groups to obtain a third data shard group and a fourth data shard group, wherein the third data shard group includes p second data shards, and the fourth data shard group includes np second data shards; the sending party and the result party send the data to the task management thread, which is then responsible for sharding the data, and the number of shards is changed in real time according to the network bandwidth; The sender and the result party use a full-duplex mode to perform a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group to obtain a target intersection result, specifically: The sender and the result party perform an intersection operation on the first data shard group and the third data shard group using a first data channel to obtain a first intersection result, wherein the sender acts as a server and the result party acts as a client; The sender and the result party perform an intersection operation on the second data shard group and the fourth data shard group using a second data channel to obtain a second intersection result, wherein the communication role of the sender is a client and the communication role of the result party is a server; The target intersection result is determined by the sending party and the result party according to the first intersection result and the second intersection result.
2. The method according to claim 1, characterized in that The performing an intersection operation on the first data slice group and the third data slice group by the sending party and the result party using the first data channel to obtain a first intersection result includes: Performing a first data compression on the first data slice group by the sender to obtain a reference first data slice group; Performing a second data compression on the third data slice group using the result method to obtain a reference third data slice group; The first intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference first data slice group and the reference third data slice group using the first data channel.
3. The method according to claim 1, characterized in that The performing an intersection operation on the second data slice group and the fourth data slice group by the sending party and the result party using the second data channel to obtain a second intersection result includes: performing a third data compression on the second data slice group by the sender to obtain a reference second data slice group; Performing fourth data compression on the fourth data slice group according to the result to obtain a reference fourth data slice group; The second intersection result is obtained by the sending party and the result party performing an intersection operation based on the reference second data slice group and the reference fourth data slice group using the second data channel.
4. The method according to any one of claims 1 to 3, characterized in that The sending party shards the first local data set to obtain n first data shards, including: Determining network resource parameters between the sender and the resultant; Determine a fragment processing parameter according to the network resource parameter, wherein the fragment processing parameter includes the number of fragments n; The first local data set is fragmented according to the fragmentation processing parameters to obtain the n first data fragments.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Determine, by the sender and the result party, the network bandwidth between the sender and the result party; When the network bandwidth is less than a preset threshold, the step of sharding the first local data set by the sender to obtain n first data shards is performed.
6. A privacy intersection device in a low-bandwidth environment, characterized in that: Applied to a two-party computing system, the two-party computing system includes a sender and a result party, the sender has a first local data set, and the result party has a second local data set; the device includes: a first shard processing unit, a second shard processing unit and a computing unit, wherein, The first shard processing unit is configured to shard the first local data set through the sender to obtain n first data shards, and divide the n first data shards into two groups to obtain a first data shard group and a second data shard group, wherein the first data shard group includes p first data shards, and the second data shard group includes np first data shards, where p is a positive integer and np is also a positive integer; The second shard processing unit is configured to shard the second local data set through the result party to obtain n second data shards, and divide the n second data shards into two groups to obtain a third data shard group and a fourth data shard group, wherein the third data shard group includes p second data shards, and the fourth data shard group includes np second data shards; the sending party and the result party send the data to the task management thread, which is then responsible for sharding the data, and the number of shards is changed in real time according to the network bandwidth; The operation unit performs a privacy intersection operation on the first data slice group, the second data slice group, the third data slice group, and the fourth data slice group through the sender and the result party in full-duplex mode to obtain a target intersection result, specifically: The sender and the result party perform an intersection operation on the first data shard group and the third data shard group using a first data channel to obtain a first intersection result, wherein the sender acts as a server and the result party acts as a client; The sender and the result party perform an intersection operation on the second data shard group and the fourth data shard group using a second data channel to obtain a second intersection result, wherein the communication role of the sender is a client and the communication role of the result party is a server; The target intersection result is determined by the sending party and the result party according to the first intersection result and the second intersection result.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the programs include instructions for executing the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multimedia data transmission system suitable for field cooperation
CN107483471A
Privacy intersection method based on efficient compressed data transmission
CN113591151A
Privacy-protected set confusion intersection method and system and related equipment
CN114818000A