Private data processing method and computing device

By corresponding to the hash value of the privacy data with the vertices in the undirected graph and using the degree of the vertices to determine the hash value, the problem of the insufficiency of the cuckoo hash algorithm in large-scale scenarios is solved, and efficient privacy data processing is achieved.

CN119720266APending Publication Date: 2025-03-28ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411549423.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The cuckoo hash algorithm is natural serial computing and cannot be directly expanded into a parallel algorithm, resulting in the lack of scalability in large-scale scenarios, affecting the efficiency of privacy data processing.

Method used

The hash value of the privacy data in the hash table is determined based on the degrees of each vertex by corresponding the hash value of the privacy data to the vertices in the undirected graph and the privacy data itself to the edges between the vertices. Multiple steps in this method can be performed in parallel, improving processing efficiency.

Benefits of technology

Through parallel processing steps, the efficiency of determining the hash value of privacy data is significantly improved, and the problem of insufficiency of the cuckoo hash algorithm in large-scale scenarios is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720266A_ABST
    Figure CN119720266A_ABST
Patent Text Reader

Abstract

A privacy data processing method and computing device, the method comprising: obtaining n hash values corresponding to m privacy data, the n hash values being obtained based on two hash functions, each privacy data corresponding to two hash values in the n hash values; enabling the n hash values to correspond to n vertexes, enabling each piece of privacy data to correspond to an edge between the corresponding vertex, and determining the degree of each vertex; according to the degree of each vertex, a first hash value of each privacy data in the hash table is determined, and each first hash value is used as a data identifier of the privacy data corresponding to the first hash value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of data processing technology, and in particular, relate to a privacy data processing method and computing device. Background Art

[0002] The cuckoo hash algorithm is a dynamic hash algorithm used to dynamically maintain a hash table. The hash values ​​in the hash table correspond to multiple data respectively, so it can be applied to a variety of scenarios for protecting privacy data, such as calculating the intersection of privacy data and performing hidden queries on data in the database. The main idea of ​​the cuckoo hash algorithm is to distribute the hash values ​​corresponding to the data into multiple buckets to avoid hash conflicts. Specifically, the cuckoo hash algorithm uses two hash functions h1(x) and h2(x) as two hash buckets T1 and T2. When inserting element x, if one of T1[h1(x)] and T2[h2(x)] is empty, insert it; if both are empty, randomly select one to insert; if T1[h1(x)] and T2[h2(x)] are full, randomly select one of them (assuming that the element in the bucket is y), kick y out, insert x, and then repeat the above process to insert element y into the hash table. Among them, inserting an element means matching the hash value in the hash table with the element, and the correspondence can be storing the element and the hash value in correspondence or other corresponding methods, that is, determining the hash value of the element in the hash table. Since the above-mentioned cuckoo hash algorithm is a natural serial calculation, it cannot be directly expanded to a parallel algorithm, which makes the algorithm not scalable for large-scale scenarios. Summary of the invention

[0003] The purpose of the present invention is to provide a method for processing private data to improve the efficiency of processing private data.

[0004] The first aspect of the present specification provides a privacy data processing method, including: obtaining n hash values ​​corresponding to m privacy data, wherein the n hash values ​​are obtained based on two hash functions, and each privacy data corresponds to two hash values ​​among the n hash values; by corresponding the n hash values ​​to n vertices, corresponding the edges between each privacy data and its corresponding vertex, and determining the degree of each vertex; according to the degree of each vertex, determining the first hash value of each privacy data in the hash table, wherein each first hash value is used as a data identifier of the corresponding privacy data.

[0005] The second aspect of the present specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method described in the first aspect.

[0006] A third aspect of the specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in the first aspect is implemented.

[0007] In the solution provided in the embodiments of this specification, by cleverly corresponding the hash value of the element (i.e., private data) to the vertex in the undirected graph and the element itself to the edge between the vertices in the undirected graph, the hash value of the element in the hash table can be determined based on the degree of each vertex. Multiple steps in this method can be performed in parallel, thereby improving the efficiency of determining the hash value of private data. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0009] Figure 1 This is a flowchart of a privacy data processing method in an embodiment of this specification;

