A privacy intersection method, system, device, medium and product based on decentralized matrix secure calculation

CN122932952APending Publication Date: 2026-10-16BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611186808.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]但是,相关技术在实际工程应用中仍存在如下不足:在大规模尤其是不平衡数据场景下,整体效率仍然受限;部分相关方案在协议执行前或执行过程中需要准备较多密码学材料,预处理开销较高;相关方案大多针对标准求交任务单独优化,底层能力复用性不足;在海量数据条件下,中间结构规模较大,工程部署压力较高;相关方案与上层分析任务的衔接不够自然等

Benefits of technology

本申请提供了一种基于去中心化矩阵安全计算的隐私求交方法、系统、设备、介质及产品,通过获取第一参与方的第一私有集合和第二参与方的第二私有集合,并记录各元素的原始位置索引,解决了隐私求交任务中输入数据准备和索引追踪的技术问题,实现了隐私求交的基础数据组织和后续结果映射的数据基础;通过哈希分桶方法对第一私有集合和第二私有集合进行分桶处理,得到预设数量个待处理桶并对待处理桶进行编号,解决了大规模数据场景下单次计算规模过大的技术问题,实现了将全局求交任务拆分为多个局部任务、降低单次计算规模的效果;通过基于去中心化矩阵安全计算的桶内隐私求交方法分别对每个待处理桶进行局部隐私求交处理,解决了现有方案依赖大量密码学材料预处理的技术问题,实现了无需预生成复杂密码学材料即可完成受保护交集计算的效果;通过合并所有待处理桶的局部隐私求交结果,解决了分桶处理后局部结果整合的技术问题,实现了从局部匹配到全局交集的完整输出。因此,本申请通过哈希分桶与去中心化矩阵安全计算相结合的方式,在大规模、不平衡数据场景下安全、高效地完成集合交集计算,提高了隐私求交的效率和工程可部署性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122932952A_ABST
    Figure CN122932952A_ABST
Patent Text Reader

Abstract

The application discloses a privacy intersection method, system, device, medium and product based on decentralized matrix secure calculation, relates to the field of privacy calculation and secure multi-party calculation, and comprises the following steps: acquiring a first private set of a first participant and a second private set of a second participant, and recording first original position indexes and second original position indexes of elements; performing bucket processing on the first private set and the second private set by means of a hash bucketing method, obtaining a preset number of to-be-processed buckets, and numbering the to-be-processed buckets; performing local privacy intersection processing on each to-be-processed bucket by means of a bucket-internal privacy intersection method based on decentralized matrix secure calculation, and obtaining local privacy intersection results of the to-be-processed buckets; and merging the local privacy intersection results of all the to-be-processed buckets, and obtaining a privacy intersection result of the first private set and the second private set. The application improves the efficiency and engineering deployability of the privacy intersection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of privacy-preserving computation and secure multi-party computation, and in particular to a privacy-preserving intersection method, system, device, medium, and product based on decentralized matrix secure computation. Background Technology

[0002] Data from different institutions is typically stored in their own independent information systems. Due to factors such as data security, privacy protection, management boundaries, and insufficient mutual trust, direct exchange of raw data is difficult. To conduct joint analysis without exposing the underlying data content, it is usually necessary to first identify common objects among the data from multiple parties, such as common customers, common devices, common patients, or common records. Various privacy-preserving intersection schemes have been proposed. Common technical approaches include: intersection schemes based on public-key cryptography, intersection schemes based on homomorphic encryption, intersection schemes based on Oblivious Transfer (OT) extensions and Oblivious Pseudo-Random Functions (OPRF), and intersection schemes based on general secure multi-party computation, obfuscated circuits, or secret sharing. Furthermore, some schemes incorporate structured techniques such as hash bucketing, cuckoo hashing, and Bloom filters to reduce the overhead of direct comparisons.

[0003] However, the relevant technologies still have the following shortcomings in practical engineering applications: the overall efficiency is still limited in large-scale, especially unbalanced data scenarios; some related solutions require a lot of cryptographic materials to be prepared before or during protocol execution, resulting in high preprocessing overhead; most related solutions are optimized separately for standard intersection tasks, resulting in insufficient reusability of underlying capabilities; under massive data conditions, the intermediate structure is large in scale, resulting in high engineering deployment pressure; and the connection between related solutions and upper-level analysis tasks is not natural enough.

[0004] Therefore, there is an urgent need for a privacy-preserving intersection method based on decentralized matrix secure computation to solve the technical problems of excessively large single-computation scale and limited operating efficiency of privacy set intersection technology in large-scale data scenarios, thereby improving the efficiency and engineering deployability of privacy intersection. Summary of the Invention

[0005] The purpose of this application is to provide a privacy-preserving intersection method, system, device, medium, and product based on decentralized matrix secure computation. It can securely and efficiently complete the intersection calculation of sets in large-scale, unbalanced data scenarios by combining hash bucketing and matrix secure computation, while ensuring that the original data of each participant is not leaked. This reduces computational overhead and resource consumption, and improves the reusability and engineering deployability of the underlying operators.

[0006] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a subject-matter method including: Obtain the first private set of the first participant and the second private set of the second participant, and record the first original position index of each element in the first private set and the second original position index of each element in the second private set; The first private set and the second private set are divided into buckets using the hash bucketing method to obtain a preset number of buckets to be processed, and the buckets to be processed are numbered. Each bucket to be processed includes the set of elements in the first bucket and the subset of the original position index of the first element of the first participant in the bucket with the corresponding number, and the set of elements in the second bucket and the subset of the original position index of the second element of the second participant in the bucket with the corresponding number. Local privacy intersection processing is performed on each bucket to be processed by a bucket privacy intersection method based on decentralized matrix secure computation, and the local privacy intersection results of each bucket to be processed are obtained. Merge the local privacy intersection results of all buckets to be processed to obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

[0007] Secondly, this application provides a subject-two system including: The data acquisition module is used to acquire the first private set of the first participant and the second private set of the second participant, and record the first original position index of each element in the first private set and the second original position index of each element in the second private set. The hash bucketing module is used to bucket the first private set and the second private set using the hash bucketing method to obtain a preset number of buckets to be processed, and to number the buckets to be processed; wherein, each bucket to be processed includes the set of elements in the first bucket and the subset of the original position index of the first element of the first participant in the bucket with the corresponding number, and the set of elements in the second bucket and the subset of the original position index of the second element of the second participant in the bucket with the corresponding number. The in-bucket privacy intersection module is used to perform local privacy intersection processing on each bucket to be processed by using an in-bucket privacy intersection method based on decentralized matrix secure computation, so as to obtain the local privacy intersection results of each bucket to be processed. The privacy intersection result determination module is used to merge the local privacy intersection results of all buckets to be processed, and obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

[0008] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the privacy intersection method based on decentralized matrix secure computation as described above.

[0009] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the privacy intersection method based on decentralized matrix secure computation as described above.

[0010] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the privacy intersection method based on decentralized matrix secure computation as described above.

