Privacy set dynamic operation method, system and device and storage medium

By inserting privacy collection elements into a full binary tree and building an encoded vector, the problem that the prior art cannot process dynamic data is solved, and efficient operation of dynamic updateable privacy collections is achieved.

CN119760779APending Publication Date: 2025-04-04浪潮智慧科技有限公司 +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411941379.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art cannot effectively process dynamic data and cannot adapt to the dynamic changes of privacy collections.

Method used

By evenly inserting elements of the privacy collection into the pre-built leaf nodes full binary tree, and using the grouping privacy protection key-value storage algorithm to build the coded vector, the coded vector is updated in the privacy collection interception operation stage to support dynamic updates.

Benefits of technology

The operation of dynamic updateable privacy sets is implemented, ensuring that most of the encoding results remain unchanged, significantly reducing the computational complexity and communication overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760779A_ABST
    Figure CN119760779A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and particularly provides a privacy set dynamic operation method, system and device and a storage medium, and the method comprises the steps: uniformly inserting elements of a privacy set into leaf nodes of a pre-constructed full binary tree; constructing a coding vector by using a grouping privacy protection key value storage algorithm and taking the element group of each leaf node as a basic unit; in a privacy set intersection operation stage, if an update element exists, recoding a leaf node where the update element is located into a new vector, and synchronously updating a corresponding coding vector backed up by an operation participant based on the new vector; and updating an intersection generated by the privacy set intersection operation based on the update element. According to the method, the updating operation of any local key value pair can be supported in the encoding stage, and meanwhile, most encoding results are not changed, so that the operation of the dynamic updatable privacy set can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and specifically relates to a privacy set dynamic calculation method, system, device and storage medium. Background Art

[0002] Privacy set operations are a high-level basic primitive in the field of secure multi-party computing, and also belong to the specific application protocol of secure multi-party computing. Privacy set operations allow two mutually untrusted parties to calculate the intersection, union, and difference of their sets without leaking additional private information. Therefore, it has important applications in the fields of financial institution blacklist sharing, criminal investigation, medical research, identity authentication, etc.

[0003] At present, the research on privacy set operations mainly includes privacy set intersection (PSI), privacy set union (PSU), privacy data retrieval (PIR) and database count query (Count Query) and other privacy set operations.

[0004] The industry has optimized various protocols to varying degrees. Generally speaking, these privacy set operations are based on static data, where only the privacy input sets of both parties are operated once. Therefore, existing technologies cannot perform adaptive processing on dynamic data. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a privacy set dynamic calculation method, system, device and storage medium to solve the above-mentioned technical problems.

[0006] In a first aspect, the present invention provides a privacy set dynamic calculation method, comprising: The elements of the privacy set are uniformly inserted into the leaf nodes of the pre-constructed full binary tree; a coding vector is constructed based on the element group of each leaf node using a group privacy protection key-value storage algorithm; In the privacy set intersection operation phase, if there is an updated element, the leaf node where the updated element is located is re-encoded into a new vector, and the corresponding encoding vector backed up by the operation participant is synchronously updated based on the new vector; The intersection set generated by the privacy set intersection operation is updated based on the update element.

[0007] In an optional implementation, the elements of the privacy set are uniformly inserted into the leaf nodes of a pre-constructed full binary tree, including: Perform hash operations on elements in the prime number field to obtain the hash values ​​of the elements; In the hash-based privacy set intersection protocol, a full binary tree is constructed as the data structure; Based on the hash value of the element, the element is inserted into a leaf node of the full binary tree.

[0008] In an optional implementation, in a hash-based privacy set intersection protocol, a full binary tree is constructed as a data structure, including: According to the expected number of input elements n, determine the height h so that 2^h>= n; The value of the root node is set to p / 2, where p is a prime number; the values ​​of the nodes are assigned from left to right and from top to bottom, and the assigned values ​​are used to identify the nodes; The value of the leaf node serves as a container for storing hash values. When an element is mapped to a specific hash value through a hash algorithm, the specific hash value will serve as an index to point to the corresponding leaf node in the tree.

[0009] In an optional implementation, a group privacy protection key-value storage algorithm is used to construct a coding vector based on the element group of each leaf node, including Hash each element in the privacy collection to get the key-value pair ; Generate a set of random numbers ; For all elements that fall into the same leaf node Do local coding, local coding includes: definition , , in To generate a sparse vector with fixed weights, is a dense vector, and are two random functions, The weight is A bit string containing 1, random number , then The element group vector of leaf nodes is:

[0010] The matrix equation for calculating the leaf node is as follows, where It is a column vector consisting of the values ​​corresponding to the elements in the leaf node:

[0011] Element group vector based on the i-th leaf node The value of and the column vector corresponding to the value of the element in the leaf node are used to calculate the encoding vector of the leaf node; The matrix equation is solved, and the solution process includes: Perform triangulation, row-column transformation and elimination to obtain the maximum lower triangular matrix, and use the back substitution method to solve the successfully triangulated Row vectors, using Gaussian elimination to solve those that cannot be triangulated row vector, ,based on Row vector sum The solution of the row vector is the element group vector of the i-th leaf node The value of Merge the encoding vectors of all leaf nodes into the encoding matrix of the privacy set.

[0012] In an optional embodiment, the method further comprises: In the offline stage, the coding matrix is ​​backed up to the operation participant using an offline storage medium; Performing a privacy set intersection operation based on the encoding matrix of the other party's privacy set includes: Obtain the other party's random number through lightweight trusted execution hardware; Based on the random number, reversely decode the backed-up encoding vector using a group privacy protection key-value storage algorithm to obtain an element hash value; Calculate the hash value intersection of the element hash value of its own privacy set and the element hash value, map the hash value elements in the hash value intersection to the elements in the privacy set, and save the mapped elements to the intersection.

[0013] In an optional implementation, during the privacy set intersection operation phase, if there is an updated element, the leaf node where the updated element is located is re-encoded into a new vector, and the corresponding encoding vector backed up by the operation participant is synchronously updated based on the new vector, including: Confirming that there is an updated element in the privacy set, the operation participant searches for a target leaf node to which the updated element belongs based on the full binary tree; The target leaf node is re-encoded using the group privacy protection key-value storage algorithm to obtain the corresponding new vector and index; The new vector is encrypted and sent to a computing participant by using lightweight trusted execution hardware. The computing participant determines an original encoding vector corresponding to the new vector based on the index and replaces the original encoding vector with the new vector.

[0014] In an optional implementation, updating the intersection generated by the privacy set intersection operation based on the update element includes: If it is confirmed that there is a newly added element in its own privacy set, the hash value of the newly added element is calculated, and the hash value is matched with the element hash value. If the match is successful, the newly added element is placed in the intersection; Confirming that there is a deleted element in its own privacy set, and the deleted element exists in the intersection, then removing the deleted element from the intersection; If it is confirmed that there are updated elements in the other party's privacy set, after receiving the other party's updated leaf node encoding vector and index, all elements in the node in the intersection will be removed, and the element hash value will be matched with the updated encoding vector again, and the successfully matched elements will be put into the intersection.

[0015] In a second aspect, the present invention provides a privacy set dynamic operation system, comprising: The first processing module is used to uniformly insert the elements of the privacy set into the leaf nodes of the pre-constructed full binary tree; and construct a coding vector based on the element group of each leaf node using a group privacy protection key-value storage algorithm; The second processing module is used to, during the privacy set intersection operation phase, if there is an updated element, re-encode the leaf node where the updated element is located into a new vector, and synchronously update the corresponding encoding vector backed up by the operation participant based on the new vector; The third processing module is used to update the intersection generated by the privacy set intersection operation based on the update element.

[0016] In a third aspect, a device is provided, including: A memory, used for storing a privacy set dynamic operation program; A processor is used to implement the steps of the privacy set dynamic calculation method provided in the first aspect when executing the privacy set dynamic calculation program.

[0017] In a fourth aspect, a computer-readable storage medium is provided, on which a privacy set dynamic operation program is stored. When the privacy set dynamic operation program is executed by a processor, the steps of the privacy set dynamic operation method provided in the first aspect are implemented.

[0018] The beneficial effect of the present invention lies in that the privacy set dynamic operation method, system, device and storage medium provided by the present invention, based on the binary search tree grouped oblivious privacy-preserving key-value storage algorithm (CBT-OKVS), can support local arbitrary key-value pair update operations in the encoding stage, while ensuring that most encoding results remain unchanged, thereby enabling the operation of dynamically updateable privacy sets.

[0019] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0022] Figure 2 It is a schematic structural diagram of a binary tree of a method according to an embodiment of the present invention.

[0023] Figure 3 The figure is a schematic diagram of the encryption interaction of the method according to an embodiment of the present invention.

