CN-122020723-A - Image content auditing method based on GPU in privacy protection application scene
Abstract
The invention discloses a GPU-based image content auditing method in a privacy protection application scene, and belongs to the field of image content auditing. The method comprises the steps of encrypting an original image by a user side and locally operating an audit model, generating a first certificate, performing calculation and decomposition on the model into a plurality of zero knowledge proof sub-protocols, performing parallel acceleration by using a GPU, proving that a model result is derived from the original image, generating a second certificate, performing addition semi-homomorphic encryption based on an elliptic curve ElGamal, proving that an encrypted image is derived from the original image by using a random number in the first certificate and a multi-linear expansion value of the original image, transmitting the encrypted image, the model result and the two certificates to a server side for verification, and forwarding the encrypted image to a target user after the verification is performed to complete image content audit. The invention completes the content auditing under the premise of not revealing the original image, shortens the proving time to an acceptable range through GPU acceleration, and is suitable for the scenes of privacy protection, such as instant messaging and the like.
Inventors
- WANG ZONGHUI
- CHEN YUXUN
- LU TAO
- CHEN WENZHI
Assignees
- 浙江大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260415
Claims (9)
- 1. The image content auditing method based on the GPU in the privacy protection application scene is characterized by comprising the following steps of: The client encrypts the original image to obtain an encrypted image, and meanwhile, the original image passes through a preset neural network model to obtain a model operation result; the client generates a first certificate and a second certificate, wherein the generation process of the first certificate comprises the steps of decomposing the calculation process of a preset neural network model into a plurality of zero knowledge proving sub-protocols, and utilizing a GPU (graphics processing Unit) to accelerate the plurality of zero knowledge proving sub-protocols in parallel, wherein the calculation result of the proving model is calculated by the original image through the preset neural network model; the generation process of the second certification comprises the steps of calculating an encryption result of the original image multi-linear expansion value by utilizing the original image multi-linear expansion value obtained in the generation process of the first certification based on an addition semi-homomorphic encryption algorithm, calculating the multi-linear expansion value of the encrypted image at the random number by utilizing the random number obtained in the generation process of the first certification, and then verifying that the multi-linear expansion value of the encrypted image is equal to the encryption result of the original image multi-linear expansion value by proving that the encrypted image is obtained by encrypting the original image; the client sends the encrypted image, the model operation result, the first certificate and the second certificate to the server, the server verifies the first certificate and the second certificate, and if the verification is passed and the model operation result meets the preset compliance condition, the encrypted image is forwarded to the target user, so that the image content auditing is completed.
- 2. The method according to claim 1, wherein the generating of the first certificate further comprises integer quantizing weights and input/output data of a predetermined neural network model to obtain quantized integer data, and executing a plurality of zero knowledge proof sub-protocols based on the quantized integer data.
- 3. The GPU-based image content auditing method of claim 1, wherein the plurality of zero-knowledge proof sub-protocols at least includes a sum check protocol, a warp assessment protocol, a zero-knowledge multidimensional convolution protocol, a logarithmic derivative lookup protocol, a GKR protocol, a special matrix multiplication protocol, and a polynomial commitment protocol; The parallel acceleration of the zero knowledge proof sub-protocols by using the GPU comprises parallelizing a parallel computing part in each zero knowledge proof sub-protocol by adopting CUDA programming and performing memory access optimization by using a shared memory.
- 4. The GPU-based image content auditing method of claim 3, wherein the parallel acceleration of the plurality of zero knowledge proof sub-protocols with a GPU further comprises at least one parallel computing mode of: The reduced half-rule mode is used for carrying out parallel calculation on zero knowledge proving sub-protocols requiring sum rule in a shared memory by adopting a reduced half-rule method, synchronizing after each calculation and gradually reducing the number of half threads; the prefix and the mode are used for parallelly calculating the power sequence of the random number on the GPU by adopting the prefix and the algorithm for the zero knowledge proof sub-protocol of the power sequence to be constructed; And the batch processing mode is used for carrying out parallel processing on zero knowledge proof sub-protocols which need to carry out parallel processing on large batch data, splitting the data into a plurality of batches, and distributing independent CUDA thread blocks for each batch for parallel processing.
- 5. A GPU-based image content auditing method according to claim 3, in which the GPU acceleration of the log derivative lookup protocol comprises: in the outer circulation, use is made of Updating the multi-linear expansion value of the Lagrangian kernel in parallel by each thread, wherein Is a cycle number; in an inner nested and check cycle, simultaneously utilizing Updating the Lagrangian kernel of the current loop by each thread, and The individual threads update the Lagrangian kernel required for the next outer loop, where Is a nested cycle number; When the data size exceeds the GPU video memory capacity, splitting the data into a plurality of subsets to be respectively proved, and merging the results.
- 6. The GPU-based image content auditing method according to claim 5, wherein the GKR protocol GPU acceleration comprises: Merging the certificates of the plurality of maximum pooling units by adopting a batch GKR protocol, and utilizing in each round of the outer layer circulation The two threads complete the data preparation of two stages in parallel, synchronously update the multi-linear expansion value in the embedded and check cycle, and finally update the multi-linear expansion value of the multiplication relation needed by the next round by the same number of threads, wherein, In order to be a cycle number, Is the number of batches.
- 7. The GPU-based image content auditing method of claim 6, wherein the GPU acceleration of the polynomial commitment protocol comprises: Performing batch processing on the linear time coding protocol, and performing transposition and sparse format storage on the matrix, and performing parallel computation on sparse matrix multiplication by using a CUDA thread; Batch processing is carried out on the merck tree protocol, the hash values of adjacent data are calculated in parallel by utilizing a shared memory and double-buffer technology, and the merck tree is constructed through a recursion protocol.
- 8. The GPU-based image content auditing method according to claim 1, wherein the additive semi-homomorphic encryption algorithm is an elliptic curve ElGamal encryption algorithm, and the second proof generating process further comprises: Carrying out elliptic curve ElGamal encryption on each pixel point of an original image in parallel by using a GPU to obtain an encrypted image; Based on the random number obtained in the first proving process, adopting a reduced-half rule method, and utilizing a GPU to calculate a multi-linear expansion value of the encrypted image at the random number in parallel; The encrypted image is proved to be encrypted by the original image by proving that the encrypted image is equal to the encryption result of the multi-linear expansion value of the original image.
- 9. A GPU-based image content auditing apparatus in a privacy preserving application scenario, comprising a memory and a processor, the memory being configured to store a computer program, wherein the processor is configured to implement the GPU-based image content auditing method in a privacy preserving application scenario according to any one of claims 1-8 when the computer program is executed.
Description
Image content auditing method based on GPU in privacy protection application scene Technical Field The invention belongs to the field of image content auditing, and particularly relates to a GPU-based image content auditing method in a privacy protection application scene. Background With the rapid development of information technology, data is not only static record, but also a core engine for driving new generation technical innovation such as artificial intelligence, big data analysis, intelligent decision and the like. The image is used as a data form with extremely high information density, and is a main carrier for users to record life, spread resources and other events. However, with the large-scale explosion and growth of image data, important challenges are brought to the privacy protection of images, and meanwhile, great requirements are also brought to the verification of illegal contents of the images. Taking the scene of user communication software as an example, there is a great contradiction between image privacy protection and image content auditing. For example, in existing communication software, a user wants to send an image to another user, and at this time, the software side needs to undertake a task of checking the content of the image, and if an illegal image needs to stop the transmission and propagation of the image in time. At present, model automatic auditing or manual auditing is generally adopted for image content auditing, and is widely adopted due to the low-cost characteristic of the model automatic auditing, but the image content auditing model needs to be in direct contact with an original image, so that the privacy of a user can be revealed. Therefore, the software platform side transmits the encrypted image and the user at the other side decrypts and views the encrypted image, so that a reasonable mode is realized. However, existing image content review schemes do not support review of encrypted images. Therefore, the user privacy protection and the image content auditing become a pair of contradictory problems. In addition, the current image content auditing schemes based on deep learning only can support the content auditing of a plaintext image, and the auditing of an encrypted image is not mature, so that when the contradiction problems of privacy protection and image content auditing are faced, an effective solution is difficult to put forward. Zero-Knowledge Proof of Proof (ZKP) is a cryptographic protocol that allows a prover (prover) to prove to a verifier (verifier) that a statement is correct without revealing any critical original information, simply to prove that it knows a secret itself, but without revealing the contents of the secret itself. The core of the verifiable neural network (Verifiable Neural Network, VNN) is to provide a cryptographic or formal proof for the computational process or input/output results of the neural network, so that any verifier can be sure that the computational process is performed correctly and meets specific constraints, without having to verify that he or she re-runs the entire neural network to perform the verification. Through the above research, it can be known that the zero-knowledge proof can be used as a reliable and safe proof scheme for verifying the neural network, and the prover can prove the correctness of the output result of the neural network to the verifier on the premise of not revealing the weight parameters or the input of the neural network. Although some efficient attestation protocols currently exist for verifiable neural network research based on zero-knowledge attestation, most of these attestation protocols currently have only some simple implementation on a CPU, while existing neural networks tend to run on a GPU, which would result in verifiable neural network solutions based on zero-knowledge attestation proving for much longer time than the neural network. For example, in the above scenario, sending an image may require a proofing time of up to tens of seconds or even minutes, which is unacceptable in practical applications. How to accelerate verifiable neural network schemes based on zero knowledge proof with GPUs has become a challenge. In addition, for the process of proving that the encrypted image is derived from the original image, the process not only requires that the related proving can be completed, but also cannot reveal the information of the original image, otherwise, the verifiable neural network scheme based on zero knowledge proving can be abandoned. Therefore, the task of proving that a dense image is derived from an original image and does not leak the information of the original image by using a zero knowledge proof technology or other technologies is also to be solved. Disclosure of Invention The invention provides a GPU-based image content auditing method in a privacy protection application scene, which utilizes zero knowledge proof to replace the thought of encryption image a