Image anti-retrieval processing method and device based on noise attack

By using an image anti-retrieval processing method based on noise attacks, the method automatically adds noise to images and establishes corresponding relationships, solving the problems of high computational resource consumption and manual intervention in image encryption technology, thereby improving processing efficiency and user experience.

CN120893057APending Publication Date: 2025-11-04SUZHOU CHUANGLUTIANXIA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510841923.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing image encryption technologies consume significant computational resources in preventing retrieval and require manual intervention, thus impacting user experience.

Method used

An image anti-retrieval processing method based on noise attack is adopted. By receiving user requests, the original image is automatically obtained and processed using a preset noise model to generate a noisy image. The image correspondence is established to reduce decryption operations and improve processing efficiency.

Benefits of technology

It achieves automated processing, reduces computational complexity, reduces user waiting time, optimizes user experience, and enables batch processing of images while preventing easy retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120893057A_ABST
    Figure CN120893057A_ABST
Patent Text Reader

Abstract

The invention discloses an image anti-retrieval processing method and device based on noise attack, and relates to the technical field of computer vision. In the method, a to-be-noise-added request sent by a user is received, the to-be-noise-added request is processed to obtain an original image, and the to-be-noise-added request is a request for carrying out noise adding processing on the original image; inputting the original image into a preset noise model for processing to obtain a first noise-added image; and establishing a corresponding relationship between the first noise-added image and the original image, storing the corresponding relationship, and sending the first noise-added image to a user, so that the user uploads the first noise-added image. By implementing the technical scheme provided by the invention, some problems of an image encryption technology in anti-retrieval processing are effectively solved, the complexity of manual participation in an encryption process is avoided, the time of waiting for encryption operation completion by a user is shortened, and thus the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer vision technology, specifically to an image anti-retrieval processing method and apparatus based on noise attacks. Background Technology

[0002] The core purpose of image anti-retrieval algorithms is to safeguard the privacy and copyright of images, effectively curbing unauthorized image retrieval and misuse. These algorithms cleverly utilize sophisticated image processing techniques to effectively reduce the recognition and matching capabilities of traditional retrieval algorithms while ensuring that the visual quality of the image is not significantly affected. Currently, mainstream technologies in this field cover multiple aspects, including digital watermarking, image encryption, adversarial sample generation, and steganography.

[0003] Image encryption technology, as a key method, uses symmetric or asymmetric encryption algorithms to encrypt and decrypt image data, aiming to prevent unauthorized access and thus protect the security of sensitive image data. However, the encryption and decryption process usually consumes a large amount of computing resources, and the entire encryption process requires manual intervention. When faced with a large number of images to be processed, the encryption operation can take a long time, thus affecting the user experience.

[0004] Therefore, there is an urgent need for an image anti-retrieval processing method and device based on noise attacks that can solve the above-mentioned technical problems. Summary of the Invention

[0005] This application provides an image anti-retrieval processing method and apparatus based on noise attack. This method effectively solves some problems faced by image encryption technology in anti-retrieval processing, avoids the tediousness of manual encryption process, reduces the time users wait for encryption operation to complete, and thus improves user experience.

[0006] In a first aspect, this application provides an image anti-retrieval processing method based on noise attack, applied in an image processing platform. The method includes: receiving a noise request sent by a user; processing the noise request to obtain an original image, wherein the noise request is a request to add noise to the original image; inputting the original image into a preset noise model for processing to obtain a first noise-added image; establishing a correspondence between the first noise-added image and the original image; storing the correspondence; and sending the first noise-added image to the user so that the user can upload the first noise-added image for processing.

[0007] By adopting the above technical solution, the system receives user requests for noise enhancement and automatically processes these requests to obtain the original image, thus achieving automatic acquisition of the original image and avoiding the tedious manual encryption process. Using a preset noise model to process the original image, the system can quickly generate the first noisy image. This model-based processing method has lower computational complexity compared to traditional image encryption techniques. A correspondence is established between the first encrypted image and the original image; when the original image needs to be verified or recovered later, it can be quickly found through this correspondence without complex decryption operations, reducing computational resource consumption. The automated processing flow and preset noise model allow for batch processing of a large number of original images, significantly improving processing efficiency. By quickly generating the first noisy image and sending it to the user, the user's waiting time for encryption operations to complete is reduced. Users can directly upload the first noisy image for subsequent processing without worrying about the image being easily retrieved, thereby optimizing the user experience.

[0008] Optionally, before inputting the original image into the preset noise model for processing to obtain the first noisy image, the preset noise model needs to be constructed. Specifically, this includes: acquiring a sample image; generating a first noise image with the same target size based on random noise and learnable noise parameters, where the target size is the size corresponding to the sample image; adding the first noise image to the sample image to obtain the second noisy image; training the sample image using the initialization model until the target loss value between the output second noisy image and the sample image reaches the preset condition, ending the training, and using the initialization model at the end of the training as the preset noise model.

[0009] By employing the above technical solution, a first noisy image with the same size as the target image (i.e., the sample image size) is generated by combining random noise and learnable noise parameters. This ensures that the generated noisy image not only matches the size of the sample image but also adaptively adjusts its noise characteristics through learnable parameters to better simulate or enhance the noise in the sample image. The first noisy image is added to the sample image to obtain a second noisy image. The initialization model is then used to train the sample image, and the model parameters are continuously optimized until the target loss value between the output second noisy image and the sample image reaches a preset condition. During this process, the model gradually learns how to generate a noisy image that matches the sample image. When training ends, the resulting model serves as the preset noise model, capable of effectively generating a noisy image with the same size as the target image and conforming to a specific noise distribution.

[0010] Optionally, a first noise image with the same size as the target is generated based on random noise and learnable noise parameters. Specifically, this includes: obtaining a learnable noise parameter matrix with the same size as the target, wherein the element values ​​in the learnable noise parameter matrix are randomly sampled from a Gaussian distribution; generating a random noise matrix based on the target size; obtaining a target noise control factor from a noise control factor library, multiplying each element value in the random noise matrix with the target noise control factor to obtain an adjusted random noise matrix; and adding the adjusted random noise matrix to the learnable noise parameter matrix to obtain the first noise image.

