Real-time data access and privacy calculation method and system based on homomorphic encryption

By introducing privacy indexing and adaptive strategies into homomorphic encryption technology, the problems of low computing efficiency and unreasonable permission control in the existing technology are solved, efficient real-time data access and privacy computing are achieved, and data security and real-timeness are ensured.

CN120012162AActive Publication Date: 2025-05-16BEIJING GUODU INTERNET TECH CO LTD

Patent Information

Application Number
CN202510472525.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-05-16
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

The existing homomorphic encryption technology is inefficient in processing large-scale data and lacks an efficient privacy indexing mechanism, which leads to the inability to support real-time dynamic updates, and the permission control method relies on plaintext attribute verification, so that the calculation strategy cannot be adjusted dynamically, resulting in unreasonable resource allocation.

Method used

A real-time data access and privacy calculation method based on homomorphic encryption is proposed. The encrypted data set is generated through full homomorphic encryption, and the privacy index associated with it is synchronized to realize encrypted computing and partial homomorphic decryption, and the end-to-end encryption transmission protocol ensures the security of data transmission.

Benefits of technology

It realizes privacy calculations and decrypted access to encrypted data under homomorphic encryption, ensures the entire data confidentiality, improves the computing efficiency of encrypted data, supports real-time dynamic updates, and optimizes resource allocation through adaptive strategies, improving data utilization and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012162A_ABST
    Figure CN120012162A_ABST
Patent Text Reader

Abstract

The invention discloses a real-time data access and privacy calculation method and system based on homomorphic encryption, and relates to the field of data security, and the method comprises the steps: receiving to-be-encrypted data, and carrying out homomorphic encryption on the to-be-encrypted data; synchronously generating an associated privacy index; receiving a calculation request of a user, and executing encryption calculation based on the privacy index; performing partial homomorphic decryption on the encryption calculation result to obtain an intermediate result; and sending the result of the encryption calculation to a user through an end-to-end encryption transmission protocol, and verifying the accuracy of the result of the encryption calculation through the intermediate result. Efficient calculation of encrypted data is achieved through full-amount homomorphic encryption, and redundant traversal and insufficient real-time performance caused by lack of indexes are avoided. The core problems of low encryption calculation efficiency, unreasonable authority control, unsafe transmission and the like in the prior art are avoided, the balance between privacy protection and calculation efficiency is realized, and the data utilization rate and security are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a real-time data access and privacy computing method and system based on homomorphic encryption. Background Art

[0002] At present, with the rapid development of big data and cloud computing, the contradiction between data privacy protection and efficient computing has become increasingly prominent. Although homomorphic encryption technology provides a theoretical basis for secure computing on encrypted data, its practical application still faces multiple challenges: First, traditional homomorphic encryption schemes are computationally inefficient when processing large-scale data and lack an efficient privacy indexing mechanism, resulting in statistical features (such as mean and variance) that need to be obtained through full data calculations, which cannot support real-time dynamic updates and have redundant calculations; second, existing permission control methods (such as role-based access control) rely on plaintext attribute verification, which may leak user privacy and cannot dynamically adjust the computing strategy according to the complexity of operations and user permission levels, resulting in unreasonable resource allocation; and the noise accumulation problem in homomorphic operations cannot be solved in existing technologies, and it is difficult to achieve dual privacy protection in the final result verification and privacy protection. Existing solutions either expose sensitive data through complete decryption or cannot ensure credibility due to insecure intermediate data transmission. Summary of the invention

[0003] In view of this, the present invention proposes a real-time data access and privacy computing method and system based on homomorphic encryption, which can complete privacy computing according to the user's computing request under homomorphic encryption and realize decryption access to encrypted data, ensuring that the privacy data of the whole process will not be leaked. The present invention provides the following technical solutions: A real-time data access and privacy computing method based on homomorphic encryption, the method comprising: Receive the data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set; synchronously generating a privacy index associated with the encrypted data set; Receive a computing request from a user, perform user authority verification, and after the authority verification is passed, perform encryption computing based on the privacy index; Performing partial homomorphic decryption on the result of the encrypted calculation to obtain an intermediate result; The result of the encryption calculation is sent to the user through an end-to-end encryption transmission protocol, and the accuracy of the result of the encryption calculation is verified through the intermediate result.