[0024] Figure 4 This is an example diagram of a computing application scenario of a method according to an embodiment of the present invention.

[0025] Figure 5 The figure is an example diagram of an element update scenario of a method according to an embodiment of the present invention.

[0026] Figure 6 is a schematic block diagram of a system according to an embodiment of the present invention.

[0027] Figure 7 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0030] The key terms appearing in the present invention are explained below: Binary Tree (BT); Full Binary Tree (FBT); Privacy Set Computation; Secure Multi-Party Computation (MPC); Private Set Operations (PSO); Private Set Intersection (PSI); Updatable Private Set Intersection (UPSI); Private Set Union (PSU); Private Information Retrieval (PIR); Oblivious Key-Value Store (OKVS); Cluster OKVS Oblivious Pseudorandom Function (OPRF); Trusted Execution Environment (TEE); Light Trust Execution Hardware (LTH).

[0031] The privacy set dynamic calculation method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the privacy set dynamic calculation system runs in the computer device.

[0032] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject can be a privacy set dynamic computing system. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0033] like Figure 1 As shown, the method includes: S1. Evenly insert the elements of the privacy set into the leaf nodes of the pre-constructed full binary tree; and construct a coding vector using the grouped privacy-preserving key-value storage algorithm with the element group of each leaf node as the basic unit.

[0034] Construct a full binary tree: The operation participants first need to pre-process their respective privacy set elements, such as deduplication and sorting, to ensure that each element is unique.

[0035] Then, these elements are evenly inserted into the leaf nodes of a pre-built full binary tree. The characteristic of a full binary tree is that each non-leaf node has two child nodes, and all leaf nodes are at the same level.

[0036] When inserting elements, you can do it in a certain order (such as increasing order of element values) to ensure the balance of the binary tree and the uniformity of element distribution.

[0037] Construct the encoding vector: After the full binary tree is constructed, the group privacy protection key-value storage algorithm is used to construct the encoding vector based on the element group of each leaf node.

[0038] The encoding vector can be a fixed-length binary string, where each bit represents a path from the root node to the leaf node in the binary tree. If an element exists on the path, the corresponding bit is 1, otherwise it is 0.

[0039] The group privacy-preserving key-value storage algorithm is used to ensure that no private information about the original collection elements is leaked when constructing and storing the encoded vectors.

[0040] S2. During the privacy set intersection operation phase, if there is an updated element, the leaf node where the updated element is located is re-encoded into a new vector, and the corresponding encoding vector backed up by the operation participant is synchronously updated based on the new vector.

[0041] Detect updated elements: During the privacy set intersection operation phase, if a participant in the operation finds that there are updated elements in its privacy set (such as new, deleted or modified elements), subsequent processing is required.

[0042] Recode leaf nodes: For leaf nodes containing updated elements, they need to be re-encoded to generate new encoding vectors, which involves updating the path information from the root node to the leaf node in the binary tree.

[0043] Update the encoding vector synchronously: Based on the newly generated code vector, the corresponding code vector backed up by the operation participants needs to be updated synchronously. This can be achieved by sending update information (such as added or deleted bit information) to reduce communication overhead.

[0044] After the synchronous update, the operation participants and the encoding vectors will remain consistent, thus ensuring the accuracy of subsequent intersection operations.

[0045] The intersection set generated by the privacy set intersection operation is updated based on the update element.

[0046] S3. Update the intersection generated by the private set intersection operation based on the update element.

[0047] In an embodiment of the present invention, based on step S1, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0048] S101. Evenly insert the elements of the privacy set into the leaf nodes of the pre-constructed full binary tree.

[0049] Construct a full binary tree, element The total amount is , the size of the element data in each group is taken as , the leaf nodes have , the total number of nodes is , the depth of the tree .

[0050] The specific construction process is as follows: (1) For elements in the prime field Hash The hash algorithm can be SimpleModHash or other algorithms that can make the elements A hash algorithm whose hash values ​​are uniformly distributed over the prime number field.

[0051] (2) In the hash-based privacy set intersection protocol, a full binary tree is constructed as the data structure.

[0052] Determine the height h based on the expected number of input elements n, ; The value of the root node is set to p / 2, where p is a prime number; the node values ​​are assigned from left to right and from top to bottom, and the assigned values ​​are used to identify the nodes. For example, the values ​​of the secondary nodes from left to right are , and so on for lower nodes. Figure 2 shown.