[0011] By employing the above technical solution, a learnable noise parameter matrix is ​​constructed by randomly sampling element values ​​from a Gaussian distribution. This solution provides high flexibility for noise generation. By introducing a noise control factor and multiplying it by each element in the random noise matrix, fine control of noise intensity is achieved. The introduction of the learnable noise parameter matrix means that noise characteristics can be optimized during the training process. The addition operation between the adjusted random noise matrix and the learnable noise parameter matrix further enhances the diversity and complexity of noise, enabling effective generation and processing of noisy images.

[0012] Optionally, the preset conditions include a first condition: training the sample image using an initialization model until the target loss value between the output second noisy image and the sample image reaches the preset condition. Specifically, this includes: inputting the second noisy image into the target deep learning model for extraction to obtain target features; performing classification prediction based on the target features to obtain a predicted image; calculating the predicted image and the sample image using a loss function to obtain a first loss value, and outputting the first loss value as the target loss value; determining whether the first loss value is greater than a preset first loss value; and determining that the target loss value between the second noisy image and the sample image satisfies the first condition when the first loss value is greater than the preset first loss value.

[0013] By employing the above technical solution, the second noisy image is input into a deep learning model for training. The model extracts useful features from the second noisy image and uses these extracted target features to classify the image. The difference between the predicted image and the sample image is calculated using a loss function, which quantifies the model's predictive performance. When the first loss value is greater than a preset first loss value, it indicates that the preset noisy model has met the conditions for training termination. The loss function serves as the basis for judging whether the target loss value between the second noisy image and the sample image meets specific conditions.

[0014] Optionally, after determining whether the first loss value is greater than a preset first loss value, the method further includes: when the first loss value is less than or equal to the preset first loss value, determining that the target loss value between the second noisy image and the sample image does not meet the first condition; adjusting the learnable noise parameters and random noise according to the first loss value to obtain the first noise parameters and the first random noise; generating a second noise image with the same size as the target image according to the first noise parameters and the first random noise; adding the second noise image to the sample image to obtain a third noisy image; and then using the initialization model to train the sample image until the target loss value between the output third noisy image and the sample image reaches the first condition, and ending the training.

[0015] By employing the above technical solution, when the first loss value is greater than or equal to the preset first loss value, it indicates that the difference between the second noisy image generated by the current noise parameters and the sample image is significant, and the performance of the preset noise model still has room for improvement. By adjusting the learnable noise parameters and random noise, and regenerating the third noisy image for training, this difference can be gradually reduced, thereby improving the performance of the preset noise model. By continuously adjusting the noise parameters, the preset noise model can learn how to generate a third noisy image that better matches the sample image, thus avoiding the situation where the target deep learning model extracts the third noisy image and retrieves the sample image based on the extracted features.

[0016] Optionally, the preset conditions also include a second condition: training the sample image using an initialization model until the target loss value between the output noisy second image and the sample image reaches the preset condition. Specifically, this includes: inputting the noisy second image into a feature extractor to extract a first feature vector; inputting the sample image into a feature extractor to extract a second feature vector; performing cosine loss calculation on the first and second feature vectors to obtain a second loss value; performing mean squared error loss calculation on the first and second feature vectors to obtain a third loss value; determining whether the second loss value is less than a preset second loss value and whether the third loss value is less than a preset third loss value; when the second loss value is less than the preset second loss value and the third loss value is less than the preset third loss value, determining that the target loss value between the noisy second image and the sample image satisfies the second condition.

[0017] By employing the above technical solution, based on the feature extractor, corresponding feature vectors (first feature vector and second feature vector) can be extracted from the second noisy image and the sample image. Cosine loss is used to measure the directional difference between the two feature vectors. Since the cosine value is only related to the angle between the vectors and not to their magnitude, cosine loss can more accurately reflect the similarity between feature vectors; mean squared error loss is used to measure the numerical difference between the two feature vectors. Simultaneously calculating cosine loss and mean squared error loss allows for comparison and analysis of feature vectors from two different perspectives, resulting in a more comprehensive and accurate evaluation. During the initial model training process, by continuously adjusting the noise parameters and training strategy, the difference in feature vectors between the second noisy image and the sample image can be gradually reduced. When the second loss value is less than the preset second loss value, and the third loss value is less than the preset third loss value, it indicates that the training effect of the preset noise model has reached the expected goal.

[0018] Optionally, after determining whether the second loss value is less than a preset second loss value and whether the third loss value is less than a preset third loss value, the method further includes: when the second loss value is greater than or equal to the preset second loss value and the third loss value is greater than or equal to the preset third loss value, determining that the target loss value between the second noisy image and the sample image does not meet the second condition; adjusting the learnable noise parameter and random noise according to the second loss value and the third loss value to obtain the second noise parameter and the second random noise; generating a third noise image with the same size as the target image according to the second noise parameter and the second random noise; adding the third noise image to the sample image to obtain the fourth noisy image; and then using the initialization model to train the sample image until the target loss value between the output fourth noisy image and the sample image reaches the second condition, and ending the training.

[0019] By adopting the above technical solution, when neither the second nor the third loss value meets the preset conditions, it indicates that the third noisy image generated by the current noise parameters differs significantly from the sample image in the feature space. Training is then conducted by adjusting the learnable noise parameters and random noise, and regenerating the fourth noisy image. During training, when adding noise values ​​to the sample image, it is necessary to ensure that the feature distribution between the sample image and the fourth noisy image is altered, while still maintaining similar visual quality between the sample image and the fourth noisy image.

[0020] A second aspect of this application provides an image anti-retrieval processing device based on noise attacks. The device is an image processing platform, which includes a receiving unit, a processing unit, and a sending unit. The receiving unit receives a noise request sent by a user, processes the noise request, and obtains an original image. The noise request is a request to add noise to the original image. The processing unit inputs the original image into a preset noise model for processing to obtain a first noise-added image. The sending unit establishes a correspondence between the first noise-added image and the original image, stores the correspondence, and sends the first noise-added image to the user so that the user can upload the first noise-added image for processing.