[0004] Optionally, the synchronously generating a privacy index associated with the encrypted data set includes: Calculate an encrypted representation of the statistical features of the encrypted data set according to the encrypted data set, wherein the statistical features include an encrypted mean, an encrypted variance, and an encrypted quantile; The calculation formula of the encrypted mean is: ,in, is the encrypted data set, is the total amount of encrypted data, is the serial number of the encrypted data; The calculation formula of the encryption variance is: ; The calculation formula of the encrypted quantile is: ,in is the data to be encrypted, is the quantile parameter, is a homomorphic encryption function; The encrypted representation of at least one of the statistical features is uniquely bound to the encrypted data set through a metadata tag and stored to generate a privacy index.

[0005] Optionally, the receiving a computing request from a user, performing user authority verification at the same time, and performing encryption computing based on the privacy index after the authority verification passes, includes: Extracting the operation type, permission attribute and data range based on the calculation request; Performing authority verification on the authority attribute based on zero-knowledge proof; If the permission verification is passed, the corresponding privacy index is selected according to the operation type; Calling the encrypted data set corresponding to the privacy index, and performing segmentation on it to obtain multiple encrypted data blocks; The GPU computing engine is called to perform multi-threaded encryption calculations on the plurality of encrypted data blocks to obtain encryption calculation results.

[0006] Optionally, the calling of the GPU computing engine to perform multi-threaded encryption calculations on the plurality of encrypted data blocks to obtain encryption calculation results includes: A dynamic weight parameter is constructed according to the permission level corresponding to the permission attribute and the complexity corresponding to the operation type, and the formula is: ,in, is the dynamic weight parameter, is the user's permission level, is the noise attenuation coefficient, is the noise level function of the encryption operation, is the number of operation rounds, is the weighted parameter of the permission level; Constructing an adaptive strategy for encryption calculation according to the dynamic weight parameter, wherein the adaptive strategy includes a first strategy and a second strategy; The encryption calculation formula of the first strategy is: ,in To encrypt the calculation results, is an encrypted feature selected from the privacy index, is a direct calculation result based on the data to be encrypted; The encryption calculation formula of the second strategy is: ,in, is the noise compensation coefficient, , is the preset noise threshold.

[0007] Optionally, performing partial homomorphic decryption on the result of the encrypted calculation to obtain an intermediate result includes: Get the decryption key , and decomposed into Share ; The number of shares required for homomorphic decryption is calculated based on the permission attributes. The calculation formula is: ,in The permission level corresponding to the user's permission attribute; use The decryption key of each share is used to restore the required partial decryption key; Partial homomorphic decryption is performed on the result of the encrypted calculation using a partial decryption key to generate an intermediate result.

[0008] Optionally, sending the result of the encryption calculation to the user through an end-to-end encryption transmission protocol, and verifying the accuracy of the result of the encryption calculation through the intermediate result includes: Use the user's public key to re-encrypt the result of the encryption calculation and generate ciphertext; An end-to-end encrypted transmission protocol is selected to send the twice-encrypted ciphertext and the intermediate result to the user together to form a verification pair; Use the private key to decrypt the twice-encrypted ciphertext and generate local verification data; Verify whether the local verification data is the same as the intermediate result. If they are the same, the result of the encryption calculation is correct.

[0009] The present invention further discloses a real-time data access and privacy computing system based on homomorphic encryption, comprising: An encryption module, used to receive the data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set; An index generation module, synchronously generating a privacy index associated with the encrypted data set; An encryption calculation module, used to receive a user's calculation request, perform user authority verification, and perform encryption calculation based on the privacy index after the authority verification is passed; A decryption module, used to perform partial homomorphic decryption on the result of the encryption calculation to obtain an intermediate result; The verification module is used to send the result of the encryption calculation to the user through an end-to-end encryption transmission protocol, and to verify the accuracy of the result of the encryption calculation through the intermediate result.

[0010] The present invention further discloses a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0011] The present invention further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.

[0012] The present invention further discloses a computer program product, comprising a computer program, wherein the computer program implements the above method when executed by a processor.