[0010] Figure 2 This is a schematic diagram of the process of processing private data in the embodiments of this specification;

[0011] Figure 3 This is an example process of determining the hash value of each private data in the hash table according to the degree of each vertex in the embodiments of this specification. DETAILED DESCRIPTION

[0012] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0013] In view of the problems existing in the above-mentioned cuckoo hash algorithm, the embodiments of this specification provide a privacy data processing method, which cleverly uses the hash value (i.e., cuckoo bucket) of the element (i.e., privacy data) as the vertex in the undirected graph and the element itself as the edge between the vertices in the undirected graph, so that the cuckoo hash table can be determined based on the degree of each vertex. Multiple steps in this method can be performed in parallel, such as determining the degree of each vertex in parallel, assigning the edge to the preset vertices at both ends of the vertex, etc., so that the method can be performed in multiple threads, which improves the efficiency of obtaining the cuckoo hash table.

[0014] Figure 1 This is a flowchart of a privacy data processing method in an embodiment of this specification. The method can be executed by a device of a data owner, and the data owner can use this method to assign hash values ​​as data indexes to multiple privacy data owned by the data owner, so that the data owner can intersect the privacy data with other data owners based on each data index, or store the hash value of the privacy data and its corresponding data in a database, so that the privacy data can be queried anonymously.

[0015] like Figure 1 As shown, in step S101, n hash values ​​corresponding to m private data are obtained.

[0016] Wherein, the n hash values ​​are obtained by calculating the hash values ​​of the m private data based on two hash functions, each private data corresponds to two hash values ​​among the n hash values, and the m private data are different from each other. The two hash functions can be determined based on the MD5 hash algorithm or the SHA-256 hash algorithm, for example. Wherein, the output of MD5 (Message-DigestAlgorithm 5) is a 128-bit (16-byte) hash value, usually expressed as a 32-bit hexadecimal number. The output of SHA-256 (Secure Hash Algorithm 256-bit) is a 256-bit (32-byte) hash value, usually expressed as 64 hexadecimal characters.

[0017] The two hash functions are, for example, h1() and h2(), where h1() and h2() can be expressed as the following formulas (1) and (2):

[0018] h1()=SHA256(s1+x)%p+1 (1)

[0019] h2()=SHA256(s2+x)%p+1 (2)

[0020] Where s1 and s2 are randomly generated random seeds, and the symbol % represents a modulo operation. From formulas (1) and (2), it can be concluded that the output range of hash functions h1() and h2() is 1 to p.

[0021] For example, m private data are x1, x2, ...x m , using the two hash functions to calculate the two hash values ​​of each private data in turn, we can get [h1(x1),h2(x1)], [h1(x2),h2(x2)], … [h1(x m ),h2(x m )], if there are no repeated values ​​in these hash values, then n=2m, if there are repeated values, then n<2m.

[0022] In step S103 , the degree of each vertex is determined by corresponding n hash values ​​to n vertices and corresponding private data to edges between vertices.

[0023] Figure 2 This is a schematic diagram of the process of processing private data in the embodiments of this specification. Figure 2 The left side shows a schematic diagram of the process of determining the degree of each vertex. Figure 2 As shown in the upper left part, the points marked with numbers 1, 2, ... 19 (hereinafter referred to as vertex 1, vertex 2, ... vertex 19) correspond to 19 hash values, respectively, denoted by x1, x2, ... x 16 Each of the marked edges corresponds to 16 private data respectively, that is, in this example, m=16 and n=19.

[0024] The degree of each vertex can be counted by traversing the hash value corresponding to each private data. Specifically, in the initial drawing,

[0025] Table 1 shows the table:

[0026] vertex 1 2 3 … Spend 0 0 0 0

[0027] Table 1

