Homomorphic Encryption-Based Real-Time Data Access and Privacy Computing Method and System

Through full homomorphic encryption and dynamically generated privacy index, combined with the GPU computing engine and adaptive strategies, the problems of low encryption computing efficiency, unreasonable permission control and unsafe transmission in the existing technology are solved, and efficient and secure privacy computing and data access are achieved.

CN120012162BActive Publication Date: 2025-06-27BEIJING GUODU INTERNET TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510472525.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-06-27
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 update statistical features dynamically in real time, redundant calculations, and unreasonable permission control, which cannot ensure the security of data transmission.

Method used

Full homomorphic encryption is used to generate encrypted data sets, and the privacy index associated with them is synchronized, and the metadata tags are bound to store and efficient calculation of encrypted data. At the same time, based on user computing requests and permission verification, the encryption computing strategy is dynamically adjusted, multi-threaded encryption calculation is performed through the GPU computing engine, and intermediate results are generated through partial homomorphic decryption to support user verification.

Benefits of technology

It realizes efficient privacy calculations under homomorphic encryption conditions, avoids the problems of redundant calculations and insufficient real-time performance, improves data utilization and security, ensures that data is kept confidential throughout the process and supports real-time dynamic updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120012162B_ABST
    Figure CN120012162B_ABST
Patent Text Reader

Abstract

The present invention discloses a real-time data access and privacy computing method and system based on homomorphic encryption, which relates to the field of data security. The method includes: receiving data to be encrypted and performing homomorphic encryption on it; synchronously generating an associated privacy index; receiving a computing request from a user and performing encrypted computing based on the privacy index; performing partial homomorphic decryption on the result of the encrypted computing to obtain an intermediate result; sending the result of the encrypted computing to the user through an end-to-end encryption transmission protocol, and verifying the accuracy of the result of the encrypted computing through the intermediate result. Through full homomorphic encryption, efficient computing of encrypted data is achieved, avoiding redundant traversal and insufficient real-time performance caused by the lack of an index. It avoids the core problems such as low efficiency of encrypted computing, unreasonable permission control, and insecure transmission in the prior art, realizes the balance between privacy protection and computing efficiency, and significantly improves data utilization and security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] At present, in the context of 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 inefficient in processing large-scale data and lack an efficient privacy index mechanism, resulting in statistical features (such as mean and variance) needing to be calculated through all data, unable to support real-time dynamic updates and having redundant calculations; Second, existing permission control methods (such as role-based access control) rely on plaintext attribute verification, which may not only leak user privacy but also cannot dynamically adjust the computing strategy according to the operation complexity and user permission level, resulting in unreasonable resource allocation; Moreover, the problem of noise accumulation in homomorphic operations cannot be solved in the existing technology, 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 the insecurity of 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 achieve privacy computing according to the user's computing request and decrypt and access encrypted data under the condition of homomorphic encryption, ensuring that privacy data will not be leaked throughout the process. The present invention provides the following technical solutions:

[0004] A real-time data access and privacy computing method based on homomorphic encryption, the method comprising:

[0005] Receiving data to be encrypted and performing full homomorphic encryption on it to generate an encrypted data set;

[0006] Synchronously generating a privacy index associated with the encrypted data set;

[0007] Receiving a user's computing request, simultaneously performing user permission verification, and after the permission verification passes, performing encrypted computing based on the privacy index;

[0008] Performing partial homomorphic decryption on the result of the encrypted computing to obtain an intermediate result;

[0009] Sending the result of the encrypted computing to the user through an end-to-end encryption transmission protocol, and verifying the accuracy of the result of the encrypted computing through the intermediate result.

[0010] Optionally, the synchronous generation of the privacy index associated with the encrypted dataset includes:

[0011] Calculating an encrypted representation of the statistical features of the encrypted dataset, where the statistical features include encrypted mean, encrypted variance, and encrypted quantiles;

[0012] The calculation formula for the encrypted mean is: , where is the encrypted dataset, is the total number of encrypted data, is the serial number of the encrypted data;

[0013] The calculation formula for the encrypted variance is: ;

[0014] The calculation formula for the encrypted quantile is: , where is the data to be encrypted, is the quantile parameter, is the homomorphic encryption function;

[0015] Uniquely binding and storing the encrypted representations of at least one of the statistical features to the encrypted dataset through metadata tags to generate a privacy index.

[0016] Optionally, the receiving of the user's calculation request, simultaneous user permission verification, and, after the permission verification passes, performing encrypted calculation based on the privacy index includes:

[0017] Extracting the operation type, permission attribute, and data range based on the calculation request;

[0018] Performing permission verification on the permission attribute based on zero-knowledge proof;

