Multi-party ciphertext sample alignment method and device, equipment and storage medium
Patent Information
- Application Number
- CN202610836576.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-06-23
- Filing Date
- 2026-06-10
- Publication Date
- 2026-10-27
AI Technical Summary
但是,目前的多方密态样本对齐方法隐私保护性较差,缺乏有效的多方协同机制,并且在应对实际的多方密态网络传输中的复杂性和不确定性时,鲁棒性也存在不足,可能会导致数据安全风险
[0015]本申请实施例提供的多方密态样本对齐方法,由每一个客户端将原始样本映射至位向量,利用编码函数将位向量转换为样本索引向量,根据样本索引向量、第一隐私向量和公共矩阵生成第一加密样本索引,并将第一加密样本索引发送给服务器。然后,服务器收到第一加密样本索引后,对第一加密样本索引进行求和计算,获取第二加密样本索引,再根据第二加密样本索引、公共矩阵和第二隐私向量生成重构样本索引,并将重构样本索引发送至客户端。最后,客户端根据第一选择策略从重构样本索引对应的样本中选择对齐样本。在确保数据隐私和安全性的同时,提高了计算效率和灵活性,为多方密态计算样本对齐提供了有效的隐私解决方案,并且,确保了计算过程的鲁棒性和对齐结果的准确性,即使在在故障或者存在不被信任的客户端的情况下也能保持稳定,能够处理潜在的错误或故障,保证样本对齐过程的准确性,以满足实际应用的需求,提高服务质量。
Smart Images