[0028] Vertex 1, vertex 2, vertex 3, etc. in Table 1 correspond to a hash value in the hash table to be generated, and the degree of each vertex is the degree of the hash value corresponding to each vertex, wherein the degree of each hash value is initially set to 0. It can be understood that the vertex identifier can also be set to be equal to the hash value, that is, the hash value of vertex 1 is 1, the hash value of vertex 2 is 2, and so on. It can be understood that the identifier of each vertex can also be set to be different from the hash value corresponding to it, for example, the vertex identifier can be set to a range of 1 to 19. According to the above formula (1) and formula (2), the range of the hash values ​​of the 19 vertices is in [1, p], where p = 2.14*m = 2.14*16≈34.

[0029] When counting the degree of each vertex, for example, first obtain the two hash values ​​h1(x1) and h2(x1) of the private data x1, and add 1 to the degrees of the vertices corresponding to the two hash values ​​h1(x1) and h2(x1) in Table 1, and then obtain the two hash values ​​h1(x2) and h2(x2) of the private data x2, and add 1 to the degrees of the vertices corresponding to the two hash values ​​h1(x2) and h2(x2) in Table 1. This process is repeated until all the private data are processed. Thus, the degree of each vertex can be obtained from the updated Table 1. Figure 2 The lower left part shows the degree of each vertex finally obtained in the form of a histogram. The histogram may correspond to the following Table 2:

[0030]

[0031] Table 2

[0032] It can be understood that the degree of each vertex is Figure 2 The number of edges connecting each vertex in the upper left corner. For example, Figure 2 In the upper left part, vertices 1, 19, 11, 2, and 12 form a pentagonal ring. Each vertex in the ring connects two edges. Therefore, the degrees of vertices 1, 19, 11, 2, and 12 are all 2. Vertex 3 and vertex 14 are only vertices of one edge, so the degrees of vertex 3 and vertex 14 are both 1. Vertex 10 is the common vertex of the three edges, so the degree of vertex 10 is 3.

[0033] The above process of counting the degree of each vertex can be performed in parallel. For example, k threads can be set, and each thread is assigned part of the private data among the m private data, so that the k threads can traverse the private data assigned to them respectively and update Table 1 in parallel, thereby speeding up the counting of the degree of each vertex through parallelization. For example, taking m as 16, 4 threads can be set, and 4 private data can be assigned to each thread.

[0034] However, in the above parallelization process, some errors may be introduced with a low probability. Specifically, when each thread traverses the hash value of the private data, if thread 1 and thread 2 simultaneously add 1 to the degree of vertex 1 in table 1, thread 1 and thread 2 may simultaneously read the current degree "0" of vertex 1 and write "1" to the degree of vertex 1. Assuming that thread 1 writes "1" first, thread 2 still writes "1" when writing later, without accumulating on the already written "1". This problem can be solved by using a read-write lock, but the use of a read-write lock will cause performance degradation, so that parallelization cannot achieve the effect of acceleration. In order to solve this problem, the multiple threads can perform multiple statistics on the degree of each vertex, that is, construct multiple histograms, and take the maximum value of all values ​​of the degree of the same vertex in the multiple histograms as the degree of each vertex, thereby solving the problem of small probability errors. Among them, when multiple threads perform multiple statistics on the degree of each vertex, the private data allocated to each thread in different statistics may be different.

[0035] The above-mentioned multiple statistics method needs to store the degree of each vertex in the multiple statistics, which also increases the memory overhead. In the embodiment of the present specification, as described above, by using the hash functions h1 and h2 shown in the above formulas (1) and (2), the range of the output values ​​of the hash functions h1 and h2 (i.e., the length of the hash table or hash bucket) is p, where p can be determined based on the empirical value 2.14 and the number of private data m, for example, p = 2.14*m or p can be set to a positive integer greater than 2.14*m. By setting the value of p in this way, the degree of each vertex can be made to be less than 16 with a high probability. In this case, the degree of the vertex can be represented by 4 bits (i.e., half a byte), thereby reducing the memory overhead by half; in addition, it can be ensured that there is usually no cross-ring in the vertex relationship graph corresponding to any m private data, and the cross-ring refers to the existence of common vertices in the ring composed of vertices in the undirected graph.

[0036] In step S105 , the hash value of each private data in the hash table is determined according to the degree of each vertex.