[0021] Optionally, the receiving unit is used to acquire the sample image; the processing unit is used to generate a first noise image with the same target size as the sample image based on random noise and learnable noise parameters; the first noise image is added to the sample image to obtain a second noise-added image; the initialization model is used to train the sample image until the target loss value between the output second noise-added image and the sample image reaches a preset condition, the training ends, and the initialization model at the end of the training is used as the preset noise model.

[0022] Optionally, the receiving unit is used to acquire a learnable noise parameter matrix with the same size as the target, wherein the element values ​​in the learnable noise parameter matrix are randomly sampled from a Gaussian distribution; the processing unit is used to generate a random noise matrix according to the target size; the receiving unit is used to acquire a target noise control factor from a noise control factor library, and multiply each element value in the random noise matrix with the target noise control factor to obtain an adjusted random noise matrix; the processing unit is used to add the adjusted random noise matrix to the learnable noise parameter matrix to obtain a first noise image.

[0023] Optionally, the processing unit is used to input the second noisy image into the target deep learning model for extraction to obtain target features; perform classification prediction based on the target features to obtain a predicted image; calculate the first loss value by using a loss function on the predicted image and the sample image to obtain a first loss value, and output the first loss value as the target loss value; determine whether the first loss value is greater than a preset first loss value; when the first loss value is greater than the preset first loss value, determine that the target loss value between the second noisy image and the sample image satisfies the first condition.

[0024] Optionally, the processing unit is configured to determine that the target loss value between the second noisy image and the sample image does not meet the first condition when the first loss value is less than or equal to the preset first loss value; adjust the learnable noise parameters and random noise according to the first loss value to obtain the first noise parameters and the first random noise; generate a second noisy image with the same size as the target image according to the first noise parameters and the first random noise; add the second noisy image to the sample image to obtain a third noisy image; and then use the initialization model to train the sample image until the target loss value between the output third noisy image and the sample image reaches the first condition, and then end the training.

[0025] Optionally, the processing unit is used to input the second noisy image into the feature extractor for extraction to obtain a first feature vector; input the sample image into the feature extractor for extraction to obtain a second feature vector; perform cosine loss calculation on the first feature vector and the second feature vector to obtain a second loss value; perform mean square error loss calculation on the first feature vector and the second feature vector to obtain a third loss value; determine whether the second loss value is less than a preset second loss value and whether the third loss value is less than a preset third loss value; when the second loss value is less than the preset second loss value and the third loss value is less than the preset third loss value, determine that the target loss value between the second noisy image and the sample image satisfies the second condition.

[0026] Optionally, the processing unit is configured to determine that the target loss value between the second noisy image and the sample image does not meet the second condition when the second loss value is greater than or equal to a preset second loss value and the third loss value is greater than or equal to a preset third loss value; adjust the learnable noise parameter and random noise according to the second loss value and the third loss value to obtain the second noise parameter and the second random noise; generate a third noise image with the same size as the target image according to the second noise parameter and the second random noise; add the third noise image to the sample image to obtain the fourth noisy image; and then train the sample image using the initialization model until the target loss value between the output fourth noisy image and the sample image reaches the second condition, and end the training.

[0027] In a third aspect, this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory, causing the electronic device to perform any of the methods described above in this application.

[0028] In a fourth aspect, this application provides a computer-readable storage medium storing instructions that, when executed, perform any of the methods described above in this application.

[0029] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Receive user requests for noise enhancement and automatically process the requests to obtain the original image, thus avoiding the tedious manual encryption process. Use a preset noise model to process the original image, quickly generating the first noisy image. This model-based processing method has lower computational complexity compared to traditional image encryption techniques. Establish and store the correspondence between the first encrypted image and the original image. When it is necessary to verify or restore the original image later, it can be quickly found through the correspondence without complex decryption operations, reducing the consumption of computing resources. With an automated processing flow and preset noise model, a large number of original images can be processed in batches, significantly improving processing efficiency. By quickly generating the first noisy image and sending it to the user, the user's waiting time for the encryption operation to complete is reduced. Users can directly upload the first noisy image for subsequent processing without worrying about the image being easily retrieved, thereby optimizing the user experience.

[0030] 2. A first noisy image with the same size as the target image (i.e., the sample image size) is generated by combining random noise and learnable noise parameters. This ensures that the generated noisy image not only matches the size of the sample image but also adaptively adjusts its noise characteristics through learnable parameters to better simulate or enhance the noise in the sample image. The first noisy image is added to the sample image to obtain a second noisy image. The initial model is used to train the sample image, and the model parameters are continuously optimized until the target loss value between the output second noisy image and the sample image reaches a preset condition. During this process, the model gradually learns how to generate a noisy image that matches the sample image. When training ends, the resulting model serves as the preset noise model, which can effectively generate a noisy image with the same size as the target image and conforming to a specific noise distribution. Attached Figure Description

[0031] Figure 1 This is a flowchart illustrating an image anti-retrieval processing method based on noise attacks provided in an embodiment of this application; Figure 2 This is a schematic diagram of a scenario for an image anti-retrieval processing method based on noise attacks provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an image anti-retrieval processing device based on noise attack provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0032] Explanation of reference numerals in the attached drawings: 301, receiving unit; 302, processing unit; 303, transmitting unit; 400, electronic device; 401, processor; 402, memory; 403, user interface; 404, network interface; 405, communication bus. Detailed Implementation

[0033] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0034] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0035] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0036] The core purpose of image anti-retrieval algorithms is to safeguard the privacy and copyright of images, effectively curbing unauthorized image retrieval and misuse. These algorithms cleverly utilize sophisticated image processing techniques to effectively reduce the recognition and matching capabilities of traditional retrieval algorithms while ensuring that the visual quality of the image is not significantly affected. Currently, mainstream technologies in this field cover multiple aspects, including digital watermarking, image encryption, adversarial sample generation, and steganography.

[0037] Image encryption technology, as a key method, uses symmetric or asymmetric encryption algorithms to encrypt and decrypt image data, aiming to prevent unauthorized access and thus protect the security of sensitive image data. However, the encryption and decryption process usually consumes a large amount of computing resources, and the entire encryption process requires manual intervention. When faced with a large number of images to be processed, the encryption operation can take a long time, thus affecting the user experience.