[0019] If the permission verification passes, select the corresponding privacy index according to the operation type;

[0020] Invoking the encrypted dataset corresponding to the privacy index and performing segmentation on it to obtain multiple encrypted data blocks;

[0021] Invoking the GPU computing engine to perform multi-threaded encrypted calculation on multiple encrypted data blocks to obtain an encrypted calculation result.

[0022] Optionally, the invoking of the GPU computing engine to perform multi-threaded encrypted calculation on multiple encrypted data blocks to obtain an encrypted calculation result includes:

[0023] Constructing a dynamic weight parameter according to the permission level corresponding to the permission attribute and the complexity corresponding to the operation type, with the formula: , where is a 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;

[0024] Construct an adaptive strategy for encryption calculation according to the dynamic weight parameter, and the adaptive strategy includes a first strategy and a second strategy;

[0025] The formula for encryption calculation of the first strategy is: , where is the encryption calculation result, is the encryption feature selected from the privacy index, is the direct calculation result based on the data to be encrypted;

[0026] The formula for encryption calculation of the second strategy is: , where, is the noise compensation coefficient, , is the preset noise threshold.

[0027] Optionally, the partial homomorphic decryption of the result of the encryption calculation to obtain an intermediate result includes:

[0028] Obtain the decryption secret key , and decompose it into shares ;

[0029] Calculate the number of shares required for homomorphic decryption according to the permission attribute, and the calculation formula is , where is the permission level corresponding to the user's permission attribute;

[0030] Use shares of the decryption secret key to recover the required partial decryption secret key;

[0031] Use the partial decryption secret key to perform partial homomorphic decryption on the result of the encryption calculation and generate an intermediate result.

[0032] Optionally, 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:

[0033] Use the user's public key to perform secondary encryption on the result of the encryption calculation and generate a ciphertext;

[0034] Select an end-to-end encrypted transmission protocol, and jointly send the doubly encrypted ciphertext and the intermediate result to the user, and form a verification pair;

[0035] Use the private key to decrypt the doubly encrypted ciphertext and generate local verification data;

[0036] 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.

[0037] The present invention further discloses a real-time data access and privacy computing system based on homomorphic encryption, including:

[0038] An encryption module, configured to receive data to be encrypted and perform full homomorphic encryption on it to generate an encrypted data set;

[0039] An index generation module, synchronously generating a privacy index associated with the encrypted data set;

[0040] An encryption calculation module, configured to receive a calculation request from a user, perform user permission verification at the same time, and perform encryption calculation based on the privacy index after the permission verification passes;

[0041] A decryption module, configured to perform partial homomorphic decryption on the result of the encryption calculation to obtain an intermediate result;

[0042] A verification module, configured to send the result of the encryption calculation to the user through an end-to-end encrypted transmission protocol, and verify the accuracy of the result of the encryption calculation through the intermediate result.

[0043] The present invention further discloses a computer-readable storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0044] The present invention further discloses an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above method is implemented.

[0045] The present invention further discloses a computer program product, including a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0046] According to the technical solution of the present invention, the whole data is encrypted by full homomorphic encryption to ensure confidentiality throughout the process. By combining the dynamically generated privacy index with the metadata for bound storage, efficient calculation of encrypted data is achieved, avoiding redundant traversal and insufficient real-time performance caused by the lack of an index. Moreover, through an adaptive strategy, the calculation mode is dynamically adjusted according to the permission level, operation complexity, and noise level, which not only improves the index call efficiency in low-noise scenarios but also ensures the result accuracy in high-noise scenarios through a noise compensation coefficient. Finally, some of the intermediate results generated by partial homomorphic decryption can support local verification of the correctness of the encrypted result by the user without exposing the plaintext data or the complete calculation result, and the end-to-end encryption transmission protocol further guarantees 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 calculation efficiency, and significantly improves data utilization and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] For purposes of illustration and not limitation, the present invention will now be described in conjunction with the embodiments and drawings of the present invention, wherein:

[0048] Figure 1 is a schematic flowchart of a real-time data access and privacy calculation method based on homomorphic encryption in an embodiment of the present invention;

[0049] Figure 2 is a schematic structural diagram of a real-time data access and privacy calculation system based on homomorphic encryption in an embodiment of the present invention;

[0050] Figure 3 is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the scope of protection of the present application.

[0052] It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments may be combined with each other. The embodiments of the present application will be described in detail below in conjunction with the drawings.

[0053] Refer to Figure 1 , this embodiment discloses a real-time data access and privacy calculation method based on homomorphic encryption, and the method includes:

[0054] S100: Receive the data to be encrypted and perform full - homomorphic encryption on it to generate an encrypted data set. Specifically, pre - process the data to be encrypted into structured or unstructured data and construct the data set to be encrypted , and then perform one - hot encoding or hash encoding on the encrypted data set to ensure compatibility with subsequent homomorphic operations. In this embodiment, the BFV encryption algorithm is selected and a public key , a private key and an evaluation key are generated. The above keys are generated and stored by secure hardware. Further, perform encryption on the data set to be encrypted: , where is a homomorphic encryption library. And finally, generate an encrypted data set and the corresponding metadata tags. By storing all the data to be encrypted in ciphertext form, the leakage of plaintext can be effectively avoided.

[0055] S200: Synchronously generate a privacy index associated with the encrypted data set. Specifically, calculate the encrypted representation of its statistical features according to the encrypted data set. In this embodiment, the statistical features include encrypted mean, encrypted variance, and encrypted quantile. It should be understood that the statistical features can be preset according to needs and are not limited here.

[0056] For this embodiment, the calculation formula for the above - mentioned encrypted mean is: , where is the encrypted data in the encrypted data set, is the total number of encrypted data, is the serial number of the encrypted data;

[0057] The calculation formula for the encrypted variance is: ;

[0058] The calculation formula for the encrypted quantile is: , where is the data to be encrypted, is the quantile parameter, is the homomorphic encryption function.

[0059] Bind and store the encrypted representation of at least one of the statistical features to the encrypted data set uniquely through the metadata tags in step S100 to generate a privacy index. For the generation of metadata tags, specifically, calculate the hash value of the encrypted data set as the unique identifier: , where is the hash function. Further, the above - calculated encrypted statistical features , and are associated with the metadata tags Bind to form a privacy index entry: .

[0060] This embodiment further discloses a dynamic index update mechanism. When new data is added, the above-mentioned encrypted mean is updated as: ; the encrypted variance is updated as: ; the encrypted quantile is updated as: , , where is the updated original data set.

[0061] Pre-computing and storing the statistical features of encrypted data through the above-generated privacy index that is strongly correlated with the encrypted data allows these features to be directly called for encrypted calculations, avoiding redundant operations of traversing the entire encrypted data, and is particularly suitable for large-scale data real-time analysis scenarios. The privacy index only contains encrypted statistical features and cannot be used to reverse-engineer the original data or the complete plaintext result. For example, the encrypted quantile is calculated by first calculating the plaintext quantile and then encrypting it, avoiding high-overhead sorting operations on the encrypted data, while ensuring the encryption of the features and preventing the leakage of sensitive information. At the same time, the index is bound and stored with the encrypted data set through metadata tags to ensure that the index is strictly consistent with the data version. When new data is added, the index is quickly updated through the incremental update formula without re-encryption or full-scale recalculation, supporting real-time index maintenance of dynamic data streams and reducing system downtime or latency.

[0062] S300: Receive the user's calculation request, perform user permission verification at the same time, and after the permission verification passes, perform encrypted calculations based on the privacy index.

[0063] That is, the calculation in the user dimension of the encrypted calculation is in an encrypted state and will not leak data during the calculation process. Specifically, extract the operation type, permission attribute, and data range based on the calculation request, 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 relevant permission setting of the user, such as user role, department, operation scope, and the data range refers to the encrypted data set and its metadata tags .

[0064] Perform permission verification on the permission attribute based on zero-knowledge proof; specifically, construct a permission expression C according to the user permission attribute. Exemplarily, , where is the permission level corresponding to the user permission attribute, is the department attribute. Generate a proof corresponding to the user, and the attribute of this proof satisfies . When performing permission verification, verify The legitimacy is thus achieved without exposing the user attributes and the original data. If the permission verification passes, the corresponding privacy index is selected according to the operation type. Exemplarily, when the user requests to calculate the variance of the encrypted data set and the permission level L = 2, the user generates a proof , verifies that it satisfies , selects the encrypted variance , and verifies that the metadata label matches the current data set to complete the selection of the privacy index.

[0065] After completing the selection of the privacy index, 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 encrypted calculations on the multiple encrypted data blocks to obtain the encrypted calculation result. Specifically, the encrypted data set is segmented into encrypted data blocks , and the size of each block is dynamically determined according to the GPU memory capacity and the number of threads. Exemplarily, if the data set contains encrypted data items, the size of each block is . Further, a dynamic weight parameter is constructed according to the permission level corresponding to the permission attribute and the complexity corresponding to the operation type. The formula is: , where 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 the noise level , the number of GPU threads is calculated. The formula is: , where is the preset benchmark number of threads, is the preset noise compensation number of threads, is the preset noise threshold. Further, threads are divided into thread groups, and each group is responsible for the calculation of one encrypted data block.