[0053] Final confirmation The value of a leaf node.

[0054] The value of the leaf node serves as a container for storing hash values. When an element is mapped to a specific hash value through a hash algorithm, the specific hash value will serve as an index to point to the corresponding leaf node in the tree.

[0055] (3) Based on the hash value of the element, insert the element into a leaf node of the full binary tree.

[0056] Elements enter the full binary tree according to their hash values, after After the comparison, it falls into a leaf node. The hash algorithm in the first step can make the element Evenly fall into leaf nodes.

[0057] S102. Use a group privacy protection key-value storage algorithm to construct a coding vector based on the element group of each leaf node.

[0058] Hash each element in the privacy collection to get the key-value pair ; Generate a set of random numbers ; Coding Phase : For all elements that fall into the same leaf node Do local coding, local coding includes: definition , , in To generate a sparse vector with fixed weights, is a dense vector, and are two random functions, The weight is A bit string containing 1, random number , then The element group vector of leaf nodes is:

[0059] right Perform triangulation, row-column transformation and elimination to obtain the maximum lower triangular matrix, and use the back substitution method to solve the successfully triangulated Row vector, the complexity is ; Use Gaussian elimination to solve problems that cannot be triangulated row vector, , the complexity is So the total complexity is .

[0060] The matrix equation for calculating the leaf node is as follows, where It is a column vector consisting of the values ​​corresponding to the elements in the leaf node:

[0061] Element group vector based on the i-th leaf node The value of and the column vector corresponding to the value of the element in the leaf node are used to calculate the encoding vector of the leaf node. .

[0062] Calculate the encoding vector of the leaf node The solution process includes: based on Row vector sum The solution of the row vector is the element group vector of the i-th leaf node After completing the triangulation, row-column transformation and elimination operations, a maximally triangulated matrix is ​​obtained. At this point, the value of the element group vector can be generated based on the solution of the row vector. Specifically, starting from the last row, the components of each element group vector can be gradually solved according to the known coefficients and constant terms. Then, these components are combined to obtain the element group vector of the i-th leaf node. The value of .

[0063] Will The encoding vector of leaf nodes The encoding matrix merged into a private set :

[0064] Among them, the encoding matrix is the encoding vector A collection of .

[0065] With respect to the above encoding method, a corresponding decoding method is given.

[0066] Decoding stage : When decoding, input the encoding result , a key value element that needs to be solved , random number First, calculate the element The position of the binary tree leaf node , then similar to the encoding step, calculate .

[0067] calculate , the result Output.

[0068] For the encoding method in this implementation, if there is an element addition or deletion operation, the leaf node position of the element is located according to the binary search tree in the encoding stage, and the local Group Code Vector , thereby updating the overall encoding matrix .

[0069] In the present invention, each update operation of the privacy set needs to locate the updated element in a leaf node, so the update operation complexity of the privacy set is the same as the search complexity of the binary tree, which is Due to the nature of binary trees, each update requires h comparisons, so the complexity of the local update OKVS algorithm is Much smaller than the overall OKVS reconstruction complexity .

[0070] In the offline stage, the coding matrix is ​​backed up to the operation participant using an offline storage medium.

[0071] After obtaining the encoding matrix, perform an intersection operation: Obtain the other party's random number through lightweight trusted execution hardware; Based on the random number, reversely decode the backed-up encoding vector using a group privacy protection key-value storage algorithm to obtain an element hash value; Calculate the hash value intersection of the element hash value of its own privacy set and the element hash value, map the hash value elements in the hash value intersection to the elements in the privacy set, and save the mapped elements to the intersection.

[0072] In an embodiment of the present invention, based on step S2, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0073] S201. Confirming that there is an updated element in the privacy set, the operation participant searches for the target leaf node to which the updated element belongs based on the full binary tree; S202. Re-encode the target leaf node using a group privacy protection key-value storage algorithm to obtain a corresponding new vector and index; S203. Utilize lightweight trusted execution hardware to encrypt the new vector and send it to a computing participant. The computing participant determines the original encoding vector corresponding to the new vector based on the index and replaces the original encoding vector with the new vector.

[0074] In an embodiment of the present invention, based on step S3, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0075] S301. Confirm that there is a new element in its own privacy set, calculate the hash value of the new element, and match the hash value with the element hash value. If the match is successful, put the new element into the intersection; S302. Confirm that there is a deleted element in its own privacy set, and the deleted element exists in the intersection, then remove the deleted element from the intersection.