[0011] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a privacy intersection method, system, device, medium, and product based on decentralized matrix secure computation. By obtaining the first private set of the first participant and the second private set of the second participant, and recording the original position index of each element, it solves the technical problems of input data preparation and index tracking in privacy intersection tasks, realizing the basic data organization for privacy intersection and the data foundation for subsequent result mapping. By using a hash bucketing method to bucket the first and second private sets, obtaining a preset number of buckets to be processed and numbering them, it solves the technical problem of excessively large single computation scale in large-scale data scenarios, achieving the effect of splitting the global intersection task into multiple local tasks and reducing the single computation scale. By using an intra-bucket privacy intersection method based on decentralized matrix secure computation to perform local privacy intersection processing on each bucket to be processed, it solves the technical problem of existing schemes relying on large amounts of cryptographic material preprocessing, achieving the effect of completing protected intersection calculation without pre-generating complex cryptographic material. By merging the local privacy intersection results of all buckets to be processed, it solves the technical problem of integrating local results after bucketing, realizing a complete output from local matching to global intersection. Therefore, this application combines hash bucketing with decentralized matrix secure computation to securely and efficiently complete set intersection computation in large-scale, unbalanced data scenarios, improving the efficiency of privacy-preserving intersection calculation and engineering deployability. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart illustrating a privacy-preserving intersection method based on decentralized matrix secure computation, provided in an embodiment of this application; Figure 2 A flowchart illustrating a privacy-preserving intersection method based on decentralized matrix secure computation, provided for another embodiment of this application; Figure 3 This is a schematic diagram illustrating the process of performing local privacy intersection on the buckets to be processed obtained after hash bucketing, as provided in an embodiment of this application. Figure 4 A schematic diagram of a partitioned parallel and batch processing mechanism for imbalanced scenarios provided in an embodiment of this application; Figure 5 A schematic diagram of the functional modules of a privacy intersection system based on decentralized matrix secure computation provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0014] First, let me introduce some of the technical terms used in this application.

[0015] Private Set Intersection (PSI) is a cryptographic technique that allows multiple participants to obtain only the intersection result or results related to the intersection of sets without revealing their individual non-intersection elements. This technique is widely used in scenarios such as joint risk control, identity deduplication, privacy marketing, cross-institutional sample alignment, and collaborative analysis of medical data, and is a fundamental step in multi-party data collaborative processing.

[0016] In real-world applications, data from different organizations is typically stored in their own independent information systems. Factors such as data security, privacy protection, management boundaries, and insufficient mutual trust make it difficult for parties to directly exchange raw data. To complete joint analysis without exposing the underlying data content, it is usually necessary to first identify common objects among the data from multiple parties, such as shared customers, shared devices, shared patients, or shared records. Privacy set intersection is a key foundational technology for solving this type of "alignment before analysis" problem. Therefore, the core technical challenge in this field is how to securely and efficiently perform set intersection calculations while ensuring the original data of all participants is not leaked, especially in large-scale scenarios with unbalanced data distribution and subsequent complex analytical tasks, further reducing computational overhead and resource consumption.

[0017] To address the aforementioned issues, various privacy-preserving set intersection schemes have been proposed. Common technical approaches include: intersection schemes based on public-key cryptography, intersection schemes based on homomorphic encryption, intersection schemes based on unintentional transfer (OT) extensions and pseudo-random functions (OPRF), and intersection schemes based on general secure multi-party computation, obfuscated circuits, or secret sharing. Furthermore, some schemes incorporate structured techniques such as hash bucketing, cuckoo hashing, and Bloom filters to reduce the overhead of direct comparisons. These existing technologies have already demonstrated their ability to perform privacy-preserving intersection tasks effectively in standard two-party datasets of similar scale.

[0018] However, the relevant technologies still have the following shortcomings in practical engineering applications: In large-scale, especially imbalanced, data scenarios, overall efficiency remains limited. Although relevant technical solutions typically employ methods such as hash mapping, OT extension, OPRF, Bloom filters, or homomorphic encryption to reduce direct matching overhead, the overall complexity of the protocol is still significantly affected by the scale of the big data side when one party holds a massive database and the other party holds only a small query set. This leads to a rapid increase in runtime, communication costs, or memory usage, making it unsuitable for deployment in real-world business scenarios.

[0019] Some related technical solutions require the preparation of a significant amount of cryptographic material before or during protocol execution, resulting in high preprocessing overhead. For example, partial intersection schemes based on public-key cryptography, OT extensions, OPRF, or homomorphic encryption typically require the pre-generation, derivation, or transmission of substantial amounts of key-related cryptographic material, such as basic OT instances, pseudo-random labels, ciphertext, mask values, or other auxiliary parameters. As the data volume continues to increase, this preprocessing process can easily impose additional computational, storage, and communication burdens, hindering stable deployment in resource-constrained or high-concurrency business environments.

[0020] Most related technical solutions are optimized separately for standard intersection tasks, resulting in insufficient reusability of underlying capabilities. Many related technologies can complete intersection determination relatively efficiently, but their protocol output format and intermediate representation are usually more biased towards dedicated intersection processes, making it difficult to directly reuse them for subsequent tasks such as privacy JOIN, anonymous query, fuzzy matching, and privacy statistical analysis. This leads to the need to redesign the underlying protocol when the system expands to complex data processing scenarios.

[0021] Under massive data conditions, the intermediate structure is large in scale, resulting in high engineering deployment pressure. Related methods often require the construction of large hash structures, ciphertext structures, index structures, or circuit structures. These intermediate representations can easily lead to high peak memory consumption and scheduling overhead as the data scale continues to increase, affecting the stable operation of the system in resource-constrained environments.

[0022] The integration of related methods with higher-level analysis tasks is not seamless. In many practical scenarios, intersection of privacy sets is not the ultimate goal, but rather a prerequisite for subsequent tasks such as database joining, joint feature analysis, correlation assessment, or other statistical tasks. While related techniques can perform intersection, they often lack a unified underlying computational representation and operator interface when integrating with these subsequent tasks, thus increasing the complexity of system implementation.

[0023] Therefore, the relevant technologies still need to be further improved. This application proposes a privacy-preserving intersection method that can adapt to large-scale and unbalanced data scenarios, while also taking into account the reusability of underlying operators and the deployability of engineering, so as to better meet the actual needs of complex cross-domain data collaborative applications.

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0026] In one exemplary embodiment, such as Figure 1 As shown, a privacy-preserving intersection method based on decentralized matrix secure computation is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, it includes the following steps 101 to 104. Wherein: Step 101: Obtain the first private set of the first participant and the second private set of the second participant, and record the first original position index of each element in the first private set and the second original position index of each element in the second private set. The first private set and the second private set are respectively the input data to be intersected for the first participant and the input data to be intersected for the second participant in the privacy intersection task.

[0027] Step 102: The first private set and the second private set are bucketed using a hash bucketing method to obtain a preset number of buckets to be processed, and these buckets are numbered. Each bucket to be processed includes the set of elements in the first bucket belonging to the first participant and a subset of the original position indices of the first elements, and the set of elements in the second bucket belonging to the second participant and a subset of the original position indices of the second elements. The first original index array (second original index array) records the position index of each element of the first participant (second participant) before bucketing (i.e., in the original first private set (original second private set)) when it is assigned to a bucket during the hash bucketing process.