[0037] Figure 3 This is an example process of determining the hash value of each private data in the hash table according to the degree of each vertex in the embodiments of this specification.

[0038] like Figure 3 As shown, in step S31, for a vertex with a degree of 1, the privacy data corresponding to the edge connected to the vertex is allocated to the vertex, and the degrees of the two vertices of the edge are reduced by 1 respectively.

[0039] refer to Figure 2On the left side and in Table 2, the m vertices include 1-degree vertices, 2-degree vertices, 3-degree vertices, etc. We can first operate on any 1-degree vertex among the m vertices, and assign the privacy data corresponding to the edge connected to the 1-degree vertex to the 1-degree vertex, that is, determine the hash value of the privacy data corresponding to the edge connected to the 1-degree vertex in the hash table to be the hash value corresponding to the 1-degree vertex, and at the same time reduce the degrees of the two vertices of the edge by 1. For example, according to the order of the 1-degree vertices recorded in Table 2, we can first assign privacy data to vertex 3:

[0040] Assign the private data x6 corresponding to the edge connected to vertex 3 to vertex 3, that is, correspond the data x6 to vertex 3 in the hash table, and use the hash value corresponding to vertex 3 as the index (or identifier) ​​of data x6; at the same time, reduce the degrees of the two vertices 3 and vertex 14 of the edge corresponding to the private data x6 by 1.

[0041] At this point, Table 2 can be updated to Table 3:

[0042]

[0043] Table 3

[0044] And the hash table shown in Table 4 can be obtained:

[0045]

[0046] Table 4

[0047] It can be understood that the hash table shown in Table 4 is only for example, and this specification is not limited to this. For example, in the scenario of privacy calculation intersection, 1 or 0 can be written in the data row, where 1 indicates the existence of the data and 0 indicates the absence of the data, without writing the data itself. In addition, as mentioned above, the hash table should include p = 34 hash values, that is, all the output values ​​of the hash function, some of which do not correspond to the privacy data. Table 4 only shows 19 hash values ​​(vertices) corresponding to the privacy data.

[0048] Then, in step S32, it is determined whether there is a vertex with degree 1, and if so, step S31 is executed again.

[0049] Specifically, according to Table 3, vertex 5 is determined to be a point of degree 1, then step S31 is executed to convert the privacy data x corresponding to the edge connected to vertex 5 into 15 Assigned to vertex 5, the private data x 15 The degrees of the two vertices 5 and 10 of the corresponding edge are both reduced by 1.

[0050] At this point, Table 3 can be updated to Table 5:

[0051]

[0052] Table 5

[0053] And the hash table shown in Table 6 can be obtained:

[0054]

[0055] Table 6

[0056] Then, steps S32 and S31 are executed repeatedly, and according to Table 5, the privacy data x corresponding to the edge connected to vertex 6 is 11 Assigned to vertex 6, the private data x 11 The degrees of the two vertices 6 and 7 of the corresponding edges are both reduced by 1.

[0057] At this point, Table 5 can be updated to Table 7:

[0058]

[0059] Table 7

[0060] And the hash table shown in Table 8 can be obtained:

[0061]

[0062] Table 8

[0063] Then, continue to loop through steps S32 and S31, and according to Table 7, the private data x corresponding to the edge connected to vertex 7 is 12 Assigned to vertex 7, the private data x 12 The degrees of the two vertices 7 and 13 of the corresponding edges are both reduced by 1.

[0064] At this point, Table 7 can be updated to Table 9:

[0065]

[0066] Table 9

[0067] And the hash table shown in Table 10 can be obtained:

[0068]

[0069] Table 10

[0070] By analogy, by iteratively removing the edges containing vertices of degree 1, such as Figure 2 As shown in the middle figure, the degree of each vertex in the relationship graph of each vertex except the vertices forming a ring can be reduced to 0, and these points with a degree of 0 are assigned a privacy data.