[0013] According to the technical solution of the present invention, full homomorphic encryption is used to ensure the confidentiality of data throughout the process, and the dynamically generated privacy index is combined with metadata binding storage to achieve efficient calculation of encrypted data, avoiding redundant traversal and lack of real-time performance due to lack of index. And the calculation mode is dynamically adjusted according to the permission level, operation complexity and noise level through adaptive strategies, which not only improves the efficiency of index call in low-noise scenarios, but also ensures the accuracy of results in high-noise scenarios through noise compensation coefficients. Finally, the intermediate results generated by partial homomorphic decryption can support users to locally verify the correctness of the encryption results without exposing plaintext data or complete calculation results, and the end-to-end encrypted transmission protocol further ensures the security of data transmission. In summary, this technical solution solves the core problems of low encryption calculation efficiency, unreasonable permission control and insecure transmission in the prior art, achieves a balance between privacy protection and computing efficiency, and significantly improves data utilization and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] For the purpose of illustration and not limitation, the present invention is now described in conjunction with the embodiments of the present invention and the accompanying drawings, in which: Figure 1 It is a flowchart of a real-time data access and privacy computing method based on homomorphic encryption in an embodiment of the present invention; Figure 2 It is a structural diagram of a real-time data access and privacy computing system based on homomorphic encryption in an embodiment of the present invention; Figure 3 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the implementation mode of the present application. Obviously, the described implementation mode is only a part of the implementation mode of the present application, not all the implementation modes. Based on the implementation mode in the present application, all other implementation modes obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.

[0016] It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0017] refer to Figure 1 This embodiment discloses a real-time data access and privacy computing method based on homomorphic encryption, which includes: S100: Receive the data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set. Specifically, preprocess the data to be encrypted into structured data or unstructured data and construct the encrypted data set. , and then perform one-hot encoding or hash encoding on the encrypted data set to ensure the compatibility of subsequent homomorphic operations. This implementation uses the BFV encryption algorithm and generates a public key , Private Key and evaluation key , the above keys are generated and stored by secure hardware. Further, encryption is performed on the encrypted data set: ,in It is a homomorphic encryption library. And finally generates an encrypted data set And the corresponding metadata tag. By storing all the data to be encrypted in the form of ciphertext, the leakage of plaintext can be effectively avoided.

[0018] S200: Synchronously generate a privacy index associated with the encrypted data set. Specifically, an encrypted representation of the statistical features of the encrypted data set is calculated. In this embodiment, the statistical features include an encrypted mean, an encrypted variance, and an encrypted quantile. It should be understood that the statistical features can be preset as needed and are not limited here.

[0019] For this implementation, the calculation formula of the above encrypted mean is: ,in, For the encrypted data in the encrypted dataset, is the total number of encrypted data, is the serial number of the encrypted data; The calculation formula of the encryption variance is: ; The calculation formula of the encrypted quantile is: ,in is the data to be encrypted, is the quantile parameter, is a homomorphic encryption function.

[0020] The encrypted representation of at least one of the statistical features is uniquely bound to the encrypted data set through the metadata tag in step S100 and stored to generate a privacy index. Calculate the hash value as a unique identifier: ,in is a hash function. Further, the encrypted statistical features calculated above are , and With metadata tags Bind to form a privacy index entry: .

[0021] This embodiment further discloses a dynamic index update mechanism. When , the above encrypted mean is updated to: ; The encrypted variance is updated to: ; The encrypted quantile is updated to: , ,in, is the updated original dataset.

[0022] The privacy index generated above, which is strongly associated with the encrypted data, pre-calculates and stores the statistical features of the encrypted data, allowing these features to be directly called for encryption calculations, avoiding redundant operations of traversing the entire encrypted data, which is especially suitable for large-scale data real-time analysis scenarios. The privacy index only contains encrypted statistical features and cannot infer the original data or the complete plaintext results. For example, the encrypted quantile avoids high-overhead sorting operations on the encrypted data by calculating the plaintext quantile before encrypting it, while ensuring the encryption of the features and preventing the leakage of sensitive information. At the same time, the index is bound to the encrypted data set through metadata tags to ensure strict consistency between the index and the data version. When new data is added, the index is quickly updated through the incremental update formula without re-encryption or full recalculation, supporting real-time index maintenance of dynamic data streams and reducing system downtime or delays.