[0066] An adaptive strategy for encrypted calculation is constructed according to the dynamic weight parameter. The adaptive strategy includes a first strategy and a second strategy; the formula for the encrypted calculation of the first strategy is: , where is the encrypted calculation result, is the encrypted feature selected from the privacy index, is the direct calculation result based on the data to be encrypted; the encryption calculation formula of the second strategy is: , where is the noise compensation coefficient, , is the preset noise threshold. Finally, the encryption calculation result is returned to the main process.

[0067] S400: Perform partial homomorphic decryption on the result of the encryption calculation to obtain an intermediate result. Before performing homomorphic decryption, obtain the decryption key and decompose it into shares , where any shares can recover the partial key, but less than shares cannot infer the complete key. The above share sharding formula is: , where , where is a large prime number, , , …, are random coefficients, .

[0068] Furthermore, calculate the number of shares required for homomorphic decryption according to the permission attribute calculation, and the calculation formula is: , where is the permission level corresponding to the user's permission attribute; use shares of the decryption key to recover the required partial decryption key. Exemplarily, if is 5 and the user's permission level is 2, then .

[0069] After the user passes the zero-knowledge proof to verify their permission, the system releases the corresponding shares and uses shares of the partial decryption key to perform partial homomorphic decryption on the result of the encryption calculation in step S300 and generate an intermediate result. Specifically, use shares to recover the partial decryption key through Lagrange interpolation, and the formula is: , where is the Lagrange basis polynomial, and when = 0, recover . Furthermore, use to perform partial decryption on the encryption calculation result and generate an intermediate result , and according to the intermediate result Generate intermediate verification data, the method including a hash verification value and a low-precision approximation value , where , where is a hash function is a homomorphic decryption function , where is a noise compensation coefficient is a preset number of digits

[0070] S500: Send the result of the encrypted calculation to the user through an end-to-end encryption transmission protocol, and verify the accuracy of the result of the encrypted calculation through the intermediate result. Specifically, use the public key of the user to perform secondary encryption on the encrypted calculation result to generate a ciphertext : , where is an asymmetric encryption algorithm to ensure that only the user holding the corresponding private key can decrypt. Combine the ciphertext after secondary encryption, the intermediate result and the message authentication code MAC into a verification pair: . The generation formula of the message authentication code MAC is: , where is a pre-shared authentication key to ensure the integrity of the transmitted data. In this embodiment, the end-to-end encryption transmission protocol is selected according to the specific usage scenario, and the international standard: TLS 1.3 or the domestic standard: the national cipher SM2 / SM4 protocol can be selected

[0071] After the user receives the ciphertext after secondary encryption, use the private key to decrypt it and obtain the decryption result : , where is an asymmetric decryption function. Select the corresponding verification method according to the type of the intermediate verification data. If the intermediate verification data is , then calculate the local verification data for the decrypted : , and then compare and , if they are consistent, it means that is correct. If the intermediate verification data is , then calculate the local verification data for the decrypted : , and then compare and , if they are consistent, it means that Correct. If all verification steps pass, the final confirmation of the accuracy. The user can further decrypt to obtain the plaintext result.

[0072] Therefore, by calculating the intermediate result, it can be ensured that it only contains the partial information required for verification and cannot reverse-infer the original data or the complete plaintext result. The user does not need to fully decrypt, and can verify the correctness of the result only through the intermediate result, preventing the leakage of plaintext data during the verification process.

[0073] In summary, this embodiment ensures the confidentiality of data throughout the process through full homomorphic encryption, synchronously generates a privacy index containing encrypted mean, variance, and quantiles, and strongly binds it to the encrypted dataset through metadata tags to achieve efficient invocation of statistical features; when receiving a calculation request, it verifies whether the user permission attributes are satisfied based on zero-knowledge proof, drives the GPU computing engine to perform encrypted data block calculations in parallel through multi-threading, combines an adaptive strategy to preferentially invoke index features in a low-noise scenario to reduce redundant operations, or introduces a compensation coefficient to correct the result in a high-noise scenario, while real-time monitoring the noise level and dynamically adjusting thread allocation and calculation mode; when performing partial homomorphic decryption on the encrypted result, it uses the threshold sharding technology to allocate decryption shares, calculates the required number of shares according to the user permission level, generates an irreversible intermediate result after restoring part of the key, and transmits the secondarily encrypted ciphertext, the intermediate result, and the MAC code together through an end-to-end encryption protocol. After the user decrypts, it verifies the result accuracy by locally calculating and comparing the hash value or noise compensation parameter, and finally forms a complete closed loop from encrypted index generation, dynamic permission verification, noise-aware calculation to secure transmission and zero-trust verification, solving the pain points of low encryption calculation efficiency, rough permission control, uncontrollable noise accumulation, and the need to expose privacy in traditional solutions. On the premise of ensuring that the original data is not leaked, it realizes high real-time performance, fine-grained permission control, and result reliability in a noise scenario, thus completing real-time data access and privacy calculation based on homomorphic encryption.