[0038] Therefore, how to solve some problems faced by image encryption technology in anti-retrieval processing? This application provides an image anti-retrieval processing method based on noise attacks, applied in an image processing platform. The image processing platform of this application can be a platform that provides anti-retrieval processing for images. Figure 1 This is a flowchart illustrating an image anti-retrieval processing method based on noise attacks provided in an embodiment of this application. (Refer to...) Figure 1 The method includes the following steps S101-S103.

[0039] S101: Receive a noise request sent by the user, process the noise request, and obtain the original image. The noise request is a request to add noise to the original image.

[0040] In step S101 above, the user sends a request to add noise via a client (such as a webpage or app). This request typically includes the path, name, or other identifying information of the original image, as well as the type or parameters of noise addition the user desires. The image processing platform receives the request and performs preliminary verification to ensure the request format is correct and the user has the necessary permissions. Here, "user" refers to the staff member performing anti-retrieval processing on the image. The request is usually sent via HTTP or HTTPS, using the POST or GET method. The processing platform receives and processes the request using a web framework (such as Flask or Django) or an API gateway. Based on the image path or name in the request, the processing platform retrieves the original image from local storage or remote storage (such as cloud storage). If the original image is not pre-stored, it is included in the request to add noise; that is, the original image is compressed and then sent to the processing platform, which performs decompression to obtain the original image. The original image refers to the unprocessed, unprocessed original image.

[0041] S102: Input the original image into the preset noise model for processing to obtain the first noisy image.

[0042] In step S102 above, before inputting the original image into the preset noise model for processing to obtain the first noisy image, the preset noise model needs to be constructed. This includes: acquiring a sample image; generating a first noise image with the same target size as the sample image based on random noise and learnable noise parameters; adding the first noise image to the sample image to obtain the second noisy image; training the sample image using the initialization model until the target loss value between the output second noisy image and the sample image reaches a preset condition, ending the training, and using the initialization model at the end of training as the preset noise model. Specifically, a sample image is acquired from the image database, ensuring that the format, resolution, and color space of the sample image meet the requirements of subsequent processing. If the number of sample images is insufficient or the quality is low, data augmentation techniques (such as rotation, scaling, and cropping) can be used to increase the diversity of samples. The target size corresponding to the sample image is then acquired, i.e., the size of the sample image. Random noise and learnable noise parameters are then used to generate a first noise image with the same target size.

[0043] Furthermore, a first noise image of the same size as the target image is generated based on random noise and learnable noise parameters. Specifically, this includes: obtaining a learnable noise parameter matrix of the same size as the target image, where the element values ​​are randomly selected from a Gaussian distribution; generating a random noise matrix based on the target size; obtaining a target noise control factor from a noise control factor library, multiplying each element value in the random noise matrix by the target noise control factor to obtain an adjusted random noise matrix; and adding the adjusted random noise matrix to the learnable noise parameter matrix to obtain the first noise image. Specifically, the target size is first defined, i.e., the size of the required noise parameter matrix, which is usually consistent with the size of the sample image. A matrix of the same size as the target image is created to store the learnable noise parameters. Using a Gaussian (normal) distribution random number generation method, each element in the matrix is ​​assigned a value randomly selected from a Gaussian distribution. These values ​​will serve as the initial learnable noise parameters. Similarly, a matrix of the same size as the target image is created to store the random noise. Use a random number generator (such as the `randn` function in MATLAB or the `numpy.random.randn` function in Python) to generate a random number for each element in the matrix. These random numbers will form the random noise matrix. Standardize the random noise matrix as needed to ensure its mean is 0 and its variance is 1 (or other specified values). This helps maintain noise consistency during subsequent noise adjustment. Pre-build a library containing various noise control factors. These factors can be parameters used to adjust noise intensity, frequency, shape, etc. Select a target noise control factor Q from the noise control factor library based on specific needs or preset conditions. Apply the selected noise control factor Q to the random noise matrix. This typically involves multiplying each element value in the matrix by the corresponding noise control factor. The noise control factor Q is used to control the noise intensity. By adjusting the value of the noise control factor, which ranges from (0,1), the characteristics of the random noise matrix (such as intensity and frequency) can be changed. The adjusted random noise matrix is ​​then added element-wise to the learnable noise parameter matrix. This step combines random noise and learnable noise parameters to generate a noise image with more complex characteristics. After addition, the pixel values ​​of the noise image are checked to see if they exceed the valid numerical range (e.g., 0-255). If they do, normalization or cropping is required to ensure that the pixel values ​​are within the valid range. After the above processing, the resulting matrix is ​​the first noise image. It combines random noise and learnable noise parameters, offering flexibility and adjustability. After generating the first noise image with the same size as the target image, the dimensions of the first noise image and the sample image are compared to ensure they are the same for pixel-wise addition. Image processing libraries (such as OpenCV, PIL, etc.) are used to add each pixel value of the first noise image to the corresponding pixel value in the sample image.If the summed pixel values ​​exceed the image's color space range (e.g., 0-255), normalization or cropping is required to ensure the pixel values ​​remain within the valid range. This results in a second noisy image, which contains the content of the sample image and the noise pattern of the first noisy image. A suitable initialization model is chosen; this could be a deep learning model such as a Convolutional Neural Network (CNN) or a Generative Adversarial Network (GAN). The sample image and the second noisy image are used as input and output pairs to train the initialization model. A target loss function is defined, which can be the loss value from feature extraction, mean squared error (MSE), cosine loss, etc., used to measure the difference between the model's output (the second noisy image) and the sample image. During training, the model parameters are continuously adjusted using backpropagation and gradient descent to minimize the target loss value. The change in the target loss value is monitored; training ends when the target loss value reaches a preset condition (e.g., less than a certain threshold or converges to a certain range). After training, the parameters of the initialization model are saved as the parameters of the preset noise model. A pre-defined noise model can be used to generate a noisy image of the same size as the target image, or to add noise to new sample images. The performance of the pre-defined noise model can be evaluated, such as by comparing the similarity between the generated noisy image and the real noisy image, or by assessing the model's generalization ability under different noise conditions, to verify the model's effectiveness. Figure 2 As shown.