[0023] S300: receiving a computing request from a user, performing user authority verification, and executing encryption computing based on the privacy index after the authority verification is passed.

[0024] That is, the encrypted calculation in the user dimension is encrypted and will not leak data during the calculation process. Specifically, based on the calculation request, the operation type, permission attribute and data range are extracted, where the operation type refers to the type of calculation the user wants to perform, such as mean calculation, variance calculation, quantile query, etc. The permission attribute is the user's related permission settings, such as user role, department, operation scope, and the data scope refers to the encrypted data set and its metadata label. .

[0025] The permission attribute is verified based on zero-knowledge proof; specifically, according to the user permission attribute, a permission expression C is constructed, exemplarily, ,in, is the permission level corresponding to the user permission attribute, For department attributes. Generate a certificate corresponding to the user , the properties of this proof satisfy , when performing permission verification, verify The legitimacy of the operation is verified, thereby preventing the user's attributes and original data from being exposed. If the permission verification is passed, the corresponding privacy index is selected according to the operation type. For example, if the user requests to calculate the variance of the encrypted data set and the permission level L=2, the user generates a certificate , verify that , select encryption variance , and verify the metadata tags Match with the current dataset to complete the selection of privacy index.

[0026] After the privacy index is selected, the encrypted data set corresponding to the privacy index is called and segmented to obtain multiple encrypted data blocks. Then the GPU computing engine is called to perform multi-threaded encryption calculations on the multiple encrypted data blocks to obtain encryption calculation results. Specifically, the encrypted data set Split into Encrypted data blocks , the size of each block is dynamically determined based on the GPU memory capacity and the number of threads. For example, if the dataset contains encrypted data items, each block is of size Furthermore, a dynamic weight parameter is constructed based on the permission level corresponding to the permission attribute and the complexity corresponding to the operation type. The formula is: ,in, is the dynamic weight parameter, is the user's permission level, is the noise attenuation coefficient, is the noise level function of the encryption operation, is the number of operation rounds, is the weighted parameter of the permission level. On this basis, according to the dynamic weight parameter and noise level Calculating the number of GPU threads , the formula is: ,in, is the preset number of baseline threads, is the preset number of noise compensation threads, is the preset noise threshold. Threads are divided into There are thread groups, each of which is responsible for the calculation of an encrypted data block.

[0027] An adaptive strategy for encryption calculation is constructed according to the dynamic weight parameter, wherein the adaptive strategy includes a first strategy and a second strategy; the formula for encryption calculation of the first strategy is: ,in To encrypt the calculation results, is an encrypted feature selected from the privacy index, is a direct calculation result based on the data to be encrypted; the encryption calculation formula of the second strategy is: ,in, is the noise compensation coefficient, , is the preset noise threshold. Finally, the encrypted calculation result Return to the main process.

[0028] S400: Perform partial homomorphic decryption on the result of the encryption calculation to obtain an intermediate result. Before performing homomorphic decryption, obtain a decryption key , and decomposed into Share , where any Shares can recover some of the keys, but less than The complete key cannot be inferred from the shares. The above share sharding formula is: ,in, ,in is a large prime number, , , …, is the random coefficient, .

[0029] Further, the number of shares required for homomorphic decryption is calculated according to the permission attribute , the calculation formula is: ,in The permission level corresponding to the user's permission attribute; use The required partial decryption key can be restored by using the decryption key of the shares. 5, the user's permission level is 2, then .

[0030] After the user's permission is verified through zero-knowledge proof, the system releases the corresponding shares, and use The partial decryption key of each share performs partial homomorphic decryption on the result of the encryption calculation in step S300 and generates an intermediate result. Specifically, use The shares are used to recover the partial decryption key through Lagrange interpolation , the formula is: ,in, is a Lagrange basis polynomial, =0, recovery . Further, use Encryption calculation results Perform partial decryption and generate intermediate results , and based on the intermediate results Generate intermediate verification data, including hash verification value and low-precision approximation ,in, ,in, is a hash function, is the homomorphic decryption function. ,in, is the noise compensation coefficient, The number of digits is preset.