[0071] The above process can also be performed in parallel. For example, for the histogram corresponding to Table 2, the above process can be performed in parallel on the points with a degree of 1 in Table 2 through multiple threads. In this parallel processing, there may be a small probability of error. In one error case, if thread 1 and thread 2 process vertex 3 and vertex 14 in parallel, it is possible that data x6 is distributed to vertex 3 and vertex 4 at the same time. If this happens, data x6 can be distributed to either vertex 3 or vertex 14. In another error case, thread 1 and thread 2 process vertex 5 and vertex 8 in parallel, for example, thereby reducing the degree of vertex 10 by 1 in parallel, which may result in the degree of vertex 10 being reduced by 1, so that when the above process terminates, the degree of each vertex is either 0, or a value equal to 2, or a value greater than 2. For the case where the degree of the vertex is greater than 2 or the degree of the vertices other than the vertices that constitute the ring is equal to 2, it can be regarded as a low-probability error caused by parallelization. For the unallocated data corresponding to these vertices with a degree greater than 2 or equal to 2, the histogram can be reconstructed for these data through a single thread, and the edges containing vertices with degree 1 can be removed by a single thread based on the reconstructed histogram, so as to obtain the correct distribution of data in the hash table.

[0072] After completing the above process, as described above, by setting p / m ≥ 2.14 or its approximate range, there will generally be no cross-rings in the vertex relationship graph corresponding to any m private data, that is, there should only be independent rings and independent vertices in the relationship graph of multiple vertices, or there should only be independent vertices in the relationship graph.

[0073] Optionally, it is possible to check whether there are vertices with a degree greater than 2 according to the histogram at this time. If so, the algorithm can be terminated and the above process can be re-executed by using the two updated hash functions h3() and h4(). The two updated hash functions, for example, use different hash seeds s3 and s4 compared to the initial two hash functions h1() and h2(). The hash seeds are generated randomly, specifically:

[0074] h3()=SHA256(s3+x)%p+1

[0075] h4()=SHA256(s4+x)%p+1

[0076] In the case where it is determined that there are no vertices with a degree greater than 2 in the histogram, step S33 may be executed to determine whether there are vertices with a degree of 2.

[0077] When there is no vertex of degree 2 in the histogram, the algorithm can be terminated, that is, the allocation of each private data in the hash table is completed.

[0078] In the case where there are vertices of degree 2 in the histogram, that is, Figure 2As shown in the middle figure, there are independent loops in the relationship graph of each vertex. Therefore, step S34 can be executed to assign each edge in the loop to the vertex at the preset end of each edge for the multiple vertices constituting the loop. For example, the privacy data corresponding to each edge in the loop can be uniformly assigned to the left vertex or the right vertex. Figure 2 As shown on the right, the m private data are all assigned to the vertices on the left or right side of the corresponding edge, and the degree of each vertex is zero, so that the private data is assigned to a hash value in a hash table, avoiding hash conflicts.

[0079] In the scheme for processing privacy data in the embodiments of this specification, by corresponding the hash values ​​corresponding to multiple privacy data to vertices and corresponding the privacy data to the edges between vertices, the hash value of the privacy data in the hash table can be determined based on the degree of each vertex. Compared with the existing algorithm for generating hash tables, this scheme can be executed in parallel, thereby improving the efficiency of data processing.

[0080] The method for processing private data in the embodiments of this specification can be used in scenarios such as calculating intersections of private data and performing hidden queries on data in a database.

[0081] In the scenario of calculating the intersection of private data, assume that Party A and Party B each hold their own private data set {S} A and {S} B Participant A and Participant B can perform the following operations respectively:

[0082] pass Figure 1 The method shown uses two hash functions (e.g., h1() and h2()) to insert each element in its private data set into a specific position in the hash table;

[0083] The data in its cuckoo hash table is encrypted by a preset encryption method (such as homomorphic encryption) to generate an encrypted hash table. This encryption operation ensures that participants A and B cannot obtain each other's data content, but can compare or match based on the ciphertext data.

[0084] Then, for example, party A can send its encrypted hash table to party B. Party B can compare its encrypted hash table with the encrypted hash table of party A. When the ciphertext data at the same position of the two encrypted hash tables are equal, it can be determined that the element corresponding to the position is the intersection element.