[0044] Furthermore, since the preset conditions include a first condition and a second condition, the target loss value between the second noisy image and the sample image is calculated sequentially and then compared with a threshold to determine whether the target loss value between the second noisy image and the sample image satisfies both the first and second conditions. Only when the target loss value satisfies both the first and second conditions can the initialization model be determined to have reached the end of training, and the initialization model at the end is then output as the preset noise model. First, it is determined whether the target loss value satisfies the first condition. The initialization model is then used to train the sample image until the target loss value between the output second noisy image and the sample image reaches the preset condition. Specifically, this includes: inputting the second noisy image into the target deep learning model for extraction to obtain target features; performing classification prediction based on the target features to obtain a predicted image; calculating the first loss value by applying a loss function to the predicted image and the sample image to obtain a first loss value, and outputting the first loss value as the target loss value; determining whether the first loss value is greater than the preset first loss value; when the first loss value is greater than the preset first loss value, it is determined that the target loss value between the second noisy image and the sample image satisfies the first condition. Specifically, the second noisy image is obtained by adding noise (such as Gaussian noise, salt-and-pepper noise, etc.) to the sample image. This noise addition increases data diversity and helps prevent overfitting during deep learning model training. The target deep learning model can be a Convolutional Neural Network (CNN), ResNet, VGG, etc., depending on the task requirements and image characteristics. The second noisy image is input into the target deep learning model, and features are extracted through the model's convolutional layers, pooling layers, and other structures. These features can be information such as image edges, textures, and shapes. The extracted feature vectors are usually located at the output of a certain layer of the model; the specific layer chosen depends on the task requirements and model structure. For example, in image classification tasks, the outputs of the last few convolutional layers are often extracted as feature vectors. At the end of the deep learning model, a classifier (such as a fully connected layer + Softmax function) is usually connected for classification prediction. The extracted target features are input into the classifier, and the classifier calculates the predicted image category. At this point, the predicted image refers to the image similar to the second noisy image by performing a similarity search based on the target features. A loss function measures the difference between the predicted image and the sample image. Commonly used loss functions include mean squared error (MSE) and cross-entropy loss. The specific choice depends on the task requirements and image characteristics. The predicted image (the image predicted based on features extracted by the model) and the sample image (the original real image) are input into the loss function to calculate the first loss value. The calculated first loss value is then output as the target loss value for subsequent judgment and processing.The preset first loss value is a threshold used to determine whether the first loss value meets the anti-retrieval requirement. This means that after the target deep learning model extracts features from the second noisy image and then performs a similarity search, the retrieved predicted image should be different from the sample image, thus achieving anti-retrieval. This threshold is usually set based on task requirements and model performance. The first loss value is compared with the preset first loss value. If the first loss value is greater than the preset first loss value, the target loss value between the second noisy image and the sample image is considered to meet the first condition. This indicates that the difference between the predicted image of the target deep learning model and the sample image is significant, preventing the target deep learning model from performing similarity searches on the second noisy image. When the first condition is met, it is also necessary to determine whether the target loss value between the second noisy image and the sample image meets the second condition.

[0045] Furthermore, when the first loss value is less than or equal to a preset first loss value, it is determined that the target loss value between the second noisy image and the sample image does not meet the first condition. The learnable noise parameters and random noise are adjusted based on the first loss value to obtain first noise parameters and first random noise. A second noisy image of the same size as the target image is generated based on the first noise parameters and first random noise. The second noisy image is added to the sample image to obtain a third noisy image. The initialization model is then used to train the sample image until the target loss value between the output third noisy image and the sample image meets the first condition, at which point training ends. Specifically, during training, the calculated first loss value is compared with a preset first loss value (a pre-set threshold). If the first loss value is less than or equal to the preset first loss value, it indicates that the difference between the predicted image of the target deep learning model and the sample image is small, making it impossible to avoid similarity retrieval after extraction of the second noisy image by the target deep learning model. When it is determined that the first loss value does not meet the first condition, further measures are needed to improve the model. Learnable noise parameters are typically dynamically adjusted during model training to generate noise patterns that match the characteristics of the sample images. A small first loss value may indicate that the current noise pattern is ineffective or the noise intensity is inappropriate. Therefore, these parameters need to be adjusted based on the first loss value. Random noise generation usually relies on random seeds or random number generators. During adjustment, the value of the random seed or the parameters of the random number generator can be changed to generate new random noise patterns. Through the above adjustment strategy, new first noise parameters and first random noise are obtained, which are used to generate new noisy images. Using the adjusted first noise parameters and first random noise, a second noise image with the same size as the target sample image is generated. The generated second noise image is pixel-wise added to the original sample image to obtain a new third noisy image. The noisy sample image (i.e., the third noisy image) is trained using an initialization model (which may be a pre-trained model or a model trained from scratch). During training, the model continuously learns how to improve the difference between the predicted result and the real sample image; that is, the greater the difference between the predicted result and the real sample image, the less likely it is that the sample image will be retrieved through similarity retrieval using the third noisy image. During training, the loss value is continuously monitored. When the first loss value decreases to meet the first condition (i.e., greater than the preset first loss value), the initial model is considered to have learned enough information, and the training process can be terminated. If poor model performance or ineffective loss reduction is found during training, it may be necessary to adjust the model structure, optimize the algorithm, learning rate, or other hyperparameters, or add more training data to improve model performance.