[0074] Reference Figure 2 to. This embodiment further discloses a real-time data access and privacy calculation system based on homomorphic encryption, including:

[0075] An encryption module 21, configured to receive data to be encrypted and perform full homomorphic encryption on it to generate an encrypted dataset;

[0076] An index generation module 22, synchronously generating a privacy index associated with the encrypted dataset, including: calculating an encrypted representation of its statistical features according to the encrypted dataset, where the statistical features include encrypted mean, encrypted variance, and encrypted quantiles; the calculation formula of the encrypted mean is: , where is 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 encryption quantile is: , where is the data to be encrypted, is the quantile parameter, is the homomorphic encryption function; Bind and store the encrypted representation of at least one of the statistical features to the encrypted data set uniquely through metadata tags to generate a privacy index;

[0077] The encryption calculation module 23 is used to receive the user's calculation request, perform user permission verification at the same time, and after the permission verification passes, perform encryption calculation based on the privacy index, including: extracting the operation type, permission attribute and data range based on the calculation request; performing permission verification on the permission attribute based on zero-knowledge proof; if the permission verification passes, select the corresponding privacy index according to the operation type; call the encrypted data set corresponding to the privacy index, and perform segmentation on it to obtain multiple encrypted data blocks; call the GPU computing engine to perform multi-threaded encryption calculation on multiple encrypted data blocks to obtain the encryption calculation result. Specifically, construct a dynamic weight parameter according to the permission level corresponding to the permission attribute and the complexity corresponding to the operation type. The formula is: , where, 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; construct an adaptive strategy for encryption calculation according to the dynamic weight parameter. The adaptive strategy includes a first strategy and a second strategy; The formula for the encryption calculation of the first strategy is: , where is the encryption calculation result, is the encrypted feature selected from the privacy index, is the direct calculation result based on the data to be encrypted; The formula for the encryption calculation of the second strategy is: , where, is the noise compensation coefficient, , is the preset noise threshold;

[0078] 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 the decryption secret key , and decomposing it into shares ; Calculate the number of shares required for homomorphic decryption according to the permission attribute, and the calculation formula is , where is the permission level corresponding to the user's permission attribute; Use decryption keys of shares to recover the required partial decryption key; Use the partial decryption key to perform partial homomorphic decryption on the result of the encrypted calculation, and generate an intermediate result;

[0079] The verification module 25 is used to send the result of the encrypted calculation to the user through an end-to-end encryption transmission protocol, and verify the accuracy of the result of the encrypted calculation through the intermediate result, including: using the user's public key to perform secondary encryption on the result of the encrypted calculation, and generating a ciphertext; Select an end-to-end encryption transmission protocol, and send the doubly encrypted ciphertext and the intermediate result to the user together to form a verification pair; Use the private key to decrypt the doubly encrypted ciphertext and generate local verification data; Check whether the local verification data is the same as the intermediate result. If they are the same, the result of the encrypted calculation is correct.

[0080] Figure 3 is a schematic diagram of the physical structure of the electronic device provided by the embodiment of the present invention. As Figure 3 shown, the electronic device 50 includes: a processor 501 (processor), a memory 502 (memory), and a bus 503;

[0081] Among them, the processor 501 and the memory 502 complete communication with each other through 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 embodiments.

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

[0083] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; And the foregoing storage medium includes: various storage media such as ROM, RAM, magnetic disk, or optical disk that can store program codes.

[0084] The device embodiments described above are merely illustrative. 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, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.

[0085] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0086] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within 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 at the same time, and after the authority verification passes, perform encryption calculation based on the privacy index, including: extracting the operation type, authority attribute and data range based on the computing request; performing authority verification on the authority attribute based on zero-knowledge proof; if the authority verification passes, 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 encryption calculation results, including: constructing a dynamic weight parameter 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; Performing 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 attributes, 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 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 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 double-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.

4. 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; The encryption calculation module 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 multiple encrypted data blocks to obtain encryption calculation results, including: constructing a dynamic weight parameter 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; A decryption module 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 attributes, 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 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.

5. 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 3 is implemented.

6. 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 according to any one of claims 1 to 3 is implemented.

7. 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 3 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