[0085] In the scenario of performing a hidden query on the data in the database, the hash value of the field (such as user ID, user name) and the corresponding data can be stored in the database, where the field hash value is based on the embodiment of this specification. Figure 1 When a user queries the database, he can use the following method in the embodiments of this specification: Figure 1 The method shown determines the hash value corresponding to the query field, and then searches the database through the hash value, so that the data corresponding to the field can be queried while concealing the meaning of the specific field.

[0086] This specification provides a privacy data processing device for executing Figure 1 The method shown, the device comprises:

[0087] An acquiring unit, configured to acquire n hash values ​​corresponding to the m private data, wherein the n hash values ​​are obtained based on two hash functions, and each private data corresponds to two of the n hash values;

[0088] A determination unit is used to determine the degree of each vertex by corresponding the n hash values ​​to the n vertices and corresponding the edges between each private data and its corresponding vertex; according to the degree of each vertex, determine the first hash value of each private data in the hash table, wherein each first hash value is used as a data identifier of the corresponding private data.

[0089] In one implementation, the determining unit is further configured to:

[0090] For a first vertex with a degree of 1, a first hash value of first private data corresponding to a first edge connected to the first vertex is determined to be a hash value corresponding to the first vertex.

[0091] In one embodiment, the device further includes: a degree processing unit, configured to reduce the degree of the first vertex and the second vertex connected to the opposite end of the first edge by 1 respectively.

[0092] In one embodiment, the device further comprises:

[0093] The calculation unit is used to use two hash functions to calculate two hash values ​​of each private data for m private data, so as to obtain n hash values ​​corresponding to the m private data.

[0094] In one embodiment, the determining unit is further configured to:

[0095] Dividing the m private data into multiple groups of private data;

[0096] Each group of private data is processed in parallel as follows: for the k vertices corresponding to the group of private data, the group of private data is traversed to determine the degree of each vertex in the k vertices.

[0097] In one embodiment, the determination unit is also used to: perform the following processing on each group of privacy data multiple times in parallel: for the k vertices corresponding to the group of privacy data, traverse the group of privacy data to determine the degree of each vertex in the k vertices; or perform the following operation multiple times: divide the m privacy data into multiple groups of privacy data; perform the following processing on each group of privacy data in parallel: for the k vertices corresponding to the group of privacy data, traverse the group of privacy data to determine the degree of each vertex in the k vertices; take the maximum value of the degrees of each vertex determined multiple times as the final degree of each vertex.

[0098] In one embodiment, the determining unit is further configured to:

[0099] For multiple first vertices with a degree of 1, the following processing is performed in parallel for each first vertex: a first hash value of the first privacy data corresponding to the first edge connected to the first vertex is determined as the hash value corresponding to the first vertex, and the degree of the first vertex and the second vertex connected to the opposite end of the first edge is reduced by 1 respectively.

[0100] In one embodiment, the ratio of the number of output values ​​of the two hash functions to m is greater than or equal to a preset threshold, and the determination unit is also used to redetermine the degree of each vertex when it is determined that there is no vertex with a degree of 1, and the current vertices include vertices with a degree greater than 2 or the degree of vertices other than the vertices constituting the ring is equal to 2, and according to the redetermined degrees of each vertex, the following operations are performed serially for each vertex: for a third vertex with a degree of 1, determine that the first hash value of the second privacy data corresponding to the second edge connected to the third vertex is the hash value corresponding to the third vertex, and subtract 1 from the degree of the fourth vertex connected to the third vertex and the opposite end of the second edge.

[0101] In one embodiment, the determination unit is also used to: when there is no cross-ring in the current vertex, for multiple fifth vertices constituting the ring, determine that the first hash value of the third privacy data corresponding to each third edge in the ring is the hash value corresponding to the vertex at a preset end of the third edge.

[0102] In one embodiment, the apparatus comprises a recording unit for recording the degree of each vertex using nibble data after determining the degree of each vertex.

[0103] In one implementation, the first hash value is used to perform a privacy intersection or a hidden query on the first private data.

[0104] The embodiment of the present specification also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the following Figure 1 The method shown.