[0046] Furthermore, after determining that the first loss value meets the first condition, it is also necessary to determine whether the target loss value between the second noisy image and the sample image meets the second condition. When the target loss value also meets the second condition, the training can end. The initialization model is used to train the sample image until the target loss value between the output second noisy image and the sample image reaches a preset condition. Specifically, this includes: inputting the second noisy image into a feature extractor for extraction to obtain a first feature vector; inputting the sample image into the feature extractor for extraction to obtain a second feature vector; performing cosine loss calculation on the first and second feature vectors to obtain a second loss value; performing mean squared error loss calculation on the first and second feature vectors to obtain a third loss value; determining whether the second loss value is less than a preset second loss value and whether the third loss value is less than a preset third loss value; when the second loss value is less than the preset second loss value and the third loss value is less than the preset third loss value, it is determined that the target loss value between the second noisy image and the sample image meets the second condition. Specifically, the second noisy image is input into the feature extractor. The feature extractor may be a pre-trained convolutional neural network (CNN) or other network structure capable of extracting image features. The feature extractor processes the second noisy image to extract a feature vector that represents the image's characteristics, denoted as the first feature vector. This vector is typically a high-dimensional numerical array containing key information about the image. Similarly, the original sample image is input into the feature extractor, which processes it to extract the corresponding feature vector, denoted as the second feature vector. This vector has the same dimension and format as the first feature vector for subsequent comparison and calculation. Cosine loss is a loss function that measures the similarity between two vectors. It is calculated based on the cosine value between the two vectors; the closer the cosine value is to 1, the more similar the two vectors are; the closer the cosine value is to -1, the less similar the two vectors are. Using the cosine loss formula, the first and second feature vectors are calculated to obtain the second loss value. This value reflects the similarity between the second noisy image and the original sample image in the feature space. Mean Squared Error Loss (MSE) is a commonly used loss function used to measure the difference between predicted and true values. It calculates the average of the squared differences between the predicted and true values. Treating the first and second feature vectors as the predicted and true values ​​respectively, it uses the mean squared error loss formula to calculate the third loss value. This value reflects the numerical difference in feature vectors between the noisy image and the original sample image. During training, preset second and third loss values ​​are typically set as thresholds. These thresholds are used to determine whether the feature similarity and visual quality difference between the current noisy image and the sample image meet specific performance requirements.The calculated second loss value is compared with a preset second loss value, and the third loss value is also compared with a preset third loss value. If the second loss value is less than the preset second loss value, and the third loss value is less than the preset third loss value, then the target loss value between the second noisy image and the sample image is considered to satisfy the second condition. This indicates that the noisy image is dissimilar to the original sample image in the feature space, and the difference in visual quality between the two images is within an acceptable range, meaning there has been no significant change in visual quality. When the target loss value between the second noisy image and the sample image satisfies the second condition, the current noise addition strategy and feature extractor performance can be considered effective. The current training can then be terminated.

[0047] Furthermore, when the second loss value is greater than or equal to the preset second loss value, and the third loss value is greater than or equal to the preset third loss value, it is determined that the target loss value between the second noisy image and the sample image does not meet the second condition; the learnable noise parameter and random noise are adjusted according to the second loss value and the third loss value to obtain the second noise parameter and the second random noise; a third noise image with the same size as the target is generated according to the second noise parameter and the second random noise; the third noise image is added to the sample image to obtain the fourth noisy image; the initialization model is then used to train the sample image until the target loss value between the output fourth noisy image and the sample image reaches the second condition, and the training ends. Specifically, during training, the calculated second loss value (cosine loss) and third loss value (mean squared error loss) are compared with preset second and third loss values ​​(thresholds set in advance based on task requirements and model performance). If the second loss value is greater than or equal to the preset second loss value, and the third loss value is greater than or equal to the preset third loss value, this indicates that the current noisy image and the sample image have significant differences in feature space and visual quality. In other words, the noisy image and the sample image have high similarity, but the visual quality of the image is reduced. This can be understood as a high feature similarity between the noisy image and the sample image, resulting in a significant difference in visual quality. For example, if the sample image contains a trapezoidal shape, adding noise to the sample image yields a noisy image containing a square shape; in this case, the visual quality difference between the sample image and the noisy image is significant. When both of the above conditions are met simultaneously, or if either the second or third loss value is greater than or equal to the preset loss value, it is determined that the target loss value between the second noisy image and the sample image does not satisfy the second condition. This means the current noise addition needs adjustment, i.e., the model needs further training. Based on the magnitudes of the second and third loss values, we can infer the differences between the current noisy image and the sample image. For example, a large cosine loss might indicate a significant directional difference between the noisy image and the sample image in the feature space; a large mean square error loss might indicate a significant difference in visual quality between the noisy image and the sample image. Based on these inferences, we can adjust the learnable noise parameters (such as noise intensity and type) and the generation method of random noise (such as the selection of random seeds and the setting of noise distribution) to generate a noisy image that more closely resembles the characteristics of the sample image. Through the above adjustment strategy, new second noise parameters and second random noise are obtained. These new parameters and noise will be used to generate new noisy images subsequently. Using the adjusted second noise parameters and second random noise, a third noise image with the same size as the target sample image is generated. This noise image will have a noise pattern that more closely resembles the characteristics of the sample image. The generated third noise image is pixel-wise added to the original sample image to obtain a new fourth noisy image.This noisy image will be used for subsequent model training. The initial model is used to train on the sample images. During training, the model continuously learns how to improve the difference between the predicted result and the real sample image; that is, the greater the difference between the predicted result and the real sample image, the less likely it is to be retrieved using the third noisy image for similarity. Changes in the loss value are continuously monitored during training, especially the second and third loss values. These loss values ​​are used to evaluate whether the model performance meets the second condition. When the loss value decreases to meet the second condition (i.e., the second loss value is less than the preset second loss value, and the third loss value is less than the preset third loss value), the model is considered to have learned enough information, and the training process can be terminated. When the second condition is met, the training process ends. At this point, the initial model at the end of training is output as the preset noise model, so that the original image can be processed using the preset noise model to obtain the noisy image.

[0048] After training the initial model through the above training process, training ends when the target loss value between the output noisy image and the sample image reaches a preset condition. The initial model at the end of training is then output as the preset noise model. The image processing platform inputs the original image into the preset noise model. The preset noise model adds noise to the original image according to the noise type and parameters. The noise type includes Gaussian noise, and the parameters include learnable noise parameters, random noise, and noise control factors. After processing, the preset noise model outputs the first noisy image.

[0049] S103: Establish the correspondence between the first noisy image and the original image, store the correspondence, and send the first noisy image to the user so that the user can upload the first noisy image.

