Method and apparatus for processing user privacy data, storage medium, and electronic device
By constructing a hash function to filter user privacy data, the problem of low efficiency in intersection operations caused by the difference in data volume between the request initiator and the request receiver is solved, and more efficient intersection operations and filtering are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-08-23
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the large difference in the amount of user privacy data held by the request initiator and the request recipient leads to low efficiency in intersection operations and a large amount of redundant computation.
By constructing a hash function, user privacy data is filtered based on the original data volume of the request initiator to obtain the target privacy data. Intersection operation is performed when the data volume difference is less than or equal to a preset threshold to reduce redundant calculations.
It improves the efficiency of intersection operations and filtering, reduces computational overhead, and enhances system performance.
Smart Images

Figure CN116032458B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of network technology and security technology, and more specifically, to a method for processing user privacy data, a device for processing user privacy data, a computer-readable storage medium, and an electronic device. Background Technology
[0002] In some calculation methods involving user privacy data held by the request initiator and the request recipient, the user privacy data held by both parties is encrypted. Then, the request recipient sends the encrypted privacy data to the request initiator. The request initiator then performs an intersection operation on the encrypted privacy data and finally feeds back the intersection operation result to the request recipient.
[0003] However, the above scheme has the following drawbacks: due to the large difference in the amount of data held by the request initiator and the request recipient, there is a lot of redundant calculation in the process of the request initiator performing intersection operation on the encrypted privacy data, which makes the intersection operation inefficient.
[0004] It should be noted that the information in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method for processing user privacy data, a device for processing user privacy data, a computer-readable storage medium, and an electronic device, thereby overcoming, at least to some extent, the problem of low efficiency in intersection operations caused by limitations and defects in related technologies.
[0006] According to one aspect of this disclosure, a method for processing user privacy data is provided, comprising:
[0007] Obtain the first user privacy data possessed by the request initiator, and calculate the first original data volume of the first user privacy data;
[0008] A first hash function is constructed based on the first original data volume, and the first user privacy data and the second user privacy data possessed by the request recipient are filtered according to the first hash function to obtain the first target privacy data and the second target privacy data.
[0009] Calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and calculate the data volume difference between the first target data volume and the second target data volume;
[0010] When the difference in data volume is determined to be less than or equal to a preset threshold, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result, and the intersection operation result is sent to the request recipient.
[0011] In one exemplary embodiment of this disclosure, constructing a first hash function based on the first original data volume includes:
[0012] Based on the first original data volume and the preset first hash bucket value, calculate the first original parameter value, and determine the second original parameter value based on the first original parameter value;
[0013] The first hash function is constructed based on the second original parameter value and the user identification information.
[0014] In one exemplary embodiment of this disclosure, calculating a first original parameter value based on the first original data volume and a preset first hash bucket value, and determining a second original parameter value based on the first original parameter value, includes:
[0015] Calculate the first product value between the preset first hash bucket value and the preset load factor, and calculate the first ratio between the first original data volume and the first product value;
[0016] The first original parameter value is determined based on the first ratio, and the first original prime value of the first original parameter value is obtained; wherein, the range of the first original prime value is from the smallest prime number to the prime value adjacent to the first original parameter value;
[0017] Select a prime value from the first original prime value that is adjacent to and smaller than the first original parameter value, and use it as the second original parameter value.
[0018] In one exemplary embodiment of this disclosure, constructing the first hash function based on the second original parameter value and user identification information includes:
[0019] The first hash function is constructed based on the modulo operation between the user identification information and the second original parameter value.
[0020] In one exemplary embodiment of this disclosure, filtering the first user privacy data and the second user privacy data possessed by the request recipient according to the first hash function to obtain first target privacy data and second target privacy data includes:
[0021] Based on the first hash function and the first user identifier included in the first user privacy data, a first information list including the first bucket identifier of the first hash bucket and the first user identifier is generated.
[0022] The first hash function is sent to the requesting recipient, and the requesting recipient sends a second information list including a second bucket identifier and whether a second user identifier exists in the second hash bucket corresponding to the second bucket identifier; wherein, the second bucket identifier is calculated by the requesting recipient based on the first hash function and the second user identifier included in the second user privacy data held by the requesting recipient;
[0023] Select a target hash bucket from the first information list and the second information list that has the same bucket identifier and contains a user identifier in both the first hash bucket and the second hash bucket;
[0024] The first user privacy data corresponding to the first user identifier included in the target hash bucket is used as the first target privacy data, and the second user privacy data corresponding to the second user identifier included in the target hash bucket is used as the second target privacy data.
[0025] In one exemplary embodiment of this disclosure, a first information list including a first bucket identifier of a first hash bucket and a first user identifier is generated based on the first hash function and the first user identifier included in the first user privacy data, including:
[0026] The first user identifier included in the first user privacy data and the second original parameter value included in the first hash function are moduloed to obtain the first bucket identifier of the first hash bucket;
[0027] The first information list is generated based on the first user identifier used to calculate the first bucket identifier and the first bucket identifier.
[0028] In one exemplary embodiment of this disclosure, calculating the second target data volume of the second target privacy data includes:
[0029] The target bucket identifier of the target hash bucket is sent to the requesting recipient so that the requesting recipient can calculate the second target data volume based on the second target privacy data of the second user identifier corresponding to the target bucket identifier.
[0030] In one exemplary embodiment of this disclosure, calculating the data volume difference between the first target data volume and the second target data volume includes:
[0031] Receive the second data volume sent by the requesting recipient, and calculate the data volume difference between the first target data volume and the second target data volume.
[0032] In one exemplary embodiment of this disclosure, the method for processing user privacy data further includes:
[0033] When the data volume difference is determined to be greater than a preset threshold, the first target privacy data and the second target privacy data are filtered again until the data volume difference between the first target data volume of the filtered first target privacy data and the second target data volume of the filtered second target privacy data is less than or equal to the preset threshold.
[0034] In one exemplary embodiment of this disclosure, the first target privacy data and the second target privacy data are filtered again, including:
[0035] Calculate the second product between the preset second hash bucket value and the preset load factor, and calculate the second ratio between the first original data volume and the second product value; wherein the preset first hash bucket value is twice the preset second hash bucket value;
[0036] The first target parameter value is determined based on the second ratio, and the first target prime value is obtained; wherein, the range of the first target prime value is from the smallest prime number to the prime value adjacent to the first target parameter value.
[0037] Select a prime value from the first target prime value that is adjacent to and smaller than the first target parameter value as the second target parameter value, and construct a second hash function based on the modulo operation between the user identification information and the second target parameter value;
[0038] The first target privacy data and the second target privacy data are filtered again according to the second hash function.
[0039] In one exemplary embodiment of this disclosure, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result, including:
[0040] Receive the first ciphertext sent by the requesting recipient, which is obtained by encrypting the first target privacy data using a preset encryption algorithm;
[0041] The second target privacy data is encrypted using the preset encryption algorithm to obtain the second ciphertext, and the intersection operation is performed on the first ciphertext and the second ciphertext to obtain the intersection operation result.
[0042] According to one aspect of this disclosure, a user privacy data processing apparatus is provided, comprising:
[0043] The first calculation module is used to obtain the first user privacy data possessed by the request initiator and to calculate the first original data volume of the first user privacy data.
[0044] The user privacy data filtering module is used to construct a first hash function based on the first original data volume, and filter the first user privacy data and the second user privacy data possessed by the request recipient based on the first hash function to obtain the first target privacy data and the second target privacy data.
[0045] The second calculation module is used to calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and to calculate the data volume difference between the first target data volume and the second target data volume;
[0046] The intersection operation module is used to perform an intersection operation on the first target privacy data and the second target privacy data when the difference in data volume is determined to be less than or equal to a preset threshold, to obtain the intersection operation result, and to send the intersection operation result to the request receiver.
[0047] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the user privacy data processing method described in any of the preceding claims.
[0048] According to one aspect of this disclosure, an electronic device is provided, comprising:
[0049] Processor; and
[0050] Memory for storing the executable instructions of the processor;
[0051] The processor is configured to execute the user privacy data processing method described above by executing the executable instructions.
[0052] This disclosure provides a method for processing user privacy data. On one hand, because the first user privacy data and the second user privacy data are filtered before the intersection operation, and the data volume difference between the first target data volume and the second target data volume is less than or equal to a preset threshold, the first target privacy data and the second target privacy data are subjected to an intersection operation to obtain the intersection operation result. This solves the problem in the prior art where the request initiator has a large amount of redundant calculations during the intersection operation of the encrypted privacy data due to the large difference in the amount of data held by the request initiator and the request recipient, resulting in low efficiency of the intersection operation. This improves the efficiency of the intersection operation. On the other hand, because the first original data volume of the first user privacy data can be calculated, and a first hash function can be constructed based on the first original data volume, and the first user privacy data and the second user privacy data held by the request recipient can be filtered based on the first hash function to obtain the first target privacy data and the second target privacy data, the filtering efficiency of the first user privacy data and the second user privacy data is improved.
[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0055] Figure 1 The flowchart illustrates a method for processing user privacy data according to an example embodiment of the present disclosure.
[0056] Figure 2 The illustration shows an example diagram illustrating an application scenario of vertical federated learning according to an example embodiment of the present disclosure.
[0057] Figure 3 The illustration schematically depicts a method flow according to an example embodiment of the present disclosure for filtering first user privacy data and second user privacy data possessed by a request recipient based on a first hash function to obtain first target privacy data and second target privacy data.
[0058] Figure 4 An example diagram illustrating a first information list according to an exemplary embodiment of the present disclosure is shown.
[0059] Figure 5 An example diagram illustrating a second information list according to an exemplary embodiment of the present disclosure is shown.
[0060] Figure 6 The flowchart illustrates a method for further filtering first target privacy data and second target privacy data according to an example embodiment of the present disclosure.
[0061] Figure 7 The flowchart illustrates a method for processing user privacy data based on multi-terminal interaction according to an example embodiment of the present disclosure.
[0062] Figure 8 The diagram schematically illustrates a block diagram of a user privacy data processing apparatus according to an example embodiment of the present disclosure.
[0063] Figure 9 An electronic device for implementing the above-described method for processing user privacy data is illustrated according to an example embodiment of this disclosure. Detailed Implementation
[0064] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0065] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0066] Currently, with the introduction of data security regulations, the protection of user privacy and security is becoming increasingly important. While ensuring data security, data silos have emerged. Meanwhile, federated learning, as a mainstream technology, connects these data silos, combining data from multiple sources for training and modeling. In the process of federated training and modeling, Private Set Intersection (PSI) becomes a necessary step. PSI refers to calculating the shared samples between two entities through an encrypted process without exposing their individual data. For example, if the two entities are a local telecom operator and a bank, the user overlap is significant, which fits the scenario of vertical federated learning. However, there is a situation where the operator's data (in the hundreds of millions) is far greater than the bank's data (in the tens of thousands). In this case, the PSI intersection of the two entities is an imbalanced PSI, and the performance advantage of current imbalanced PSI schemes compared to balanced PSI is not very significant.
[0067] Furthermore, when the data volume of the two participants in vertical federated learning differs significantly, privacy intersection calculations, including modular exponentiation encryption, incur substantial computational overhead to ensure security. Much of the data can actually be pre-screened and does not need to participate in the calculation process. Simultaneously, traditional privacy intersection methods, based on Deutsche Welle (DH) key exchange algorithms, require double encryption and double modular exponentiation of each data entry, followed by the mutual transmission of encrypted results, resulting in significant communication overhead. Moreover, existing schemes perform privacy intersection based on DH calculations, generating substantial computational overhead for non-intersection data. Furthermore, when hashing separately, the selection of hash functions in existing patents leads to numerous hash collisions, resulting in a slow intersection rate. Therefore, a method is needed to further reduce the computational overhead in unbalanced PSI scenarios, improve performance, and allocate computational load to the party with the larger data volume.
[0068] Based on this, this exemplary embodiment first provides a method for processing user privacy data. This method can run on the terminal device where the request initiator is located, or on the server, server cluster, or cloud server where the request initiator is located. Of course, those skilled in the art can also run the method disclosed herein on other platforms as needed, and this exemplary embodiment does not impose any special limitations on this. Specifically, refer to... Figure 1 As shown, the method for processing user privacy data may include the following steps:
[0069] Step S110. Obtain the first user privacy data possessed by the request initiator, and calculate the first original data volume of the first user privacy data;
[0070] Step S120. Construct a first hash function based on the first original data volume, and filter the first user privacy data and the second user privacy data possessed by the request recipient based on the first hash function to obtain the first target privacy data and the second target privacy data;
[0071] Step S130. Calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and calculate the data volume difference between the first target data volume and the second target data volume;
[0072] Step S140. When it is determined that the difference in data volume is less than or equal to a preset threshold, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result, and the intersection operation result is sent to the request receiver.
[0073] In the aforementioned method for processing user privacy data, on the one hand, since the first user privacy data and the second user privacy data are filtered before the intersection operation, and the intersection operation is performed on the first target privacy data and the second target privacy data when the difference in data volume between the first target data volume and the second target data volume is less than or equal to a preset threshold, the intersection operation result is obtained. This solves the problem in the prior art where the request initiator has a large amount of redundant calculations during the intersection operation of the encrypted privacy data due to the large difference in the amount of data held by the request initiator and the request recipient, resulting in low efficiency of the intersection operation. This improves the efficiency of the intersection operation. On the other hand, since the first original data volume of the first user privacy data can be calculated, and a first hash function can be constructed based on the first original data volume, and the first user privacy data and the second user privacy data held by the request recipient can be filtered based on the first hash function to obtain the first target privacy data and the second target privacy data, the filtering efficiency of the first user privacy data and the second user privacy data is improved.
[0074] The following will provide a detailed explanation and description of the user privacy data processing method of the exemplary embodiments of this disclosure, in conjunction with the accompanying drawings.
[0075] First, the terms used in the exemplary embodiments of this disclosure will be explained and described.
[0076] Vertical Federated Learning: Specifically, consider this scenario: a telecom operator and a bank jointly train a model to predict whether a user is interested in a certain type of product. For example, the operator has primary user privacy data of users A, B, C, and D, while the bank has secondary user privacy data of users B and C. Using vertical federated learning, without the operator and bank disclosing their respective user data, they can integrate the primary and secondary user privacy data of users B and C. This allows them to jointly train a predictive model using both types of data. Furthermore, since two types of data are used for training, the result should be more accurate than a model trained independently by the operator or the bank.
[0077] Private Set Intersection (PSI): Specifically, since model training requires the simultaneous use of both first and second user privacy data, users A and D cannot participate in the training. Therefore, before longitudinal federated learning, both parties need to compute shared samples, namely users B and C, and subsequent computations revolve around users B and C. Private Set Intersection is a method where both parties obtain the set of users B and C through encrypted computation without exposing their original sets. Specifically, PSI means that the participating parties obtain the intersection of their data without revealing any additional information; here, additional information refers to any information other than the intersection of their data.
[0078] Privacy set intersection is very useful in real-world scenarios, such as data alignment in longitudinal federated learning or friend discovery through address books in social software. Therefore, a secure and fast privacy set intersection algorithm is very important. In some technical solutions, privacy set intersection can be performed based on Diffie-Hellman (DH) key exchange or inadvertent transmission methods. The example embodiment of this disclosure uses the DH key exchange method to calculate privacy set intersection.
[0079] The Deutsche Welle (DH) key exchange algorithm can determine the symmetric key between two parties while ensuring secure transmission. The core of this algorithm lies in the fact that the private keys of both parties do not enter the network transmission process. The same key can be calculated using the other party's public key and one's own private key. Furthermore, even if an attacker obtains the public key and the P and G values, they cannot calculate the key. The parameters used in the DH key exchange algorithm may include:
[0080] (1) Public key refers to the key part that will be transmitted over the network. This part is public. (2) Private key refers to the key part that is kept by the end itself. This part is not allowed to be made public. (3) DK refers to the encryption algorithm that uses X to encrypt sensitive data and then uses Key to encrypt X to obtain DK. Then X is discarded. Here, X is not persistent and is destroyed after the memory is used up. If the attacker needs to obtain sensitive data, he must obtain X. Then X has been destroyed. The cracker must use DK to crack X. DK is protected by Key. As long as Key is secure, sensitive data is secure. (4) Key refers to the Key value generated by the other party's public key and one's own private key. As long as the private key is not cracked, the value is secure.
[0081] Secondly, the inventive purpose of the exemplary embodiments of this disclosure will be explained and described. Specifically, the user privacy data processing method described in the exemplary embodiments of this disclosure addresses the problem of high computational overhead when performing PSI intersection in vertical federated learning, especially when the data size of the participating parties differs significantly. This method proposes a solution for processing user privacy data in unbalanced PSI intersection, which can minimize computational overhead while ensuring secure PSI intersection. Furthermore, compared to traditional PSI methods that balance data size, the exemplary embodiments of this disclosure consider unbalanced PSI, where one party's data is much larger than the other's. Also, DH-based PSI is suitable for balanced PSI, as numerous modular exponentiation operations are excessive and useless computations for larger datasets. Therefore, the user privacy data processing method described in the exemplary embodiments of this disclosure, before DH encryption, allows the initiator and receiver to use the same hash function for the same hashing process and place the data into buckets for filtering. Finally, the filtered user privacy data is DH encrypted, significantly reducing the amount of data compared to existing methods that perform DH encryption followed by hashing and then intersection, thereby reducing computational overhead and improving system efficiency.
[0082] Furthermore, the application scenarios of vertical federated learning described in the exemplary embodiments of this disclosure will be explained and illustrated. Specifically, in one application scenario of vertical federated learning, it may include a request initiator 210 and a request receiver 220; wherein, the request initiator can communicate with the request receiver through a wired network or a wireless network; at the same time, the request initiator may be a terminal device, server, server cluster or cloud server, etc., and the request receiver may also include a terminal device, server, server cluster or cloud server, etc., and this example does not impose any special restrictions on this.
[0083] In practical applications, the party with the larger data set can be referred to as the party initiating the privacy set intersection, i.e., the request initiator; the party with the smaller data set can be referred to as the request receiver; at the same time, the request initiator can be used to implement the user privacy data processing method described in the example embodiments of this disclosure, and the request receiver can be used to receive the hash function and filter the user privacy data it holds.
[0084] The following will be about Figure 1 The methods for processing user privacy data shown are explained and illustrated in detail. Specifically:
[0085] In step S110, the first user privacy data possessed by the request initiator is obtained, and the first original data volume of the first user privacy data is calculated.
[0086] Specifically, firstly, the requester can obtain the first user privacy data. This first user privacy data can include the first user's user profile features and related behavioral characteristics. Specifically, user profile features are abstracted features derived from the first user's demographic characteristics, web browsing content, consumption content, social activities, etc. Demographic features may include, but are not limited to: gender, age, education level, price sensitivity, geographical location, occupation, family structure, etc. Related behavioral characteristics include, but are not limited to: browsing, adding to cart, clicking, and purchasing behaviors (which may be sequences or statistical counts) under a target brand or category (e.g., brand: Apple, category: mobile phone), etc. This example does not impose special restrictions on these behaviors. Furthermore, after obtaining the first user privacy data, the first raw data volume can be calculated. Here, the first raw data volume refers to the total raw data volume of all the first user privacy data possessed by the requester, i.e., the data size.
[0087] In step S120, a first hash function is constructed based on the first original data volume, and the first user privacy data and the second user privacy data possessed by the request recipient are filtered according to the first hash function to obtain the first target privacy data and the second target privacy data.
[0088] In this example embodiment, firstly, a first hash function is constructed based on a first amount of original data. Specifically, this can be achieved as follows: First, a first original parameter value is calculated based on the first amount of original data and a preset first hash bucket value, and a second original parameter value is determined based on the first original parameter value; secondly, the first hash function is constructed based on the second original parameter value and user identification information.
[0089] In one example embodiment, calculating a first original parameter value based on the first original data volume and a preset first hash bucket value, and determining a second original parameter value based on the first original parameter value, can be achieved as follows: First, calculate a first product value between the preset first hash bucket value and a preset load factor, and calculate a first ratio between the first original data volume and the first product value; second, determine the first original parameter value based on the first ratio, and obtain a first original prime value possessed by the first original parameter value; wherein, the range of the first original prime value is from the smallest prime number to the prime value adjacent to the first original parameter value; finally, select a prime value adjacent to the first original parameter value and smaller than the first original parameter value from the first original prime values as the second original parameter value.
[0090] In one example embodiment, the first hash function is constructed based on the second original parameter value and the user identification information, which can be achieved by constructing the first hash function based on the modulo operation between the user identification information and the second original parameter value.
[0091] The following will explain and illustrate the specific construction process of the first hash function. Specifically, in the user privacy data processing method provided in the example embodiment of this disclosure, there are two parties involved in the privacy set intersection; the party with the larger data set is called the party that initiates the intersection request, i.e., the request initiator; the party with the smaller data set is called the request receiver; the first original data volume of the first user privacy data of the request initiator is |X|, and the second original data volume of the second user privacy data of the request receiver is |Y|, and |X|>>|Y| are satisfied; furthermore, when the request initiator and the request receiver are ready to start the privacy set intersection, the request initiator first designs the first hash function according to its own data size; the first hash function can be specifically referred to as the following formula (1):
[0092] h(id)=id mod q,q≤m; Formula (1)
[0093] Where h(id) is the bucket identifier of the hash bucket, and id is the user identifier. The value of q is chosen as the prime number closest to m; μ is the load factor, which can be 0.7; |bucket| is the size of the hash bucket, which can be 1024 (the default value for the first hash bucket); n is the number of hash buckets, and n is the prime number closest to m and greater than m; The user identifier id recorded here can be the user's ID card number, phone number, or other number that can be used to uniquely identify the user. This example does not impose special restrictions on this. id mod q is the modulo operation on id and q, and the result is the bucket identifier of the hash bucket. It should be noted that since the modulo operation is performed on the same prime number q using different user identifiers, there is a possibility that different user identifiers will obtain the same remainder. Therefore, a hash bucket can include one or more user identifiers, meaning that a hash bucket can include user identifiers from multiple different users. It should be noted here that by setting the second original parameter value and the number of hash buckets to prime numbers, it is ensured that the hash bucket identifiers will form the most dispersed remainders, so that the first user identifier and / or the second user identifier will be evenly distributed in the corresponding hash buckets, thereby achieving the purpose of data filtering (screening).
[0094] Furthermore, after obtaining the first hash function, the first user privacy data and the second user privacy data possessed by the request recipient can be filtered according to the first hash function to obtain the first target privacy data and the second target privacy data. For details, refer to... Figure 3 As shown, this can be achieved in the following way:
[0095] Step S310: Based on the first hash function and the first user identifier included in the first user privacy data, generate a first information list including the first bucket identifier of the first hash bucket and the first user identifier.
[0096] In this example embodiment, a first information list including a first bucket identifier of a first hash bucket and a first user identifier is generated based on the first hash function and the first user identifier included in the first user privacy data. This can be achieved as follows: First, a modulo operation is performed on the first user identifier included in the first user privacy data and the second original parameter value included in the first hash function to obtain the first bucket identifier of the first hash bucket; second, the first information list is generated based on the first user identifier used to calculate the first bucket identifier and the first bucket identifier. Specifically, in practical applications, firstly, all first user identifiers included in the first user privacy data can be obtained, and then a modulo operation is performed on the first user identifier and the second original parameter value q to obtain the first bucket identifier; then, the first information list is generated based on the first bucket identifier and the first user identifier; wherein, the first bucket identifier can correspond to one or more first user identifiers, and the specific generated first information list can be referred to... Figure 4 As shown.
[0097] Step S320: Send the first hash function to the request recipient, and receive the second information list sent by the request recipient, including the second bucket identifier and whether the second user identifier exists in the second hash bucket corresponding to the second bucket identifier; wherein, the second bucket identifier is calculated by the request recipient based on the first hash function and the second user identifier included in the second user privacy data held by the request recipient.
[0098] Specifically, firstly, the request initiator sends a first hash function to the request recipient. Upon receiving the first hash function, the request recipient can obtain the second user identifier included in its own second user privacy data. Then, it performs a modulo operation on the second user identifier and the second original parameter value q to obtain the second bucket identifier. Next, based on the second bucket identifier and the identifier information indicating whether the second user identifier exists in the corresponding second hash bucket, a second information list is generated. The obtained second information list can be referenced... Figure 5 As shown. It should be noted that the difference between the first information list and the second information list is that the first information list includes the first bucket identifier and the first user identifier corresponding to the first bucket identifier, while the second information list includes the second bucket identifier and the yes or no identifier information.
[0099] It should be noted that the design of the hash function affects the speed of data filtering. In the case of unbalanced PSI, the data volume of the larger party is evenly distributed across multiple hash buckets, and the data volume of the smaller party is also evenly distributed across multiple hash buckets. There will inevitably be a situation where one bucket is empty, which can be removed directly without calculation, while retaining the case where both hash buckets contain elements. At the same time, to ensure security during transmission, in the user privacy data processing method described in the example embodiment of this disclosure, the requesting recipient transmits an information table (second information list) to the requesting initiator, which only needs to contain the hash bucket number and whether there is an element. Therefore, the data transmission volume of the second information list is very small compared to the existing scheme that transmits a hash table containing all the data. Moreover, even if intercepted by a third party, it is very secure as the hash bucket only contains true or false information. Furthermore, the calculation of selecting the bucket number to remove or retain is fast.
[0100] Step S330: Select a target hash bucket from the first information list and the second information list that has the same bucket identifier and contains a user identifier in both the first hash bucket and the second hash bucket.
[0101] Specifically, after the request initiator receives the second information list, it can select the target hash bucket from the first information list and the second information list. The target hash bucket has the same bucket identifier and the user identifier exists in both the first hash bucket and the second hash bucket corresponding to the same bucket identifier. To confirm whether the user identifier exists in the second hash bucket, it is possible to directly check whether the information identifier is true. That is, if it is true, it can be considered that the user identifier exists in the bucket.
[0102] Step S340: The first user privacy data corresponding to the first user identifier included in the target hash bucket is taken as the first target privacy data, and the second user privacy data corresponding to the second user identifier included in the target hash bucket is taken as the second target privacy data.
[0103] Specifically, once the target hash bucket is obtained, the second user privacy data corresponding to the second user identifier included in the target hash bucket can be used as the second target privacy data. It should be noted that the method of filtering the first and second user privacy data using the first hash function prevents accidental deletion of either data. Furthermore, since the request initiator and receiver use the same hash function, there may be situations where one hash bucket contains data while the other does not. Such situations definitely do not indicate data overlap. Therefore, filtering (removing) the first and second user privacy data using the first hash function ensures data integrity and avoids accidental deletion.
[0104] In step S130, the first target data volume of the first target privacy data and the second target data volume of the second target privacy data are calculated, and the data volume difference between the first target data volume and the second target data volume is calculated.
[0105] Specifically, after obtaining the first target privacy data and the second target privacy data, the first target data volume of the first target privacy data and the second target data volume of the second target privacy data can be calculated. The first target data volume of the first target privacy data can be obtained as follows: First, obtain the first target privacy data corresponding to the first user identifier included in the target hash bucket; second, calculate the first target data volume based on the first target privacy data. Further, the second target data volume of the second target privacy data can be obtained as follows: send the target bucket identifier of the target hash bucket to the request recipient, so that the request recipient can calculate the second target data volume based on the second target privacy data of the second user identifier corresponding to the target bucket identifier.
[0106] Furthermore, once the first target data volume and the second target data volume are obtained, the data volume difference between the first target data volume and the second target data volume can be calculated. Specifically, this can be obtained by receiving the second data volume sent by the requesting recipient and calculating the data volume difference between the first target data volume and the second target data volume.
[0107] In step S140, when it is determined that the data volume difference is less than or equal to a preset threshold, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result, and the intersection operation result is sent to the request receiver.
[0108] In this example embodiment, when the data range is determined to be less than or equal to a preset threshold (the preset threshold described here can be selected according to actual needs, such as 10 or 20, etc., and this example does not impose any special restrictions on it), that is, when the first target data volume of the first target privacy data held by the request initiator and the second target data volume of the second target privacy data held by the request recipient tend to be balanced, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result; wherein, the specific intersection operation process is as follows: receiving the first ciphertext obtained by encrypting the first target privacy data with a preset encryption algorithm sent by the request recipient, and encrypting the second target privacy data with the preset encryption algorithm to obtain the second ciphertext, and performing an intersection operation on the first ciphertext and the second ciphertext to obtain the intersection operation result.
[0109] It should be noted that the encryption of the first and second target privacy data to obtain the first and second ciphertexts can be achieved using the Diffie-Hollman (DH) encryption algorithm. The specific encryption process is as follows: To enable A (the requester) and B (the request receiver) to generate the same key, they each create their own keys. These keys are then encrypted using a shared, publicly available information, which is transmitted (this information may be leaked). Calculations are then performed based on this information to complete the exchange. Finally, A and B use their own keys and the other party's feature values to generate the final public key. This public key is then used to encrypt the first and second target privacy data, thus obtaining the first and second ciphertexts.
[0110] Based on the foregoing description, it can be understood that in the user privacy data processing method described in the example embodiments of this disclosure, on the one hand, in the case of unbalanced PSI, before performing a large number of modular exponentiation operations in the DH algorithm, a suitable hash function is designed and placed into hash buckets, so that a large amount of data can be quickly filtered out. After the data is filtered out, the modular exponentiation operation is performed, reducing the computational overhead. On the other hand, the selection of hash function can ensure that the number of hash buckets in the hash table is a prime number, which will produce the most dispersed remainder. At the same time, the data of the side with a larger data volume is distributed among multiple hash buckets, and a large number of hash buckets are designed. The large amount of data is evenly distributed, and the side with a smaller data volume will have more empty buckets, which makes data filtering faster. Furthermore, the size of the hash buckets is designed to be large, and the generation of hash collisions makes the buckets more dispersed. By adding more data, when the hash bucket with the larger data has data, but the bucket with the same data number has no data, the bucket with the larger data can be quickly removed, and the data contained therein can also be directly filtered out. Furthermore, the data filtering method used in the example embodiment of this disclosure will absolutely not result in the accidental deletion of data. Both parties use the same hash function. If one party has data in its bucket but the other party does not, this situation is definitely not the intersection of the data. Therefore, this patent also ensures the integrity of the data. Moreover, since it is not uncommon in practical applications for one party to have a much larger data volume than the other party, for example, when a local city operator user and a local small-scale bank perform a privacy intersection, the operator user's data volume is much larger than the small-scale bank's data volume. Therefore, reducing the computational overhead can greatly improve system performance.
[0111] In some example embodiments, if the data volume difference between the first target data volume and the second target data volume is greater than a preset threshold, the method for processing the user privacy data may further include: when it is determined that the data volume difference is greater than the preset threshold, filtering the first target privacy data and the second target privacy data again until the data volume difference between the first target data volume of the filtered first target privacy data and the second target data volume of the filtered second target privacy data is less than or equal to the preset threshold. Wherein, reference... Figure 6 As shown, further filtering of the first target privacy data and the second target privacy data may include the following steps:
[0112] Step S610: Calculate the second product value between the preset second hash bucket value and the preset load factor, and calculate the second ratio between the first original data volume and the second product value; wherein, the preset first hash bucket value is twice the preset second hash bucket value;
[0113] Step S620: Determine the first target parameter value according to the second ratio, and obtain the first target prime value of the first target parameter value; wherein, the range of the first target prime value is from the smallest prime number to the prime value adjacent to the first target parameter value.
[0114] Step S630: Select a prime value that is adjacent to and smaller than the first target parameter value from the first target prime value and use it as the second target parameter value; and construct a second hash function based on the modulo operation between the user identification information and the second target parameter value.
[0115] Step S640: Filter the first target privacy data and the second target privacy data again according to the second hash function.
[0116] The following will explain and illustrate steps S610-S640. Specifically, in practical applications, if the magnitude of the remaining data after processing is still significantly different, the above method is used to continue hashing and placing the data into hash buckets. The |bucket| hash bucket size is changed to 512, and the q in the hash function also changes. The above steps are repeated (each time the hash bucket size is divided by 2) until the remaining elements of the initiator and the remaining elements of the receiver are relatively balanced. Based on this remaining data information, the DH algorithm is calculated again, and then the intersection is obtained. Finally, after the initiator calculates the intersection result, it sends the final calculation result to the participants, and the entire privacy intersection process ends. That is, if the magnitude of the remaining data after processing is still significantly different, when continuing to hash (secondary filtering), only the hash bucket size needs to be changed to a power of 2. Dividing the hash bucket size by 2 increases the number of hash buckets and increases the value of q, so that the originally designed hash function directly becomes a new hash function. This can save time in designing a second hash function and also filter data more quickly.
[0117] It should be noted that the specific implementation process of filtering the first target privacy data and the second target privacy data again using the second hash function is similar to the implementation process of filtering the first user privacy data and the second user privacy data using the first hash function, and will not be elaborated further here.
[0118] At this point, the process for processing user privacy data described in the exemplary embodiments of this disclosure has been fully implemented. The following, in conjunction with... Figure 7 The method for processing user privacy data described in the exemplary embodiments of this disclosure will be further explained and illustrated. Specifically, refer to... Figure 7 As shown, the following steps may be included:
[0119] Step S701: The request initiator designs a first hash function and sends the first hash function to the request receiver;
[0120] Step S702: The request initiator processes its own first user identifier according to the first hash function to obtain the first bucket identifier, and generates a first information list based on the first bucket identifier and the corresponding first user identifier.
[0121] Step S703: The requesting receiver processes its own second user identifier according to the first hash function to obtain the second bucket identifier, and generates a second information list based on the second bucket identifier and the identifier information of whether the corresponding second bucket identifier has a second user identifier.
[0122] Step S704: The requesting recipient sends the second information list to the requesting party;
[0123] Step S705: The request initiator compares the first information list and the second information list to obtain the target bucket identifier, and sends the target bucket identifier to the request receiver;
[0124] Step S706: The requesting party encrypts the first user privacy data corresponding to the target bucket identifier to obtain the first ciphertext;
[0125] Step S707: The requesting recipient encrypts the second user privacy data corresponding to the target identifier to obtain the second ciphertext, and sends the second ciphertext to the requesting party;
[0126] Step S708: The requesting party performs an intersection operation on the first ciphertext and the second ciphertext to obtain the intersection operation result, and sends the intersection operation result to the requesting receiving party.
[0127] Therefore, it can be concluded without a doubt that the user privacy data processing method described in the exemplary embodiments of this disclosure has at least the following advantages: On the one hand, compared with the traditional balanced PSI, the user privacy data processing method described in the exemplary embodiments of this disclosure considers the processing of unbalanced PSI, that is, the situation where one side of the data is much larger than the other side; at the same time, since the traditional DH-based PSI method is suitable for balanced PSI, a large number of modular exponentiation operations are excessive and useless computational load for a large dataset, the user privacy data processing method described in the exemplary embodiments of this disclosure, before performing the DH encryption process, allows the request initiator and the request receiver to use the same hash function to perform the same hash processing and put the data into the bucket for filtering; compared with the existing method, the amount of data that needs to be hashed and then intersected after DH is greatly reduced, thereby reducing computational overhead and improving system efficiency; on the other hand, the design of the hash function affects the speed of data filtering. In the case of unbalanced PSI, the amount of data is much larger. The larger data volume is evenly distributed across multiple hash buckets, and the smaller data volume is also evenly distributed across multiple hash buckets. There will inevitably be instances where one bucket is empty, which can be removed directly without calculation, retaining only cases where both hash buckets contain elements. The choice of hash function ensures that the number of hash buckets in the hash table is a prime number, resulting in the most dispersed remainders. Simultaneously, the larger data volume is distributed across multiple hash buckets, and the larger number of hash buckets ensures a more even distribution of data, leading to more empty buckets on the smaller data volume side, thus making data filtering faster. Furthermore, to ensure security during transmission, the user privacy data processing method described in this example embodiment transmits an information table to the request initiator, containing only the hash bucket number and whether a corresponding element exists. This transmission volume is significantly smaller compared to existing solutions that transmit hash tables containing all data, and even if intercepted by a third party, the hash bucket will only contain true values. The "or false" information is also very secure, and the selection of bucket numbers to remove or retain is calculated quickly. Furthermore, if the remaining data volume after processing still differs significantly in magnitude, when continuing hashing, only the hash bucket size needs to be changed to a power of 2. Dividing by 2 increases the number of hash buckets and the value of q, directly transforming the initially designed hash function into a new hash function. This saves time in designing the function and allows for faster data filtering. Finally, the data filtering method absolutely prevents accidental deletion of data. Both parties use the same hash function; if one bucket contains data while the other does not, this situation is definitely not an intersection of data, thus this patent also guarantees data integrity.
[0128] This disclosure also provides an apparatus for processing user privacy data, as illustrated in the example embodiments. Specifically, refer to... Figure 8As shown, the user privacy data processing device may include a first calculation module 810, a user privacy data filtering module 820, a second calculation module 830, and an intersection operation module 840.
[0129] in:
[0130] The first calculation module 810 can be used to obtain the first user privacy data possessed by the request initiator and calculate the first original data volume of the first user privacy data;
[0131] The user privacy data filtering module 820 can be used to construct a first hash function based on the first original data volume, and filter the first user privacy data and the second user privacy data possessed by the request recipient based on the first hash function to obtain the first target privacy data and the second target privacy data.
[0132] The second calculation module 830 can be used to calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and to calculate the data volume difference between the first target data volume and the second target data volume;
[0133] The intersection operation module 840 can be used to perform an intersection operation on the first target privacy data and the second target privacy data when it is determined that the difference in the data volume is less than or equal to a preset threshold, to obtain the intersection operation result, and send the intersection operation result to the request receiver.
[0134] In one exemplary embodiment of this disclosure, constructing a first hash function based on the first original data volume includes:
[0135] Based on the first original data volume and the preset first hash bucket value, calculate the first original parameter value, and determine the second original parameter value based on the first original parameter value;
[0136] The first hash function is constructed based on the second original parameter value and the user identification information.
[0137] In one exemplary embodiment of this disclosure, calculating a first original parameter value based on the first original data volume and a preset first hash bucket value, and determining a second original parameter value based on the first original parameter value, includes:
[0138] Calculate the first product value between the preset first hash bucket value and the preset load factor, and calculate the first ratio between the first original data volume and the first product value;
[0139] The first original parameter value is determined based on the first ratio, and the first original prime value of the first original parameter value is obtained; wherein, the range of the first original prime value is from the smallest prime number to the prime value adjacent to the first original parameter value;
[0140] Select a prime value from the first original prime value that is adjacent to and smaller than the first original parameter value, and use it as the second original parameter value.
[0141] In one exemplary embodiment of this disclosure, constructing the first hash function based on the second original parameter value and user identification information includes:
[0142] The first hash function is constructed based on the modulo operation between the user identification information and the second original parameter value.
[0143] In one exemplary embodiment of this disclosure, filtering the first user privacy data and the second user privacy data possessed by the request recipient according to the first hash function to obtain first target privacy data and second target privacy data includes:
[0144] Based on the first hash function and the first user identifier included in the first user privacy data, a first information list including the first bucket identifier of the first hash bucket and the first user identifier is generated.
[0145] The first hash function is sent to the requesting recipient, and the requesting recipient sends a second information list including a second bucket identifier and whether a second user identifier exists in the second hash bucket corresponding to the second bucket identifier; wherein, the second bucket identifier is calculated by the requesting recipient based on the first hash function and the second user identifier included in the second user privacy data held by the requesting recipient;
[0146] Select a target hash bucket from the first information list and the second information list that has the same bucket identifier and contains a user identifier in both the first hash bucket and the second hash bucket;
[0147] The first user privacy data corresponding to the first user identifier included in the target hash bucket is used as the first target privacy data, and the second user privacy data corresponding to the second user identifier included in the target hash bucket is used as the second target privacy data.
[0148] In one exemplary embodiment of this disclosure, a first information list including a first bucket identifier of a first hash bucket and a first user identifier is generated based on the first hash function and the first user identifier included in the first user privacy data, including:
[0149] The first user identifier included in the first user privacy data and the second original parameter value included in the first hash function are moduloed to obtain the first bucket identifier of the first hash bucket;
[0150] The first information list is generated based on the first user identifier used to calculate the first bucket identifier and the first bucket identifier.
[0151] In one exemplary embodiment of this disclosure, calculating the second target data volume of the second target privacy data includes:
[0152] The target bucket identifier of the target hash bucket is sent to the requesting recipient so that the requesting recipient can calculate the second target data volume based on the second target privacy data of the second user identifier corresponding to the target bucket identifier.
[0153] In one exemplary embodiment of this disclosure, calculating the data volume difference between the first target data volume and the second target data volume includes:
[0154] Receive the second data volume sent by the requesting recipient, and calculate the data volume difference between the first target data volume and the second target data volume.
[0155] In one exemplary embodiment of this disclosure, the user privacy data processing apparatus further includes:
[0156] The secondary filtering module can be used to filter the first target privacy data and the second target privacy data again when it is determined that the data volume difference is greater than a preset threshold, until the data volume difference between the first target data volume of the filtered first target privacy data and the second target data volume of the filtered second target privacy data is less than or equal to the preset threshold.
[0157] In one exemplary embodiment of this disclosure, the first target privacy data and the second target privacy data are filtered again, including:
[0158] Calculate the second product between the preset second hash bucket value and the preset load factor, and calculate the second ratio between the first original data volume and the second product value; wherein the preset first hash bucket value is twice the preset second hash bucket value;
[0159] The first target parameter value is determined based on the second ratio, and the first target prime value is obtained; wherein, the range of the first target prime value is from the smallest prime number to the prime value adjacent to the first target parameter value.
[0160] Select a prime value from the first target prime value that is adjacent to and smaller than the first target parameter value as the second target parameter value, and construct a second hash function based on the modulo operation between the user identification information and the second target parameter value;
[0161] The first target privacy data and the second target privacy data are filtered again according to the second hash function.
[0162] In one exemplary embodiment of this disclosure, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result, including:
[0163] Receive the first ciphertext sent by the requesting recipient, which is obtained by encrypting the first target privacy data using a preset encryption algorithm;
[0164] The second target privacy data is encrypted using the preset encryption algorithm to obtain the second ciphertext, and the intersection operation is performed on the first ciphertext and the second ciphertext to obtain the intersection operation result.
[0165] The specific details of each module in the aforementioned user privacy data processing device have been described in detail in the corresponding user privacy data processing methods, so they will not be repeated here.
[0166] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0167] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0168] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0169] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0170] The following reference Figure 9 To describe an electronic device 900 according to such an embodiment of the present disclosure. Figure 9 The electronic device 900 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0171] like Figure 9 As shown, the electronic device 900 is manifested in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting different system components (including storage unit 920 and processing unit 910), and a display unit 940.
[0172] The storage unit stores program code that can be executed by the processing unit 910, causing the processing unit 910 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 910 can perform actions such as... Figure 1 The steps shown are as follows: Step S110: Obtain the first user privacy data possessed by the request initiator and calculate the first original data volume of the first user privacy data; Step S120: Construct a first hash function based on the first original data volume, and filter the first user privacy data and the second user privacy data possessed by the request recipient based on the first hash function to obtain the first target privacy data and the second target privacy data; Step S130: Calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and calculate the data volume difference between the first target data volume and the second target data volume; Step S140: When it is determined that the data volume difference is less than or equal to a preset threshold, perform an intersection operation on the first target privacy data and the second target privacy data to obtain the intersection operation result, and send the intersection operation result to the request recipient.
[0173] Storage unit 920 may include readable media in the form of volatile storage units, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203.
[0174] Storage unit 920 may also include a program / utility 9204 having a set (at least one) program module 9205, such program module 9205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0175] Bus 930 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0176] Electronic device 900 can also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 900, and / or with any device that enables electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0177] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0178] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.
[0179] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0180] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0181] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0182] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0183] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0184] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0185] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not invented by this disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for processing user privacy data, characterized in that, include: Obtain the first user privacy data possessed by the request initiator, and calculate the first original data volume of the first user privacy data; Based on the first original data volume and the preset first hash bucket value, calculate the first original parameter value and obtain the first original prime value of the first original parameter value; wherein, the range of the first original prime value is from the smallest prime number to the prime value adjacent to the first original parameter value; select the prime value adjacent to the first original parameter value and smaller than the first original parameter value from the first original prime value as the second original parameter value; construct the first hash function based on the modulo operation between the user identifier information and the second original parameter value, and generate the first information list including the first bucket identifier of the first hash bucket and the first user identifier based on the first hash function and the first user identifier included in the first user privacy data; and set the first hash function... The system sends a message to the requesting recipient and receives a second information list sent by the requesting recipient, including a second bucket identifier and a second hash bucket corresponding to the second bucket identifier, indicating whether a second user identifier exists. The second bucket identifier is calculated by the requesting recipient based on the first hash function and the second user identifier included in the second user privacy data held by the requesting recipient. A target hash bucket with the same bucket identifier and containing a user identifier in both the first hash bucket and the second hash bucket is selected from the first information list and the second information list. The first user privacy data corresponding to the first user identifier included in the target hash bucket is used as the first target privacy data, and the second user privacy data corresponding to the second user identifier included in the target hash bucket is used as the second target privacy data. Calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and calculate the data volume difference between the first target data volume and the second target data volume; When the difference in data volume is determined to be less than or equal to a preset threshold, an intersection operation is performed on the first target privacy data and the second target privacy data to obtain the intersection operation result, and the intersection operation result is sent to the request recipient.
2. The method for processing user privacy data according to claim 1, characterized in that, Based on the first original data volume and the preset first hash bucket value, calculate the first original parameter value, including: Calculate the first product value between the preset first hash bucket value and the preset load factor, and calculate the first ratio between the first original data volume and the first product value; The first original parameter value is determined based on the first ratio.
3. The method for processing user privacy data according to claim 1, characterized in that, Based on the first hash function and the first user identifier included in the first user privacy data, a first information list is generated, including the first bucket identifier of the first hash bucket and the first user identifier, comprising: The first user identifier included in the first user privacy data and the second original parameter value included in the first hash function are moduloed to obtain the first bucket identifier of the first hash bucket; The first information list is generated based on the first user identifier used to calculate the first bucket identifier and the first bucket identifier.
4. The method for processing user privacy data according to claim 1, characterized in that, Calculating the second target data volume of the second target privacy data includes: The target bucket identifier of the target hash bucket is sent to the requesting recipient so that the requesting recipient can calculate the second target data volume based on the second target privacy data of the second user identifier corresponding to the target bucket identifier.
5. The method for processing user privacy data according to claim 1, characterized in that, Calculating the data volume difference between the first target data volume and the second target data volume includes: Receive the second target data volume sent by the requesting recipient, and calculate the data volume difference between the first target data volume and the second target data volume.
6. The method for processing user privacy data according to claim 1, characterized in that, The method for processing user privacy data also includes: When the data volume difference is determined to be greater than a preset threshold, the first target privacy data and the second target privacy data are filtered again until the data volume difference between the first target data volume of the filtered first target privacy data and the second target data volume of the filtered second target privacy data is less than or equal to the preset threshold.
7. The method for processing user privacy data according to claim 6, characterized in that, The first target privacy data and the second target privacy data are filtered again, including: Calculate the second product between the preset second hash bucket value and the preset load factor, and calculate the second ratio between the first original data volume and the second product value; wherein the preset first hash bucket value is twice the preset second hash bucket value; The first target parameter value is determined based on the second ratio, and the first target prime value is obtained; wherein the range of the first target prime value is from the smallest prime number to the prime value adjacent to the first target parameter value. Select a prime value from the first target prime value that is adjacent to and smaller than the first target parameter value as the second target parameter value, and construct a second hash function based on the modulo operation between the user identifier information and the second target parameter value; The first target privacy data and the second target privacy data are filtered again according to the second hash function.
8. The method for processing user privacy data according to claim 1, characterized in that, Perform an intersection operation on the first target privacy data and the second target privacy data to obtain the intersection operation result, including: The first target privacy data is encrypted using a preset encryption algorithm to obtain the first ciphertext; The system receives the second ciphertext obtained by encrypting the second target privacy data using the preset encryption algorithm sent by the requesting recipient, and performs an intersection operation on the first ciphertext and the second ciphertext to obtain the intersection operation result.
9. A device for processing user privacy data, characterized in that, include: The first calculation module is used to obtain the first user privacy data possessed by the request initiator and to calculate the first original data volume of the first user privacy data. The user privacy data filtering module is used to calculate a first original parameter value based on the first original data volume and a preset first hash bucket value, and to obtain the first original prime value of the first original parameter value; wherein the range of the first original prime value is from the smallest prime number to the prime value adjacent to the first original parameter value; select a prime value adjacent to the first original parameter value and smaller than the first original parameter value from the first original prime value as a second original parameter value; construct a first hash function based on the modulo operation between the user identifier information and the second original parameter value, and generate a first information list including the first bucket identifier of the first hash bucket and the first user identifier based on the first hash function and the first user identifier included in the first user privacy data; and filter the data. The first hash function is sent to the requesting recipient, and the requesting recipient receives a second information list, including a second bucket identifier and a second hash bucket corresponding to the second bucket identifier, indicating whether a second user identifier exists. The second bucket identifier is calculated by the requesting recipient based on the first hash function and the second user identifier included in the second user privacy data held by the requesting recipient. A target hash bucket with the same bucket identifier and containing a user identifier in both the first and second hash buckets is selected from the first and second information lists. The first user privacy data corresponding to the first user identifier included in the target hash bucket is used as the first target privacy data, and the second user privacy data corresponding to the second user identifier included in the target hash bucket is used as the second target privacy data. The second calculation module is used to calculate the first target data volume of the first target privacy data and the second target data volume of the second target privacy data, and to calculate the data volume difference between the first target data volume and the second target data volume; The intersection operation module is used to perform an intersection operation on the first target privacy data and the second target privacy data when the difference in the data volume is determined to be less than or equal to a preset threshold, to obtain the intersection operation result, and to send the intersection operation result to the request receiver.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the user privacy data processing method according to any one of claims 1-8.
11. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the user privacy data processing method according to any one of claims 1-8 by executing the executable instructions.