[0028] Step 103: Perform local privacy intersection processing on each bucket to be processed using the bucket privacy intersection method based on decentralized matrix secure computation to obtain the local privacy intersection results of each bucket to be processed.

[0029] Step 104: Merge the local privacy intersection results of all buckets to be processed to obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant. The privacy intersection result includes the original position index set of the elements belonging to the intersection in the first participant; the original position index set of the elements belonging to the intersection in the second participant; the set of original position index pairs that match between the first participant and the second participant; and the set of intersection element values ​​of the first private set and the second private set.

[0030] By implementing steps 101 to 104 above, this application can transform the element equality judgment problem in traditional privacy set intersection into a protected computation problem based on matrix encoding, matrix secure multiplication, and zero detection. By splitting the global intersection task into multiple local bucket-level tasks through hash bucketing, the scale of a single computation is effectively reduced, thereby solving the technical problem that the existing privacy set intersection technology has an excessively large single computation scale and limited operating efficiency in large-scale data scenarios, and improving the efficiency and engineering deployability of privacy intersection.

[0031] In another exemplary embodiment of this application, step 103 specifically includes: If the sets of elements in the first bucket and the sets of elements in the second bucket of any current bucket to be processed are both non-empty, then perform the following local privacy intersection processing steps on any current bucket to be processed: Step 103-1: Randomly split the set of elements in the first bucket and the set of elements in the second bucket in the current bucket to be processed to obtain the first random split vector set and the second random split vector set corresponding to the current bucket to be processed. Step 103-2: Construct each of the first random split vectors in the first random split vector set corresponding to the current bucket to be processed into a row vector and stack them to form the first encoding matrix of the current bucket to be processed; Step 103-3: Construct each of the second random split vectors in the second random split vector set corresponding to the current bucket to be processed into a column vector and organize them by column to form the second encoding matrix of the current bucket to be processed; Step 103-4: By calling the decentralized matrix secure multiplication protocol, protected multiplication operations are performed on the first and second encoding matrices of the current bucket to be processed to obtain the first and second result shares of the current bucket to be processed; wherein, the sum of the first and second result shares of the current bucket to be processed is equal to the product of the first and second encoding matrices of the current bucket to be processed. Step 103-5: Based on the first result share and the second result share of the current bucket to be processed, determine the set of local matching positions of the current bucket to be processed using the zero-value detection method; Step 103-6: Based on the first element original position index subset and the second element original position index subset of the current bucket to be processed, map each local matching position in the local matching position set of the current bucket to be processed to the original position of the element in the first private set and the original position of the element in the second private set, respectively, to obtain the local privacy intersection result of the current bucket to be processed. Step 103-7: Update the current bucket to be processed to the next bucket to be processed, and repeat the above local privacy intersection processing steps until all buckets to be processed are processed, and obtain the local privacy intersection results of each bucket.

[0032] In another exemplary embodiment of this application, step 103-2 specifically includes: Each first random split vector in the first random split vector set corresponding to the current bucket to be processed is constructed as a row vector containing alternating negative unit values ​​and random sub-items, and all row vectors are stacked to form the first encoding matrix; Each of the second random split vectors in the second random split vector set corresponding to the current bucket to be processed is constructed as a column vector and organized column-wise to form the second encoding matrix of the current bucket to be processed. Specifically, this includes: Each second random split vector in the second random split vector set corresponding to the current bucket to be processed is constructed as a column vector containing alternating random sub-items and positive unit values. All column vectors are organized by column to form a second encoding matrix.

[0033] In another exemplary embodiment of this application, step 103-4 specifically includes: Determine a first random matrix with the same dimension as the first encoding matrix, and a second random matrix with the same dimension as the second encoding matrix; Calculate the product of the first random matrix and the second random matrix to obtain a random product matrix, and then split the random product matrix into a first auxiliary share and a second auxiliary share; The first participant calculates the first mask matrix based on the first encoding matrix and the first random auxiliary matrix, and sends the first mask matrix to the second participant; The second participant calculates the second mask matrix based on the second encoding matrix and the second random auxiliary matrix, and sends the second mask matrix to the first participant; The second participant randomly generates a random matrix with the same dimension as the product of the first encoding matrix and the second encoding matrix as a second result share, and calculates an intermediate quantity based on the second result share, the first mask matrix, the second encoding matrix and the second auxiliary share, and sends the intermediate quantity to the first participant; The first participant calculates the first result share based on the intermediate quantity, the first random matrix, the first auxiliary share, and the second mask matrix.

[0034] In another exemplary embodiment of this application, step 103-5 specifically includes: Initialize the local matching position set of the current bucket to be processed to empty; The first result share is added to the second result share to obtain the difference matrix, and the positions of all zero-value elements in the difference matrix are added to the local matching position set of the current bucket to be processed; each element in the difference matrix represents the difference between the corresponding element in the first bucket element set and the corresponding element in the second bucket element set in the current bucket to be processed. Alternatively, the difference matrix can be masked using random non-zero multiples to obtain a masking matrix, and the positions of all zero-value elements in the masking matrix can be added to the local matching position set of the current bucket to be processed.

[0035] In another exemplary embodiment of this application, the privacy intersection method based on decentralized matrix secure computation further includes: When the difference between the data size of the first private set of the first participant and the data size of the second private set of the second participant exceeds a preset size difference, the first private set is sharded to form multiple first sharded private subsets, and the original sharding position index of each element in each sharded private subset in the first private set is recorded. Divide multiple private subsets of the first shard into a preset number of batches; The privacy intersection process for any current batch includes: The hash bucketing method is used to bucket each first shard private subset and second private set of the current batch to obtain multiple shard-level buckets to be processed in the current batch; wherein, each shard-level bucket to be processed in the current batch includes the set of elements in the shard bucket of the first participant under the corresponding number of the shard-level bucket to be processed in the current batch and the subset of the original position index of the shard elements, and the set of elements in the second bucket of the second participant under the corresponding number of the shard-level bucket to be processed in the current batch and the subset of the original position index of the second element. By using a bucket privacy intersection method based on decentralized matrix secure computation, local privacy intersection processing is performed on each shard-level bucket to be processed in the current batch, and the shard-level local privacy intersection results of each shard-level bucket to be processed in the current batch are obtained. Merge the fragment-level local privacy intersection results of all fragment-level buckets to be processed in the current batch to obtain the matching results of the current batch; Update the current batch to the next batch, repeat the privacy intersection process until all batches are processed, merge the matching results of all batches, and obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

[0036] Based on the same inventive concept, this application also provides a privacy intersection system based on decentralized matrix secure computation for implementing the privacy intersection method based on decentralized matrix secure computation described above. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more privacy intersection system embodiments based on decentralized matrix secure computation provided below can be found in the limitations of the privacy intersection method based on decentralized matrix secure computation described above, and will not be repeated here.

[0037] In one exemplary embodiment, such as Figure 5 As shown, a privacy-preserving intersection system based on decentralized matrix secure computation is provided, including: The data acquisition module 201 is used to acquire the first private set of the first participant and the second private set of the second participant, and record the first original position index of each element in the first private set and the second original position index of each element in the second private set.