[0050] In step S103 above, the image processing platform establishes a correspondence between the first noisy image and the original image. This typically includes their identification information (such as filename, ID, etc.) and possible metadata (such as processing time, noise type, etc.). This correspondence is stored in a database for subsequent querying and management. The processing platform sends the first noisy image to the client either as a file or via a data stream. After receiving the noisy image, the client displays it on the user interface and allows the user to upload it. Since the first noisy image is an image that has undergone anti-retrieval processing, it facilitates the prevention of unauthorized image retrieval and use.

[0051] The above method inputs the original image into a preset noise model for processing to obtain the first noisy image. This avoids the tedious manual encryption process and reduces computational resource consumption, thus improving processing efficiency. To address the issue that current anti-retrieval algorithms cannot avoid similarity retrieval after feature extraction by deep learning models, a noisy image is generated during the training of the preset noise model using random noise and learnable noise parameters. This noisy image is then added to the sample image to obtain the second noisy image. The existing deep learning model is then used to extract features from the second noisy image to obtain a prediction result. The loss value between the prediction result and the sample image is calculated. When the loss value does not meet the first condition, it is determined that the difference between the second noisy image and the sample image is small. The random noise and learnable noise parameters need to be adjusted to generate a new noisy image, and the preset noise model is retrained. This ensures that the second noisy image output by the preset noise model has a large difference from the sample image, thus preventing similarity retrieval after feature extraction by the deep learning model. Meanwhile, while adding noise perturbation to images can fool the recognition system of machine learning models, excessive perturbation can lead to a decrease in image visual quality. To address this issue, a feature extractor is used to extract feature vectors from both the second noisy image and the sample image. Then, a loss calculation is performed between the feature vectors of the sample image and the second noisy image to ensure the loss value remains within a preset range. This alters the characteristic distribution between the sample image and the second noisy image, thereby reducing similarity while maintaining image visual quality.

[0052] This application also provides an image anti-retrieval processing device based on noise attacks. Figure 3 This is a schematic diagram of an image anti-retrieval processing device based on noise attacks provided in an embodiment of this application. (Refer to...) Figure 3 The device is an image processing platform, which includes a receiving unit 301, a processing unit 302, and a sending unit 303.

[0053] The receiving unit 301 receives a noise request sent by the user, processes the noise request, and obtains the original image. The noise request is a request to add noise to the original image.

[0054] The processing unit 302 inputs the original image into a preset noise model for processing to obtain the first noisy image.

[0055] The sending unit 303 establishes a correspondence between the first noisy image and the original image, stores the correspondence, and sends the first noisy image to the user so that the user can upload the first noisy image.

[0056] In one possible implementation, the receiving unit 301 is used to acquire a sample image; the processing unit 302 is used to generate a first noise image with the same target size as the sample image based on random noise and learnable noise parameters; the first noise image is added to the sample image to obtain a second noise-added image; the sample image is trained using an initialization model until the target loss value between the output second noise-added image and the sample image reaches a preset condition, the training ends, and the initialization model at the end of the training is used as the preset noise model.

[0057] In one possible implementation, the receiving unit 301 is used to acquire a learnable noise parameter matrix with the same size as the target, wherein the element values ​​in the learnable noise parameter matrix are randomly sampled from a Gaussian distribution; the processing unit 302 is used to generate a random noise matrix according to the target size; the receiving unit 301 is used to acquire a target noise control factor from a noise control factor library, and multiply each element value in the random noise matrix with the target noise control factor to obtain an adjusted random noise matrix; the processing unit is used to add the adjusted random noise matrix to the learnable noise parameter matrix to obtain a first noise image.

[0058] In one possible implementation, the processing unit 302 is used to input the second noisy image into the target deep learning model for extraction to obtain target features; perform classification prediction based on the target features to obtain a predicted image; calculate the predicted image and the sample image using a loss function to obtain a first loss value, and output the first loss value as the target loss value; determine whether the first loss value is greater than a preset first loss value; when the first loss value is greater than the preset first loss value, determine that the target loss value between the second noisy image and the sample image satisfies a first condition.

[0059] In one possible implementation, the processing unit 302 is configured to determine that the target loss value between the second noisy image and the sample image does not meet the first condition when the first loss value is less than or equal to a preset first loss value; adjust the learnable noise parameter and random noise according to the first loss value to obtain the first noise parameter and the first random noise; generate a second noise image with the same size as the target image according to the first noise parameter and the first random noise; add the second noise image to the sample image to obtain a third noisy image; and then use the initialization model to train the sample image until the target loss value between the output third noisy image and the sample image reaches the first condition, and then end the training.

[0060] In one possible implementation, the processing unit 302 is configured to input the second noisy image into a feature extractor for extraction to obtain a first feature vector; input the sample image into the feature extractor for extraction to obtain a second feature vector; perform cosine loss calculation on the first feature vector and the second feature vector to obtain a second loss value; perform mean square error loss calculation on the first feature vector and the second feature vector to obtain a third loss value; determine whether the second loss value is less than a preset second loss value and whether the third loss value is less than a preset third loss value; when the second loss value is less than the preset second loss value and the third loss value is less than the preset third loss value, determine that the target loss value between the second noisy image and the sample image satisfies a second condition.

[0061] In one possible implementation, the processing unit 302 is configured to determine that the target loss value between the second noisy image and the sample image does not meet the second condition when the second loss value is greater than or equal to a preset second loss value and the third loss value is greater than or equal to a preset third loss value; adjust the learnable noise parameter and random noise according to the second loss value and the third loss value to obtain the second noise parameter and the second random noise; generate a third noise image with the same size as the target image according to the second noise parameter and the second random noise; add the third noise image to the sample image to obtain a fourth noisy image; and then train the sample image using the initialization model until the target loss value between the output fourth noisy image and the sample image reaches the second condition, and end the training.

[0062] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0063] This application also discloses an electronic device. (See reference...) Figure 4 , Figure 4 This application provides a schematic diagram of the structure of an electronic device. The electronic device 400 may include: at least one processor 401, at least one network interface 404, a user interface 403, a memory 402, and at least one communication bus 405.