[0076] S303. Confirm that there are updated elements in the other party's privacy set. After receiving the updated leaf node encoding vector and index of the other party, remove all elements in the node in the intersection, re-match the element hash value with the updated encoding vector, and put the successfully matched elements into the intersection.

[0077] Since the characteristics of OKVS are very conducive to building the PSO protocol, the CBT-OKVS algorithm proposed in this invention can also be used in various privacy set operations. Here, the specific solution is to realize the dynamically updateable PSI. At the same time, the present invention simplifies the upper layer protocol process with the help of lightweight trusted execution hardware (LTH), reduces the communication cost, and is roughly divided into offline and online stages.

[0078] In a specific example, assume that there are two parties involved: Alice holds a private collection , Bob holds the privacy collection , where Alice sends a PSI application to Bob. Alice and Bob each hold LTH, and the encryption channel of LTH between the two parties is determined by the secret key agreed upon by both parties. Protection, with physical isolation properties, such as Figure 3 shown.

[0079] Please refer to Figure 4 , is an example of calculating the intersection of private sets: Offline stage (operation of CBT-OKVS encoding algorithm and pre-generation of random numbers): Alice and Bob construct binary trees for the elements of their privacy sets respectively, so that the elements in their privacy sets fall evenly among all leaf nodes of the binary tree.

[0080] For all elements that fall into the same leaf node Execute the CBT-OKVS encoding algorithm and convert the encoding result Mutual backup, random number Generated by LTH and stored by the party in the local LTH.

[0081] Online stage (initial intersection generation and dynamic update of intersection): Initial intersection generation: Alice sends a PSI request instruction to Bob, and Bob sends Alice the processed random number, which is encrypted by SharedKeys in LTH. LTH sent to Alice, is the encryption function.

[0082] Alice uses Shared Keys to decrypt in LTH Get random numbers , For the decryption function, the elements held Execute the CBT-OKVS decoding algorithm one by one and calculate ,like , then Put the intersection result; if Then discard.

[0083] According to the protocol, the communication complexity of the initial intersection generation is the same as the random number The size of the two is related, and it is a round of communication. Since Alice did not send the division encoding result to Bob, Other information except Alice’s will not be leaked; due to the double casualness of the OKVS structure, the elements of Bob’s set that do not belong to Alice’s set will not be decoded, and Bob’s information is also safe.

[0084] Please refer to Figure 5 , after generating the initial intersection, if there is an element update, perform the following steps: If Alice updates an element: (1) After locating the update element at the leaf node, update the leaf node encoding vector ; (2) If an element is added, the hash value of the newly added element is calculated, and the hash value is matched with the element hash value. If the match is successful, the newly added element is placed in the intersection, using the same method as the intersection calculation step in the online stage; (3) If the element is to be deleted, if the element is in the initial intersection, the element is removed from the initial intersection.

[0085] (4) Send the encrypted updated Group Code Vector and its index , encrypted by the Shared Keys in LTH and sent to Bob's LTH.

[0086] (5) Bob uses Shared Keys to decrypt the updated Group Code Vector , update Alice's global encoding result according to its leaf node index .

[0087] If Bob has an element update: (1) Bob then performs an updateable privacy set operation based on the CBT-OKVS algorithm, locates the leaf node to which the update element belongs according to the binary search tree, re-executes the OKVS encoding algorithm for the leaf node, and updates the local Group Code Vector .

[0088] (2) Bob sends the encrypted updated Group Code Vector and its index , encrypted by the Shared Keys in LTH and sent to Alice.

[0089] (3) Alice uses Shared Keys to decrypt the updated Group Code Vector , update Bob's global encoding result according to its leaf node index .

[0090] (4) Alice puts her All the elements in the intersection of the leaf nodes are removed, and the node is re-encoded according to step 2 of the online phase with the updated encoding vector Update the intersection after doing the decoding algorithm.

[0091] According to the protocol, the communication cost of each update is only the application for updating the encoding result. Its communication complexity is similar to that of the unbalanced PSI protocol, which is only related to the data size of the smaller party. The communication complexity of the updateable PSI protocol in the present invention is only related to is related to the size of Much smaller than the overall update reconstruction communication complexity .