[0038] The hash bucketing module 202 is used to perform bucketing processing on the first private set and the second private set using the hash bucketing method to obtain a preset number of buckets to be processed, and to number the buckets to be processed; wherein, each bucket to be processed includes the set of elements in the first bucket and the subset of the original position index of the first element of the first participant under the corresponding numbered bucket, and the set of elements in the second bucket and the subset of the original position index of the second element of the second participant under the corresponding numbered bucket.

[0039] The in-bucket privacy intersection module 203 is used to perform local privacy intersection processing on each bucket to be processed by using an in-bucket privacy intersection method based on decentralized matrix secure computation, so as to obtain the local privacy intersection results of each bucket to be processed.

[0040] The privacy intersection result determination module 204 is used to merge the local privacy intersection results of all buckets to be processed to obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

[0041] The following section uses a specific example of privacy-preserving intersection based on decentralized matrix secure computation to explain this application in detail.

[0042] To address the limitations of privacy set intersection techniques in large-scale, imbalanced data scenarios, including limited efficiency, high resource consumption, insufficient reusability of underlying capabilities, and unnatural integration with subsequent complex data processing tasks, this application proposes a privacy set intersection method and system based on decentralized matrix secure computation. The core idea of ​​this application is to transform the element equality judgment problem in traditional privacy set intersection into a protected computation problem based on matrix encoding, matrix secure multiplication, and zero-value detection. Specifically, the participants first uniformly represent the elements of the input set; for string elements, they can be mapped to numerical representations; then, each element is randomly split, and a matrix encoding satisfying a predetermined structure is constructed, so that the result of secure multiplication of the two encoded matrices directly corresponds to the difference relationship between the original elements. Then, through difference recovery and zero-value detection, the matching relationship corresponding to the intersection elements can be obtained without directly exposing the original data of each participant.

[0043] Building upon this foundation, to address efficiency issues in large-scale and imbalanced data scenarios, this application further introduces optimization mechanisms such as hash bucketing, sharding parallelism, and batch processing. Hash bucketing divides the originally global intersection task into multiple local bucket-level tasks, reducing the scale of single matrix construction and matrix operations. Sharding parallelism and batch processing mechanisms split and schedule large-scale data-side tasks, reducing the memory and computational pressure caused by processing the entire dataset at once, thereby improving the applicability of the method in scenarios with large-scale databases and small-scale query sets. Figure 4 The diagram illustrates a sharded parallel and batch processing mechanism for unbalanced scenarios.

[0044] Furthermore, this application not only addresses standard privacy intersection tasks but also provides unified underlying support for subsequent privacy data processing tasks. Because this application employs a matrix-based protected representation, its computation process and intermediate results are more easily integrated with tasks such as privacy JOIN, fuzzy matching, and privacy correlation analysis, thereby enhancing the reusability of underlying operators and the system's scalability.

[0045] This application provides a privacy-preserving intersection method and system based on decentralized matrix secure computation, which can be deployed in a distributed environment consisting of at least two data holders and one auxiliary computing node. The first participant holds a private set X, the second participant holds a private set Y, and the auxiliary computing node supports random auxiliary computation in the decentralized matrix secure multiplication protocol. The participants do not trust each other and do not directly exchange original data content during protocol execution.

[0046] like Figure 2 As shown, the overall working process of this application can be summarized as follows: First, the input set is uniformly represented; then, the elements are randomly split and matrix encoding is constructed; then, the protected result corresponding to the difference matrix is ​​obtained through decentralized matrix secure multiplication; then, the difference is restored or masked and restored, and the matching relationship is determined through zero value detection; finally, efficient intersection in large-scale and imbalanced scenarios is achieved through hash bucketing, sharding parallelism and batch processing mechanisms.

[0047] 1. System Structure. The system of this application may include at least the following functional modules: The data preprocessing module is used to detect the type of input elements and map string elements to a unified numerical representation.

[0048] The random splitting module is used to perform random splitting on each input element, generating multiple random sub-items such that their linear combination still equals the original element.

[0049] The matrix encoding module is used to construct row vectors or column vectors with a predetermined structure from the random splitting results, and further organize them into encoding matrices corresponding to the participants.

[0050] The matrix-safe multiplication module is used to invoke the decentralized matrix-safe multiplication protocol to perform protected multiplication operations on the encoded matrices constructed by the participants.

[0051] The difference recovery and zero detection module is used to recover, mask recovery or near-zero detection of matrix multiplication results in order to determine element matching relationships.

[0052] The hash bucketing and task scheduling module is used to perform hash bucketing on the input set and combine sharding parallelism and batch processing mechanisms to complete large-scale task scheduling.

[0053] The result mapping and output module is used to map local matching results back to the original index space and output the intersection index set or intersection value set.

[0054] Compared with related technologies that construct dedicated protocols only around a single intersection process, this application integrates element representation, batch evaluation, and result recovery into a matrix-secure computation framework through the above-mentioned modular structure. This not only enables privacy-preserving intersection but also facilitates expansion to subsequent tasks such as privacy-preserving JOIN, fuzzy matching, and statistical analysis.

[0055] 2. Method implementation process.

[0056] In one exemplary embodiment, the first participant Holding a private collection: X represents the first private set of the first participant; , and These represent the first element, the second element, and the m-th element in the first private set, respectively; m represents the total number of elements in the first private set; the second participant... Holding a private collection: Y represents the second private set of the second participant; , and These represent the first, second, and nth elements in the second private set, respectively; n represents the total number of elements in the second private set; both parties pre-agree on the same hash function. and the same number of buckets Among them, hash function It is used to map input elements to corresponding buckets; when the input element is a string identifier, the output of the hash function can also be used as a unified numerical representation of that string identifier.

[0057] First, hash bucket the two sets and record the original index of each element before bucketing during the bucketing process. Then, perform local privacy intersection on the buckets with the same number on both sides. Each local privacy intersection returns the matching position within the bucket. Finally, based on the original index recorded during bucketing, map all matching positions within the buckets back to the global original index and merge them to obtain the final intersection result.

[0058] Step 1: Hash bucket the input set and record the original index.

[0059] Input: First participant First private set Second Participant The second private set: A hash function agreed upon by both parties And the number of buckets .

[0060] Processing procedure: First Participant Initialize the array of buckets to be processed: ; and the original position index array corresponding to the bucket array: .

[0061] For the i-th element in the first private set of the first participant ,regardless Whether the identifier is a string or a numeric type, it is input into a hash function agreed upon by both parties. We obtain the hash value of the i-th element in the first private set: .

[0062] The hash value of the i-th element in the first private set is used as the unified numerical representation for subsequent matrix calculations: .in, This represents the uniform numerical element of the i-th element in the first private set.

[0063] And calculate the corresponding bucket number to be processed based on the hash value of the i-th element in the first private set: ; in, This represents the modulo operation (modulo operation).

[0064] The first participating party will unify the numerical elements. Insert the corresponding bucket and the element's original index before bucketing. Insert the corresponding original position index array: .

[0065] Second Participant Initialize the bucket array to be processed in the same way: ; and the original position index array corresponding to the bucket array: .