Figure CN122993979A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application relate to the field of privacy computing, and more particularly to a method, apparatus, device, and storage medium for aligning multi-party dense state samples. Background Technology
[0002] Secure Multi-Party Computation (MPC) is a cryptographic technique for protecting data privacy. It enables multiple parties to collaborate on a computational goal without a trusted third party, ensuring that each party receives no private data from other parties beyond the computation result. Sample alignment is a crucial step in MPC, aiming to integrate the different data characteristics of the same user held by different parties. This improves the overall quality of MPC, ensuring data privacy is protected and unauthorized access is prevented when aligning samples across different clients. However, current MPC sample alignment methods suffer from poor privacy protection, lack effective multi-party collaboration mechanisms, and are insufficiently robust to the complexity and uncertainty of real-world MPC network transmissions, potentially leading to data security risks.
[0003] Therefore, how to perform efficient and reliable private sample alignment is a technical problem that current multi-party dense state computation needs to solve. Summary of the Invention
[0004] According to embodiments of this application, a method, apparatus, device, and storage medium for multi-party dense sample alignment are provided, which can effectively protect the data privacy of multiple clients and promote secure multi-party collaboration.
[0005] In a first aspect of this application, a method for aligning multi-party dense-state samples is provided. The method includes: Each client maps the original sample to a bit vector, uses an encoding function to convert the bit vector into a sample index vector, generates a first encrypted sample index based on the sample index vector, the first privacy vector, and the common matrix, and sends the first encrypted sample index to the server. After receiving the first encrypted sample index, the server sums the first encrypted sample index to obtain the second encrypted sample index. Then, based on the second encrypted sample index, the common matrix, and the second privacy vector, the server generates a reconstructed sample index and sends the reconstructed sample index to the client. The client selects an aligned sample from the samples corresponding to the reconstructed sample index according to the first selection strategy.
[0006] In one possible implementation, the first privacy vector is randomly generated by the client; The public matrix is shared among all clients.
[0007] In one possible implementation, the second privacy vector is computed using the following methods: The first client inputs the first privacy vector into the Shamir key sharing algorithm to obtain N key blocks. Then, it encrypts the N key blocks to generate an encryption key and sends the encryption key to the server. The server obtains the encryption key from the first client and forwards it to the second client; The second client decrypts the encryption key and generates an intermediate result, which is then sent to the server. The server uses Lagrange interpolation to calculate the intermediate results based on the homomorphic additive property of the Shamir key-sharing algorithm to obtain the second privacy vector; The first client and the second client are different clients among the clients.
[0008] Optionally, the server performs Lagrange interpolation on the intermediate results based on the homomorphic additive property of the Shamir key-sharing algorithm to obtain the second privacy vector, and further includes: When the number of intermediate results exceeds the first threshold, the server can perform Lagrange interpolation calculations.
[0009] In one possible implementation, the first choice strategy includes: After receiving the reconstructed sample index, the client performs inverse encoding on the reconstructed sample index according to the encoding function; When the inverse encoding result of the reconstructed sample index is 1, the sample corresponding to the reconstructed sample index is selected as the alignment sample.
[0010] In one possible implementation, the method also includes: The size of the intersection of the reconstructed sample indices of the client is evaluated. The client can only participate in multi-party dense state computation when the size of the intersection of the reconstructed sample indices of the client is greater than the second threshold.
[0011] Optionally, the size of the intersection of the reconstructed sample indices on the client side is determined by the Goldwasser-Sipser algorithm; The Goldwasser-Sipser algorithm iteratively verifies each client based on the set of reconstructed sample indexes sent to the server by each client.
[0012] In a second aspect of this application, a multi-faceted dense-state sample alignment device is provided. The device includes: The encrypted index module involves each client mapping the original sample to a bit vector, using an encoding function to convert the bit vector into a sample index vector, generating a first encrypted sample index based on the sample index vector, the first privacy vector, and the common matrix, and then sending the first encrypted sample index to the server. The reconstruction index module is formed by the server receiving the first encrypted sample index, summing the first encrypted sample index to obtain the second encrypted sample index, generating a reconstruction sample index based on the second encrypted sample index, the common matrix, and the second privacy vector, and then sending the reconstruction sample index to the client. The selection module allows the client to choose an aligned sample from the samples corresponding to the reconstructed sample index according to a first selection strategy.
[0013] In a third aspect of this application, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described above.
[0014] In a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method according to the first aspect of this application.
[0015] The multi-party encrypted sample alignment method provided in this application involves each client mapping the original sample to a bit vector, converting the bit vector into a sample index vector using an encoding function, generating a first encrypted sample index based on the sample index vector, a first privacy vector, and a common matrix, and sending the first encrypted sample index to the server. Then, upon receiving the first encrypted sample index, the server sums the first encrypted sample index to obtain a second encrypted sample index, and generates a reconstructed sample index based on the second encrypted sample index, the common matrix, and the second privacy vector, sending the reconstructed sample index to the client. Finally, the client selects an aligned sample from the samples corresponding to the reconstructed sample index according to a first selection strategy. This method improves computational efficiency and flexibility while ensuring data privacy and security, providing an effective privacy solution for multi-party encrypted computation sample alignment. Furthermore, it ensures the robustness of the computation process and the accuracy of the alignment results, maintaining stability even in the event of failures or the presence of untrusted clients. It can handle potential errors or failures, guaranteeing the accuracy of the sample alignment process to meet the needs of practical applications and improve service quality.
[0016] It should be understood that the description in the Summary Section is not intended to limit the key or essential features of the embodiments of this application, nor is it intended to restrict the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0017] The above and other features, advantages, and aspects of the embodiments of this application will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1A flowchart of a multi-party dense-state sample alignment method according to an embodiment of this application; Figure 2 A flowchart illustrating a method for calculating a second privacy vector according to an embodiment of this application; Figure 3 A system architecture diagram relating to the methods provided in the embodiments of this application.
[0018] Figure 4 A block diagram of a multi-party dense-state sample alignment device according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a terminal device or server suitable for implementing the embodiments of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0020] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0021] Figure 1 A flowchart of a multi-party dense-state sample alignment method according to an embodiment of this disclosure is shown. See also Figure 1 The method includes: S101, each client maps the original sample to a bit vector, uses an encoding function to convert the bit vector into a sample index vector, generates a first encrypted sample index based on the sample index vector, the first privacy vector and the public matrix, and sends the first encrypted sample index to the server.
[0022] In one possible implementation, the common matrix is denoted as... ,in, The length of the sample index vector. The length of the first privacy vector. For a predefined finite field or modulus. Common matrix. The random seed can be generated during system initialization or through negotiation among clients and then shared. Each client holds the same public matrix. Specifically, the public matrix Elements from finite fields Generated by uniform random sampling in the middle, its dimension From the sample index vector length With the first privacy vector length Joint decision-making. When using a public random seed for generation, each participant can independently generate and verify the consistency of the matrix locally based on the same random seed; when using a negotiated generation method, each client shares the same matrix after confirmation through a secure multi-party protocol. Public Matrix The sample alignment protocol remains unchanged throughout its execution and does not contain any client-private data, therefore its public disclosure does not pose a risk of privacy breach.
[0023] In one possible embodiment, the client The original sample This is structured identifier data (such as user ID, device number, or other string or integer data types). The original sample... A bit vector is obtained by mapping the bit vector to a fixed-length binary string using a hash function (such as SHA-256). , where the bit vector length The method is determined through negotiation among the clients during the system initialization phase, and all clients use the same method. The values and the same hash function are used to ensure that the bit vectors generated by different clients for the same original sample are consistent at the corresponding positions.
[0024] Then, since performing calculations directly using bitwise operations might leak sensitive information in the client's data, to avoid this situation, the client... The encoding function will continue to be used. Bit vector From the encoding space Convert to sample index vector Encoding function The mapping formula is:
[0025] in, It refers to random numbers. Is the value in Integers within the interval Is the value in Integers within the interval Then it represents the set of integers (all positive integers, negative integers, and 0). It is a preset security parameter. For safety parameters and number of clients The exported auxiliary parameters satisfy , This represents the number of clients. The encoding function follows a one-to-one encoding rule during execution, targeting the bit vector. Each 0 / 1 bit in the bit vector performs an independent random number encoding. When the target bit in the range is 1, from Randomly select an integer as the encoding result in the bit vector. When the target bit in the range is 0, then from the range An integer is randomly selected as the encoding result. Additionally, based on the above... As can be seen from the definition, much smaller For example, when big enough When smaller, much smaller The encoding result when the target bit bit in the bit vector is 1 is much smaller than the encoding result when the target bit bit is 0. If the bit vectors of different clients... If the bits at the same position are all 1s, the maximum summation of the sample index vector at that position is [value]. It falls within a relatively small numerical range. However, if the bit vectors of different clients... In this coding scheme, at least one bit at the same position is zero, and the summation of the sample index vector at that position will be evenly distributed over a larger numerical range. This differentiated coding rule allows different clients to exhibit distinct range characteristics in the summation of the sample index vector at the same position. This facilitates subsequent determination of aligned samples based on the range of the summation results. Furthermore, since the encoded results are randomly selected integers without a fixed mapping relationship, the privacy of individual client samples is effectively protected from leakage.
[0026] Next, the first encrypted sample index is generated based on the sample index vector, the first privacy vector, and the common matrix. The calculation formula is as follows:
[0027] in, For the common matrix, This is the first privacy vector. This is the sample index vector. Due to the difficulty of the decision-oriented LWE problem, and The random vectors in the sample index vector are computationally indistinguishable, thus effectively hiding the sample index vector. Ensure the server cannot be accessed from and China Resumption or .
[0028] In this embodiment, by mapping the client's original sample to a bit vector and then using an encoding function to convert it into a sample index vector, the server does not need to access the client's sensitive data, effectively protecting the privacy of the client's original sample data.
[0029] Optionally, the first privacy vector is randomly generated by the client; The public matrix is shared among all clients.
[0030] In this embodiment, the first privacy vector is randomly generated by the client, increasing the randomness and unpredictability of the sample alignment process and improving the robustness of multi-party dense state computation. Furthermore, the common matrix is shared among each client, ensuring consistency in the computation during the sample alignment process and guaranteeing correct matching and alignment of samples from different clients.
[0031] S102, after receiving the first encrypted sample index, the server sums the first encrypted sample index to obtain the second encrypted sample index, and then generates a reconstructed sample index based on the second encrypted sample index, the common matrix and the second privacy vector, and sends the reconstructed sample index to the client.
[0032] In one possible embodiment, the server receives the first encrypted sample index. Then, the second encrypted sample index is obtained by summing the first encrypted sample index. From the formula The reconstructed sample index can be obtained. ,in, This is the second privacy vector.
[0033] In this embodiment, the server can aggregate the first encrypted sample index to achieve data reconstruction while protecting the client's data privacy, providing a foundation for sample alignment in subsequent multi-party encrypted computation.
[0034] Optionally, the second privacy vector can be calculated using the following methods: S201, the first client inputs the first privacy vector into the Shamir key sharing algorithm to obtain... One key block, then, for Each key block is encrypted to generate an encryption key, and the encryption key is sent to the server; S202, the server obtains the encryption key from the first client and forwards it to the second client; S203, the second client decrypts the encryption key and generates an intermediate result, which is then sent to the server; S204, The server uses Lagrange interpolation to calculate the intermediate results based on the homomorphic additive property of the Shamir key-sharing algorithm to obtain the second privacy vector; S205, the first client and the second client are different clients among the clients.
[0035] Figure 2 A flowchart illustrating a method for calculating a second privacy vector according to an embodiment of this disclosure is shown, such as... Figure 2 As shown.
[0036] Shamir's Secret Sharing Scheme is a threshold cryptography method. It allows a secret to be divided into multiple parts, called "shares," and the original secret can only be reconstructed when a sufficient number of shares are collected. Specifically, if the secret S is divided into... Individual shares ( The preset total number of shares must satisfy the following conditions: ,in (Number of clients participating in the calculation), and set a threshold. ( ), then any greater than or equal to Each combination of shares can be used to reconstruct the original secret, but less than Combinations of individual shares cannot be reconstructed. In multi-party encrypted computation, participating clients need to jointly compute certain privacy results. Using the Shamir key-sharing algorithm, these sensitive privacy results can be divided into multiple shares and sent to different participating clients. Only when a preset threshold is reached can these shares be used to reconstruct the original privacy result, thus ensuring that even if individual participating clients are attacked, sensitive information will not be leaked. This guarantees effective multi-party encrypted computation while avoiding the risk of data exposure for a single participant.
[0037] In one possible embodiment, the first client First privacy vector In the Shamir key-sharing algorithm, it is divided into One key block, The representation of each key block is as follows:
[0038] in, For the client First privacy vector The key block. In this application, the first privacy vector is... Divided into of A key block, randomly selected based on polynomial interpolation. polynomial of degree First privacy vector Divided into Based on this, when other clients or servers receive no less than [number] key blocks, When there are multiple key blocks, the first privacy vector can be calculated by reverse engineering. This ensures the security of the first privacy vector during transmission. Then, the first client... Use a second client public key For the The key blocks of the column are mixed and encrypted to generate an encryption key. An example of the calculation formula can be seen below: in, This represents the process of using a second client's public key to perform hybrid encryption on a key block. The server will use the encryption key... Forward to the second client Then, by the second client encryption key To perform decryption, an example of the decryption formula can be shown below:
[0039] in, This represents the process in the Shamir key-sharing algorithm where the second client decrypts the key data stored within it. Then, the second client... From all The client decryption obtained the first... The key block is summed element by element to generate an intermediate result. The calculation formula is as follows:
[0040] Finally, the server performs Lagrange interpolation on the intermediate results based on the homomorphic additive property of the Shamir key-sharing algorithm, as shown in the following formula:
[0041] in, For Lagrange coefficients, This is the first threshold, which is the reconstruction threshold of the Shamir key-sharing algorithm. The value of must simultaneously satisfy the following conditions: (1) That is, the number of intermediate results required does not exceed the total number of shares; (2) That is, the number of required participants does not exceed the total number of clients; (3) The specific value can be determined based on a comprehensive consideration of actual security and fault tolerance requirements. Larger sizes offer higher security but lower fault tolerance. A smaller value indicates stronger fault tolerance but relatively lower security. In practical deployments, the number of clients should be considered. and total share Flexible settings.
[0042] Among them, Lagrange interpolation is a method for constructing polynomial functions from known data points. Its main purpose is to construct a polynomial based on given points so that the polynomial can take the corresponding function values at these points. It is suitable for situations with a small number of data points.
[0043] In this embodiment, the second privacy vector is calculated using the Shamir key-sharing algorithm, achieving efficient, secure, and robust privacy protection and ensuring the privacy of data from each client.
[0044] Optionally, the server performs Lagrange interpolation on the intermediate results based on the homomorphic additive property of the Shamir key-sharing algorithm to obtain the second privacy vector, and further includes: When the number of intermediate results exceeds the first threshold, the server can perform Lagrange interpolation calculations.
[0045] The first threshold is the reconstruction threshold of the Shamir key-sharing algorithm.
[0046] In one possible embodiment, the encrypted sample index generation mechanism of the present invention is built upon the assumption of computational difficulty of the Learning with Errors (LWE) problem. Specifically, the LWE problem is defined as follows: given a common matrix... Secret Vector and error distribution LWE sample pairs are defined as ,in From the error distribution Medium sampling. Due to the difficulty of the decision-making LWE problem, LWE sampling... and Random vectors in the vectors are computationally indistinguishable.
[0047] In this invention, the LWE parameters are set as follows: Modulus prime numbers, matrix A public matrix shared by all clients. The dimension of the sample index vector. This represents the dimension of the secret vector. (For each client) From the error distribution Generating secret vectors through random sampling As a random mask, the sample index vector This serves as the error term in the LWE. The client generates the first encrypted sample index using the following formula:
[0048] This structure can be viewed as a set There are LWE samples, where each row corresponds to an LWE sample pair. Due to the difficulty of the decision-oriented LWE problem, and The random vectors in the sample index vector are computationally indistinguishable, thus effectively hiding the sample index vector. Even if the server obtains simultaneously and It is also impossible to recover. or This ensures the security of the encrypted sample index.
[0049] Meanwhile, such as the second client The decrypted result Aggregate the key blocks to generate intermediate results. As shown in the calculation formula, as long as the number of intermediate results is greater than the first threshold... The server can then perform Lagrange interpolation on the intermediate results to obtain the second privacy vector, enabling the reconstruction of the second privacy vector even when some clients are missing or malfunctioning. This fault tolerance aligns with the design philosophy of the LWE problem: LWE introduces an error term... This ensures that even with partial information loss or noise interference, the secret information is still effectively protected; furthermore, this invention utilizes the threshold mechanism of the Shamir key-sharing algorithm to ensure that even if some clients disconnect or malfunction, as long as the number of participants reaches the threshold, the secret information is still protected. The vector aggregation process can still be completed correctly, thus ensuring the accuracy of the sample alignment process.
[0050] In this embodiment, by setting the first threshold, the server can perform Lagrange interpolation calculation without all intermediate results, thus enabling the calculation of the second privacy vector to have a certain fault tolerance.
[0051] S103, the client selects an aligned sample from the samples corresponding to the reconstructed sample index according to the first selection strategy.
[0052] In this embodiment, by using the first selection strategy, it is possible to ensure that the sample alignment between different clients is consistent, thereby guaranteeing the consistency and accuracy of data samples during the multi-party dense state learning process.
[0053] Optionally, the first choice strategy includes: After receiving the reconstructed sample index, the client performs inverse encoding on the reconstructed sample index according to the encoding function; When the inverse encoding result of the reconstructed sample index is 1, the sample corresponding to the reconstructed sample index is selected as the alignment sample.
[0054] In other words, the client performs inverse encoding on the reconstructed sample index according to the encoding function. When the inverse encoding result of the reconstructed sample index is 1, the sample corresponding to the reconstructed sample index is determined to be an aligned sample. When the inverse encoding result of the reconstructed sample index is 0, the sample corresponding to the reconstructed sample index is determined to be an unaligned sample.
[0055] In one possible embodiment, the encoding function described above is used. From the mapping formula, we can obtain the mapping formula for the inverse encoding function as follows:
[0056] in, It is a preset security parameter. , This refers to the number of clients. During bit vector encoding, if the bit vectors of different clients... If the bits at the same position are all 1s, the maximum summation of the sample index vector at that position is [value]. Because of the existence of an identity Bit vectors of different clients The maximum summation result of the sample index vector at that position when all bits at the same position are 1 is _____. In other words, when performing inverse encoding on the reconstructed sample index, if the value at a certain position of the reconstructed sample index is... If the value at a certain position in the reconstructed sample index is not within the specified range, then by inverse encoding, we can obtain that the bit vectors of different clients at this position are all 1s, meaning that the samples corresponding to this position for different clients are aligned samples. If the bit vectors of different clients are not all 1s at this position, then the samples corresponding to this position of different clients are unaligned samples.
[0057] For example, all clients agree that the vector length is 5, and the hash rule is ( (For a single 0 / 1 bit in a bit vector): 1001 → =1、1002→ =2、1003→ =3、1004→ =4、1005→ =5. The original sample in client 1 is {1001, 1003, 1005}, and its bit vector is... =[1,0,1,0,1]. The original sample in client 2 is {1001,1002,1005}, and its bit vector is [1,0,1,0,1]. =[1,1,0,0,1]. The original sample in client 3 is {1001,1004,1005}, and its bit vector is... =[1,0,0,1,1]. All three clients have samples 1001 and 1005, meaning these three clients are in... =1 and If all bits at position 5 are 1, then the maximum sum of the sample index vectors from the three clients at these two positions is: Then, after complex forwarding and encrypted computation between the server and client, the sample index is reconstructed. =1 and The value at position =5 will definitely fall into... Within the scope, finally, the reconstructed sample index is inverse encoded, and the three clients are in... =1 and The bits after inverse encoding at position 5 are all 1, so the client can determine 1001 and 1005 as aligned samples, and then perform subsequent multi-party dense state calculations.
[0058] In this embodiment, the first selection strategy filters aligned samples from the samples corresponding to the reconstructed sample index by using the inverse encoding result value, thereby achieving the selection of aligned samples in multi-party dense state computation while ensuring the privacy of multiple clients.
[0059] Optionally, the method further includes: The size of the intersection of the reconstructed sample indices of the client is evaluated. The client can only participate in multi-party dense state computation when the size of the intersection of the reconstructed sample indices of the client is greater than the second threshold.
[0060] For example, if the intersection sizes of the reconstructed sample indexes between client A and client B are 150 and 80 respectively, and the second threshold is 100, then the intersection size of the reconstructed sample indexes of client A meets the requirements, and it has enough reconstructed sample index data to participate in multi-party dense state computation, while client B does not have enough reconstructed sample index data and cannot participate in multi-party dense state computation.
[0061] In this embodiment, by evaluating the size of the intersection of client reconstructed sample indices, it can be ensured that only clients with a large intersection of reconstructed sample indices can participate in multi-party dense state computation. This helps to improve the quality of data from each participating client in multi-party dense state computation and ensures fairness among multiple clients.
[0062] Optionally, the size of the intersection of the reconstructed sample indices on the client side is determined by the Goldwasser-Sipser algorithm; The Goldwasser-Sipser algorithm iteratively verifies each client based on the set of reconstructed sample indexes sent to the server by each client.
[0063] The Goldwasser-Sipser algorithm is a public-to-private (PT) interactive protocol based on the concept of zero-knowledge proofs, used to determine sets... Does the size reach the threshold? Specifically, the protocol selects an integer. Make and define In this invention, the server acts as the verifier, and the client acts as the prover. Both parties perform multiple rounds of iterative verification of the intersection size through the following process: In the wheel( In ), each client Negotiate to select a random hash function and random values Then each client Local computation subset And using a collision-resistant hash function Will Mapped to dimensional vector To protect privacy, the client... right Perform LWE encryption:
[0064] After receiving the encrypted vectors from all clients, the server calculates the following using vector addition:
[0065] The server uses known reduction Then check Does the number of participating clients equal the number of clients? The elements. If they exist, it means there is an intersection in this round, let Otherwise, .go through After round-robin verification, the server determines Valid or not: If valid, return 0. If the intersection size exceeds the threshold, the client can participate in the multi-party dense state computation; otherwise, return... The collaboration will be terminated.
[0066] in, , , These are protocol parameters, and their specific meanings are as follows: The total number of verification rounds; the more rounds, the more reliable the judgment result. To accept the threshold, i.e. At least in the wheel Only after the first round of acceptance is the intersection deemed satisfactory; By the second threshold Confirmed, satisfied Second threshold The rule for determining the intersection size is: if the intersection size is... The probability that the verifier accepts is at least 1. ;like The probability of acceptance is at most 100%. The acceptance probability differs significantly between the two cases, thus ensuring the reliability of the judgment result. The specific value can be determined based on the minimum number of valid samples required for multi-party dense state calculation, and is set by the participating parties through negotiation during the system initialization phase.
[0067] In this embodiment, the Goldwasser-Sipser algorithm is used to determine the size of the intersection of the reconstructed sample indices of the clients, providing an efficient verification mechanism, improving the quality of participating clients and reducing communication overhead, and providing a good data foundation for multi-party dense state computation.
[0068] Figure 3 The system architecture diagram involved in the methods provided for the embodiments of this application is as follows: Figure 3 As shown: The client calculates a first encrypted sample index by using the sample index vector, a first privacy vector, and a common matrix, and sends this index to the server to prevent data leakage to other clients. The server then calculates a second encrypted sample index based on the first. Further, a reconstructed sample index is generated based on the second encrypted sample index, the common matrix, and the second privacy vector. Alignment samples are then selected according to a first selection strategy, effectively solving the problem of inconsistent data between different clients in multi-party encrypted learning. The second privacy vector is calculated using the Shamir key-sharing algorithm, ensuring the security of multi-client computation. Furthermore, the server uses the Goldwasser-Sipser algorithm to calculate the intersection size of the clients' reconstructed sample indices, selecting clients with a sufficiently large intersection for multi-party encrypted computation. This effectively controls the value of the client data participating in the multi-party encrypted computation, ensuring its effectiveness.
[0069] According to the embodiments of this disclosure, the following technical effects are achieved: 1) A complex encryption and decryption mechanism ensures that reliable alignment samples can be obtained for multi-party encrypted computation, thus guaranteeing the robustness of the computation process and the accuracy of the alignment results.
[0070] 2) Multi-client dense state computation is only initiated when the sample intersection size reaches the second threshold, effectively solving the security and scalability issues.
[0071] 3) The first privacy vector is randomly generated by the client, which enhances the robustness of the sample alignment process and ensures that accurate alignment results can still be obtained in the event of failure or error.
[0072] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0073] The above is an introduction to the method embodiments. The following describes the solution described in this application through device embodiments.
[0074] Figure 4 A block diagram of a multi-party dense-state sample alignment apparatus according to an embodiment of this application is shown, such as... Figure 4 The following are included: The encryption index module 401 is used by each client to map the original sample to a bit vector, use an encoding function to convert the bit vector into a sample index vector, generate a first encrypted sample index based on the sample index vector, the first privacy vector and the public matrix, and send the first encrypted sample index to the server. The reconstruction index module 402, after receiving the first encrypted sample index from the server, performs a summation calculation on the first encrypted sample index to obtain the second encrypted sample index, and then generates a reconstruction sample index based on the second encrypted sample index, the common matrix and the second privacy vector, and sends the reconstruction sample index to the client. Module 403 is selected by the client to select an aligned sample from the samples corresponding to the reconstructed sample index according to the first selection strategy.
[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0076] Figure 5 A schematic diagram of a terminal device or server suitable for implementing embodiments of this application is shown.
[0077] like Figure 5 As shown, the terminal device or server includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the terminal device or server. The CPU 501, ROM 502, and RAM 503 are interconnected via bus 504. An input / output (I / O) interface 505 is also connected to bus 504.
[0078] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0079] Specifically, according to embodiments of this application, the above method flow steps can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a machine-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined in the system of this application.
[0080] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0081] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0082] The units or modules described in the embodiments of this application can be implemented in software or hardware. The described units or modules can also be located in a processor. The names of these units or modules do not, in certain circumstances, constitute a limitation on the unit or module itself.
[0083] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the methods described in this application.
[0084] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing application concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions claimed in this application.
Claims
1. A method for aligning multi-faceted dense-state samples, characterized in that, include: Each client maps the original sample to a bit vector, uses an encoding function to convert the bit vector into a sample index vector, generates a first encrypted sample index based on the sample index vector, a first privacy vector, and a common matrix, and sends the first encrypted sample index to the server. After receiving the first encrypted sample index, the server performs a summation calculation on the first encrypted sample index to obtain the second encrypted sample index, and then generates a reconstructed sample index based on the second encrypted sample index, the common matrix, and the second privacy vector, and sends the reconstructed sample index to the client. The client selects an aligned sample from the samples corresponding to the reconstructed sample index according to a first selection strategy.
2. The multi-party dense-state sample alignment method according to claim 1, characterized in that, The first privacy vector is randomly generated by the client; The public matrix is shared among each client.
3. The multi-party dense-state sample alignment method according to claim 1, characterized in that, The calculation method for the second privacy vector includes: The first client inputs the first privacy vector into the Shamir key sharing algorithm to obtain N key blocks, then encrypts the N key blocks to generate an encryption key, and sends the encryption key to the server; The server obtains the encryption key from the first client and forwards it to the second client; The second client decrypts the encryption key and generates an intermediate result, then sends the intermediate result to the server; The server performs Lagrange interpolation on the intermediate result based on the homomorphic additive property of the Shamir key-sharing algorithm to obtain the second privacy vector; The first client and the second client are different clients among the clients.
4. The multi-party dense-state sample alignment method according to claim 3, characterized in that, The server performs Lagrange interpolation on the intermediate result based on the homomorphic additive property of the Shamir key-sharing algorithm to obtain the second privacy vector, and further includes: When the number of intermediate results exceeds a first threshold, the server can perform the Lagrange interpolation calculation.
5. The multi-party dense-state sample alignment method according to claim 1, characterized in that, The first selection strategy includes: After receiving the reconstructed sample index, the client performs inverse encoding on the reconstructed sample index according to the encoding function; When the inverse encoding result of the reconstructed sample index is 1, the sample corresponding to the reconstructed sample index is selected as the alignment sample.
6. The multi-party dense-state sample alignment method according to claim 1, characterized in that, The method further includes: The size of the intersection of the reconstructed sample indices of the client is evaluated. Only when the size of the intersection of the reconstructed sample indices of the client is greater than a second threshold can the client participate in the multi-party dense state calculation.
7. The multi-party dense-state sample alignment method according to claim 6, characterized in that, The size of the intersection of the reconstructed sample indices of the client is determined by the Goldwasser-Sipser algorithm; The Goldwasser-Sipser algorithm performs iterative verification on each client based on the set of reconstructed sample indexes sent by each client to the server.
8. A multi-faceted dense-state sample alignment device, characterized in that, include: The encrypted index module involves each client mapping the original sample to a bit vector, using an encoding function to convert the bit vector into a sample index vector, generating a first encrypted sample index based on the sample index vector, a first privacy vector, and a common matrix, and then sending the first encrypted sample index to the server. The reconstruction index module is formed by the server receiving the first encrypted sample index, summing the first encrypted sample index to obtain the second encrypted sample index, generating a reconstruction sample index based on the second encrypted sample index, the common matrix, and the second privacy vector, and sending the reconstruction sample index to the client. The selection module allows the client to select an aligned sample from the samples corresponding to the reconstructed sample index according to a first selection strategy.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1 to 7.