[0031] S500: Send the result of the encryption calculation to the user through an end-to-end encryption transmission protocol, and verify the accuracy of the result of the encryption calculation through the intermediate result. Specifically, use the user's public key Encryption calculation results Perform secondary encryption to generate ciphertext : ,in, It is an asymmetric encryption algorithm to ensure that only the corresponding private key is held The user can decrypt it. , intermediate results And the message authentication code MAC combination is the verification pair: The generation formula of the message authentication code MAC is: ,in The pre-shared authentication key ensures the integrity of the transmitted data. In this embodiment, the end-to-end encrypted transmission protocol is selected according to the specific usage scenario, and the international standard: TLS 1.3 or the domestic standard: the national encryption SM2 / SM4 protocol can be selected.

[0032] When the user receives the double-encrypted ciphertext Then, use the private key Decrypt it and get the decryption result : ,in, is an asymmetric decryption function. Select the corresponding verification method according to the type of intermediate verification data. If the intermediate verification data is , then for the decrypted Calculate local verification data: , then compare and If they are consistent, then Correct. If the intermediate verification data is , then for the decrypted Calculate local verification data: , then compare and If they are consistent, then Correct. If all verification steps are passed, the final confirmation The user can further decrypt to obtain the plaintext results.

[0033] Therefore, by calculating the intermediate results, it can be achieved that they only contain part of the information required for verification, and the original data or the complete plaintext result cannot be inferred. The user does not need to fully decrypt, and can verify the correctness of the result only through the intermediate results, preventing the plaintext data from being leaked during the verification process.

[0034] In summary, this implementation ensures data confidentiality throughout the entire process through full homomorphic encryption, synchronously generates a privacy index containing the encrypted mean, variance, and quantile, and strongly binds it to the encrypted data set through metadata tags to achieve efficient calling of statistical features; when receiving a calculation request, it verifies whether the user's permission attributes are met based on zero-knowledge proof, drives the GPU computing engine to perform encrypted data block calculations in parallel through multiple threads, and combines adaptive strategies to prioritize calling index features in low-noise scenarios to reduce redundant operations, or introduce compensation coefficients to correct results in high-noise scenarios, while monitoring the noise level in real time and dynamically adjusting thread allocation and computing modes; when partially homomorphically decrypting the encrypted result, the threshold sharding technology is used to allocate the decryption share, based on user permissions, etc. The number of shares required for level-level calculation is calculated, and an irreversible intermediate result is generated after recovering part of the key. The double-encrypted ciphertext is transmitted together with the intermediate result and the MAC code through the end-to-end encryption protocol. After decryption, the user verifies the accuracy of the result by comparing the hash value or noise compensation parameter through local calculation, and finally forms a complete closed loop from encryption index generation, dynamic permission verification, noise-aware computing to secure transmission and zero-trust verification. It solves the pain points of low encryption computing efficiency, extensive permission control, uncontrollable noise accumulation and privacy exposure in traditional solutions. On the premise of ensuring that the original data is not leaked, it achieves high real-time performance, fine-grained permission control and result reliability in noise scenarios, thereby completing real-time data access and privacy computing based on homomorphic encryption.

