A privacy-protected image generation method, device and medium based on biological products
By using data anonymization on edge devices and an improved federated learning framework, the problems of privacy leakage and insignificant personalization effects in the generation of biological product images are solved, enabling the generation of high-quality personalized images while protecting privacy.
Patent Information
- Application Number
- CN202511196745.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing technologies for generating images of biological products have problems such as high risk of user privacy leakage and insignificant personalization effects, making it difficult to achieve personalized image generation while protecting privacy.
Edge devices are used for data anonymization, an improved federated learning framework is used for hierarchical encryption parameter aggregation, and a personalized generative model is combined for adversarial training to generate personalized images.
While protecting user privacy, it generates more accurate and personalized images that meet user needs, satisfying data security and compliance requirements.
Smart Images

Figure CN120705919B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing and biotechnology, and in particular to a privacy-preserving image generation method, device and medium based on biological products. Background Technology
[0002] Currently, with the development of artificial intelligence technology, image generation technology is increasingly widely used in the fields of biological products, veterinary drugs, and feed additives. To improve the accuracy of product display, scientific research exchange, or market promotion, it is often necessary to generate personalized images according to user needs. Examples include generating regulatory-compliant biological product packaging images, feed additive ingredient diagrams adapted to enterprise formulas, and biological product experimental visualization images tailored to R&D needs. Currently, the generation solution still mainly relies on a centralized training paradigm: user data needs to 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-tunes the basic model for specific users. When users use the service, they send a generation request, and the central server returns the generated result.
[0003] However, this centralized data collection model has significant drawbacks in industry applications: On the one hand, the user data to be collected contains a large amount of sensitive information, such as the raw material formula ratio of veterinary drugs, the core component data of feed additives, and the experimental research and development data of biological products. This data belongs to the company's trade secrets or technical patents, and 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 and 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] (a) Technical problems to be solved
[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 of high risk of user privacy leakage and insignificant personalization effect in the prior art.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the main technical solutions adopted by the present invention include:
[0009] In a first aspect, embodiments of the present invention provide a privacy-preserving image generation method based on biological products, wherein the following steps are performed by an edge device:
[0010] S100: Obtain the target user's request information and private data, perform desensitization processing on the target user's private data, obtain the desensitized data, compress the desensitized data, and obtain the user feature vector.
[0011] In 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: biopharmaceutical raw material formulations and biopharmaceutical experimental data; compliance standard data includes data thresholds defined in the biopharmaceutical regulations for the target market.
[0014] S200. Input the user feature vector into the improved federated learning framework, perform hierarchical encrypted parameter aggregation processing, and obtain the encrypted aggregated parameters.
[0015] S300. Based on the encrypted and aggregated parameters, initialize the personalized generation model, and use the target user's request information as a condition to perform adversarial training on the personalized generation model to obtain the trained personalized generation model.
[0016] S400. Input the request information of the target user into the trained personalized generation model to obtain the final output image.
[0017] Optionally,
[0018] Optionally, in step S100, the private data of the target user is locally anonymized to obtain the anonymized data, including:
[0019] S110. A multi-factor obfuscation algorithm is used to de-identify the enterprise user production data and compliance standard data to generate a de-identification identifier; the multi-factor obfuscation algorithm generates a de-identification identifier by fragmenting and obfuscating the enterprise user production data and compliance standard data and adding noise.
[0020] S120. Based on content-aware hashing technology, perform feature extraction and desensitization mapping on the historical image data to obtain the desensitization mapping result;
[0021] S130. Based on the historical image data and user interaction records, obtain the user's preference for image elements; and use a preference matrix decomposition model to perform dimensionality reduction and generalization processing on the preference for image elements to obtain generalized preference data.
[0022] The image elements include: product category, location of compliance feature annotations, display mode of technical parameters, and display category of safety warnings;
[0023] S140. The desensitized identifier, desensitized mapping result, and generalized preference data are associated and integrated to obtain the desensitized data.
[0024] Optionally, S120 includes:
[0025] S121. Convert the historical image data from the original RGB color space to the YUV color space and separate the luminance component;
[0026] S122. Perform discrete cosine transform on the brightness components to convert the image into the frequency domain and obtain the frequency domain coefficient matrix.
[0027] S123. Remove the high-frequency detail coefficients from the frequency domain coefficient matrix, retain the low-frequency coefficients, and quantize the low-frequency coefficients to map the continuous low-frequency coefficients into discrete binary sequences.
[0028] S124. The binary sequence is encrypted using a salted hash function to generate a desensitized mapping result.
[0029] Optionally, in step S130, obtaining the user's preference for image elements based on the historical image data and user interaction records includes:
[0030] S131. Preprocess the historical image data to obtain the image elements of each image;
[0031] S132. Based on the image elements of each image and the user interaction record, obtain the user's preference for each image element based on weighted fusion;
[0032] The user interaction records include: user browsing time, click frequency, favorites, and sharing behavior.
[0033] Optionally, in S130, the preference matrix decomposition model is a model based on probability matrix decomposition. The step of using the preference matrix decomposition model to reduce the dimensionality and generalize the preference levels of the image elements to obtain the generalized preference data includes:
[0034] S133. Construct a preference relationship matrix between users and image elements based on the user's preference for each image element;
[0035] S134. The preference relationship matrix is decomposed into a user feature matrix and an image element feature matrix using a probabilistic matrix factorization model, and cluster analysis is performed on the decomposed user feature matrix and image element feature matrix to obtain category information.
[0036] S135. Based on the category relationship, reconstruct the user's preference data and obtain the 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 the first layer encryption parameters;
[0039] The second encryption layer injects noise into the encryption parameters of the first layer through a differential privacy mechanism to obtain the encryption parameters after adding noise;
[0040] The third encryption layer divides the encrypted parameters after adding noise into multiple parameter fragments, and distributes the parameter fragments to multiple aggregation nodes;
[0041] The aggregation layer includes multiple aggregation nodes, which perform secure multi-party computation, aggregate multiple parameter shards, and generate encrypted aggregated parameters.
[0042] Optionally, in S300, the personalized generation model includes a generator and a discriminator; the adversarial training includes:
[0043] The generator generates candidate images based on the encrypted and aggregated parameters and the target user's request information;
[0044] The discriminator distinguishes between the candidate image and the real image, generates a discrimination result, and updates the parameters of the generator through a backpropagation algorithm based on the discrimination result until the candidate image generated by the generator can make the discrimination accuracy of the discriminator higher than a preset threshold.
[0045] Secondly, embodiments of this application provide an electronic device, including a memory and a processor, wherein:
[0046] The memory is used to store computer programs;
[0047] The processor is used to execute the computer program to implement the privacy-preserving image generation method based on biological products as described above.
[0048] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the above-described privacy-preserving image generation method based on biological products.
[0049] (III) Beneficial Effects
[0050] The beneficial effects of this invention are as follows: The privacy-preserving image generation method, device, and medium based on biological products of this invention, by using edge devices to perform desensitization processing and feature extraction of user data, and by using an improved federated learning framework for hierarchical encrypted parameter aggregation, can, compared with the prior art, train a generation model using the user's personalized data to generate more accurate and personalized images that meet customer needs while fully protecting user privacy. This achieves the effect of both ensuring user data security and generating high-quality images that meet the user's personalized needs. Attached Figure Description
[0051] Figure 1 This is a schematic 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 schematic diagram illustrating the process of local de-identification of private data according to an embodiment of the present invention;
[0053] Figure 3 This is a schematic diagram illustrating the process of feature extraction and desensitization mapping of historical image data based on content-aware hashing technology in an embodiment of the present invention. Detailed Implementation
[0054] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Against the backdrop of rapid development in AI-powered image generation technology, the biopharmaceutical industry is experiencing a surge in demand for image generation based on personalized enterprise data. This demand is concentrated in compliance images, such as veterinary drug labels and feed additive packaging; technical images, such as visualizations of biopharmaceutical experiments; and transactional images, such as the generation of multilingual labels for import and export products. However, existing technologies face a core contradiction in achieving industry-driven image generation: the difficulty in simultaneously addressing privacy protection, compliance adaptation, and personalized effects.
[0056] On the one hand, directly uploading private corporate data, such as trade secrets like biopharmaceutical raw material formulas, to generate images could easily lead to the leakage of trade secrets or the misuse of compliant data. On the other hand, using traditional desensitization techniques or simple federated learning frameworks often results in insufficient extraction of industry data features or encryption mechanisms that are not adapted to the differences in industry data sensitivity. This makes it difficult to effectively utilize the company's personalized features while protecting privacy, resulting in generated images that either do not meet industry compliance requirements or are not sufficiently aligned with the company's needs.
[0057] To address the aforementioned issues, this application proposes a privacy-preserving image generation method, device, and medium based on biological products. It employs edge devices to perform targeted de-identification processing of industry data, utilizes an improved federated learning framework to achieve hierarchical encryption parameter aggregation, and combines this with adversarial training of a personalized generation model. This technical solution avoids the risk of leakage of enterprise private data and compliance information while fully leveraging the personalized characteristics and compliance rules of industry data. Ultimately, it achieves the technical effects of protecting trade secrets, meeting industry compliance requirements, and improving the relevance of generated images to enterprise 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 drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.
[0059] Figure 1 This is a schematic flowchart illustrating a privacy-preserving image generation method based on biological products according to an embodiment of this application. Figure 1 As shown, this privacy-preserving image generation method based on biological products includes:
[0060] Step S100: Obtain the target user's request information and private data, perform desensitization processing on the target user's private data, obtain the desensitized data, compress the desensitized data, and obtain the user feature vector.
[0061] In step S100, the private data includes: enterprise user production data, compliance standard data, historical image data, and user interaction records;
[0062] Enterprise user production data includes: biopharmaceutical raw material formulations and biopharmaceutical experimental data; compliance standard data includes data thresholds defined in the biopharmaceutical regulations for the target market.
[0063] In step S100, the private data of the target user is locally anonymized, and the anonymized data obtained includes (e.g.) Figure 2 (as shown)
[0064] Step S110: Use a multi-factor obfuscation algorithm to de-identify enterprise user production data and compliance standard data, and generate de-identification labels; the multi-factor obfuscation algorithm generates de-identification labels by fragmenting and obfuscating enterprise user production data and compliance standard data and adding noise.
[0065] For example, suppose the company's production data consists of the recombinant protein raw material formulation ratio and cell culture experiment data, specifically: recombinant protein A: 35%, adjuvant B: 15%, stabilizer C: 5%, buffer D: 45%, fifth-generation cell survival rate 92%, fermentation temperature 37.5℃.
[0066] Obfuscation: Industry-standard codes and range symbols are introduced to obfuscate the segmented data. For formulation ratio segments, the specific names are replaced with raw material classification codes, such as recombinant protein A being replaced with P1 and adjuvant B with A2. Precise ratios are converted to ranges, such as recombinant protein A: 35% becoming P1: 30%-40%. For experimental data segments, the descriptions are replaced with parameter codes, such as cell viability being replaced with S5 and fermentation temperature being replaced with T3. The numerical values are also obfuscated.
[0067] Add noise: In the obfuscated fragment, dynamic noise is injected according to the data sensitivity to randomly drift the formula ratio range by ±2%; the test temperature value is fluctuated by ±0.3℃, and finally a desensitized label is generated.
[0068] Furthermore, to ensure that the anonymized production data cannot be reverse-engineered, the intensity of dynamic noise is linked to the confidentiality level of raw materials, and the obfuscation rules are automatically updated weekly, such as rotating the raw material code mapping relationship. Simultaneously, a mapping table between anonymized identifiers and original production data is established and stored on the enterprise's local node using consortium blockchain technology. Only R&D managers are allowed to query this data through multi-factor authentication, such as fingerprints and dynamic passwords. Once generated, the mapping record is tamper-proof.
[0069] Step S120: Perform feature extraction and desensitization mapping on historical image data based on content-aware hashing technology to obtain the desensitization mapping results;
[0070] See 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 luminance component;
[0072] Raw image data is typically stored in the RGB color space, where the three channels exhibit high correlation and are sensitive to changes in illumination, hindering feature extraction. To optimize processing performance, this application employs the BT.601 standard conversion formula to convert the RGB color space to the YUV color space, achieving separation of luminance information (Y) and chromaticity information (U, V). After conversion, the Y component is extracted separately for subsequent processing.
[0073] The above steps effectively reduce the data dimensionality and minimize the impact of illumination changes on image features, 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 the 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, performing the two-dimensional DCT independently on each sub-block. During the DCT transformation, the image energy is mainly concentrated in the low-frequency region at the lower left corner of the frequency domain coefficient matrix, which contains the main structural information of the image; the high-frequency region corresponds to the detailed texture information of the image.
[0076] Step S123: Remove high-frequency detail coefficients from 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 process, the first 10 to 15 low-frequency coefficients are retained. After retaining the low-frequency coefficients, quantization processing is performed using the JPEG standard luminance quantization table. Quantization mapping continuous frequency domain coefficients to finite discrete values effectively reduces data precision and data storage space. Simultaneously, the quantized low-frequency coefficients are further converted into binary sequences, providing a standardized data format for subsequent encryption processing.
[0078] Step S124: Encrypt the binary sequence using a salted hash function to generate a desensitized mapping result.
[0079] In the specific implementation process, to ensure data security, a salted hashing mechanism is used to encrypt the above binary sequence, specifically including:
[0080] First, an image salt value is generated using the HMAC-SHA256 algorithm. This salt value, combined with a global salt value stored in the internal security module, is then concatenated with a binary sequence and used as input to the SHA-3-256 hash function. The hash calculation generates a fixed-length 256-bit hash value, which forms an irreversible mapping with the original image data. Finally, the first 12 bits of the hash value are Base64URL encoded and a fixed prefix "IMG_" is added to generate the final de-identified mapping result, achieving secure de-identification 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 mechanisms, ensure the integrity of the core features of the image while meeting strict privacy protection requirements.
[0082] Step S130: Based on historical image data and user interaction records, obtain the user's preference for image elements; and use a preference matrix decomposition model to perform dimensionality reduction and generalization processing on the preference for image elements to obtain generalized preference data.
[0083] Image elements include: product category, location of compliance feature annotations, display mode of technical parameters, and display category of safety warnings;
[0084] In step S130, obtaining the user's preference for image elements based on historical image data and user interaction records includes:
[0085] Step S131: Preprocess the historical image data to obtain the image elements of each image;
[0086] Specifically, the historical image data is first standardized by adjusting images of different sizes and formats to a standard resolution and performing color space calibration. Then, a deep learning model is used for multi-dimensional feature extraction.
[0087] Product category feature extraction: A template matching method combined with an industry product image library is used to compare the features of historical image data with product images of known categories in the image library. The SIFT algorithm is used to match key contours to determine the product category. The industry product image library is a pre-constructed image library containing standard images of all biological products of the enterprise.
[0088] Compliance feature annotation location extraction: Combining OCR text recognition and coordinate positioning, OCR text recognition is used to identify compliant text in the image, and OpenCV contour detection is used to locate the area where the text is located, and its corresponding position in the image is recorded, such as the lower left corner, the bottom center, the 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 them with the "parameter name + value" (such as "potency: 98%" and "temperature: 37℃") recognized by OCR to determine whether it is a "table" (including row and column grids), a "line graph" (including continuous curves), or a "bar chart" (including rectangular bars).
[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, and OCR is used to identify the warning text to determine the category.
[0091] Step S132: Based on the image elements of each image and the user interaction record, obtain the user's preference for each image element based on weighted fusion;
[0092] The user interaction records include: user browsing time, click frequency, favorites, and sharing behavior.
[0093] Specifically, each behavior in the user interaction log will be quantified and analyzed: User browsing time: This can reflect the user's level of 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 a user's active attention to a specific image. The higher the click frequency, the stronger the user's preference for that image element.
[0095] Favorite action: This is a clear expression of user preference, indicating that the user has a high degree of approval for the image as a whole or for some of its elements.
[0096] Sharing behavior reflects a user's value judgment of an image. The occurrence of sharing behavior means that the user believes that the image has a certain value for dissemination.
[0097] When assigning dynamic weights to user interaction records during weighted fusion calculations, more recent user interactions are given higher weights. The system automatically adjusts the weight coefficients based on the time of the interaction 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–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. No points are awarded for browsing time less than 30 seconds, 0.5 points are awarded for browsing time between 30 and 120 seconds, and 1 point is awarded for browsing time more than 120 seconds.
[0100] Click frequency: Calculate the average number of clicks per day, normalize by min-max, and multiply by 2. The highest score is 2 points.
[0101] Collection action: Each collection action is worth 3 points, with a 7-day validity period. After the expiration date, the points will decrease by 15% every day.
[0102] Sharing behavior: Each share is worth 3 points, weighted according to the influence of the sharing platform; for example, WeChat ×1.5, Weibo ×1.2, others ×1.
[0103] Based on the above steps, the user's preference score for different image elements is the degree of preference.
[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 reduce the dimensionality and generalize the preference levels of image elements, obtaining the generalized preference data, including:
[0105] Step S133: Construct a preference relationship matrix between users and image elements based on the user's preference for each image element;
[0106] Step S134: Use the probability matrix factorization model to decompose the preference relationship matrix into a user feature matrix and an image element feature matrix, and perform 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 (MMF) model is used to model and decompose the preference relationship matrix. This model learns from the interaction behavior between users and image elements, decomposing the original high-dimensional sparse preference matrix into two low-dimensional dense feature matrices: one is a user feature matrix representing the user's potential preferences, and the other is 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 completing the feature matrix decomposition, cluster analysis is further performed on the user feature matrix and the image element feature matrix respectively. 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 features.
[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, desensitized mapping result, and generalized preference data to obtain the desensitized data.
[0111] Specifically, this step first divides users into several interest groups based on clustering results, with users within each group sharing similar visual content preferences; simultaneously, 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, but rather infers the overall preference trend of users for all image elements within a given category by considering the user's interest group and the category to which the image element belongs.
[0112] In addition, during the reconstruction process, mechanisms such as time decay factors and behavioral weight factors can be introduced to further optimize the dynamic update logic of preference data, so that the preference expression can better reflect the user's current interest state.
[0113] Step S200: Input the user feature vector into the improved federated learning framework, perform hierarchical encrypted parameter aggregation processing, and obtain the encrypted 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 and obtain the first layer encryption parameters;
[0116] The second encryption layer injects noise into the encryption parameters of the first layer through a differential privacy mechanism to obtain the encryption parameters after adding noise.
[0117] The third encryption layer divides the encrypted parameters with added noise into multiple parameter fragments and distributes the parameter fragments to multiple aggregation nodes;
[0118] The aggregation layer consists of multiple aggregation nodes, which perform secure multi-party computation, aggregate multiple parameter shards, and generate encrypted aggregated parameters.
[0119] Step S300: Initialize the personalized generation model according to 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 the trained personalized generation model.
[0120] In step S300, the personalized generative model includes a generator and a discriminator; adversarial training includes:
[0121] The generator generates candidate images based on the encrypted and aggregated parameters and the target user's request information;
[0122] The discriminator distinguishes between candidate images and real images, generates a discrimination result, and updates the generator's parameters based on the discrimination result through a backpropagation algorithm until the candidate images generated by the generator can make the discrimination accuracy of the discriminator higher than a preset threshold.
[0123] In step S300, a personalized generative model architecture is first constructed based on the encrypted aggregation parameters. The aggregation parameters are then decrypted, and the weights of the generator and discriminator networks are initialized. Simultaneously, semantic parsing of the target user's request information is performed, converted into embedding vectors, and fused with the decrypted parameters. The generator employs a multi-scale architecture and incorporates an attention mechanism, receiving fused features to generate candidate images, and applying spectral normalization to improve training stability. The discriminator constructs a multi-scale structure, processing local and global image features to distinguish the authenticity of candidate images from real images. During training, a hybrid loss function is designed, including adversarial loss, perceptual loss, and style loss. An alternating training strategy is adopted, updating the discriminator first and then the generator, and gradient truncation and learning rate scheduling are used. During training, the quality of generated images is evaluated using FID, and an early stopping mechanism is implemented. Training stops when the discriminator accuracy reaches a preset threshold. 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, this embodiment presents a privacy-preserving image generation method based on biological products, which performs multi-dimensional desensitization processing on the target user's private data. For enterprise user production data and compliance standard data, a multi-factor obfuscation algorithm is used for fragmentation and noise addition; historical image data is transformed using content-aware hashing technology; and user interaction records are generalized through dimensionality reduction using a preference matrix decomposition model, effectively preventing data leakage and identity verification. Simultaneously, a layered encryption strategy is employed within the federated learning framework, utilizing homomorphic encryption, differential privacy mechanisms, secret sharing algorithms, and secure multi-party computation to ensure data privacy and security throughout the entire process, from data encryption and noise injection to parameter fragmentation and secure aggregation.
[0126] Simultaneously, it deeply mines users' historical image data and interaction records to accurately extract users' preferences for image elements, covering product categories, compliance feature annotation locations, technical parameter display modes, and safety warning display categories. Through dimensionality reduction and generalization processing using a preference matrix decomposition model, it integrates users' personalized preferences into the image generation process. Using requested information as a condition, it trains a personalized generation model with encrypted aggregation parameters, ensuring that the generated images highly match user needs and significantly improving the user experience.
[0127] Finally, this application utilizes an improved federated learning framework to achieve data collaboration between edge devices, avoiding large-scale data transmission and reducing communication costs and time overhead. Layered encrypted parameter aggregation processing ensures data security while effectively integrating data from multiple sources, providing rich information for model training. The adversarial training mechanism, through the game between the generator and the discriminator, continuously optimizes the generator parameters, improving the quality of generated images and achieving a high level of realism, diversity, and detail, thus meeting diverse user needs.
[0128] In addition, this application also proposes a computer device including a processor and a memory, wherein the processor is used to execute instructions stored in the memory so that the computer device performs the privacy-preserving image generation method based on biological products described in the above embodiments.
[0129] Finally, this application also proposes a computer-readable storage medium including computer program instructions, which, when executed by a processor, implement the privacy-preserving image generation method based on biological products described in the above embodiments.
[0130] In some other embodiments, the privacy-preserving image generation method based on biological products of this application targets a domestic veterinary drug manufacturer, and the request information is "generate an image of albendazole tablet packaging containing the EU veterinary drug number, withdrawal period label, and residue limit indication". The privacy-preserving image generation method based on biological products is as follows:
[0131] A100: Obtain the target user's request information and private data; de-identify the target user's private data; obtain the de-identified data; and compress the de-identified data to obtain the user feature vector.
[0132] The private data collected at this time includes:
[0133] Enterprise user production data: purity of albendazole raw material, production batch number, content of active ingredient, and origin of raw material;
[0134] Compliance standards data: EU's "Deworming Veterinary Drugs Labelling Directive", residue limits ≤0.1mg / kg, withdrawal period ≥7 days, and EU veterinary drug numbering and coding rules;
[0135] Historical image data: Packaging images of albendazole tablets sold domestically by the company over the past 3 years;
[0136] User interaction logs: Records of modifications made by enterprise users to export labels over the past 6 months.
[0137] The aforementioned private data are anonymized and then integrated to obtain user feature vectors, specifically including:
[0138] Enterprise user production data and compliance standard data anonymization: A "fragmentation 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," and associated with a dynamic key bound to the production batch number (a unique key is generated for each batch, valid for 48 hours), retaining only the range characteristic of "98% to 99%." The origin of raw materials is replaced with an industry-standard regional code (e.g., "EU-01" represents a compliant raw material production area) using a multi-factor obfuscation algorithm.
[0139] Historical image data anonymization: Key features are extracted based on content-aware hashing technology. For example, the rectangular boundary features (width-to-height ratio 1:3) of the GMP certification mark and the geometric center coordinates of the brand logo, such as 10% of the width from the top left corner, are retained, and the background texture is blurred; the text features of "veterinary use only" in domestic labels are converted into 128-dimensional vectors to map the layout features of the EU "Veterinary Use Only" mark, etc.
[0140] User interaction record processing: User preferences are extracted using a preference matrix decomposition model. Quantitative analysis of the interaction records shows, for example, that the user's preference weight for "withdrawal period in bold" is 0.85, and the preference weight for "residual limit in orange font" is 0.9; mandatory fields (such as residual limit thresholds and label text) are retained for compliance standard data, while unnecessary descriptions (such as regulatory clause numbers) are obscured.
[0141] Subsequently, by integrating the de-identified production data features, compliance standard features, historical image features, and user preference features, the dimensions were reduced to 64 dimensions through principal component analysis to generate user feature vectors.
[0142] A200. Input the user feature vector into the improved federated learning framework, perform hierarchical encrypted parameter aggregation processing, and obtain the encrypted aggregated parameters.
[0143] This step achieves enterprise data privacy protection and cross-regional compliance parameter integration through layered encryption and multi-node aggregation. The specific process is as follows:
[0144] First encryption layer: The CKKS homomorphic encryption algorithm is used to encrypt the 64-dimensional user feature vector to generate the first layer of 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 residual limit thresholds) are injected with a noise intensity of 0.01, balancing privacy protection and feature availability.
[0146] The third encryption layer: The encryption parameters are divided into 6 fragments and distributed to 3 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 based on the Garbled Circuit protocol, parameter fragments from 6 nodes are aggregated. During the aggregation process, each node only exchanges intermediate computation results and cannot reverse-engineer the original data, ultimately generating 128-dimensional encrypted aggregation parameters.
[0148] Furthermore, the third encryption layer and the aggregation layer also include:
[0149] The industry parameter layer is used to filter each segment for compliance using the EU veterinary drug compliance parameter library, removing parameter segments that do not meet the requirements.
[0150] A300. Based on the encrypted and aggregated parameters, initialize the personalized generation model, and use the target user's request information as a condition to perform adversarial training on the personalized generation model to obtain the trained personalized generation model.
[0151] A400. Input the request information of the target user 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 was achieved, solving the data security concerns of enterprises in export; at the same time, the generated images meet the EU veterinary drug labeling standards, and also incorporate the design style and interaction preferences of enterprise users, ultimately achieving the technical effect of both ensuring user data security and generating high-quality images that meet the personalized needs of users.
[0153] In the description of this invention, it should be understood that 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 number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0154] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0155] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first and second features are in direct contact, or that they are in indirect contact through an intermediate medium. Furthermore, "above," "over," or "on top" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," or "beneath" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0156] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0157] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make modifications, alterations, substitutions and variations to 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 the target user's request information and private data, perform desensitization processing on the target user's private data, obtain the desensitized data, compress the desensitized data, and obtain the user feature vector. S200. Input the user feature vector into the improved federated learning framework, perform hierarchical encrypted parameter aggregation processing, and obtain the encrypted aggregated parameters. S300. Based on the encrypted and aggregated parameters, initialize the personalized generation model, and use the target user's request information as a condition to perform adversarial training on the personalized generation model to obtain the trained personalized generation model. S400: Input the request information of the target user into the trained personalized generation model to obtain the final output image; In step S100, the private data of the target user is locally anonymized to obtain the anonymized data, including: S110. A multi-factor obfuscation algorithm is used to de-identify enterprise user production data and compliance standard data to generate a de-identification identifier; the multi-factor obfuscation algorithm generates a de-identification identifier by fragmenting and obfuscating enterprise user production data and compliance standard data and adding noise. S120. Based on content-aware hashing technology, perform feature extraction and desensitization mapping on historical image data to obtain the desensitization mapping results; S130. Based on the historical image data and user interaction records, obtain the user's preference for image elements; and use a preference matrix decomposition model to perform dimensionality reduction and generalization processing on the preference for image elements to obtain generalized preference data. The image elements include: product category, compliance feature marking location, technical parameter display mode, and safety warning display category; S140. The desensitized identifier, the desensitized mapping result, and the generalized preference data are associated and integrated to obtain the desensitized data; S120 includes: S121. Convert the historical image data from the original RGB color space to the YUV color space and separate the luminance component; S122. Perform discrete cosine transform on the brightness component to convert the image into the frequency domain and obtain the frequency domain coefficient matrix. S123. Remove the high-frequency detail coefficients from the frequency domain coefficient matrix, retain the low-frequency coefficients, and quantize the low-frequency coefficients to map the continuous low-frequency coefficients into discrete binary sequences. S124. The binary sequence is encrypted using a salted hash function to generate a desensitized mapping result.
2. The privacy-preserving image generation method based on biological products according to claim 1, characterized in that, In 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: biopharmaceutical raw material formulations and biopharmaceutical experimental data; compliance standard data includes data thresholds defined in the biopharmaceutical regulations for the target market.
3. The privacy-preserving image generation method based on biological products according to claim 1, characterized in that, In step S130, obtaining the user's preference for image elements based on the historical image data and user interaction records includes: S131. Preprocess the historical image data to obtain the image elements of each image; S132. Based on the image elements of each image and the user interaction record, obtain the user's preference for each image element based on weighted fusion; The user interaction records include: user browsing time, click frequency, favorites, and sharing behavior.
4. The privacy-preserving image generation method based on biological products according to claim 3, characterized in that, In step S130, the preference matrix decomposition model is a model based on probability matrix decomposition. The step of using the preference matrix decomposition model to reduce the dimensionality and generalize the preference levels of the image elements to obtain the generalized preference data includes: S133. Construct a preference relationship matrix between users and image elements based on the user's preference for each image element; S134. The preference relationship matrix is decomposed into a user feature matrix and an image element feature matrix using a probabilistic matrix factorization model, and cluster analysis is performed on the decomposed user feature matrix and image element feature matrix to obtain category information. S135. Based on the category information, reconstruct the user's preference data to obtain the generalized preference data.
5. The privacy-preserving image generation method based on biological products according to claim 1, 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 the first layer encryption parameters; The second encryption layer injects noise into the encryption parameters of the first layer through a differential privacy mechanism to obtain the encryption parameters after adding noise; The third encryption layer divides the encrypted parameters after adding noise into multiple parameter fragments, and distributes the parameter fragments to multiple aggregation nodes; The aggregation layer includes multiple aggregation nodes, which perform secure multi-party computation, aggregate multiple parameter shards, and generate encrypted aggregated parameters.
6. 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; the adversarial training includes: The generator generates candidate images based on the encrypted and aggregated parameters and the target user's request information; The discriminator distinguishes between the candidate image and the real image, generates a discrimination result, and updates the parameters of the generator through a backpropagation algorithm based on the discrimination result until the candidate image generated by the generator can make the discrimination accuracy of the discriminator higher than a preset threshold.
7. An electronic device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to implement the privacy-preserving image generation method based on biological products as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, is used to implement the privacy-preserving image generation method based on biological products as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Image processing method, device and equipment based on privacy protection
CN114638014A
Differential privacy-based generative adversarial network image generation system
CN116228906A