[0092] When Alice and Bob update the elements in the collection, they only send the updated encoding vector and index to each other. Due to the processing of the elements by the hash function, the elements can fall evenly into all leaf nodes, so the other party cannot obtain additional information about the updated elements, nor can they know what specific update operations the other party has taken. Therefore, the updated element information is safe.

[0093] The method provided by the present invention processes long-term stored and frequently used data into an intermediate format suitable for analysis in the offline stage, amortizes the time cost of the high-cost OKVS matrix equation solving algorithm in the offline stage, and at the same time, the use of LTH adds a layer of physical isolation protection to the intermediate format of the privacy set elements and simplifies the protocol; while in the online stage, only decoding operations are performed. For dynamically updated set operations, the two parties involved in the calculation can quickly calculate new results when modifying the set without re-performing traditional static set operations, so that the calculation complexity remains independent of the total set size, significantly reducing the calculation overhead. Constant round communication in the online stage also greatly reduces communication overhead.

[0094] The Binary Search Tree-Based Grouped Oblivious Privacy Preserving Key-Value Storage (CBT-OKVS) algorithm can support local updates of arbitrary key-value pairs during the encoding phase while ensuring that most encoding results remain unchanged. This ensures that in most cases when an element is updated, the present invention has faster performance than re-executing the entire PSO protocol. The update operation complexity of the privacy set is the same as the search complexity of the binary tree. Due to the nature of the binary tree, each update requires h comparisons, and the complexity of the local update OKVS algorithm is Much smaller than the overall OKVS reconstruction complexity , the computational complexity remains independent of the total set size and is only related to the amount of data in the leaf node.

[0095] The present invention can apply the CBT-OKVS algorithm to various dynamically updateable privacy set operations by adjusting the upper layer protocol.

[0096] In some embodiments, the privacy set dynamic operation system may include multiple functional modules composed of computer program segments. The computer program of each program segment in the privacy set dynamic operation system may be stored in the memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) The function of dynamic operation of privacy sets.

[0097] In this embodiment, the privacy set dynamic operation system can be divided into multiple functional modules according to the functions it performs, such as Figure 6 As shown. The functional modules of the system 600 may include: a first processing module 610, a second processing module 620 and a third processing module 630. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0098] The first processing module is used to uniformly insert the elements of the privacy set into the leaf nodes of the pre-constructed full binary tree; and construct a coding vector based on the element group of each leaf node using a group privacy protection key-value storage algorithm; The second processing module is used to, during the privacy set intersection operation phase, if there is an updated element, re-encode the leaf node where the updated element is located into a new vector, and synchronously update the corresponding encoding vector backed up by the operation participant based on the new vector; The third processing module is used to update the intersection generated by the privacy set intersection operation based on the update element.

[0099] Optionally, as an embodiment of the present invention, the elements of the privacy set are uniformly inserted into the leaf nodes of a pre-constructed full binary tree, including: Perform hash operations on elements in the prime number field to obtain the hash values ​​of the elements; In the hash-based privacy set intersection protocol, a full binary tree is constructed as the data structure; Based on the hash value of the element, the element is inserted into a leaf node of the full binary tree.

[0100] Optionally, as an embodiment of the present invention, in a hash-based privacy set intersection protocol, a full binary tree is constructed as a data structure, including: According to the expected number of input elements n, determine the height h so that 2^h>= n; The value of the root node is set to p / 2, where p is a prime number; the values ​​of the nodes are assigned from left to right and from top to bottom, and the assigned values ​​are used to identify the nodes; The value of the leaf node serves as a container for storing hash values. When an element is mapped to a specific hash value through a hash algorithm, the specific hash value will serve as an index to point to the corresponding leaf node in the tree.

[0101] Optionally, as an embodiment of the present invention, a group privacy protection key-value storage algorithm is used to construct a coding vector with each leaf node element group as a basic unit, including Hash each element in the privacy collection to get the key-value pair ; Generate a set of random numbers ; For all elements that fall into the same leaf node Do local coding, local coding includes: definition , , in To generate a sparse vector with fixed weights, is a dense vector, and are two random functions, The weight is A bit string containing 1, random number , then The element group vector of leaf nodes is:

[0102] The matrix equation for calculating the leaf node is as follows, where It is a column vector consisting of the values ​​corresponding to the elements in the leaf node:

[0103] Element group vector based on the i-th leaf node The value of and the column vector corresponding to the value of the element in the leaf node are used to calculate the encoding vector of the leaf node. , the specific solution process includes: right Perform triangulation, row-column transformation and elimination to obtain the maximum lower triangular matrix, and use the back substitution method to solve the successfully triangulated Row vectors, using Gaussian elimination to solve those that cannot be triangulated row vector, ,based on Row vector sum The solution of the row vector is the element group vector of the i-th leaf node The value of Merge the encoding vectors of all leaf nodes into the encoding matrix of the privacy set.

[0104] Optionally, as an embodiment of the present invention, the method further includes: In the offline stage, the coding matrix is ​​backed up to the operation participant using an offline storage medium; Performing a privacy set intersection operation based on the encoding matrix of the other party's privacy set includes: Obtain the other party's random number through lightweight trusted execution hardware; Based on the random number, reversely decode the backed-up encoding vector using a group privacy protection key-value storage algorithm to obtain an element hash value; Calculate the hash value intersection of the element hash value of its own privacy set and the element hash value, map the hash value elements in the hash value intersection to the elements in the privacy set, and save the mapped elements to the intersection.

[0105] Optionally, as an embodiment of the present invention, in the privacy set intersection operation phase, if there is an updated element, the leaf node where the updated element is located is re-encoded into a new vector, and the corresponding encoding vector backed up by the operation participant is synchronously updated based on the new vector, including: Confirming that there is an updated element in the privacy set, the operation participant searches for a target leaf node to which the updated element belongs based on the full binary tree; The target leaf node is re-encoded using the group privacy protection key-value storage algorithm to obtain the corresponding new vector and index; The new vector is encrypted and sent to a computing participant by using lightweight trusted execution hardware. The computing participant determines an original encoding vector corresponding to the new vector based on the index and replaces the original encoding vector with the new vector.

[0106] Optionally, as an embodiment of the present invention, updating the intersection generated by the privacy set intersection operation based on the update element includes: If it is confirmed that there is a newly added element in its own privacy set, the hash value of the newly added element is calculated, and the hash value is matched with the element hash value. If the match is successful, the newly added element is placed in the intersection; If it is confirmed that there is a deleted element in its own privacy set and the deleted element exists in the intersection, the deleted element is removed from the intersection.

[0107] If it is confirmed that there are updated elements in the other party's privacy set, after receiving the other party's updated leaf node encoding vector and index, all elements in the node in the intersection will be removed, and the element hash value will be matched with the updated encoding vector again, and the successfully matched elements will be put into the intersection.

[0108] Figure 7 The privacy set dynamic calculation method provided for the embodiment of the present application can be applied to the device. Those skilled in the art will understand that the device structure involved in the embodiment of the present invention does not constitute a limitation on the device, and the device may include more or fewer components than shown in the figure, or combine certain components, or arrange different components. In an embodiment of the present invention, the device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0109] The device 700 may include: a processor 710, a memory 720 and a communication unit 730. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0110] The memory 720 may be used to store the execution instructions of the processor 710, and the memory 720 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 720 are executed by the processor 710, the device 700 is enabled to perform some or all of the steps in the following method embodiments.

[0111] The processor 710 is the control center of the storage device, and uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 720, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 710 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0112] The communication unit 730 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0113] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0114] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0115] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0116] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules 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, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.

[0117] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0118] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0119] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A privacy set dynamic calculation method, characterized in that: include: Insert the elements of the privacy set evenly into the leaf nodes of the pre-built full binary tree; Using a group privacy protection key-value storage algorithm to construct a coding vector based on the element group of each leaf node; In the privacy set intersection operation phase, if there is an updated element, the leaf node where the updated element is located is re-encoded into a new vector, and the corresponding encoding vector backed up by the operation participant is synchronously updated based on the new vector; The intersection set generated by the privacy set intersection operation is updated based on the update element.

2. The method according to claim 1, characterized in that Insert the elements of the privacy set evenly into the leaf nodes of the pre-built full binary tree, including: Perform hash operations on elements in the prime number field to obtain the hash values ​​of the elements; In the hash-based privacy set intersection protocol, a full binary tree is constructed as the data structure; Based on the hash value of the element, the element is inserted into a leaf node of the full binary tree.

3. The method according to claim 2, characterized in that In the hash-based privacy set intersection protocol, a full binary tree is constructed as a data structure, including: According to the expected number of input elements n, determine the height h so that 2^h >= n; The value of the root node is set to p / 2, where p is a prime number; the values ​​of the nodes are assigned from left to right and from top to bottom, and the assigned values ​​are used to identify the nodes; The value of the leaf node serves as a container for storing hash values. When an element is mapped to a specific hash value through a hash algorithm, the specific hash value will serve as an index to point to the corresponding leaf node in the tree.

