Data transmission method and electronic device
By identifying, replacing, or removing privacy information locally, the problem of high hardware requirements for deploying large models locally and privacy leaks in the cloud is solved, achieving secure data transmission and efficient information processing.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BOE TECHNOLOGY GROUP CO LTD
- Filing Date
- 2026-01-04
- Publication Date
- 2026-07-30
AI Technical Summary
Large models have high hardware requirements when deployed on local devices, which cannot be supported by ordinary user devices, while deployment in the cloud can easily lead to user privacy leaks.
Privacy protection is implemented locally for the large model data uploaded to the server. By identifying, replacing, or removing privacy information, a combination of local privacy protection and cloud-based large model inference is used to ensure data transmission security.
Without affecting the inference performance of large models, it improves the security of information transmission, protects user privacy, and avoids privacy leaks of large models in the cloud.
Smart Images

Figure CN2026070164_30072026_PF_FP_ABST
Abstract
Description
A data transmission method and electronic device
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510104316.3, filed on January 22, 2025, entitled "A Data Transmission Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of data processing technology, and in particular to a data transmission method and electronic device. Background Technology
[0004] In recent years, with the development of the internet, more and more important information is being processed and transmitted online, leading to significant attention and concern about information security. Information storage security vulnerabilities can result in information leaks, causing substantial losses to individuals and companies.
[0005] With the development of large-scale models, more and more image generation and text generation tasks are using them. While large-scale models offer superior performance, they are also very large in size, placing high demands on disk space when deployed locally. In particular, the inference of large-scale models requires hardware support, which is simply not feasible for ordinary users' terminal devices. On the other hand, large-scale models deployed in the cloud are prone to user privacy leaks. Summary of the Invention
[0006] This disclosure provides a data transmission method and electronic device for protecting the privacy of data uploaded to a server, thereby preventing privacy leaks from large cloud-based models.
[0007] In a first aspect, this disclosure provides a data transmission method, the method comprising:
[0008] Obtain first target data and determine the privacy information contained in the first target data;
[0009] The privacy information in the first target data is declassified to obtain the second target data;
[0010] The second target data is sent to the server, which processes the second target data and returns the processing result.
[0011] Secondly, an electronic device provided in this disclosure includes a processor and a memory, wherein the memory is used to store a program executable by the processor, and the processor is used to read the program in the memory and perform the following steps:
[0012] Obtain first target data and determine the privacy information contained in the first target data;
[0013] The privacy information in the first target data is declassified to obtain the second target data;
[0014] The second target data is sent to the server, which processes the second target data and returns the processing result.
[0015] Thirdly, embodiments of this disclosure also provide a data transmission apparatus, the apparatus comprising:
[0016] A privacy determination module is used to acquire first target data and determine the privacy information contained in the first target data;
[0017] The data determination module is used to declassify the privacy information in the first target data to obtain the second target data;
[0018] The data sending module is used to send the second target data to the server, whereby the server processes the second target data and returns the processing result.
[0019] Fourthly, embodiments of this disclosure also provide a computer storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the steps of the method described in any of the first aspects above.
[0020] Fifthly, this disclosure provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects.
[0021] These or other aspects of this disclosure will become more apparent in the following description of embodiments. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 is a flowchart illustrating an implementation of a data transmission method according to an embodiment of this disclosure;
[0024] Figure 2 is a schematic diagram of a human-computer interaction interface provided in an embodiment of this disclosure;
[0025] Figure 3 is a flowchart illustrating the protected transmission of text privacy information according to an embodiment of this disclosure;
[0026] Figure 4 is a flowchart of a text privacy protection method provided in an embodiment of this disclosure;
[0027] Figure 5 is a flowchart of a text privacy protection method provided in an embodiment of this disclosure;
[0028] Figure 6 is a flowchart illustrating the transmission process for protecting image privacy information according to an embodiment of this disclosure.
[0029] Figure 7 is a flowchart of an image privacy protection method provided in an embodiment of this disclosure;
[0030] Figure 8 is a schematic diagram of an electronic device provided in an embodiment of this disclosure;
[0031] Figure 9 is a schematic diagram of a data transmission device provided in an embodiment of this disclosure. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this disclosure clearer, the disclosure will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0033] In this disclosure, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0034] The application scenarios described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided in this disclosure. Those skilled in the art will understand that with the emergence of new application scenarios, the technical solutions provided in this disclosure are also applicable to similar technical problems. In the description of this disclosure, unless otherwise stated, "multiple" means two or more.
[0035] Before introducing the data transmission method provided in the embodiments of this disclosure, for ease of understanding, the technical background of the embodiments of this disclosure will be described in detail below.
[0036] Large models (also known as foundation models) are machine learning models with a large number of parameters and complex computational structures. These models are typically built from deep neural networks and have billions or even hundreds of billions of parameters. Large models are designed to improve the expressive power and predictive performance of models, enabling them to handle more complex tasks and data. Large models have wide applications in various fields, including natural language processing, computer vision, speech recognition, and recommender systems. By training on massive amounts of data to learn complex patterns and features, large models have stronger generalization capabilities and can make accurate predictions on unseen data.
[0037] Large language models encompass various types, such as GPT (Generative Pre-trained Transformer) and ChatGPT, both language models based on the Transformer architecture. The Transformer is a neural network architecture based on an attention mechanism, but GPT and ChatGPT differ in design and application. The GPT model aims to generate natural language text and handle various natural language processing tasks, such as text generation, translation, and summarization. It is typically used in unidirectional generation scenarios, i.e., generating coherent output based on given text. ChatGPT, on the other hand, focuses on dialogue and interactive conversations. It is specifically trained to better handle multi-turn dialogues and contextual understanding. ChatGPT is designed to provide a fluent, coherent, and engaging conversational experience by responding to user input and generating appropriate responses. Large language models, such as OpenAI's GPT-3 model, are typically natural language processing models with large-scale parameters and computational power. These models can be trained with massive amounts of data and parameters to generate human-like text or answer natural language questions. Large language models have wide applications in natural language processing, text generation, and intelligent dialogue.
[0038] With the development of large-scale models, more and more image generation and text generation tasks are using them. While large-scale models offer superior performance, they are also very large in size, placing high demands on disk space when deployed locally. In particular, the inference of large-scale models requires hardware support, which is simply not feasible for ordinary users' terminal devices. On the other hand, large-scale models deployed in the cloud are prone to user privacy leaks.
[0039] To address the aforementioned technical issues, this embodiment provides a data transmission method. The core idea is to protect the privacy of large model data uploaded to the server locally. The method involves replacing the privacy information in the data locally before uploading it to the server. By combining local privacy protection with cloud-based large model inference, the method solves the problem of privacy leakage that can easily occur with cloud-based large models. It can protect the security of data transmission without deploying the large model locally, thereby improving the security of information transmission without affecting the inference performance of the large model.
[0040] As shown in Figure 1, the data transmission method provided in this embodiment is applied to a local device, and the specific implementation process of the method is as follows:
[0041] Step 100: Obtain the first target data and determine the privacy information contained in the first target data;
[0042] In practice, the first target data can be obtained through various methods such as user input, uploading, and downloading. This embodiment does not impose too many restrictions on the method of obtaining the first target data.
[0043] Optionally, the first target data in this embodiment includes, but is not limited to, text (documents), images (videos), etc. After obtaining the first target data, it is necessary to analyze the privacy information contained in the first target data. In this embodiment, the privacy information is used to represent information that the user does not want others to know, or sensitive information that cannot be disclosed.
[0044] In some embodiments, when the data type of the first target data is text, the privacy information contained in the first target data can be determined in the following manner:
[0045] Using a keyword extraction algorithm, the semantics of the first target data are analyzed to identify the keywords contained in the first target data; based on the identified keywords, the privacy information contained in the first target data is determined.
[0046] Optionally, the keyword extraction algorithm in this embodiment includes, but is not limited to:
[0047] (1) TF-IDF (Term Frequency-Inverse Document Frequency);
[0048] TF-IDF is a statistical method used to assess the importance of a word to a document in a set of documents or a corpus. It is achieved by comparing term frequency (TF) and inverse document frequency (IDF), helping to identify words that appear frequently in only a few documents and are considered to have good discriminative power for the documents.
[0049] (2) TextRank (graph ranking);
[0050] TextRank is a graph-based ranking algorithm used in text processing, particularly for keyword extraction and summarization. It works by building a graph model of the words in the text and then using the PageRank algorithm to identify important nodes (words) in the graph, thereby extracting keywords.
[0051] (3) LDA (Latent Dirichlet Allocation);
[0052] LDA is a topic modeling algorithm that can be used to identify topics in large-scale text data. By treating each document in a document collection as a topic distribution and each topic as a keyword distribution, LDA can discover hidden topics in the document collection and extract keywords accordingly.
[0053] (4) Word2Vec (word to sequence);
[0054] Word2Vec is a method that uses neural networks to represent words as vectors. This allows for the calculation of word similarity. While Word2Vec itself is not directly used for keyword extraction, it can help identify semantically related words, thereby aiding in keyword extraction.
[0055] (5) Deep learning-based methods;
[0056] With the development of deep learning technology, some deep learning-based models such as CNN (Convolutional Neural Networks), RNN (Recurrent Neural Networks), BERT (Bidirectional Encoder Representations from Transformers), and KeyBERT have been used for feature extraction from text data, and further for keyword extraction. These models can learn the deep semantic information of text, thereby improving the accuracy and effectiveness of keyword extraction.
[0057] In implementation, this embodiment can employ the KeyBERT algorithm, which combines semantic encoding, to embed and represent the text, thereby identifying key information within the text. KeyBERT is a keyword and key phrase extraction tool based on the pre-trained language model BERT. It uses an unsupervised pre-trained model to automatically extract key information from text, enabling better understanding and processing of text data.
[0058] KeyBERT's basic principle can be divided into two steps: pre-training and keyword extraction. In the pre-training phase, KeyBERT uses a pre-trained BERT model as its base model. BERT randomly masks some words in the input text and predicts these masked words using other words in the context. This training helps BERT learn the contextual relationships between words, thereby improving its ability to represent sentences. Next, BERT takes two sentences as input and predicts whether they are consecutive. This task helps BERT learn the relationships between sentences, thus better understanding the semantics of sentences in subsequent tasks. Through these two pre-training tasks, BERT can learn rich text representations, including word-level and sentence-level representations. After pre-training, KeyBERT uses the pre-trained BERT model to extract keywords and key phrases. The keyword extraction process can be divided into the following steps:
[0059] Step 1) Text preprocessing;
[0060] First, KeyBERT preprocesses the input text. It converts the text to lowercase and removes some common stop words and punctuation marks to reduce the impact of noise on keyword extraction.
[0061] Step 2) Text encoding;
[0062] KeyBERT uses a pre-trained BERT model to encode pre-processed text. The BERT model converts each word into a corresponding word vector and encodes the entire sentence into a fixed-length vector representation. This vector representation preserves the contextual information between words, thus better expressing the semantics of the sentence.
[0063] Step 3) Keyword extraction;
[0064] After encoding, KeyBERT uses the Maximal Marginal Relevance (MMR) algorithm to extract keywords and key phrases. The MMR algorithm selects the most relevant keywords by balancing their relevance and diversity. Specifically, the MMR algorithm first calculates the similarity score of each word to the text. Then, it selects an initial keyword as a seed and calculates the relevance score of the seed to other words. Next, it selects words that are highly relevant to the seed but low in relevance to other selected keywords as the next keywords. This process is repeated until the desired number of keywords is reached. The number of keywords output is controlled by setting the `top_n` parameter. Through this algorithm, KeyBERT can select keywords with high relevance and diversity to better represent the important information in the input text.
[0065] Optionally, this embodiment can also utilize synonym generation technology to generate synonyms for privacy words, and use cosine similarity to find words or phrases in the first target data whose similarity is greater than a threshold. Finally, words or phrases whose similarity is greater than the threshold can be identified as privacy information.
[0066] In some embodiments, when the data type of the first target data is text, this embodiment can also determine the privacy information contained in the first target data through the following steps:
[0067] Based on the privacy information stored in the local database, target data with a similarity greater than a threshold to the stored privacy information is determined from the first target data; the target data with a similarity greater than the threshold is determined as the privacy information contained in the first target data.
[0068] In implementation, the local database in this embodiment stores privacy information and corresponding replacement information. Using the privacy information stored in the local database, the system queries whether the first target data contains the privacy information from the local database. If it does, the system uses the replacement information to replace the privacy information in the first target data. For example, if the local database stores "Privacy A" and its corresponding replacement information "Data A", when the first target data contains "Privacy A", "Privacy A" in the first target data is replaced with "Data A".
[0069] In some embodiments, when the data type of the first target data is an image, the privacy information and the second target data are determined as follows:
[0070] In response to a target location input by the user, a matting network is used to extract the target image at the target location in the first target data, as well as the background image other than the target location; the target image is identified as privacy information contained in the first target data, and the background image is identified as the second target data.
[0071] Optionally, the target location input by the user in this embodiment includes, but is not limited to:
[0072] (1) Text information entered by the user;
[0073] In practice, semantic analysis is performed on the text information input by the user to obtain the target location of the privacy information in the first target data, thereby extracting the target image at that target location.
[0074] In practice, the target location in the first target data is determined based on the text information, and then a matting network is used to extract the target image at that location. For example, if the user inputs a face, the face location in the first target data is determined, and the face image in the first target data is extracted using a matting network; if the user inputs a hand, the hand location in the first target data is determined, and the hand image in the first target data is extracted using a matting network.
[0075] (2) User-specified target location;
[0076] In practice, the first target data is displayed on the interface. Users can define target locations by circling or marking on the displayed first target data, and then use a matting network to extract the target image at the target location in the first target data. For example, if a user circles a tattoo on an arm in the first target data, the circled tattoo location is used as the target location, and the matting network is used to extract the tattoo image from the first target data. Similarly, if a user marks text on the first target data, the marked text location is used as the target location, and the matting network is used to extract the text image from the first target data.
[0077] In some embodiments, when the data type of the first target data is an image, this embodiment uses a matting network to extract the target image at the target location in the first target data, and the background image other than the target location, through the following steps:
[0078] Using a static image matting algorithm, the first target data is processed to obtain a classified image; the first target data and the classified image are input into the matting network to output the target image and the background image.
[0079] Optionally, before performing image processing on the first target data using a static image matting algorithm, the first target data can first undergo denoising and normalization processing. The specific implementation steps are as follows:
[0080] First, the first target data is denoised using the Perona-Malik equation to filter out noise and improve image processing accuracy. Then, the denoised first target data is normalized to obtain normalized first target data, which is used to adapt to the data format requirements of the matting network's input. The Perona-Malik equation is an anisotropic nonlinear diffusion equation that introduces a nonlinear diffusion function to achieve anisotropic diffusion, aiming to preserve edge information while smoothing regions of the image. This algorithm adjusts the gradient information of pixels to change the rate of pixel value change, thus better preserving edge features while smoothing regions of the image. The Perona-Malik algorithm is particularly suitable for image processing, effectively removing noise while preserving image edges and details.
[0081] In practice, a static image matting algorithm is used to process the normalized first target data to obtain a classified image. The first target data and the classified image are then input into the matting network, which outputs a target image and a background image. The background image is identified as the second target data, and the target image is identified as privacy information.
[0082] Optionally, static image matting algorithms include, but are not limited to, Trimap and Strokes. When processing images, static image matting algorithms typically require interactive information from the user, such as Trimap and Strokes, to help the algorithm more accurately segment the foreground and background in the image. Trimap requires the user to mark regions in the image that are definitely foreground, definitely background, and regions that may belong to either foreground or background (i.e., uncertain regions). This marking method provides the algorithm with a rough segmentation reference, thereby improving the accuracy and efficiency of matting.
[0083] In implementation, the Trimap algorithm is used to process the normalized first target data to obtain a classification image, i.e., a Trimap image. The Trimap image provides a coarse classification of a given image and consists of three parts: foreground (F), background (B), and unknown regions (U). The foreground is the matted region (representing the area containing privacy information, i.e., the target image). The unknown region is the area where the matted region and background blend, such as edges, hair, and other boundary areas between the person and the background. The background is the area that does not overlap with the matted region. The matting network uses the normalized first target data and the Trimap image as input.
[0084] In this embodiment, the matting network can be a lightweight model of the pre-trained OpenVINO (Open Visual Inference and Neural Network Optimization) (such as MobileNetV3, FBNetV3, etc.). The first target data and the trimmed image are input into the matting network to obtain the matting weight alpha. Based on the weight alpha, the background and the first target image are fused, and finally the matting result, i.e., the target image and the background image, are output.
[0085] Optionally, this embodiment may also perform the following processing on the image matting network:
[0086] 1) Depthwise separable convolution is used to extract features from the input image, reducing the computational cost of traditional convolution operations. Specifically, depthwise separable convolution reduces the number of parameters required for convolution computation by separating the correlation between the spatial dimension and the channel (depth) dimension, thus improving the efficiency of kernel parameter utilization. Depthwise separable convolution computation consists of two parts: first, spatial convolution is performed on each channel (depth), and the outputs are concatenated; then, channel convolution is performed using a unit convolution kernel to obtain the feature map. This technique mainly involves two processes: depthwise convolution and pointwise convolution. In depthwise convolution, one kernel is responsible for one channel, and each channel is convolved by only one kernel. The resulting feature map has the same number of channels as the input. Pointwise convolution performs a dot product operation on the result of depthwise convolution to further process the feature map.
[0087] 2) Use h-wish as the activation function. The h-wish formula is shown below:
[0088] In formula (1), x represents the output of the previous network layer in the matting network, ReLU represents the ReLU activation function, and h-wish[x] represents the activation function value.
[0089] The matting network in this embodiment, through a lightweight network and model optimization approach, can maximize the accuracy and speed of matting (meeting real-time matting requirements).
[0090] Step 101: Decrypt the privacy information in the first target data to obtain the second target data;
[0091] Optionally, the data types in this embodiment include, but are not limited to, text, images, etc. Optionally, the decryption processing in this embodiment is used to remove and / or replace privacy information.
[0092] In some embodiments, when the data type of the first target data is text, the second target data is determined in the following manner:
[0093] Generate replacement information corresponding to the privacy information, wherein the replacement information corresponding to the privacy information has the same data type as the privacy information; replace the privacy information contained in the first target data with the replacement information to obtain the second target data.
[0094] In practice, in order for the second target data after the privacy information has been replaced to still be processed by the server's large model, it is necessary to ensure that the data types of the privacy information and the replacement information are the same; otherwise, the large model will be unable to process the second target data.
[0095] In some embodiments, when the data type of the first target data is text, the replacement information corresponding to the privacy information is generated in any of the following ways:
[0096] Method 1: Use synonym generation technology to generate replacement information corresponding to the privacy information;
[0097] In practice, synonym generation technology can be used to generate multiple synonyms (i.e., replacement information) for privacy information, and these multiple synonyms can be provided to the user so that the user can select the corresponding replacement information for the privacy information from among the multiple synonyms.
[0098] Optionally, the synonym generation techniques in this embodiment include, but are not limited to: WordNet, an English vocabulary database containing a large number of synonyms, near-synonyms, and antonyms; word2vec, a deep learning-based technique that learns semantic relationships between words by training on a large amount of text data, and can generate words with similar meanings to given words; NLPCDA (NLP Chinese Data Augmentation), etc.
[0099] Optionally, multiple synonyms for this privacy information can be generated using the synonym generation technology in the NLPCDA open-source tool. NLPCDA is an open-source tool for Chinese data augmentation, designed to enhance the generalization ability of NLP (Natural Language Processing) models by generating sentences similar to the original text.
[0100] Method 2: Use random word generation technology to generate replacement information corresponding to the privacy information.
[0101] During implementation, corresponding replacement information can also be randomly generated based on privacy information.
[0102] Method 3: Using synonym generation technology, generate first replacement information corresponding to the privacy information, and using random word generation technology, generate second replacement information corresponding to the privacy information.
[0103] It should be noted that in this embodiment, "first" and "second" do not indicate order, but are only used to distinguish different replacement information.
[0104] During implementation, first and second replacement information corresponding to privacy information can be generated and provided to users for selection, preventing the generated synonyms from directly replacing privacy words and causing possible privacy leaks.
[0105] In some embodiments, when the data type of the first target data is text, generating the replacement information corresponding to the privacy information includes:
[0106] Based on the correspondence between privacy information and replacement information stored in the local database, the replacement information corresponding to the privacy information contained in the first target data is searched in the local database; the found replacement information is determined as the replacement information corresponding to the privacy information.
[0107] Optionally, privacy information includes, but is not limited to, text information such as words and phrases, and replacement information includes, but is not limited to, text information such as words and phrases.
[0108] In practice, the privacy words in the first target data can be searched in the local database first. Once the privacy words are found, they can be directly replaced with the corresponding replacement words stored in the local database.
[0109] In some embodiments, when the data type of the first target data is an image, the second target data is determined in the following manner:
[0110] Determine the target location of the privacy information in the first target data; remove the privacy information contained in the first target data to obtain the second target data.
[0111] It should be noted that in this embodiment, when decrypting image data, only the target location of privacy information in the image is determined, thereby removing the image data at the target location to obtain the second target data. The server then replaces the image data at the target location with a random image and merges it with the second target data, that is, the second target data is filled with an image at the target location.
[0112] In some embodiments, the second target data is determined in the following manner:
[0113] In response to the target location input by the user, a matting network is used to extract the target image at the target location in the first target data, as well as the background image other than the target location; the background image is then determined as the second target data.
[0114] In some embodiments, when the data type of the first target data is an image, the server can generate replacement information corresponding to the privacy information in the following manner:
[0115] Based on the characteristic attributes of the privacy information, a random image that conforms to the characteristic attributes is randomly generated, wherein different characteristic attributes are used to distinguish different contents contained in the first target data; the random image is determined as the replacement information corresponding to the privacy information.
[0116] Optionally, the feature attributes in this embodiment include, but are not limited to, features of different parts of the human body, such as facial features and hand features; skin features, such as tattoos; and non-human features, such as text, scenery, and background information in an image. This embodiment does not impose excessive limitations on the specific information included in the feature attributes, and the corresponding feature attributes can be determined based on the privacy information specified by the user.
[0117] In practice, when the user-defined privacy information is a face in the first target data (image), a random face image is generated and used as replacement information to replace the face in the first target data. When the user-defined privacy information is a tattoo on the body in the first target data, a random tattoo image is generated and used as replacement information to replace the tattoo on the body in the first target data.
[0118] Step 102: Send the second target data to the server, so that the server can process the second target data and return the processing result.
[0119] In some embodiments, when the data type of the first target data is text, the privacy information contained in the first target data is replaced with the replacement information to obtain the second target data. The second target data is sent to the server for processing, and the processing result is returned.
[0120] In some embodiments, when the data type of the first target data is an image, the second target data and the target location can also be sent to the server, so that the server can fill the second target data at the target location with a randomly generated image.
[0121] In practice, when the data type of the first target data is an image, the second target data is the background image in the first target data excluding privacy information. In this embodiment, the background image and the target position of the privacy information in the first target data can also be sent to the server, so that the server can fill the target position of the background image with a randomly generated image.
[0122] In practice, when the data type of the first target data is an image, the data other than the privacy information (background image) in the first target data and the target position input by the user are determined as the second target data. The second target data is sent to the cloud server, which adds a random image to the target position of the background image, generates the first target data with the privacy information removed, and then performs other image processing and returns the processing result.
[0123] In some embodiments, when the data type of the first target data is text, the following steps may also be performed:
[0124] The correspondence between the privacy information and the replacement information is stored in a local database;
[0125] Receive the processing results sent by the server;
[0126] Based on the correspondence between privacy information and replacement information stored in the local database, the replacement information in the processing result is replaced with the privacy information.
[0127] In some embodiments, in order to process the results returned by the processor more quickly, this embodiment can also use a local database to restore privacy information, that is, store the correspondence between privacy information and replacement information in the local database. When the server returns the processing result, the privacy information in the local database can be used to restore the privacy information that was replaced in the processing result, that is, replace the replacement information in the processing result with privacy information.
[0128] In some embodiments, when the data type of the first target data is an image, any of the following methods can also be performed:
[0129] Method a) Store the target location and the first target data; receive the processing result sent by the server, determine the target image based on the stored first target data and the target location, and replace the image at the target location in the processing result with the target image;
[0130] In practice, the target location in the first target data can be stored. After receiving the processing result returned by the server, the location of the privacy information in the processing result can be determined based on the target location. The privacy information in the first target data can then be used to restore the privacy information in the processing result.
[0131] Method b) Store the target location and the target image; receive the processing result sent by the server, and replace the image at the target location in the processing result with the target image.
[0132] In practice, the target location and target image (i.e. privacy information) in the first target data can be stored. Then, the image at the target location can be directly replaced with the target image using the stored target image, that is, the privacy information in the processing result can be restored using the stored target image.
[0133] It should be noted that, since the privacy information of the first target data is replaced, when the first target data is text, it can be directly replaced to obtain the second target data; when the first target data is an image, in order to solve the problem that there may be mismatch or even gaps in the edge information, the replacement information and the first target data other than the privacy information can be sent to the cloud server for image fusion processing. Similarly, the privacy information can be restored from the returned processing result, and the restored privacy information can be processed using image fusion technology.
[0134] In some embodiments, when the data type of the first target data is an image, after replacing the information at the target location in the processing result with the target image, image fusion processing can also be performed in the following manner:
[0135] A static image matting algorithm is used to process the first target data to obtain a classified image; then, an image fusion technique is used to fuse the classified image and the processing result to obtain a fused processing result.
[0136] In implementation, the Trimap algorithm is used to process the first target data to obtain a classification image, i.e., a Trimap image. The Trimap image provides a coarse classification of a given image and consists of three parts: foreground (F), background (B), and unknown region (U). To optimize image details and reflect the edge information of the matted image, a Fusion Module (perceptual fusion) is used for image fusion to obtain a more accurate alpha image (processing result). The final accurate alpha image (α) is obtained by combining the foreground (F), unknown region (U), and alpha image (processing result). p The formula for obtaining α is shown below. p =F+Uα r Formula (2);
[0137] In formula (2), α p The result of the fusion process is represented by F, where F represents the foreground of the classified image, U represents the unknown region in the classified image, and α represents the unknown region in the classified image.r This indicates the processing result.
[0138] Optionally, in order to ensure that the image style of the stored privacy information is consistent with the image style of the processed result, style transfer can also be performed on the image style of the restored processed result to ensure that the image style of the privacy information and other parts of the restored processed result is consistent.
[0139] In some embodiments, the generated replacement information can also be edited, confirmed, or otherwise processed in any one or more of the following ways, as detailed below:
[0140] Method 1) Display the privacy information contained in the first target data on the human-computer interaction interface, and in response to the user's editing operation on the privacy information, update the correspondence between the privacy information and the replacement information and store it in the database;
[0141] Method 2) Display the replacement information corresponding to the privacy information contained in the first target data on the human-computer interaction interface, and update the correspondence between the privacy information and the replacement information in response to the user's editing operation on the replacement information, and store it in the database.
[0142] Optionally, the editing operations in this embodiment include, but are not limited to, modification, selection, deletion, and addition. This embodiment does not impose too many limitations on these operations.
[0143] In implementation, when the data type of the first target data is text, privacy information and corresponding replacement information can be displayed on the human-computer interaction interface. Users can select, confirm, and modify the replacement information for each piece of privacy information, and can also add new privacy information and its corresponding replacement information. When the data type of the first target data is an image, privacy information (i.e., the target image) and a background image can be displayed on the human-computer interaction interface. Users can confirm and modify the target image.
[0144] As shown in Figure 2, this embodiment provides a human-computer interaction interface. This interface displays privacy information (a1, a2, a3, a4), replacement information (b1, b2, b3, b4) generated using synonym generation technology, and randomly generated replacement information (c1, c2, c3, c4) to the user. The user can select the corresponding replacement information for each privacy information, edit the generated replacement information, add privacy information or replacement information, and edit the extracted privacy information. After the user confirms the replacement information corresponding to each privacy information, the user-confirmed privacy information and the corresponding replacement information can be saved to a local database.
[0145] In some embodiments, after obtaining the second target data, this embodiment can further encrypt the second target data and send the encrypted second target data to the server to further ensure communication security. HTTPS (Hypertext Transfer Protocol Secure) is used for transmission to ensure the security of the communication process. Optionally, data encryption methods such as MD5 (Message Digest Algorithm 5) and SHA256 (Secure Hash Algorithm 256) can be used.
[0146] In some embodiments, the server includes, but is not limited to, a cloud server or a large server. The server can be one or more servers in the cloud, and a large model is deployed on the server for model inference. The large model includes, but is not limited to, Qwen1.5-72B, chatglm3-6B, and SD (stable diffusion) models. Among them, Qwen1.5-72B is a large language model that can perform natural language processing. ChatGLM3-6B is based on ChatGLM, which is a generative machine learning method for dialogue systems. It is specifically built for conversation tasks and can help the system automatically generate targeted responses. ChatGLM uses the GLM (Generalized Linear Model) algorithm, combined with neural network models and generative text generation technology. Through learning from a large amount of text and imitating the response patterns of the conversation participants, it can understand natural language and infer the correct response. The SD model, used for image processing, is an AI painting generation tool. It's based on the Latent Diffusion Model (LDM) technique. It compresses the image into a latent representation space using an encoder in an autoencoder (AE), then uses the diffusion model to generate the latent representation of the image, and finally obtains the generated image through the AE's decoder module. This embodiment doesn't impose too many limitations on the large model; the specific model can be determined according to actual usage requirements.
[0147] As shown in Figure 3, this embodiment provides a text privacy information protection transmission process, as detailed below:
[0148] Step 300: Obtain the first target data;
[0149] Step 301: Search the local database for privacy information in the first target data and the corresponding replacement information, and replace the privacy information in the first target data with the replacement information;
[0150] In practice, based on the privacy information stored in the local database, target data with a similarity greater than a threshold to the stored privacy information is determined from the first target data, and the target data is identified as privacy data; based on the correspondence between privacy information and replacement information stored in the local database, replacement information corresponding to the privacy information contained in the first target data is searched in the local database; the found replacement information is identified as the replacement information corresponding to the privacy information.
[0151] Step 302: Use a keyword extraction algorithm to identify privacy information in the text of the first target data, excluding statements that have already had their privacy information replaced;
[0152] In practice, after replacing the privacy information using step 301, when using the key detection and extraction algorithm to identify the privacy information, it is no longer necessary to identify the statements that have already had their privacy information replaced; it is only necessary to identify the text content that has not had its privacy information replaced.
[0153] Step 303: Using synonym generation technology, generate first replacement information corresponding to the identified privacy information, and using random word generation technology, generate second replacement information corresponding to the identified privacy information;
[0154] Step 304: Display privacy information, first replacement information, and second replacement information on the human-computer interaction interface. In response to the user's editing operation on the replacement information, determine the replacement information corresponding to each piece of privacy information in the first target data.
[0155] In practice, users can choose one of the replacement information from the first replacement information (synonyms) and the second replacement information (random words) as the replacement information for privacy information. In addition, users can also customize the replacement information, add new unrecognized privacy information, and / or the replacement information corresponding to the privacy information.
[0156] Optionally, after the user confirms the replacement information corresponding to each piece of privacy information, the correspondence between the privacy information and the replacement information is stored in a local database to facilitate the replacement of privacy information in the future.
[0157] Step 305: Using the replacement information corresponding to each piece of privacy information, replace the privacy information in the first target data to obtain the second target data;
[0158] Step 306: Encrypt the second target data using MD5 and send the encrypted second target data to the cloud server using HTTPS;
[0159] The key can be stored in advance on a cloud server for easy decryption.
[0160] Step 307: The cloud server decrypts the received data to obtain the second target data, sends the second target data to the large model for processing, encrypts the processing result with MD5, and sends it to the local device via HTTPS.
[0161] Taking the large model chatglm3-6B as an example, depending on the length of the input data for the large model, if the data length (tokens) is greater than 2000, multi-machine multi-GPU (i.e., multiple servers and multiple GPUs) can be used for model inference; if the data length (tokens) is less than 2000, single-machine multi-GPU (one server and multiple GPUs) can be used for inference. This ensures that data is not blocked while maintaining the speed of data processing.
[0162] Step 308: The local device decrypts the received data to obtain the processing result;
[0163] Step 309: Query the local database, restore the privacy information in the processing results, obtain the final processing result, and display the final processing result.
[0164] In practice, based on the correspondence between privacy information and replacement information stored in the local database, the replacement information in the processing result is replaced with the privacy information, thereby restoring the privacy information.
[0165] As shown in Figure 4, this embodiment provides a text privacy protection process. Taking the first target data including meeting transcript text as an example, the text privacy protection process provided in this embodiment is described as follows:
[0166] Step 400: The local device retrieves the first meeting record text uploaded by the user;
[0167] Step 401: Query the local database and use the local replacement information in the local database to replace the privacy information involving company privacy in the meeting record text to obtain the second meeting record text;
[0168] The privacy information includes, but is not limited to, company name, key company information, and important data.
[0169] Step 402: Using a keyword recognition algorithm, continue to perform privacy recognition on the text in the second meeting record that has not been privacy-replaced, and determine the privacy information;
[0170] Step 403: Using synonym generation technology and random word generation technology, generate the first replacement information and the second replacement information for privacy information respectively;
[0171] Step 404: Display privacy information, local replacement information, first replacement information and second replacement information on the human-computer interaction interface. In response to the user's editing operation on the replacement information, determine the corresponding replacement information for each piece of privacy information from the local replacement information, first replacement information and second replacement information.
[0172] Step 405: Using the replacement information corresponding to each piece of privacy information, replace the privacy information in the second meeting record text to obtain the third meeting record text;
[0173] Step 406: Encrypt the third meeting record text and upload it to the cloud server;
[0174] Step 407: The cloud server decrypts the received data to obtain the third meeting record text, uses the large model to generate the meeting minutes of the third meeting record text, and encrypts the meeting minutes before sending them to the local device;
[0175] Step 408: The local device decrypts the received data to obtain the meeting minutes, queries the local database to restore the private information in the meeting minutes, and provides the restored meeting minutes to the user.
[0176] As shown in Figure 5, this embodiment provides a text privacy protection process. Taking the first target data including the text of a work as an example, the text privacy protection process provided in this embodiment is explained as follows:
[0177] Step 500: The local device retrieves the text of the first work uploaded by the user;
[0178] Step 501: Query the local database and use the local replacement information in the local database to replace the privacy information involving the privacy of the work in the work text to obtain the second work text;
[0179] The privacy information includes, but is not limited to, information such as the structure of the work, details of the work, and important content.
[0180] Step 502: Using a keyword recognition algorithm, continue to perform privacy recognition on the text in the second work's copy that has not undergone privacy replacement, and determine the privacy information;
[0181] Step 503: Using synonym generation technology and random word generation technology, generate the first replacement information and the second replacement information for privacy information respectively;
[0182] Step 504: Display privacy information, local replacement information, first replacement information and second replacement information on the human-computer interaction interface. In response to the user's editing operation on the replacement information, determine the corresponding replacement information for each piece of privacy information from the local replacement information, first replacement information and second replacement information.
[0183] Step 505: Using the replacement information corresponding to each piece of privacy information, replace the privacy information in the second work's copy to obtain the third work's copy;
[0184] Step 506: Encrypt the text of the third work and upload it to the cloud server;
[0185] Step 507: The cloud server decrypts the received data to obtain the third work's text, processes the third work's text using a large model, and sends the processed result to the local device after encryption.
[0186] Step 508: The local device decrypts the received data, obtains the processing result, queries the local database, restores the privacy information in the processing result, and provides the restored processing result to the user.
[0187] As shown in Figure 6, this embodiment provides a process for protecting and transmitting image privacy information, as detailed below:
[0188] Step 600: Obtain the first target data;
[0189] Step 601: Determine the location of the privacy information of the first target data based on the target location input by the user;
[0190] Step 602: Denoise and normalize the first target data to obtain the processed first target data;
[0191] Step 603: Use a matting network to extract the target image at the target location and the background image other than the target location from the processed first target data;
[0192] For example, if the target image is a portrait, the text message "Please fill the blank part of the image below with a portrait" can also be saved to fill the blank part in the background image.
[0193] Step 604: Display the target image and background image on the human-computer interaction interface, and in response to the user's editing operation on the target image, determine the target image in the first target data;
[0194] During implementation, if the user feels that the cutout area (the area where the target image is located) is not suitable, they can modify it themselves. The area selected by the user can be re-extracted as the target image, and the first target data can be processed to obtain a new target image and background image.
[0195] Optionally, after the user confirms each target image, the target image and its target location, or the target location and the first target data, are stored in a local database for easy restoration of privacy information in the future.
[0196] Step 605: Encrypt the background image and target location, and send the encrypted second target data to the cloud server using HTTPS;
[0197] The key can be stored in advance on a cloud server for easy decryption.
[0198] Step 606: The cloud server decrypts the received data to obtain the background image and target location;
[0199] Step 607: The cloud server uses the first model to generate a random image, and adds the random image to the target position of the background image to obtain a privacy-free image;
[0200] In implementation, the first major model adds a random image to the background image at the location where the target image is missing, and then merges the random image and the background image. When the user inputs the target location via text, the user's input text can be encrypted and sent to the cloud server along with encrypted secondary target data. In the second major model, a random image is randomly generated, added to the target location in the background image based on the received target location, and then merged with the background image to generate a privacy-free image.
[0201] Taking the first major model, Qwen1.5-72B, as an example, the prompt of the first major model can be set as follows: fill the blank area in the image below with a random image. That is, the first major model is used to fill the target image that has been cut out from the background image with a random image.
[0202] Step 608: The cloud server uses the second major model to perform style transfer, encrypts the style-transferred image with MD5, and sends it to the local device via HTTPS;
[0203] Taking the second largest model, the SD model, as an example, style transfer is performed on the background image (the privacy-de-enhanced image) filled with random images.
[0204] Step 609: The local device decrypts the received data to obtain the style-transformed image;
[0205] Step 610: Use a static image matting algorithm to process the first target data to obtain a classified image. Use image fusion technology to fuse the classified image and the style-transformed image to obtain a fused image.
[0206] In practice, since further processing is applied after image matting, directly replacing the random image with the target image would result in mismatched or even hollow edge information. Therefore, image fusion technology can be used to fuse the target and background images. To optimize details and reflect the edge information of the matted image, a fusion module is used to perform image fusion, resulting in a more accurate image.
[0207] Step 611: Perform style transfer on the fused image using the first target data and output the final result.
[0208] In implementation, a style transfer network is used to perform style transfer on the fused image and the first target data, fusing the image styles of both. Optionally, the VGG19 network is used as the style transfer network for image style transfer processing.
[0209] This embodiment encrypts and uploads user text and images to the cloud to ensure user information security. Firstly, for text, a combination of model-based and manually customized methods is used for privacy selection, replacing relevant privacy information. The user-selected information is added to a local database for storage, ensuring accurate replacement in the future. Secondly, for images, a combination of model-based and manually automatically selected methods is used to replace the privacy-sensitive parts of the image. For secure data transmission between the local machine and the cloud, MD5 encryption is used, and HTTPS is used for transmission to further protect data security. The information processed in the cloud is then decrypted. First, the MD5-encrypted data is decrypted, then it is identified whether the data is an image or text. If it is text information, it corresponds to the local database, and the corresponding privacy information is replaced. If it is image information, the locally replaced image information is used to partially replace the image processed by the large model. A style transfer network can also be used to further optimize the image, avoiding image distortion caused by replacing privacy information.
[0210] As shown in Figure 7, this embodiment provides a process for image privacy protection. Taking an image as the first target data as an example, the image privacy protection process provided in this embodiment is explained as follows:
[0211] Step 700: Obtain the image to be processed uploaded by the user;
[0212] Step 701: Determine the location of the privacy information of the image to be processed based on the target location input by the user;
[0213] During implementation, the location of privacy information in an image is determined by using user-inputted facial features, tattoo locations, and other data.
[0214] Step 702: Denoise and normalize the image to be processed to obtain the first image;
[0215] Step 703: Use a matting network to extract the target image at the target location and the background image excluding the target location in the first image;
[0216] For example, if the target image is a portrait, the text message "Please fill the blank part of the image below with a portrait" can also be saved to fill the blank part in the background image.
[0217] Step 704: Display the target image and background image on the human-computer interaction interface, and determine the target image in response to the user's editing operation on the target image;
[0218] During implementation, if the user feels that the cutout area (the area where the target image is located) is not suitable, they can modify it themselves. The area selected by the user can be re-extracted as the target image, and the first target data can be processed to obtain a new target image and background image.
[0219] Optionally, after the user confirms each target image, the target image and the target location of the target image, or the target location and the first target data, are stored in a local database for easy restoration of privacy information in the future.
[0220] Step 705: Encrypt the background image and target location, and send the encrypted image to the cloud server using HTTPS;
[0221] The key can be stored in advance on a cloud server for easy decryption.
[0222] Step 706: The cloud server decrypts the received encrypted image to obtain the background image and the target location;
[0223] Step 707: The cloud server uses the first model to generate a random image, and adds the random image to the target position of the background image to obtain the second image;
[0224] Taking the first major model, Qwen1.5-72B, as an example, the prompt of the first major model can be set as follows: fill the blank area in the image below with a random image. That is, the first major model is used to fill the target image that has been cut out from the background image with a random image.
[0225] Step 708: The cloud server uses the second model to process the second image with a cartoon effect or image editing to obtain the third image. After encrypting the third image with MD5, it sends it to the local device via HTTPS.
[0226] Taking the second largest model, the SD model, as an example, style transfer is performed on the background image (the privacy-de-enhanced image) filled with random images.
[0227] Step 709: The local device decrypts the received encrypted image to obtain the third image;
[0228] Step 710: Use a static image matting algorithm to process the image to be processed to obtain a classification image. Use image fusion technology to fuse the classification image and the third image to obtain a fused image.
[0229] Step 711: Output and display the fused image.
[0230] The data transmission method provided in this embodiment effectively protects against privacy leaks associated with large cloud-based models and addresses the objective issues of hardware and disk usage associated with locally deployed large models. By protecting privacy locally, compared to directly uploading to the cloud, user information is protected, preventing leaks. Compared to directly processing large models locally, the data transmission method provided in this embodiment has no special hardware requirements, making it user-friendly. Directly processing large models locally typically requires a high-performance graphics card and can be time-consuming. This embodiment, through a local database and a matting network for different areas, implements one-click privacy protection while prioritizing user experience. It grants users customizable options, enhancing the user experience. After image restoration, this embodiment also performs image repair and style synchronization to avoid image differences between the matted and unmatted areas caused by directly replacing images of privacy regions.
[0231] Based on the same inventive concept, this disclosure also provides an electronic device. Since this device is the same device in the method of this disclosure, and the principle of the device in solving the problem is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0232] As shown in Figure 8, the electronic device includes a processor 800 and a memory 801. The memory 801 is used to store programs executable by the processor 800. The processor 800 is used to read the programs in the memory 801 and perform the following steps:
[0233] Obtain first target data and determine the privacy information contained in the first target data;
[0234] The privacy information in the first target data is declassified to obtain the second target data;
[0235] The second target data is sent to the server, which processes the second target data and returns the processing result.
[0236] As an optional implementation, the data type of the first target data is text; the processor 800 is specifically configured to execute:
[0237] Using a keyword extraction algorithm, the semantics of the first target data are analyzed to identify the keywords contained in the first target data;
[0238] The privacy information contained in the first target data is determined based on the identified keywords.
[0239] As an optional implementation, the data type of the first target data is text; the processor 800 is specifically configured to execute:
[0240] Based on the privacy information stored in the local database, target data with a similarity greater than a threshold to the stored privacy information is determined from the first target data;
[0241] The target data with a similarity greater than a threshold is identified as the privacy information contained in the first target data.
[0242] As an optional implementation, the data type of the first target data is text; the processor 800 is specifically configured to execute:
[0243] Generate replacement information corresponding to the privacy information, wherein the data type of the replacement information corresponding to the privacy information is the same as that of the privacy information;
[0244] The privacy information contained in the first target data is replaced with the replacement information to obtain the second target data.
[0245] As an optional implementation, the processor 800 is specifically configured to perform:
[0246] Using synonym generation technology, generate replacement information corresponding to the privacy information; and / or,
[0247] Using random word generation technology, replacement information corresponding to the privacy information is generated.
[0248] As an optional implementation, the processor 800 is specifically configured to perform:
[0249] Based on the correspondence between privacy information and replacement information stored in the local database, the replacement information corresponding to the privacy information contained in the first target data is retrieved from the local database;
[0250] The found replacement information is determined to be the replacement information corresponding to the privacy information.
[0251] As an optional implementation, the processor 800 is further configured to perform:
[0252] The correspondence between the privacy information and the replacement information is stored in a local database;
[0253] Receive the processing results sent by the server;
[0254] Based on the correspondence between privacy information and replacement information stored in the local database, the replacement information in the processing result is replaced with the privacy information.
[0255] As an optional implementation, the data type of the first target data is an image; the processor 800 is specifically configured to execute:
[0256] Determine the target location of the privacy information in the first target data;
[0257] Remove the privacy information contained in the first target data to obtain the second target data.
[0258] As an optional implementation, the processor 800 is specifically configured to perform:
[0259] In response to the target location input by the user, a matting network is used to extract the target image at the target location in the first target data, as well as the background image other than the target location;
[0260] The background image is identified as the second target data.
[0261] As an optional implementation, the processor 800 is specifically configured to perform:
[0262] Using a static image matting algorithm, the first target data is processed to obtain a classified image;
[0263] The first target data and the classified image are input into the matting network, and the target image and the background image are output.
[0264] As an optional implementation, the processor 800 is further configured to perform:
[0265] The second target data and the target location are sent to the server, which then uses a randomly generated image to fill the second target data at the target location.
[0266] As an optional implementation, the processor 800 is further configured to perform:
[0267] Store the target location and the first target data; receive the processing result sent by the server, determine the target image based on the stored first target data and the target location, and replace the image at the target location in the processing result with the target image; or,
[0268] Store the target location and the target image; receive the processing result sent by the server, and replace the image at the target location in the processing result with the target image.
[0269] As an optional implementation, after replacing the image at the target location in the processing result with the target image, the processor 800 is further configured to execute:
[0270] Using a static image matting algorithm, the first target data is processed to obtain a classified image;
[0271] Image fusion technology is used to fuse the classified image and the processing result to obtain the fused processing result.
[0272] As an optional implementation, the processor 800 is further configured to perform:
[0273] The privacy information contained in the first target data is displayed on the human-computer interaction interface; in response to the user's editing operation on the privacy information, the correspondence between the privacy information and the replacement information is updated and stored in the database; and / or,
[0274] The human-computer interaction interface displays replacement information corresponding to the privacy information contained in the first target data. In response to the user's editing operation on the replacement information, the correspondence between the privacy information and the replacement information is updated and stored in the database.
[0275] Based on the same inventive concept, this disclosure also provides a data transmission device. Since this device is the same as the device in the method of this disclosure, and the principle of the device in solving the problem is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0276] As shown in Figure 9, the device includes:
[0277] Privacy determination module 900 is used to acquire first target data and determine the privacy information contained in the first target data;
[0278] The data determination module 901 is used to declassify the privacy information in the first target data to obtain the second target data;
[0279] The data sending module 902 is used to send the second target data to the server, and the server processes the second target data and returns the processing result.
[0280] Based on the same inventive concept, this disclosure provides a computer storage medium comprising: computer program code, which, when executed on a computer, causes the computer to perform any of the data transmission methods described above. Since the principle by which the computer storage medium solves the problem is similar to that of the data transmission method, the implementation of the computer storage medium can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0281] In specific implementation, computer storage media can include: Universal Serial Bus Flash Drive (USB), portable hard drive, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk, and other storage media that can store program code.
[0282] Based on the same inventive concept, this disclosure also provides a computer program product, which includes computer program code that, when executed on a computer, causes the computer to perform any of the data transmission methods described above. Since the principle by which the above computer program product solves the problem is similar to that of the data transmission method, the implementation of the above computer program product can be referred to the implementation of the method, and repeated details will not be elaborated further.
[0283] Computer program products may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0284] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0285] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0286] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction device that implements the functions specified in one or more flowcharts and / or one or more block diagrams.
[0287] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0288] Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from its spirit and scope. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.
Claims
1. A data transmission method, wherein, The method includes: Obtain first target data and determine the privacy information contained in the first target data; The privacy information in the first target data is declassified to obtain the second target data; The second target data is sent to the server, which processes the second target data and returns the processing result.
2. The method according to claim 1, wherein, The data type of the first target data is text; determining the privacy information contained in the first target data includes: Using a keyword extraction algorithm, the semantics of the first target data are analyzed to identify the keywords contained in the first target data; The privacy information contained in the first target data is determined based on the identified keywords.
3. The method according to claim 1, wherein, The data type of the first target data is text; determining the privacy information contained in the first target data includes: Based on the privacy information stored in the local database, target data with a similarity greater than a threshold to the stored privacy information is determined from the first target data; The target data with a similarity greater than a threshold is identified as the privacy information contained in the first target data.
4. The method according to claim 1, wherein, The first target data is of text type; the step of declassifying the privacy information in the first target data to obtain the second target data includes: Generate replacement information corresponding to the privacy information, wherein the data type of the replacement information corresponding to the privacy information is the same as that of the privacy information; The privacy information contained in the first target data is replaced with the replacement information to obtain the second target data.
5. The method according to claim 4, wherein, The generation of replacement information corresponding to the privacy information includes: Using synonym generation technology, generate replacement information corresponding to the privacy information; and / or, Using random word generation technology, replacement information corresponding to the privacy information is generated.
6. The method according to claim 4, wherein, The generation of replacement information corresponding to the privacy information includes: Based on the correspondence between privacy information and replacement information stored in the local database, the replacement information corresponding to the privacy information contained in the first target data is retrieved from the local database; The found replacement information is determined to be the replacement information corresponding to the privacy information.
7. The method according to any one of claims 2 to 6, wherein, The method also includes: The correspondence between the privacy information and the replacement information is stored in a local database; Receive the processing results sent by the server; Based on the correspondence between privacy information and replacement information stored in the local database, the replacement information in the processing result is replaced with the privacy information.
8. The method according to claim 1, wherein, The first target data is of image type; the privacy information in the first target data is declassified to obtain the second target data, including: Determine the target location of the privacy information in the first target data; Remove the privacy information contained in the first target data to obtain the second target data.
9. The method according to claim 8, wherein, The step of removing the privacy information contained in the first target data to obtain the second target data includes: In response to the target location input by the user, a matting network is used to extract the target image at the target location in the first target data, as well as the background image other than the target location; The background image is identified as the second target data.
10. The method according to claim 9, wherein, The step of extracting the target image at the target location in the first target data using a matting network, and the background image excluding the target location, includes: Using a static image matting algorithm, the first target data is processed to obtain a classified image; The first target data and the classified image are input into the matting network, and the target image and the background image are output.
11. The method according to claim 8, wherein, The method further includes: The second target data and the target location are sent to the server, which then uses a randomly generated image to fill the second target data at the target location.
12. The method according to any one of claims 8 to 11, wherein, The method further includes: Store the target location and the first target data; receive the processing result sent by the server, determine the target image based on the stored first target data and the target location, and replace the image at the target location in the processing result with the target image; or, Store the target location and the target image; receive the processing result sent by the server, and replace the image at the target location in the processing result with the target image.
13. The method according to claim 12, wherein, After replacing the image at the target location in the processing result with the target image, the process further includes: Using a static image matting algorithm, the first target data is processed to obtain a classified image; Image fusion technology is used to fuse the classified image and the processing result to obtain the fused processing result.
14. The method according to claim 4, wherein, The method also includes: The privacy information contained in the first target data is displayed on the human-computer interaction interface; in response to the user's editing operation on the privacy information, the correspondence between the privacy information and the replacement information is updated and stored in the database; and / or, The human-computer interaction interface displays replacement information corresponding to the privacy information contained in the first target data. In response to the user's editing operation on the replacement information, the correspondence between the privacy information and the replacement information is updated and stored in the database.
15. An electronic device, wherein, The electronic device includes a processor and a memory for storing a program executable by the processor, and the processor for reading the program in the memory and performing the steps of the method according to any one of claims 1 to 14.
16. A computer storage medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 14.