[0035] refer to Figure 2 This embodiment further discloses a real-time data access and privacy computing system based on homomorphic encryption, including: The encryption module 21 is used to receive the data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set; The index generation module 22 synchronously generates a privacy index associated with the encrypted data set, including: calculating an encrypted representation of the statistical features of the encrypted data set according to the encrypted data set, wherein the statistical features include an encrypted mean, an encrypted variance, and an encrypted quantile; the calculation formula of the encrypted mean is: ,in, is the encrypted data in the encrypted data set, is the total amount of encrypted data, is the serial number of the encrypted data; the calculation formula of the encryption variance is: ; The calculation formula of the encrypted quantile is: ,in is the data to be encrypted, is the quantile parameter, is a homomorphic encryption function; uniquely binding and storing the encrypted representation of at least one of the statistical features with the encrypted data set through a metadata tag to generate a privacy index; The encryption calculation module 23 is used to receive the user's calculation request, perform user authority verification at the same time, and perform encryption calculation based on the privacy index after the authority verification is passed, including: extracting the operation type, authority attribute and data range based on the calculation request; performing authority verification on the authority attribute based on zero-knowledge proof; if the authority verification is passed, selecting the corresponding privacy index according to the operation type; calling the encrypted data set corresponding to the privacy index, and performing segmentation on it to obtain multiple encrypted data blocks; calling the GPU computing engine to perform multi-threaded encryption calculation on the multiple encrypted data blocks to obtain the encryption calculation result. Specifically, a dynamic weight parameter is constructed according to the authority level corresponding to the authority attribute and the complexity corresponding to the operation type. The formula is: ,in, is the dynamic weight parameter, is the user's permission level, is the noise attenuation coefficient, is the noise level function of the encryption operation, is the number of operation rounds, is a weighted parameter of the permission level; an adaptive strategy for encryption calculation is constructed according to the dynamic weight parameter, and the adaptive strategy includes a first strategy and a second strategy; the formula for encryption calculation of the first strategy is: ,in To encrypt the calculation results, is an encrypted feature selected from the privacy index, is a direct calculation result based on the data to be encrypted; the encryption calculation formula of the second strategy is: ,in, is the noise compensation coefficient, , is the preset noise threshold; The decryption module 24 is used to perform partial homomorphic decryption on the result of the encryption calculation to obtain an intermediate result, including: obtaining a decryption key , and decomposed into Share ; Calculate the number of shares required for homomorphic decryption based on the permission attribute, and the calculation formula is: ,in The permission level corresponding to the user's permission attribute; use The decryption key of each share is used to recover the required partial decryption key; the partial decryption key is used to perform partial homomorphic decryption on the result of the encryption calculation and generate an intermediate result; The verification module 25 is used to send the result of the encryption calculation to the user through the end-to-end encryption transmission protocol, and verify the accuracy of the result of the encryption calculation through the intermediate result, including: using the user's public key to re-encrypt the result of the encryption calculation and generate a ciphertext; selecting an end-to-end encryption transmission protocol, sending the re-encrypted ciphertext and the intermediate result together to the user, and forming a verification pair; using the private key to decrypt the re-encrypted ciphertext and generate local verification data; verifying whether the local verification data is the same as the intermediate result. If they are the same, the result of the encryption calculation is correct.

[0036] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 3 As shown, the electronic device 50 includes: a processor 501 (processor), a memory 502 (memory) and a bus 503; The processor 501 and the memory 502 communicate with each other via the bus 503 ; the processor 501 is used to call program instructions in the memory 502 to execute the methods provided by the above-mentioned method implementation methods.

[0037] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments.

[0038] A person skilled in the art can understand that all or part of the steps for implementing the above-mentioned method implementation method can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method implementation method; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various storage media that can store program codes.

[0039] The device implementation described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present implementation scheme. Those of ordinary skill in the art may understand and implement it without creative effort.

[0040] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each implementation mode or some parts of the implementation mode.

[0041] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A real-time data access and privacy computing method based on homomorphic encryption, characterized in that: The method comprises: Receive the data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set; synchronously generating a privacy index associated with the encrypted data set; Receive a computing request from a user, perform user authority verification, and after the authority verification is passed, perform encryption computing based on the privacy index; Performing partial homomorphic decryption on the result of the encrypted calculation to obtain an intermediate result; The result of the encryption calculation is sent to the user through an end-to-end encryption transmission protocol, and the accuracy of the result of the encryption calculation is verified through the intermediate result.

2. The real-time data access and privacy computing method based on homomorphic encryption according to claim 1 is characterized in that: The synchronously generating a privacy index associated with the encrypted data set includes: Calculate an encrypted representation of the statistical features of the encrypted data set according to the encrypted data set, wherein the statistical features include an encrypted mean, an encrypted variance, and an encrypted quantile; The calculation formula of the encrypted mean is: ,in, is the encrypted data in the encrypted data set, is the total amount of encrypted data, is the serial number of the encrypted data; The calculation formula of the encryption variance is: ; The calculation formula of the encrypted quantile is: ,in is the data to be encrypted, is the quantile parameter, is a homomorphic encryption function; The encrypted representation of at least one of the statistical features is uniquely bound to the encrypted data set through a metadata tag and stored to generate a privacy index.