[0064] The communication bus 405 is used to enable communication between these components.

[0065] The user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.

[0066] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0067] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 402, and by calling data stored in memory 402. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and application requests; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 401 and may be implemented as a separate chip.

[0068] The memory 402 may include random access memory (RAM) or read-only memory. Optionally, the memory 402 may include a non-transitory computer-readable storage medium. The memory 402 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 402 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc. The data storage area may store data involved in the various method embodiments described above. Optionally, the memory 402 may also be at least one storage device located remotely from the aforementioned processor 401.

[0069] like Figure 4As shown, the memory 402, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application for image anti-retrieval processing based on noise attacks.

[0070] exist Figure 4 In the electronic device 400 shown, the user interface 403 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 401 can be used to call the application program stored in the memory 402 for image anti-retrieval processing based on noise attacks. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.

[0071] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0072] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0073] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some service interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.

[0074] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0075] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0076] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0077] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.

Claims

1. An image anti-retrieval processing method based on noise attacks, characterized in that, Applied in an image processing platform, the method includes: Receive a noise request sent by a user, process the noise request to obtain the original image, wherein the noise request is a request to add noise to the original image; The original image is input into a preset noise model for processing to obtain a first noisy image; A correspondence is established between the first noisy image and the original image, the correspondence is stored, and the first noisy image is sent to the user so that the user can upload the first noisy image.

2. The method according to claim 1, characterized in that, Before processing the original image in a preset noise model to obtain the first noisy image, the preset noise model needs to be constructed, specifically including: Acquire sample images; A first noise image with the same target size is generated based on random noise and learnable noise parameters, wherein the target size is the size corresponding to the sample image; The first noisy image is added to the sample image to obtain the second noisy image; The initialization model is used to train the sample image until the target loss value between the output second noisy image and the sample image reaches a preset condition, then the training ends and the initialization model at the end of the training is used as the preset noise model.

3. The method according to claim 2, characterized in that, The step of generating a first noise image of the same size as the target based on random noise and learnable noise parameters specifically includes: Obtain a learnable noise parameter matrix with the same size as the target, wherein the element values ​​in the learnable noise parameter matrix are randomly sampled from a Gaussian distribution; Generate a random noise matrix based on the target size; Obtain the target noise control factor from the noise control factor library, and multiply each element value in the random noise matrix with the target noise control factor to obtain the adjusted random noise matrix; The adjusted random noise matrix is ​​added to the learnable noise parameter matrix to obtain the first noise image.

4. The method according to claim 2, characterized in that, The preset conditions include a first condition, wherein training the sample image using an initialization model until the target loss value between the output noisy second image and the sample image reaches the preset condition specifically includes: The second noisy image is input into the target deep learning model for extraction to obtain the target features; Based on the target features, a classification prediction is performed to obtain a predicted image; The predicted image and the sample image are calculated using a loss function to obtain a first loss value, and the first loss value is output as the target loss value. Determine whether the first loss value is greater than a preset first loss value; When the first loss value is greater than the preset first loss value, it is determined that the target loss value between the second noisy image and the sample image satisfies the first condition.

5. The method according to claim 4, characterized in that, After determining whether the first loss value is greater than a preset first loss value, the method further includes: When the first loss value is less than or equal to the preset first loss value, it is determined that the target loss value between the second noisy image and the sample image does not satisfy the first condition; The learnable noise parameter and the random noise are adjusted based on the first loss value to obtain the first noise parameter and the first random noise; A second noise image with the same size as the target is generated based on the first noise parameters and the first random noise. The second noisy image is added to the sample image to obtain the third noisy image; The initialization model is then used to train the sample image until the target loss value between the output third noisy image and the sample image reaches the first condition, at which point the training ends.

6. The method according to claim 4, characterized in that, The preset condition further includes a second condition, wherein training the sample image using the initialization model until the target loss value between the output noisy second image and the sample image reaches the preset condition specifically includes: The second noisy image is input into a feature extractor for extraction to obtain a first feature vector; The sample image is input into the feature extractor for extraction to obtain a second feature vector; A second loss value is obtained by performing a cosine loss calculation on the first feature vector and the second feature vector. The mean squared error loss is calculated on the first feature vector and the second feature vector to obtain the third loss value; Determine whether the second loss value is less than a preset second loss value, and whether the third loss value is less than a preset third loss value; When the second loss value is less than the preset second loss value and the third loss value is less than the preset third loss value, it is determined that the target loss value between the second noisy image and the sample image satisfies the second condition.

7. The method according to claim 6, characterized in that, After determining whether the second loss value is less than a preset second loss value and whether the third loss value is less than a preset third loss value, the method further includes: When the second loss value is greater than or equal to the preset second loss value, and the third loss value is greater than or equal to the preset third loss value, it is determined that the target loss value between the second noisy image and the sample image does not satisfy the second condition; The learnable noise parameter and the random noise are adjusted based on the second loss value and the third loss value to obtain the second noise parameter and the second random noise; A third noise image with the same size as the target is generated based on the second noise parameters and the second random noise. The third noisy image is added to the sample image to obtain the fourth noisy image; The initialization model is then used to train the sample image until the target loss value between the output fourth noisy image and the sample image reaches the second condition, at which point the training ends.

8. An image anti-retrieval processing device based on noise attack, characterized in that, The device is an image processing platform, which includes a receiving unit (301), a processing unit (302), and a sending unit (303). The receiving unit (301) receives a noise request sent by the user, processes the noise request, and obtains the original image. The noise request is a request to add noise to the original image. The processing unit (302) inputs the original image into a preset noise model for processing to obtain a first noisy image; The sending unit (303) establishes a correspondence between the first noisy image and the original image, stores the correspondence, and sends the first noisy image to the user so that the user can upload the first noisy image.

9. An electronic device, characterized in that, The device includes a processor (401), a memory (402), a user interface (403), and a network interface (404). The memory (402) is used to store instructions. The user interface (403) and the network interface (404) are used to communicate with other devices. The processor (401) is used to execute the instructions stored in the memory (402) to cause the electronic device (400) to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.