[0066] For the j-th element in the first private set of the second participant ,regardless Whether the identifier is a string or a numeric type, it is input into the same hash function. We obtain the hash value of the j-th element in the second private set: .

[0067] The hash value of the j-th element in the second private set is used as the unified numerical representation for subsequent matrix calculations. .in, This represents the uniform numerical element of the j-th element in the second private set.

[0068] And calculate the corresponding bucket number to be processed from the uniform value element of the j-th element in the second private set: ; The second participant will use the unified numerical element of the j-th element in the second private set. Insert the corresponding bucket And insert the element at its original index j before bucketing into the corresponding index array: .

[0069] Because both parties use the same hash function and the same number of buckets Therefore, identical elements will have the same hash value after hashing and will be assigned to buckets with the same number. Subsequent local privacy intersections are only performed on buckets with the same number.

[0070] Step 1 output and As input for subsequent local privacy intersection within the bucket; the output of step 1 and This is used to ultimately map the local matching positions within the bucket back to the original index before bucketing.

[0071] Step 2: Extract the corresponding bucket and form the local intersection input within the bucket.

[0072] Input: The two bucket arrays to be processed output from step 1: , And the corresponding original position index array: and .

[0073] Processing procedure: For each bucket to be processed, the number ( ): The first participant retrieves the array of numerical elements currently in the bucket to be processed: ; The second participant retrieves the array of numerical elements currently in the bucket to be processed: ; in, This represents the array of numerical elements in the k-th bucket of the first participant; This represents the array of elements within the k-th unprocessed bucket stored by the first participant; , and These represent the first, second, and third elements of the array of elements within the k-th bucket to be processed, stored by the first participant. One element; This represents the total number of elements in the k-th unprocessed bucket within the first private set of the first participant. This represents the array of numerical elements in the k-th bucket of the second participant; This represents the array of elements within the k-th bucket to be processed, stored by the second participant. , and These represent the first, second, and third elements of the array of elements within the k-th bucket to be processed, stored by the second participant. One element; This represents the total number of elements in the k-th unprocessed bucket within the second private set of the second participant.

[0074] like or If any one is empty, skip the current bucket to be processed and do not perform subsequent matrix encoding and safe multiplication.

[0075] like and If neither is empty, then both are used as input for the local privacy intersection within the current bucket. For example... Figure 3 As shown, a flowchart illustrating the process of performing local privacy intersection on the buckets to be processed after hash bucketing is provided.

[0076] Output: For each non-empty corresponding bucket, output the local privacy intersection result of the k-th bucket. : .

[0077] Output transmission relationship: Step 2 output , As input for the random splitting in step 3. Output of step 2. , This serves as the input for the back-mapping of the result from step 6. The purpose of this step is to clarify that subsequent steps 3 through 5 are all based on a certain correspondence. It is executed within the collection, rather than being executed once for the entire global collection.

[0078] Step 3: Randomly split the elements in the bucket to be processed.

[0079] Input: Output of step 2 , and the number of randomly split sub-items ,in .

[0080] Processing procedure: The first participant processes each element in the current bucket to be processed. Perform random splitting. The first participant processes each element in the current bucket. The first s-1 items are generated randomly: And let the s-th sub-item satisfy: ; Therefore, we get: ; The second participant processes each element in the current bucket. Perform random splitting. The second participant randomly generates the first s-1 sub-items of each element in the current bucket to be processed: And let the s-th sub-item satisfy: ; Therefore, we get: ; Output: The first participant outputs the random splitting result within the current bucket: .in, The second participant outputs the random splitting result within the current bucket: .in, .

[0081] Where k represents the current bucket number to be processed; s represents the number of random sub-items obtained by splitting each element; u represents the element index in the current bucket of the first participant; and v represents the element index in the current bucket of the second participant.

[0082] Output transmission relationship: Step 3 output and This serves as the input for the structured matrix encoding in step 4. The purpose of this step is to ensure that the elements in the current bucket are not directly entered into matrix multiplication in plaintext form, but are instead hidden in a linear combination of multiple random sub-items.

[0083] Step 4: Construct the bucket-in-structured encoding matrix.

[0084] Input: Output of step 3 and .

[0085] Processing procedure: The first participant will process each element in the current bucket. Corresponding random split vector Construct it as a row vector: ; The first participant stacks all row vectors to obtain the first encoding matrix within the current bucket: ; in, .

[0086] The second participant will process each element in the current bucket. Corresponding random split vector Construct it as a column vector: ; The second participant organizes all column vectors column-wise to obtain the second encoding matrix within the current bucket to be processed: ; in, .

[0087] Based on this encoding structure, for any position within the bucket to be processed ,have: ; And because step 3 contains and .

[0088] therefore, .

[0089] Output: and .

[0090] Among them, A k B represents the first encoding matrix corresponding to the current bucket k to be processed. k This represents the second encoding matrix corresponding to the current bucket k to be processed; m k and n k represents the number of elements in bucket k for the first participant and the second participant, respectively; s is the number of randomly split sub-items, so the encoding dimension of the row vector or column vector is 2s.

[0091] Output propagation relationship: Step 4 output and This serves as the input to the decentralized matrix secure multiplication protocol in step 5.

[0092] Step 5: Perform decentralized matrix-safe multiplication on the in-bucket encoding matrix and perform zero-value detection.

[0093] enter: , and auxiliary computing nodes For ease of explanation, let's note: , .

[0094] Processing procedure: The goal of this step is to ensure that the first participant and the second participant each receive the first share of the result without directly exposing A and B. Second result share And satisfy: .

[0095] Specifically, it includes the following sub-steps: Step 5.1: The auxiliary computing node generates a random auxiliary matrix.

[0096] Auxiliary computing nodes Generate a first random matrix with the same dimension as A. and a random matrix with the same dimension as B. .

[0097] Auxiliary computing node calculation and will Split into the first auxiliary share Second auxiliary share To satisfy: .in, .

[0098] Auxiliary computing nodes will Send to the first participant, Send to the second participant.

[0099] Step 5.2: Both parties generate and exchange mask matrices.

[0100] The first participant is based on A and The first mask matrix is ​​calculated. and the first mask matrix Send to the second participant.

[0101] The second participant is based on B and The second mask matrix is ​​calculated. and the second mask matrix Send to the first participant.

[0102] Step 5.3: The second participant calculates the intermediate quantity.

[0103] The second participant randomly generates a share of the second result. And based on the received B and The intermediate quantity T is calculated as follows: The second participant sends the intermediate quantity T to the first participant and saves it. .

[0104] Step 5.4: The first participant calculates the share of the first result.

[0105] The first participant receives the intermediate quantity T, and based on... , as well as The first result share is calculated. : ; Therefore: .

[0106] According to step 4: ,therefore, .in, Let be the difference matrix within the current bucket k to be processed, and .

[0107] Step 5.5: Zero value detection.

[0108] In obtaining and Afterwards, zero-value detection can be performed by using auxiliary nodes to participate in the recovery or by random multiple occlusion recovery.