[0105] The embodiment of the present specification also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the following is implemented: Figure 1 The method shown.

[0106] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0107] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0108] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0109] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0110] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0115] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0117] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0119] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0120] The above description is only an example of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims.

Claims

1. A method for processing private data, comprising: Obtain n hash values ​​corresponding to the m private data, wherein the n hash values ​​are obtained based on two hash functions, and each private data corresponds to two of the n hash values; By making the n hash values ​​correspond to the n vertices and making the edges between each private data and the corresponding vertex correspond to each other, the degree of each vertex is determined; According to the degree of each vertex, a first hash value of each private data in the hash table is determined, wherein each first hash value is used as a data identifier of the corresponding private data.

2. The method according to claim 1, determining the first hash value of each private data in the hash table according to the degree of each vertex, comprising: For a first vertex with a degree of 1, a first hash value of first private data corresponding to a first edge connected to the first vertex is determined to be a hash value corresponding to the first vertex.

3. The method according to claim 2, further comprising: The degrees of the second vertices connected to the first vertex and the first edge are respectively reduced by 1.

4. The method according to claim 1, further comprising: For m private data, two hash functions are used to calculate two hash values ​​of each private data to obtain n hash values ​​corresponding to the m private data.

5. The method according to claim 1, wherein determining the degree of each vertex comprises: Dividing the m private data into multiple groups of private data; Each group of private data is processed in parallel as follows: for the k vertices corresponding to the group of private data, the group of private data is traversed to determine the degree of each vertex in the k vertices.

6. The method according to claim 5, wherein determining the degree of each vertex comprises: The following processing is performed on each group of private data in parallel for multiple times: for the k vertices corresponding to the group of private data, the group of private data is traversed to determine the degree of each vertex in the k vertices; Or the following operations are performed multiple times: the m private data are divided into multiple groups of private data; each group of private data is processed in parallel as follows: for k vertices corresponding to the group of private data, the group of private data is traversed to determine the degree of each vertex in the k vertices; The maximum value of the degrees of each vertex determined multiple times is taken as the final degree of each vertex.

7. The method according to claim 6, wherein: The ratio of the number of output values ​​of the two hash functions to m is greater than or equal to a preset threshold. The method further includes, after determining the degree of each vertex, recording the degree of each vertex using half-byte data.

8. The method according to claim 3, wherein for a first vertex with a degree of 1, determining that a first hash value of first privacy data corresponding to a first edge connected to the first vertex is a hash value corresponding to the first vertex, and reducing the degree of the first vertex and the second vertex connected to the opposite end of the first edge by 1 respectively, comprises: For multiple first vertices with a degree of 1, the following processing is performed in parallel for each first vertex: a first hash value of the first privacy data corresponding to the first edge connected to the first vertex is determined to be the hash value corresponding to the first vertex, and the degree of the first vertex and the second vertex connected to the opposite end of the first edge is reduced by 1 respectively.

9. The method according to claim 8, wherein: The ratio of the number of output values ​​of the two hash functions to m is greater than or equal to a preset threshold value, and the method also includes, in the case where it is determined that there is no vertex with a degree of 1, and the current vertices include vertices with a degree greater than 2 or the degree of vertices other than the vertices constituting the ring is equal to 2, redetermining the degree of each vertex, and according to the redetermined degree of each vertex, serially performing the following operations on each vertex: for a third vertex with a degree of 1, determining that the first hash value of the second privacy data corresponding to the second edge connected to the third vertex is the hash value corresponding to the third vertex, and subtracting 1 from the degree of the fourth vertex connected to the third vertex and the opposite end of the second edge.

10. The method according to claim 9, further comprising: When there is no cross ring in the current vertex, for multiple fifth vertices constituting the ring, determine that the first hash value of the third privacy data corresponding to each third edge in the ring is the hash value corresponding to the vertex at a preset end of the third edge.

11. The method according to claim 1, wherein the first hash value is used to perform a privacy intersection or a hidden query on the first private data.

12. A computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • Privacy data processing method and computing device

    WO2026092578A1