Privacy protection type image generation method and device based on biological product and medium
Through data desensitization of edge devices and an improved federated learning framework, the problems of privacy leakage and insignificant personalization effect in biological product image generation are solved, and secure and personalized image generation is achieved.
Patent Information
- Application Number
- CN202511196745.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-08-26
AI Technical Summary
The existing technology in the field of biological products image generation has the problems of high risk of user privacy leakage and insignificant personalization effect, making it difficult to achieve personalized image generation while protecting privacy.
Edge devices are used for data desensitization, and hierarchical encryption parameter aggregation is performed through an improved federated learning framework. Personalized generative models are then combined for adversarial training to generate personalized images.
While protecting user privacy, it generates more accurate and personalized images that meet user needs, meeting business confidentiality protection and compliance requirements.
Smart Images

Figure CN120705919A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the interdisciplinary field of image processing and biotechnology, and in particular to a privacy-preserving image generation method, device, and medium based on biological products. Background Art
[0002] Currently, with the development of artificial intelligence (AI), image generation technology is increasingly being used in the fields of biological products, veterinary drugs, and feed additives. To improve the accuracy of product display, scientific research communication, or market promotion, it is often necessary to generate personalized images based on user needs. For example, these include generating regulatory-compliant biological product packaging images, schematic diagrams of feed additive ingredients that match company formulas, and visualization images of biological product experiments that meet R&D needs. Current generation solutions still rely primarily on a centralized training paradigm: users' relevant data must be uploaded from their own devices and centrally stored on the service provider's central server. The service provider then uses this data to train a unified image generation model or fine-tune a basic model for specific users. Users send a generation request, and the central server returns the generated results.
[0003] However, this centralized data collection model has significant flaws in industry applications: on the one hand, the user data that needs to be collected contains a large amount of sensitive information, such as the raw material formula ratio of veterinary drugs, the core ingredient data of feed additives, the experimental research and development data of biological products, etc. These data are corporate trade secrets or technical patents. Centralized storage and processing can easily lead to risks such as formula leakage and infringement of research and development results; at the same time, the experimental data of biological products and the production standards of veterinary drugs may also involve compliance privacy, and centralized processing is difficult to meet data security and compliance requirements.
[0004] Therefore, there is an urgent need for a privacy-preserving image generation method, device, and medium based on biological products, which can achieve safer and more effective personalized image generation while strictly protecting user privacy. Summary of the Invention
[0005] (1) Technical issues to be resolved
[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a privacy-preserving image generation method, device and medium based on biological products, which solves the technical problems in the prior art of high risk of user privacy leakage and insignificant personalization effect.
[0007] (2) Technical solution
[0008] In order to achieve the above objectives, the main technical solutions adopted by the present invention include:
[0009] In a first aspect, an embodiment of the present invention provides a privacy-preserving image generation method based on biological products, wherein an edge device performs the following steps:
[0010] S100: Obtain request information and private data of a target user, desensitize the private data of the target user, obtain desensitized data, and compress the desensitized data to obtain a user feature vector;
[0011] In the S100,
[0012] The private data includes: enterprise user production data, compliance standard data, historical image data and user interaction records;
[0013] The enterprise user production data includes: biological product raw material formula, biological product experimental data; compliance standard data includes data thresholds defined in the target market biological product specifications.
[0014] S200: Input the user feature vector into the improved federated learning framework, perform hierarchical encryption parameter aggregation processing, and obtain encrypted and aggregated parameters;
[0015] S300: Initialize a personalized generation model based on the encrypted and aggregated parameters, and perform adversarial training on the personalized generation model using the target user's request information as a condition to obtain a trained personalized generation model;
[0016] S400: Input the target user's request information into a trained personalized generation model to obtain a final output image.
[0017] Optionally,
[0018] Optionally, in S100, performing local desensitization processing on the private data of the target user, and obtaining the desensitized data includes:
[0019] S110: Desensitizing the enterprise user production data and the compliance standard data using a multi-factor obfuscation algorithm to generate a desensitized identifier; the multi-factor obfuscation algorithm generates the desensitized identifier by fragmenting and obfuscating the enterprise user production data and the compliance standard data and adding noise;
[0020] S120, performing feature extraction and desensitization mapping on the historical image data based on content-aware hashing technology to obtain a desensitization mapping result;
[0021] S130, obtaining the user's preference for image elements based on the historical image data and user interaction records; and performing dimensionality reduction and generalization processing on the preference for the image elements using a preference matrix decomposition model to obtain generalized preference data;
[0022] The image elements include: product category, compliance feature labeling location, technical parameter display mode, and safety warning display category;
[0023] S140: Associating and integrating the desensitized identifier, the desensitized mapping result, and the preference data after generalization processing to obtain desensitized data.
[0024] Optionally, the S120 includes:
[0025] S121, converting the historical image data from the original RGB color space to a YUV color space, and separating the brightness component;
[0026] S122, performing discrete cosine transform on the brightness component to convert the image into frequency domain and obtain a frequency domain coefficient matrix;
[0027] S123, removing high-frequency detail coefficients in the frequency domain coefficient matrix, retaining low-frequency coefficients, and quantizing the low-frequency coefficients to map continuous low-frequency coefficients into discrete binary sequences;
[0028] S124. Encrypt the binary sequence using a salted hash function to generate a desensitizing mapping result.
[0029] Optionally, in S130, obtaining the user's preference for image elements according to the historical image data and the user interaction record includes:
[0030] S131, preprocessing the historical image data to obtain image elements of each image;
[0031] S132. Obtaining the user's preference for each image element based on weighted fusion according to the image elements of each image and the user interaction record;
[0032] The user interaction records include: user browsing time, click frequency, collection operations and sharing behaviors.
[0033] Optionally, in S130, the preference matrix decomposition model is a model based on probability matrix decomposition, and using the preference matrix decomposition model to perform dimensionality reduction and generalization processing on the preference degree of the image element, and obtaining the preference data after generalization processing includes:
[0034] S133. Constructing a preference relationship matrix between users and image elements based on the user's preference for each image element;
[0035] S134, using a probabilistic matrix decomposition model to decompose the preference relationship matrix into a user feature matrix and an image element feature matrix, and performing cluster analysis on the decomposed user feature matrix and image element feature matrix to obtain category information;
[0036] S135 . Reconstruct the user's preference data according to the category relationship to obtain generalized preference data.
[0037] Optionally, in S200, the improved federated learning framework includes a first encryption layer, a second encryption layer, a third encryption layer, and an aggregation layer;
[0038] The first encryption layer uses a homomorphic encryption algorithm to encrypt the user feature vector to obtain a first-layer encryption parameter;
[0039] The second encryption layer injects noise into the first layer encryption parameters through a differential privacy mechanism to obtain the encryption parameters after adding noise;
[0040] The third encryption layer divides the encryption parameters after adding noise into multiple parameter slices, and distributes the parameter slices to multiple aggregation nodes;
[0041] The aggregation layer includes multiple aggregation nodes, which perform secure multi-party computing, aggregate multiple parameter shards and generate encrypted aggregated parameters.
[0042] Optionally, in S300, the personalized generation model includes a generator and a discriminator; and the adversarial training includes:
[0043] The generator generates a candidate image according to the encrypted and aggregated parameters and the target user's request information;
[0044] The discriminator discriminates the candidate image and the real image to generate a discrimination result; and based on the discrimination result, updates the parameters of the generator through a back propagation algorithm until the candidate image generated by the generator can make the discrimination accuracy of the discriminator higher than a preset threshold.
[0045] In a second aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein:
[0046] The memory is used to store computer programs;
[0047] The processor is configured to execute the computer program to implement the above-mentioned privacy-preserving image generation method based on biological products.
[0048] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is used to implement the privacy-preserving image generation method based on biological products as described above.
[0049] (3) Beneficial effects
[0050] The beneficial effects of the present invention are as follows: the privacy-preserving image generation method, device and medium based on biological products of the present invention, because edge devices are used to perform desensitization processing and feature extraction of user data, and hierarchical encryption parameter aggregation is performed through an improved federated learning framework. Compared with the existing technology, it can fully protect user privacy. It uses the user's personalized data to train the generation model to generate more accurate personalized images that meet customer needs, thereby achieving the effect of both ensuring user data security and generating high-quality images that meet user personalized needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The figure is a flowchart of a privacy-preserving image generation method based on biological products according to an embodiment of the present invention.
[0052] Figure 2 This is a flowchart of performing local desensitization processing on private data according to an embodiment of the present invention;
[0053] Figure 3 Schematic diagram of the process of feature extraction and desensitization mapping of the historical image data based on content-aware hashing technology in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.
[0055] Against the backdrop of the rapid development of AI-powered image generation technology, the demand for image generation based on personalized enterprise data is growing in the biopharmaceutical industry. This demand is primarily reflected in regulatory compliance images, such as veterinary drug labels and feed additive packaging, technical images, such as visualizations of biopharmaceutical labs, and transactional images, such as the generation of multilingual labels for imported and exported products. However, existing technologies for achieving industry data-driven image generation face a core contradiction: balancing privacy protection, regulatory compliance, and personalized results.
[0056] On the one hand, if private corporate data, such as commercial secrets such as biological product raw material formulas, are directly uploaded for image generation, it is very easy to lead to the leakage of commercial secrets or the abuse of compliance data; on the other hand, if traditional desensitizing technology or a simple federated learning framework is used, it is often difficult to effectively utilize the company's personalized features while protecting privacy due to insufficient extraction of industry data features or the encryption mechanism is not adapted to the differences in industry data sensitivity. As a result, the generated images either do not meet industry compliance requirements or are not sufficiently aligned with corporate needs.
[0057] To address these issues, this application proposes a privacy-preserving image generation method, device, and medium based on biological products. This method uses edge devices to perform targeted desensitization of industry data, implements layered encryption parameter aggregation through an improved federated learning framework, and combines it with a personalized generative model for adversarial training. This technical solution not only avoids the risk of leakage of corporate private data and compliance information, but also fully utilizes the personalized characteristics and compliance rules of industry data, ultimately achieving the technical effects of protecting trade secrets, meeting industry compliance requirements, and improving the alignment of generated images with corporate needs.
[0058] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0059] Figure 1 FIG. 1 is a flow chart of a privacy-preserving image generation method based on biological products according to an embodiment of the present application. Figure 1 As shown, the privacy-preserving image generation method based on biological products includes:
[0060] Step S100: Obtain the target user's request information and private data, desensitize the target user's private data, obtain the desensitized data, and compress the desensitized data to obtain a user feature vector;
[0061] In step S100, private data includes: enterprise user production data, compliance standard data, historical image data, and user interaction records;
[0062] Enterprise user production data includes: biological product raw material formula, biological product experimental data; compliance standard data includes data thresholds specified in the biological product specifications for the target market.
[0063] In step S100, the private data of the target user is locally desensitized, and the desensitized data obtained includes (such as Figure 2 shown):
[0064] Step S110: Desensitize the enterprise user production data and compliance standard data using a multi-factor obfuscation algorithm to generate a desensitized identifier. The multi-factor obfuscation algorithm generates the desensitized identifier by fragmenting and obfuscating the enterprise user production data and compliance standard data and adding noise.
[0065] For example, suppose the company's production data is the formula ratio of recombinant protein raw materials and cell culture experimental data, specifically: recombinant protein A: 35%, adjuvant B: 15%, stabilizer C: 5%, buffer D: 45%, fifth-generation cell survival rate 92%, and fermentation temperature 37.5°C.
[0066] Obfuscation: Industry-standard codes and interval symbols are introduced to obfuscate the segmented fragments. For formula ratio fragments, specific names are replaced with ingredient classification codes, such as recombinant protein A replaced with P1 and adjuvant B replaced with A2. The exact ratio is converted to an interval range, such as recombinant protein A: 35% becomes P1: 30%-40%. For experimental data fragments, descriptions are replaced with parameter codes, such as cell viability replaced with S5 and fermentation temperature replaced with T3, and the values are fuzzified.
[0067] Adding noise: Dynamic noise is injected into the obfuscated fragment based on the data sensitivity, causing a random drift of ±2% in the formula ratio range; the test temperature value is subjected to a fluctuation of ±0.3°C, and finally a desensitized label is generated.
[0068] Furthermore, to ensure that desensitized production data cannot be reversed, the intensity of dynamic noise is tied to the confidentiality level of the raw materials, and obfuscation rules are automatically updated weekly, such as rotating the mapping relationship between raw material codes. At the same time, a mapping table between desensitized identifiers and original production data is established and stored on the company's local node using consortium blockchain technology. Only R&D leaders are allowed to access the data through multi-factor authentication, such as fingerprint and dynamic password. Once generated, the mapping record cannot be tampered with.
[0069] Step S120: performing feature extraction and desensitization mapping on the historical image data based on content-aware hashing technology to obtain a desensitization mapping result;
[0070] See also Figure 3 , step S120 includes:
[0071] Step S121: convert the historical image data from the original RGB color space to the YUV color space, and separate the brightness component;
[0072] Raw image data is typically stored in the RGB color space. The three channels are highly correlated and sensitive to changes in lighting, hindering feature extraction. To optimize processing performance, this application uses the BT.601 standard conversion formula to convert the RGB color space to the YUV color space, separating the luminance information (Y) from the chrominance information (U, V). After the conversion is complete, the Y component is extracted separately for subsequent processing.
[0073] Through the above steps, the data dimension is effectively reduced, and the impact of illumination changes on image features is reduced, providing a more stable data foundation for subsequent frequency domain conversion.
[0074] Step S122: Perform discrete cosine transform on the luminance component to convert the image into the frequency domain and obtain a frequency domain coefficient matrix;
[0075] The discrete cosine transform (DCT) is based on the principle of two-dimensional orthogonal transformation, converting image data into a combination of cosine functions of different frequencies. To improve computational efficiency, an 8×8 block processing strategy is adopted, with each sub-block independently performing a two-dimensional DCT. Image energy is primarily concentrated in the low-frequency region at the lower left corner of the frequency domain coefficient matrix, which contains the image's primary structural information. High-frequency regions correspond to the image's detailed texture information.
[0076] Step S123: remove high-frequency detail coefficients in the frequency domain coefficient matrix, retain low-frequency coefficients, and quantize the low-frequency coefficients to map continuous low-frequency coefficients into discrete binary sequences;
[0077] In the specific implementation, the first 10 to 15 low-frequency coefficients are retained. After retaining these low-frequency coefficients, they are quantized using the JPEG standard brightness quantization table. Quantization maps continuous frequency-domain coefficients to a finite number of discrete values, effectively reducing data precision and reducing data storage space. Furthermore, the quantized low-frequency coefficients are converted into a binary sequence, providing a standardized data format for subsequent encryption.
[0078] Step S124: encrypt the binary sequence using a salted hash function to generate a desensitized mapping result.
[0079] In the specific implementation process, in order to ensure data security, the above binary sequence is encrypted using a salted hash mechanism, which includes:
[0080] First, an image salt is generated using the HMAC-SHA256 algorithm. This salt, combined with the global salt stored in the internal security module, is concatenated with the binary sequence and used as the input for the SHA-3-256 hash function. This hash calculation generates a 256-bit fixed-length hash value, which forms an irreversible mapping relationship with the original image data. Finally, the first 12 bits of the hash value are Base64URL-encoded and the fixed prefix "IMG_" is added to generate the final desensitization mapping result, achieving secure desensitization and unique identification of the image data.
[0081] In summary, the above steps, through standardized color space conversion, frequency domain feature extraction and multi-layer encryption mechanism, ensure the integrity of the core features of the image while meeting strict privacy protection requirements.
[0082] Step S130: Obtaining the user's preference for image elements based on historical image data and user interaction records; and performing dimensionality reduction and generalization processing on the preference for the image elements using a preference matrix decomposition model to obtain generalized preference data;
[0083] Image elements include: product category, compliance feature labeling location, technical parameter display mode, and safety warning display category;
[0084] In step S130, obtaining the user's preference for the image element based on the historical image data and the user interaction record includes:
[0085] Step S131: pre-process the historical image data to obtain image elements of each image;
[0086] Specifically, we first standardize historical image data, adjust images of different sizes and formats to a standard resolution, and perform color space calibration. We then use a deep learning model to extract multi-dimensional features:
[0087] Product category feature extraction: Using template matching combined with an industry product image library, historical image data is compared with images of products of known categories in the library. Key contours are matched using the SIFT algorithm to determine product categories. The industry product image library is a pre-built library containing standard images of all the company's biological products.
[0088] Compliance feature annotation position extraction: Combining OCR text recognition and coordinate positioning, use OCR text recognition to identify compliance text in the image, use OpenCV contour detection to locate the area where the text is located, and record its corresponding position in the image, such as the lower left corner, bottom center, right 1 / 3 area, etc.
[0089] Technical parameter display mode extraction: Use OpenCV to detect straight lines and grid structures (such as table lines and coordinate axes) in the image, and combine the "parameter name + value" recognized by OCR (such as "potency: 98%" and "temperature: 37°C") to determine whether it is a "table" (containing row and column grids), a "line chart" (containing continuous curves), or a "bar chart" (containing rectangular columns).
[0090] Safety warning display category extraction: Color thresholding and shape detection are used. For example, warning colors are identified based on RGB thresholds, such as red: R≥200, G≤50, B≤50; yellow: R≥200, G≥200, B≤50; then Hough transform is used to detect the shape, combined with OCR to recognize the warning text and determine the category.
[0091] Step S132: Obtaining the user's preference for each image element based on weighted fusion according to the image elements of each image and the user interaction record;
[0092] The user interaction records include: user browsing time, click frequency, collection operations and sharing behaviors.
[0093] Specifically, each behavior in the user interaction record will be quantified and analyzed separately: User browsing time: It can reflect the user's interest in the image. The longer the browsing time, the more attention the user pays to certain elements in the image.
[0094] Click frequency: reflects the user's active attention to a specific image. The higher the click frequency, the stronger the user's preference for the image element.
[0095] Collection operation: This is a clear expression of user preference, indicating that the user has a high degree of recognition of the image as a whole or some elements.
[0096] Sharing behavior: reflects the user's value judgment on the image. The occurrence of sharing behavior means that the user believes that the image has certain dissemination value.
[0097] When performing weighted fusion calculations to assign dynamic weights to user interaction records, recent user interactions are given higher weights. The system automatically adjusts the weight coefficient based on the time of the behavior to ensure that it reflects the user's latest interests. For example, the weight coefficient for the past 7 days is 0.7, and for 7 to 30 days it is 0.3.
[0098] Furthermore, different interaction behaviors are mapped to preference scores:
[0099] Browsing time: A segmented scoring algorithm is used. Browsing time under 30 seconds is not scored, 30-120 seconds is scored as 0.5 points, and more than 120 seconds is scored as 1 point.
[0100] Click frequency: Calculate the average number of clicks per day, normalize it using min-max, and multiply by 2, with a maximum score of 2 points;
[0101] Collection operation: Each collection action is worth 3 points, with a validity period of 7 days. After the expiration date, the points will be decremented by 15% every day.
[0102] Sharing behavior: Each share counts as 3 points, weighted by the influence of the sharing platform; for example, WeChat × 1.5, Weibo × 1.2, other × 1.
[0103] According to the above steps, the preference scores of the user for different image elements are obtained as the preference levels.
[0104] In step S130, the preference matrix decomposition model is a model based on probability matrix decomposition. The preference matrix decomposition model is used to perform dimensionality reduction and generalization processing on the preference degree of the image elements. Obtaining the preference data after generalization processing includes:
[0105] Step S133: construct a preference relationship matrix between the user and the image elements based on the user's preference for each image element;
[0106] Step S134: Decomposing the preference relationship matrix into a user feature matrix and an image element feature matrix using a probability matrix decomposition model, and performing cluster analysis on the decomposed user feature matrix and image element feature matrix to obtain category information;
[0107] After obtaining the preference relationship matrix between users and image elements, a probabilistic matrix factorization model is used to model and decompose this preference relationship matrix. This model learns the interactions between users and image elements, decomposing the original high-dimensional, sparse preference matrix into two low-dimensional, dense feature matrices: a user feature matrix representing the user's potential preferences, and an image element feature matrix representing the potential characteristics of the image elements. This decomposition method not only effectively reduces data dimensionality but also uncovers deeper, implicit connections between users and image elements.
[0108] After decomposing the feature matrix, cluster analysis is performed on both the user feature matrix and the image element feature matrix. The clustering algorithm divides users into several interest groups based on the similarity between feature vectors, and classifies image elements into multiple categories with common characteristics.
[0109] Step S135: reconstruct the user's preference data based on the category relationship to obtain the generalized preference data.
[0110] Step S140: associate and integrate the desensitized identifier, the desensitized mapping result, and the preference data after generalization processing to obtain desensitized data.
[0111] Specifically, this step first divides users into several interest groups based on clustering results. Users within each group share similar visual content preferences. Image elements are also categorized into multiple categories with common characteristics. Based on this, the system no longer relies on users' specific interactions with individual image elements. Instead, it uses the user's interest group and the image element's category to infer the user's overall preference trends for all image elements within that category.
[0112] In addition, during the reconstruction process, mechanisms such as time decay factors and behavior weight factors can be introduced to further optimize the dynamic update logic of preference data so that preference expressions can better reflect the user's current interest status.
[0113] Step S200: Input the user feature vector into the improved federated learning framework, perform hierarchical encryption parameter aggregation processing, and obtain encrypted and aggregated parameters;
[0114] In step S200, the improved federated learning framework includes a first encryption layer, a second encryption layer, a third encryption layer, and an aggregation layer;
[0115] The first encryption layer uses a homomorphic encryption algorithm to encrypt the user feature vector to obtain the first layer encryption parameters;
[0116] The second encryption layer injects noise into the first layer encryption parameters through the differential privacy mechanism to obtain the encryption parameters after adding noise;
[0117] The third encryption layer divides the encrypted parameters after adding noise into multiple parameter slices and distributes the parameter slices to multiple aggregation nodes;
[0118] The aggregation layer includes multiple aggregation nodes, which perform secure multi-party computation, aggregate multiple parameter shards and generate encrypted aggregated parameters.
[0119] Step S300: Initialize a personalized generation model based on the encrypted and aggregated parameters, and perform adversarial training on the personalized generation model using the target user's request information as a condition to obtain a trained personalized generation model;
[0120] In step S300, the personalized generation model includes a generator and a discriminator; adversarial training includes:
[0121] The generator generates a candidate image according to the encrypted and aggregated parameters and the target user's request information;
[0122] The discriminator discriminates between the candidate image and the real image and generates a discrimination result; and based on the discrimination result, the parameters of the generator are updated through the back propagation algorithm until the candidate image generated by the generator can make the discrimination accuracy of the discriminator higher than the preset threshold.
[0123] In step S300, a personalized generative model architecture is first constructed based on the encrypted aggregated parameters, the aggregated parameters are decrypted, and the generator and discriminator network weights are initialized. At the same time, the target user request information is semantically parsed, converted into an embedded vector, and fused with the decrypted parameters. The generator adopts a multi-scale architecture and incorporates an attention mechanism to receive fused features to generate candidate images, and applies spectral normalization to improve training stability; the discriminator constructs a multi-scale structure to process local and global features of the image and distinguish the authenticity of the candidate image from the real image. During the training process, a hybrid loss function is designed, including adversarial loss, perceptual loss, and style loss. An alternating training strategy is adopted to update the discriminator first and then the generator, and gradient truncation and learning rate scheduling are applied. During training, FID is used to evaluate the quality of the generated image, and an early stopping mechanism is set. When the discriminator accuracy reaches a preset threshold, training is stopped, and finally the model parameters and structure are saved.
[0124] Step S400: Input the target user's request information into the trained personalized generation model to obtain the final output image.
[0125] In summary, the privacy-preserving image generation method based on biological products in this embodiment performs multi-dimensional desensitization processing on the private data of the target user. For the production data of enterprise users and compliance standard data, a multi-factor obfuscation algorithm is used to fragment and obfuscate and add noise; historical image data is converted and processed with the help of content-aware hashing technology; user interaction records are generalized by dimensionality reduction through the preference matrix decomposition model, which effectively prevents data leakage and identity identification. At the same time, a layered encryption strategy is adopted in the federated learning framework, and homomorphic encryption, differential privacy mechanism, secret sharing algorithm and secure multi-party computing work together to ensure data privacy and security throughout the process from data encryption, noise injection, parameter sharding to secure aggregation;
[0126] At the same time, we deeply mine historical user image data and interaction records to accurately extract user preferences for image elements, including product categories, compliance feature annotation locations, technical parameter display modes, and safety warning display categories. By performing dimensionality reduction and generalization processing through the preference matrix decomposition model, we integrate user personalized preferences into the image generation process. Using the request information as a condition, we combine encrypted aggregation parameters to train a personalized generation model, ensuring that the generated images are highly aligned with user needs, significantly improving the user experience.
[0127] Finally, this application uses an improved federated learning framework to achieve data collaboration between edge devices, avoiding large amounts of data transmission and reducing communication costs and time overhead. Layered encryption parameter aggregation ensures data security while effectively integrating data from multiple parties, providing rich information for model training. The adversarial training mechanism continuously optimizes the generator parameters through a game between the generator and the discriminator, improving the quality of generated images. The generated images achieve a high level of authenticity, diversity, and detail, meeting the diverse needs of users.
[0128] In addition, an embodiment of the present application also proposes a computer device, which includes a processor and a memory, and the processor is used to execute instructions stored in the memory so that the computer device executes the privacy-preserving image generation method based on biological products described in the above embodiment.
[0129] Finally, an embodiment of the present application also proposes a computer-readable storage medium, including computer program instructions, which, when executed by a processor, implements the privacy-preserving image generation method based on biological products described in the above embodiment.
[0130] In some other embodiments, the present application provides a privacy-preserving image generation method based on biological products. The target user is a domestic veterinary drug manufacturer. The request information is "generate a packaging image of albendazole tablets with EU veterinary drug number, withdrawal period labeling, and residue limit indication." The privacy-preserving image generation method based on biological products is:
[0131] A100, obtain the target user's request information and private data, desensitize the target user's private data, obtain the desensitized data, and compress the desensitized data to obtain the user feature vector
[0132] The private data collected at this time includes:
[0133] Enterprise user production data: albendazole raw material purity, production batch number, active ingredient content and raw material origin;
[0134] Compliance standard data: EU's "Anthelmintic Veterinary Labelling Directive", residue limit ≤ 0.1mg / kg, withdrawal period ≥ 7 days, and EU veterinary drug numbering rules;
[0135] Historical image data: images of albendazole tablet packaging sold domestically by the company over the past three years;
[0136] User interaction records: Enterprise users’ modification records of export labels in the past 6 months.
[0137] The above private data are desensitized and integrated to obtain user feature vectors, including:
[0138] Desensitizing enterprise user production data and compliance standard data: A "fragmented obfuscation + dynamic key" algorithm is used to handle trade secrets such as raw material purity. For example, a purity value of 98.5% is split into two fragments, "98" and "0.5." These fragments are then linked using a dynamic key tied to the production batch number (a unique key is generated for each batch and is valid for 48 hours), retaining only the "98% to 99%" range. The raw material origin is replaced with a universal industry-standard geographical code (e.g., "EU-01" represents a compliant raw material production area) using a multi-factor obfuscation algorithm.
[0139] Desensitizing historical image data: Key features are extracted based on content-aware hashing technology. For example, the rectangular boundary features of the GMP certification mark (aspect ratio of 1:3) and the geometric center coordinates of the brand logo, such as 10% of the width from the upper left corner, are retained, and the background texture is blurred; the "veterinary use" text features in domestic labels are converted into 128-dimensional vectors for mapping the layout features of the EU "Veterinary Use Only" mark.
[0140] User interaction record processing: User preferences are extracted through a preference matrix decomposition model. Quantitative analysis of interaction records shows that, for example, users have a preference weight of 0.85 for "withdrawal period in bold" and 0.9 for "residue limit in orange." Mandatory fields (such as residue limit threshold and identification text) are retained for compliance standard data, while non-essential fields (such as regulatory article number) are blurred.
[0141] Afterwards, the desensitized production data features, compliance standard features, historical image features, and user preference features are integrated, and the dimensions are uniformly reduced to 64 dimensions through principal component analysis to generate a user feature vector.
[0142] A200: Input the user feature vector into the improved federated learning framework, perform hierarchical encryption parameter aggregation processing, and obtain encrypted and aggregated parameters;
[0143] This step achieves the integration of enterprise data privacy protection and cross-regional compliance parameters through layered encryption and multi-node aggregation. The specific process is as follows:
[0144] First encryption layer: Use the CKKS homomorphic encryption algorithm to encrypt the 64-dimensional user feature vector to generate the first layer encryption parameters;
[0145] The second encryption layer injects differentiated Gaussian noise based on data sensitivity. Production data features (such as raw material purity range) are injected with a noise intensity of 0.03, while compliance standard features (such as residue limit thresholds) are injected with a noise intensity of 0.01, balancing privacy protection and feature availability.
[0146] The third encryption layer: Splits the encryption parameters into six shards and distributes them to three types of aggregation nodes: local enterprise nodes, regional compliance nodes, and third-party verification nodes.
[0147] Aggregation layer: Through secure multi-party computation, such as that based on the Garbled Circuit protocol, the parameter shards of six nodes are aggregated. During the aggregation process, each node only exchanges intermediate calculation results and cannot reverse the original data. The final result is a 128-dimensional encrypted aggregate parameter.
[0148] Furthermore, between the third encryption layer and the aggregation layer, there are also:
[0149] The industry parameter layer is used to use the EU veterinary drug compliance parameter library to perform compliance filtering on each segment and eliminate parameter segments that do not meet the requirements.
[0150] A300: Initialize a personalized generation model based on the encrypted and aggregated parameters, and perform adversarial training on the personalized generation model using the target user's request information as a condition to obtain a trained personalized generation model;
[0151] A400: Input the target user's request information into the trained personalized generation model to generate an albendazole tablet packaging label image that meets the requirements.
[0152] In the above process, through layered encryption and dynamic keys, zero leakage of commercial secrets such as veterinary drug formulas is achieved, solving the data security concerns of enterprises in exports; at the same time, the generated images meet the EU veterinary drug labeling standards, and integrate the design style and interaction preferences of corporate users, ultimately achieving the technical effect of ensuring user data security and generating high-quality images that meet users' personalized needs.
[0153] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0154] In the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," "connect," "fixed," etc. should be understood broadly. For example, they may refer to fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; and internal communication between two components or interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0155] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is at a lower level than the second feature.
[0156] In the description of this specification, the terms "one embodiment", "some embodiments", "embodiments", "examples", "specific examples" or "some examples" refer to the specific features, structures, materials or characteristics described in conjunction with the embodiment or example and included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.
[0157] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may alter, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A privacy-preserving image generation method based on biological products, characterized in that: The following steps are performed by the edge device: S100: Obtain request information and private data of a target user, desensitize the private data of the target user, obtain desensitized data, and compress the desensitized data to obtain a user feature vector; S200: Input the user feature vector into the improved federated learning framework, perform hierarchical encryption parameter aggregation processing, and obtain encrypted and aggregated parameters; S300: Initialize a personalized generation model based on the encrypted and aggregated parameters, and perform adversarial training on the personalized generation model using the target user's request information as a condition to obtain a trained personalized generation model; S400: Input the target user's request information into a trained personalized generation model to obtain a final output image.
2. The privacy-preserving image generation method based on biological products according to claim 1, characterized in that: In the S100, The private data includes: enterprise user production data, compliance standard data, historical image data and user interaction records; The enterprise user production data includes: biological product raw material formula, biological product experimental data; compliance standard data includes data thresholds defined in the target market biological product specifications.
3. The privacy-preserving image generation method based on biological products according to claim 2, characterized in that: In S100, performing local desensitization processing on the private data of the target user, and obtaining the desensitized data includes: S110: Desensitizing the enterprise user production data and the compliance standard data using a multi-factor obfuscation algorithm to generate a desensitized identifier; the multi-factor obfuscation algorithm generates the desensitized identifier by fragmenting and obfuscating the enterprise user production data and the compliance standard data and adding noise; S120, performing feature extraction and desensitization mapping on the historical image data based on content-aware hashing technology to obtain a desensitization mapping result; S130, obtaining the user's preference for image elements based on the historical image data and user interaction records; and performing dimensionality reduction and generalization processing on the preference for the image elements using a preference matrix decomposition model to obtain generalized preference data; The image elements include: product category, compliance feature labeling location, technical parameter display mode, and safety warning display category; S140: Associating and integrating the desensitized identifier, the desensitized mapping result, and the preference data after generalization processing to obtain desensitized data.
4. The privacy-preserving image generation method based on biological products according to claim 3, characterized in that: The S120 includes: S121, converting the historical image data from the original RGB color space to a YUV color space, and separating the brightness component; S122, performing discrete cosine transform on the brightness component to convert the image into frequency domain and obtain a frequency domain coefficient matrix; S123, removing high-frequency detail coefficients in the frequency domain coefficient matrix, retaining low-frequency coefficients, and quantizing the low-frequency coefficients to map continuous low-frequency coefficients into discrete binary sequences; S124. Encrypt the binary sequence using a salted hash function to generate a desensitizing mapping result.
5. The privacy-preserving image generation method based on biological products according to claim 3, characterized in that: In S130, obtaining the user's preference for the image element according to the historical image data and the user interaction record includes: S131, preprocessing the historical image data to obtain image elements of each image; S132. Obtaining the user's preference for each image element based on weighted fusion according to the image elements of each image and the user interaction record; The user interaction records include: user browsing time, click frequency, collection operations and sharing behaviors.
6. The privacy-preserving image generation method based on biological products according to claim 5, characterized in that: In S130, the preference matrix decomposition model is a model based on probability matrix decomposition. The preference matrix decomposition model is used to perform dimensionality reduction and generalization processing on the preference degree of the image element. Obtaining the preference data after generalization processing includes: S133. Constructing a preference relationship matrix between users and image elements based on the user's preference for each image element; S134, using a probabilistic matrix decomposition model to decompose the preference relationship matrix into a user feature matrix and an image element feature matrix, and performing cluster analysis on the decomposed user feature matrix and image element feature matrix to obtain category information; S135 . Reconstruct the user's preference data according to the category information to obtain generalized preference data.
7. The privacy-preserving image generation method based on biological products according to claim 3, characterized in that: In S200, the improved federated learning framework includes a first encryption layer, a second encryption layer, a third encryption layer, and an aggregation layer; The first encryption layer uses a homomorphic encryption algorithm to encrypt the user feature vector to obtain a first-layer encryption parameter; The second encryption layer injects noise into the first layer encryption parameters through a differential privacy mechanism to obtain the encryption parameters after adding noise; The third encryption layer divides the encryption parameters after adding noise into multiple parameter slices, and distributes the parameter slices to multiple aggregation nodes; The aggregation layer includes multiple aggregation nodes, which perform secure multi-party computing, aggregate multiple parameter shards and generate encrypted aggregated parameters.
8. The privacy-preserving image generation method based on biological products according to claim 1, characterized in that: In S300, the personalized generation model includes a generator and a discriminator; and the adversarial training includes: The generator generates a candidate image according to the encrypted and aggregated parameters and the target user's request information; The discriminator discriminates the candidate image and the real image to generate a discrimination result; and based on the discrimination result, updates the parameters of the generator through a back propagation algorithm until the candidate image generated by the generator can make the discrimination accuracy of the discriminator higher than a preset threshold.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to implement the privacy-preserving image generation method based on biological products according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that A computer program is stored, and when the computer program is executed by a processor, it is used to implement the privacy-preserving image generation method based on biological products according to any one of claims 1 to 8.
Citation Information
Patent Citations
Image processing method and device based on privacy protection and electronic equipment
CN111783146A
Image processing method, device and equipment based on privacy protection
CN114638014A
Differential privacy-based generative adversarial network image generation system
CN116228906A
E-commerce user portrait design method based on privacy protection
CN120493297A
Federated large codeword model deep learning architecture with homomorphic compression and encryption
US20250047296A1