[0109] If an auxiliary node is used in the recovery process, then the first and second participants will respectively... and Send to the auxiliary computing node, which then performs the calculation. and detect all that meet the requirements. The position is used to obtain the local privacy intersection result of the current bucket k to be processed. .

[0110] If a random multiple occlusion recovery method is used, then random non-zero multiple occlusion is performed on the difference matrix shares to obtain the occlusion matrix of the current bucket k to be processed. ,in, ,because Therefore, without recovering the true difference matrix values, the local privacy intersection result of the current bucket k can be obtained based on the zero-value position of the occlusion matrix. .in, represents the occlusion coefficient matrix of the current bucket k to be processed; ⊙ represents element-wise multiplication.

[0111] Output transmission relationship: Step 5 output This serves as input for step 6, which involves restoring the original index and merging the results.

[0112] Step 6: Map the matching positions within the bucket to the original index and merge the output.

[0113] enter: and the original position index array corresponding to the current bucket to be processed, which was retained in steps 1 and 2. , .

[0114] Processing procedure: For each local matching position within the current bucket to be processed The first participant, according to Query the current pending bucket number The original position index of each element before bucketing. .

[0115] The second participant, according to Query the current pending bucket number The original position index of each element before bucketing: .

[0116] Original index pairs Add to the original position matching index set corresponding to the current bucket to be processed Repeat steps 2 to 6 for all buckets to be processed, and merge the local privacy intersection results obtained from each bucket to obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant. .

[0117] Based on actual business needs, the final output can be the original set of intersection indices of the first participating parties. The original index set of the intersection of the second participant Original index pairs of sets Alternatively, in scenarios where outputting intersection values ​​is permitted, output the set of intersection element values. .

[0118] The purpose of this step is to restore the local matching positions returned by the privacy intersection within each bucket to the original set index before bucketing, and to integrate the local results of all buckets to obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant globally.

[0119] In an exemplary embodiment, to improve the execution efficiency and engineering deployability of this application in scenarios with large-scale datasets and unbalanced data sizes between the two parties, this application may further adopt optimized implementation methods such as hash bucketing, sharding, and batch processing scheduling of sharded tasks, based on the aforementioned basic privacy intersection process.

[0120] 3.1 Hash bucketing.

[0121] As explained in step 1 above, within each intersection task, both parties perform hash bucketing using the same hash function and the same number of buckets, and record the original index of the element before bucketing during bucketing. This embodiment will not repeat the principle of hash bucketing, but only illustrates how the local intersection results within the buckets after bucketing are mapped back to the global original index through an example.

[0122] Assume the original set of the first participants The original set of the second participants Both parties use the same hash function And set the number of buckets .

[0123] Assume the hash values ​​of each element in the first participant are: , , .

[0124] The hash values ​​of each element in the second participant are: , , .

[0125] The first participant divides the data into buckets based on the hash value modulo the number of buckets: ; ; .

[0126] Therefore, the first participant receives the following array of elements within the bucket and the original array of position indices: ; .

[0127] The second participant divides the data into buckets based on the hash value modulo the number of buckets: ; ; .

[0128] Therefore, the second participant receives the following array of elements within the bucket and the original index array: ; .

[0129] For bucket number 1, the elements in the first participating bucket are: The second participating element in the bucket is: .

[0130] For bucket number 1, perform the aforementioned bucket privacy intersection process, which involves sequentially performing random splitting within the bucket, structured matrix encoding within the bucket, decentralized matrix secure multiplication within the bucket, and zero-value detection to obtain the bucket difference matrix: .

[0131] Zero value detection yielded: .

[0132] in, This indicates that in bucket number 1, the first element in the first participating bucket matches the first element in the second participating bucket.

[0133] Based on the original index array saved during bucketing: ; .

[0134] We can obtain: ; .

[0135] Therefore, the zero value location inside the bucket is: .

[0136] Mapped to global raw index pairs: , representing the original set of the first participants. The second element in the original set of the second participant The second element is the same.

[0137] After performing the above processing on all buckets with the same number, the global original index pairs output by each bucket are merged to obtain the final set of matching indexes: .

[0138] Depending on the actual business needs, the final output can also be the set of intersection indices of the first participants: The intersection index set of the second participants: Alternatively, in scenarios where outputting the values ​​of the intersection elements is permitted, output the set of intersection element values: .

[0139] The purpose of this implementation is to accurately map the local zero-value positions in the difference matrix within the bucket back to the original set index before bucketing by using the original index array saved during bucketing, thereby ensuring that the local intersection results of multiple buckets can be correctly merged into the global intersection result.

[0140] 3.2 Fragmentation and batch processing of fragments.

[0141] In a data imbalance scenario where one side's data size is much larger than the other side's, to avoid the large-scale data side from entering the same round of hash bucketing, matrix encoding, and secure multiplication processes all at once, this application can first shard the large-scale data side, and then perform batch processing scheduling for each shard task.

[0142] Taking a scenario where the first participant is on a large-scale data side and the second participant is on a small-scale data side, the first participant holds a set of... The second participant holds the set .in, .

[0143] The first participating party will first gather a large number of participants. Divided into multiple shards: .

[0144] in, X (q) Indicates the first q Each segment, Indicates the number of fragments.

[0145] During the sharding process, the first participant retains each element in the original set. The global raw index in. For example, if element If an element is assigned to the q-th partition, then that partition will retain both the element value and the partition value. and its original index .

[0146] Subsequently, for each shard X (q) Construct a fragment-level intersection task: Task (q) =( X (q) , Y ).

[0147] For each fragment-level intersection task Task (q) Then, perform steps 1 to 6 as described above. That is, within each sharding task, both parties first perform hash bucketing and record the original index, then perform local privacy intersection within the bucket for buckets with the same number, and finally map the local matching position within the bucket back to the original index and output the shard-level matching result.

[0148] Each fragment-level intersection task outputs a fragment-level matching result. I (q) After all shards have been processed, the matching results at each shard level will be merged. .

[0149] If the second participant is a large-scale data side, the same method can be used to first shard the set of the second participant, and then form multiple shard-level intersection tasks with the set of the first participant.

[0150] In practical deployments, multiple shard-level intersection tasks can be batch-processed and scheduled. Let the set of shard-level tasks be: .

[0151] The system divides the above-mentioned sharded tasks into multiple batches based on available computing resources, memory limitations, communication bandwidth, and task priority: .

[0152] Each batch includes one or more fragment-level intersection tasks. For example: .

[0153] For multiple slice-level intersection tasks in the same batch, they can be executed sequentially or in parallel in multiple threads, multiple computing nodes, or multiple remote execution environments.

[0154] After each fragment-level intersection task is completed, the corresponding fragment-level matching result is output. I (q) After each batch is completed, the fragment-level matching results within that batch can be merged to obtain the batch-level matching results. .

[0155] After all batches have been executed, the matching results of each batch are then globally merged. .

[0156] During the batch processing of fragments, if a bucket in a fragment task does not have a valid element on any participant's side, then the bucket will not generate a local privacy intersection task; if padding rows or columns are added to meet the fixed matrix size requirement, the system sets an invalid flag for the padding elements, and the zero-value positions corresponding to the padding rows or columns will not be output as valid matching results.