4. The method according to claim 1, characterized in that The group privacy protection key-value storage algorithm is used to construct a coding vector with each leaf node element group as a basic unit, including Hash each element in the privacy collection to get the key-value pair ; Generate a set of random numbers ; For all elements that fall into the same leaf node Do local coding, local coding includes: definition , , in To generate a sparse vector with fixed weights, is a dense vector, and are two random functions, The weight is A bit string containing 1, random number , then The element group vector of leaf nodes is: The matrix equation for calculating the leaf node is as follows, where It is a column vector consisting of the values ​​corresponding to the elements in the leaf node: Element group vector based on the i-th leaf node The value of and the column vector corresponding to the value of the element in the leaf node are used to calculate the encoding vector of the leaf node; The matrix equation is solved, and the solution process includes: Perform triangulation, row-column transformation and elimination to obtain the maximum lower triangular matrix, and use the back substitution method to solve the successfully triangulated Row vectors, using Gaussian elimination to solve those that cannot be triangulated row vector, ,based on Row vector sum The solution of the row vector is the element group vector of the i-th leaf node The value of Merge the encoding vectors of all leaf nodes into the encoding matrix of the privacy set.

5. The method according to claim 4, characterized in that The method further comprises: In the offline stage, the coding matrix is ​​backed up to the operation participant using an offline storage medium; Performing a privacy set intersection operation based on the encoding matrix of the other party's privacy set includes: Obtain the other party's random number through lightweight trusted execution hardware; Based on the random number, reversely decode the backed-up encoding vector using a group privacy protection key-value storage algorithm to obtain an element hash value; Calculate the hash value intersection of the element hash value of its own privacy set and the element hash value, map the hash value elements in the hash value intersection to the elements in the privacy set, and save the mapped elements to the intersection.

6. The method according to claim 1, characterized in that In the privacy set intersection operation phase, if there is an updated element, the leaf node where the updated element is located is re-encoded into a new vector, and the corresponding encoding vector backed up by the operation participant is synchronously updated based on the new vector, including: Confirming that there is an updated element in the privacy set, the operation participant searches for a target leaf node to which the updated element belongs based on the full binary tree; The target leaf node is re-encoded using the group privacy protection key-value storage algorithm to obtain the corresponding new vector and index; The new vector is encrypted and sent to a computing participant by using lightweight trusted execution hardware. The computing participant determines an original encoding vector corresponding to the new vector based on the index and replaces the original encoding vector with the new vector.

7. The method according to claim 1, characterized in that The intersection set generated by the privacy set intersection operation is updated based on the update element, including: If it is confirmed that there is a newly added element in its own privacy set, the hash value of the newly added element is calculated, and the hash value is matched with the element hash value. If the match is successful, the newly added element is placed in the intersection; Confirming that there is a deleted element in its own privacy set, and the deleted element exists in the intersection, then removing the deleted element from the intersection; If it is confirmed that there are updated elements in the other party's privacy set, after receiving the other party's updated leaf node encoding vector and index, all elements in the node in the intersection will be removed, and the element hash value will be matched with the updated encoding vector again, and the successfully matched elements will be put into the intersection.

8. A privacy set dynamic computing system, characterized in that: include: The first processing module is used to uniformly insert the elements of the privacy set into the leaf nodes of the pre-built full binary tree; Using a group privacy protection key-value storage algorithm to construct a coding vector based on the element group of each leaf node; The second processing module is used to, during the privacy set intersection operation phase, if there is an updated element, re-encode the leaf node where the updated element is located into a new vector, and synchronously update the corresponding encoding vector backed up by the operation participant based on the new vector; The intersection set generated by the privacy set intersection operation is updated based on the update element.

9. A device, characterized in that: include: A memory, used for storing a privacy set dynamic operation program; A processor, configured to implement the steps of the privacy set dynamic calculation method as described in any one of claims 1 to 7 when executing the privacy set dynamic calculation program.

10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a privacy set dynamic operation program, and when the privacy set dynamic operation program is executed by the processor, the steps of the privacy set dynamic operation method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Privacy protection decision tree-oriented constant repeated code dynamic generation strategy and implementation method

    CN120582751A

  • Two-party privacy intersection method and system supporting any data scale

    CN120632942A