3. The real-time data access and privacy computing method based on homomorphic encryption according to claim 1 is characterized in that: The receiving a computing request from a user, performing user authority verification at the same time, and performing encryption computing based on the privacy index after the authority verification passes, comprises: Extracting the operation type, permission attribute and data range based on the calculation request; Performing authority verification on the authority attribute based on zero-knowledge proof; If the permission verification is passed, the corresponding privacy index is selected according to the operation type; Calling the encrypted data set corresponding to the privacy index, and performing segmentation on it to obtain multiple encrypted data blocks; The GPU computing engine is called to perform multi-threaded encryption calculations on the plurality of encrypted data blocks to obtain encryption calculation results.

4. The real-time data access and privacy computing method based on homomorphic encryption according to claim 3 is characterized in that: The calling of the GPU computing engine to perform multi-threaded encryption calculation on the plurality of encrypted data blocks to obtain encryption calculation results comprises: A dynamic weight parameter is constructed according to the permission level corresponding to the permission attribute and the complexity corresponding to the operation type, and the formula is: ,in, is the dynamic weight parameter, is the user's permission level, is the noise attenuation coefficient, is the noise level function of the encryption operation, is the number of operation rounds, is the weighted parameter of the permission level; Constructing an adaptive strategy for encryption calculation according to the dynamic weight parameter, wherein the adaptive strategy includes a first strategy and a second strategy; The encryption calculation formula of the first strategy is: ,in To encrypt the calculation results, is an encrypted feature selected from the privacy index, is a direct calculation result based on the data to be encrypted; The encryption calculation formula of the second strategy is: ,in, is the noise compensation coefficient, , is the preset noise threshold.

5. The real-time data access and privacy computing method based on homomorphic encryption according to claim 3 is characterized in that: The partially homomorphically decrypting the result of the encrypted calculation to obtain an intermediate result comprises: Get the decryption key , and decomposed into Share ; The number of shares required for homomorphic decryption is calculated based on the permission attributes. The calculation formula is: ,in The permission level corresponding to the user's permission attribute; use The decryption key of each share is used to restore the required partial decryption key; Partial homomorphic decryption is performed on the result of the encrypted calculation using a partial decryption key to generate an intermediate result.

6. The real-time data access and privacy computing method based on homomorphic encryption according to claim 1 is characterized in that: The step of sending the result of the encryption calculation to the user through an end-to-end encryption transmission protocol, and verifying the accuracy of the result of the encryption calculation through the intermediate result includes: Use the user's public key to re-encrypt the result of the encryption calculation and generate ciphertext; An end-to-end encrypted transmission protocol is selected to send the twice-encrypted ciphertext and the intermediate result to the user together to form a verification pair; Use the private key to decrypt the twice-encrypted ciphertext and generate local verification data; Verify whether the local verification data is the same as the intermediate result. If they are the same, the result of the encryption calculation is correct.

7. A real-time data access and privacy computing system based on homomorphic encryption, characterized in that: include: An encryption module, used to receive the data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set; An index generation module, synchronously generating a privacy index associated with the encrypted data set; An encryption calculation module, used to receive a user's calculation request, perform user authority verification, and perform encryption calculation based on the privacy index after the authority verification is passed; A decryption module, used to perform partial homomorphic decryption on the result of the encryption calculation to obtain an intermediate result; The verification module is used to send the result of the encryption calculation to the user through an end-to-end encryption transmission protocol, and to verify the accuracy of the result of the encryption calculation through the intermediate result.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Data security gateway method and system based on edge privacy calculation

    CN118921161A

  • Medical data security sharing method and system based on block chain

    CN119357995A

  • Differential privacy for encrypted data

    US20210319131A1

  • Searchable encrypted data sharing method and system based on blockchain and homomorphic encryption

    US20220368545A1

Cited By

  • Federal learning-based privacy computing service method and system

    CN120671182A