[0157] The advantages of this implementation are: the sharding mechanism prevents large-scale data from entering the same round of computation at once, reducing the peak memory usage of a single round of tasks; the batch processing mechanism enables the system to control the number of sharded tasks executed simultaneously based on resource availability, reducing the resource pressure caused by too many sharded tasks running at the same time; and each sharded task ultimately outputs the global index in the original set, so the final global intersection result can be directly obtained by merging them.

[0158] In one exemplary embodiment, this application implements the above method in a privacy computing system, which can be deployed in a distributed computing environment. The system includes at least two data holding nodes, one auxiliary computing node, and a task scheduling module. The task scheduling module controls each node to perform steps such as data preprocessing, random partitioning, matrix encoding, matrix-safe multiplication, difference recovery, and result output. Each node can complete task scheduling and protocol execution based on a unified startup mechanism.

[0159] With this system architecture, this application does not rely on a single script or static algorithm process, but can complete privacy intersection tasks in a distributed environment with multi-node collaboration capabilities, and has good engineering deployability.

[0160] In one exemplary embodiment, the privacy-preserving intersection method proposed in this application can be used as a preliminary sample alignment step in various cross-party data collaboration tasks. It should be noted that this embodiment is only used to illustrate the usage of the intersection index, matching index pair, or intersection element value output by this application in subsequent business processes, and does not present the complete implementation process of subsequent business tasks as an essential technical feature of this application.

[0161] In an exemplary embodiment, in a privacy JOIN task, the first and second participants typically hold structured data tables and want to determine the records shared by both parties based on the join key without exposing non-matching records.

[0162] At this point, the join key field in both data tables can be used as input to the privacy intersection method of this invention. Through the aforementioned hash bucketing, intra-bucket local privacy intersection, and index recovery processes, a set of matching index pairs corresponding to the join key is obtained. .in, This indicates the index of the matching record in the first participant's data table. This indicates the index of the matching record in the second participant's data table.

[0163] This set of matching index pairs can serve as the sample alignment result for subsequent JOIN tasks, enabling each participant to locate the records involved in the join locally. In other words, in privacy-preserving JOIN scenarios, this application is primarily used to determine the intersection of join keys and their corresponding record indices.

[0164] In an exemplary embodiment, in a privacy-focused fuzzy matching task, the data from the two parties may have format differences or slight noise in fields such as name, phone number, address, and postal code. Such tasks typically require first standardizing, characterizing, or constructing candidate keys for the fields to be matched, and then determining the range of potentially matching records based on the candidate keys.

[0165] In this scenario, this application can be used for privacy-preserving intersection of candidate keys or feature identifiers. Specifically, the first and second participants respectively use locally generated candidate matching identifiers as input, and obtain the intersection index or matching index pair of candidate matching identifiers through the method of this invention.

[0166] This result can serve as a range of candidate records in subsequent fuzzy matching processes, reducing the number of records requiring further comparison. In other words, in privacy-preserving fuzzy matching scenarios, this application is primarily used for candidate sample selection or candidate record alignment.

[0167] In an exemplary embodiment, in a privacy-related correlation analysis task, participants typically need to first identify common samples and then evaluate the correlation of feature fields on the common samples. Based on the premise that "after the aforementioned privacy intersection or privacy JOIN, the participants have aligned their common sample sets," the Pearson correlation coefficient and Spearman rank correlation coefficient are further calculated.

[0168] In this scenario, this application can be used for sample alignment prior to correlation analysis. The first and second participants take sample identifiers, user identifiers, device identifiers, or other record primary keys as input and obtain a set of matching indexes for common samples using the method of this application.

[0169] This set of matching indexes can serve as the basis for selecting data for subsequent correlation analysis, enabling each participant to extract local feature vectors based on common samples. In other words, in privacy-preserving correlation analysis scenarios, this application is primarily used to determine the range of common samples for statistical analysis.

[0170] It should be noted that the above extended implementation methods do not constitute a necessary limitation of this application, but rather illustrate that the underlying intersection method proposed in this application has good task expansion capabilities.

[0171] In summary, this application transforms the privacy-preserving intersection problem into a decentralized matrix-secure computation problem, and combines it with a task decomposition and scheduling optimization mechanism for large-scale and imbalanced scenarios, thus realizing a privacy-preserving intersection method and system that balances security, scalability, and engineering practicality. This application has at least the following beneficial effects: (1) Applicable to large-scale and imbalanced data scenarios. This application uses hash bucketing, sharding parallelism and batch processing mechanisms to split the global intersection task into multiple local tasks, effectively reducing the scale of a single calculation and better adapting to imbalanced application scenarios where one side has a massive base database and the other side has a small-scale query set.

[0172] (2) It has batch processing capability. Compared with the traditional method of constructing relationships based on single elements, this application organizes input data in a matrix manner, which can cover multiple element pairs in a single protected matrix calculation, making it convenient for batch processing and subsequent parallel optimization.

[0173] (3) The underlying operators are more reusable. The matrix-based privacy intersection method proposed in this application can not only be used for standard intersection calculation, but can also be further extended to scenarios such as privacy JOIN, privacy fuzzy matching and privacy statistical analysis, thereby reducing the repeated dependence of complex privacy data processing tasks on multiple underlying protocols.

[0174] (4) The method is highly deployable. The method described in this application can run in a distributed computing environment and can be implemented in conjunction with existing task scheduling frameworks, demonstrating good system integration capabilities and practical application value.

[0175] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores privacy-preserving intersection processing data based on decentralized matrix secure computation. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a privacy-preserving intersection method based on decentralized matrix secure computation.

[0176] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment to which the present application is applied. Specific computer equipment may include, for example, [the following is a list of possible additional structures]. Figure 6 The embodiments show more or fewer components, combinations of certain components, or different component arrangements. In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, which the processor executes to implement the steps in the above-described method embodiments.

[0177] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0178] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0180] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0181] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0182] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0183] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A privacy-preserving intersection method based on decentralized matrix secure computation, characterized in that, include: Obtain the first private set of the first participant and the second private set of the second participant, and record the first original position index of each element in the first private set and the second original position index of each element in the second private set; The first private set and the second private set are divided into buckets using the hash bucketing method to obtain a preset number of buckets to be processed, and the buckets to be processed are numbered. Each bucket to be processed includes the set of elements in the first bucket and the subset of the original position index of the first element of the first participant in the bucket with the corresponding number, and the set of elements in the second bucket and the subset of the original position index of the second element of the second participant in the bucket with the corresponding number. Local privacy intersection processing is performed on each bucket to be processed by a bucket privacy intersection method based on decentralized matrix secure computation, and the local privacy intersection results of each bucket to be processed are obtained. Merge the local privacy intersection results of all buckets to be processed to obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

2. The privacy-preserving intersection method based on decentralized matrix secure computation according to claim 1, characterized in that, A local privacy intersection method based on decentralized matrix secure computation is used to perform local privacy intersection processing on each bucket to obtain the local privacy intersection results for each bucket. Specifically, this includes: If the sets of elements in the first bucket and the sets of elements in the second bucket of any current bucket to be processed are both non-empty, then perform the following local privacy intersection processing steps on any current bucket to be processed: The elements set in the first bucket and the elements set in the second bucket of the current bucket to be processed are randomly split to obtain the first random split vector set and the second random split vector set corresponding to the current bucket to be processed. Each first random split vector in the first random split vector set corresponding to the current bucket to be processed is constructed as a row vector and stacked to form the first encoding matrix of the current bucket to be processed; Each of the second random split vectors in the second random split vector set corresponding to the current bucket to be processed is constructed as a column vector and organized by column to form the second encoding matrix of the current bucket to be processed. By invoking the decentralized matrix secure multiplication protocol, protected multiplication operations are performed on the first and second encoding matrices of the current bucket to be processed, respectively, to obtain the first and second result shares of the current bucket to be processed; wherein, the sum of the first and second result shares of the current bucket to be processed is equal to the product of the first and second encoding matrices of the current bucket to be processed. Based on the first and second result shares of the current bucket to be processed, the set of local matching positions of the current bucket to be processed is determined by the zero-value detection method; Based on the first element original position index subset and the second element original position index subset of the current bucket to be processed, each local matching position in the local matching position set of the current bucket to be processed is mapped to the original position of the element in the first private set and the original position of the element in the second private set, respectively, to obtain the local privacy intersection result of the current bucket to be processed. Update the current bucket to be processed to the next bucket to be processed, and repeat the above local privacy intersection processing steps until all buckets to be processed are completed, and obtain the local privacy intersection results of each bucket.

3. The privacy-preserving intersection method based on decentralized matrix secure computation according to claim 2, characterized in that, Each first random split vector in the first random split vector set corresponding to the current bucket to be processed is constructed as a row vector and stacked to form the first encoding matrix of the current bucket to be processed. Specifically, this includes: Each first random split vector in the first random split vector set corresponding to the current bucket to be processed is constructed as a row vector containing alternating negative unit values ​​and random sub-items, and all row vectors are stacked to form the first encoding matrix; Each of the second random split vectors in the second random split vector set corresponding to the current bucket to be processed is constructed as a column vector and organized column-wise to form the second encoding matrix of the current bucket to be processed. Specifically, this includes: Each second random split vector in the second random split vector set corresponding to the current bucket to be processed is constructed as a column vector containing alternating random sub-items and positive unit values. All column vectors are organized by column to form a second encoding matrix.

4. The privacy-preserving intersection method based on decentralized matrix secure computation according to claim 2, characterized in that, By invoking the decentralized matrix secure multiplication protocol, protected multiplication operations are performed on the first and second encoding matrices of the current bucket to be processed, respectively, to obtain the first and second result shares of the current bucket to be processed, specifically including: Determine a first random matrix with the same dimension as the first encoding matrix, and a second random matrix with the same dimension as the second encoding matrix; Calculate the product of the first random matrix and the second random matrix to obtain a random product matrix, and then split the random product matrix into a first auxiliary share and a second auxiliary share; The first participant calculates the first mask matrix based on the first encoding matrix and the first random auxiliary matrix, and sends the first mask matrix to the second participant; The second participant calculates the second mask matrix based on the second encoding matrix and the second random auxiliary matrix, and sends the second mask matrix to the first participant; The second participant randomly generates a random matrix with the same dimension as the product of the first encoding matrix and the second encoding matrix as a second result share, and calculates an intermediate quantity based on the second result share, the first mask matrix, the second encoding matrix and the second auxiliary share, and sends the intermediate quantity to the first participant; The first participant calculates the first result share based on the intermediate quantity, the first random matrix, the first auxiliary share, and the second mask matrix.

5. The privacy-preserving intersection method based on decentralized matrix secure computation according to claim 2, characterized in that, Based on the first and second result shares of the current bucket to be processed, the set of local matching positions of the current bucket to be processed is determined by the zero-value detection method, specifically including: Initialize the local matching position set of the current bucket to be processed to empty; The first result share is added to the second result share to obtain the difference matrix, and the positions of all zero-value elements in the difference matrix are added to the local matching position set of the current bucket to be processed. Alternatively, the difference matrix can be masked using random non-zero multiples to obtain a masking matrix, and the positions of all zero-value elements in the masking matrix can be added to the local matching position set of the current bucket to be processed.

6. The privacy-preserving intersection method based on decentralized matrix secure computation according to claim 2, characterized in that, The privacy-preserving intersection method based on decentralized matrix secure computation also includes: When the difference between the data size of the first private set of the first participant and the data size of the second private set of the second participant exceeds a preset size difference, the first private set is sharded to form multiple first sharded private subsets, and the original sharding position index of each element in each sharded private subset in the first private set is recorded. Divide multiple private subsets of the first shard into a preset number of batches; The privacy intersection process for any current batch includes: The hash bucketing method is used to bucket each first shard private subset and second private set of the current batch to obtain multiple shard-level buckets to be processed in the current batch; wherein, each shard-level bucket to be processed in the current batch includes the set of elements in the shard bucket of the first participant under the corresponding number of the shard-level bucket to be processed in the current batch and the subset of the original position index of the shard elements, and the set of elements in the second bucket of the second participant under the corresponding number of the shard-level bucket to be processed in the current batch and the subset of the original position index of the second element. By using a bucket privacy intersection method based on decentralized matrix secure computation, local privacy intersection processing is performed on each shard-level bucket to be processed in the current batch, and the shard-level local privacy intersection results of each shard-level bucket to be processed in the current batch are obtained. Merge the fragment-level local privacy intersection results of all fragment-level buckets to be processed in the current batch to obtain the matching results of the current batch; Update the current batch to the next batch, repeat the privacy intersection process until all batches are processed, merge the matching results of all batches, and obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

7. A privacy-preserving intersection system based on decentralized matrix secure computation, characterized in that, The privacy intersection system based on decentralized matrix secure computation is used to implement the privacy intersection method based on decentralized matrix secure computation as described in any one of claims 1-6, wherein the privacy intersection system based on decentralized matrix secure computation includes: The data acquisition module is used to acquire the first private set of the first participant and the second private set of the second participant, and record the first original position index of each element in the first private set and the second original position index of each element in the second private set. The hash bucketing module is used to bucket the first private set and the second private set using the hash bucketing method to obtain a preset number of buckets to be processed, and to number the buckets to be processed; wherein, each bucket to be processed includes the set of elements in the first bucket and the subset of the original position index of the first element of the first participant in the bucket with the corresponding number, and the set of elements in the second bucket and the subset of the original position index of the second element of the second participant in the bucket with the corresponding number. The in-bucket privacy intersection module is used to perform local privacy intersection processing on each bucket to be processed by using an in-bucket privacy intersection method based on decentralized matrix secure computation, so as to obtain the local privacy intersection results of each bucket to be processed. The privacy intersection result determination module is used to merge the local privacy intersection results of all buckets to be processed, and obtain the privacy intersection result of the first private set of the first participant and the second private set of the second participant.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the privacy intersection method based on decentralized matrix secure computation as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the privacy intersection method based on decentralized matrix secure computation as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the privacy intersection method based on decentralized matrix secure computation as described in any one of claims 1-6.