CN109284684A - A kind of information processing method, device and computer storage medium - Google Patents
A kind of information processing method, device and computer storage medium Download PDFInfo
- Publication number
- CN109284684A CN109284684A CN201810956986.8A CN201810956986A CN109284684A CN 109284684 A CN109284684 A CN 109284684A CN 201810956986 A CN201810956986 A CN 201810956986A CN 109284684 A CN109284684 A CN 109284684A
- Authority
- CN
- China
- Prior art keywords
- image
- sensitive information
- information
- training
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/166—Detection; Localisation; Normalisation using acquisition arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
- G06F21/6254—Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Bioethics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
Abstract
本发明实施例公开了一种信息处理方法、装置以及计算机存储介质,通过获取待处理图像;基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像;从而实现了对用户真实的敏感信息的隐藏,在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。
The embodiment of the present invention discloses an information processing method, a device and a computer storage medium. By acquiring an image to be processed; based on a first training model, sensitive information is detected from the to-be-processed image and the type of the sensitive information is obtained; Generate replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information; perform replacement processing on the sensitive information in the to-be-processed image according to the replacement information, and obtain the processed image; thus realizing the hiding of the user's real sensitive information, and protecting the user's real sensitive information without reducing the beauty of the original image.
Description
技术领域technical field
本发明涉及图像处理的技术领域,尤其涉及一种信息处理方法、装置以及计算机存储介质。The present invention relates to the technical field of image processing, and in particular, to an information processing method, an apparatus and a computer storage medium.
背景技术Background technique
随着科学技术的发展,个人信息的安全性越来越受到人们的重视,如何避免个人信息泄露是当前的研究热点,尤其是深度学习技术的广泛应用,使得个人信息隐藏有了更进一步的发展和更广阔的前景。比如,在一些自拍和生活照中,人们往往对涉及个人信息的区域通过打马赛克或者用一些小图案进行遮挡,这些个人信息可以包括身份证号、车牌号、航班号,甚至是脸部图像。然而,打马赛克和用小图案遮挡的确能起到隐藏个人信息的作用,但是往往也会使照片失去部分美感。With the development of science and technology, people pay more and more attention to the security of personal information. How to avoid the leakage of personal information is a current research hotspot. and broader prospects. For example, in some selfies and life photos, people often block areas involving personal information by mosaicking or using some small patterns. These personal information can include ID numbers, license plate numbers, flight numbers, and even face images. However, mosaicking and masking with small patterns can indeed hide personal information, but they often make photos lose part of their beauty.
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提出一种信息处理方法、装置以及计算机存储介质,通过生成“以假乱真”虚拟的替换信息来隐藏用户真实的敏感信息,从而可以在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。The main purpose of the present invention is to provide an information processing method, a device and a computer storage medium, which can hide the user's real sensitive information by generating virtual replacement information of "fake the real", so that the user's real sensitive information can be hidden without reducing the beauty of the original image. Real sensitive information is protected.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, the technical scheme of the present invention is achieved in this way:
第一方面,本发明实施例提供了一种信息处理方法,所述方法包括:In a first aspect, an embodiment of the present invention provides an information processing method, the method includes:
获取待处理图像;Get the image to be processed;
基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;Based on the first training model, sensitive information is detected from the to-be-processed image and the type of the sensitive information is obtained;
基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;generating replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information;
根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像。Perform replacement processing on the sensitive information in the to-be-processed image according to the replacement information to obtain a processed image.
在上述方案中,所述获取待处理图像,具体包括:In the above solution, the obtaining of the image to be processed specifically includes:
接收摄像头开启指令以打开摄像头;Receive a camera turn-on command to turn on the camera;
接收拍照指令,根据所述拍照指令获取所述待处理图像。A photographing instruction is received, and the to-be-processed image is acquired according to the photographing instruction.
在上述方案中,在所述基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型之前,所述方法还包括:In the above solution, before the sensitive information is detected from the to-be-processed image based on the first training model and the type of the sensitive information is obtained, the method further includes:
获取图像样本;其中,所述图像样本中每一张图像都包含有敏感信息;Obtain an image sample; wherein, each image in the image sample contains sensitive information;
将所述图像样本中每一张图像进行块划分,获得划分后的图像块集合;Perform block division on each image in the image sample to obtain a divided image block set;
将所述划分后的图像块集合中每一个图像块进行标记,获得标记后的图像块集合;Marking each image block in the divided image block set to obtain a marked image block set;
将所述标记后的图像块集合作为第一训练集,通过对所述第一训练集和所述第一训练集中每一个图像块对应的标记进行训练,获得第一训练模型;其中,所述第一训练模型用于检测所述待处理图像中是否包含有敏感信息以及所述敏感信息的类型。Taking the marked set of image blocks as the first training set, by training the first training set and the marking corresponding to each image block in the first training set, a first training model is obtained; wherein, the The first training model is used to detect whether the image to be processed contains sensitive information and the type of the sensitive information.
在上述方案中,所述通过对所述第一训练集和所述第一训练集中每一个图像块对应的标记进行训练,获得第一训练模型,具体包括:In the above solution, the first training model obtained by training the first training set and the label corresponding to each image block in the first training set specifically includes:
将所述第一训练集输入到卷积神经网络模型中,基于所述卷积神经网络模型进行图像识别,以确定所述第一训练集中每一个图像块的类别;Inputting the first training set into a convolutional neural network model, and performing image recognition based on the convolutional neural network model to determine the category of each image block in the first training set;
基于所述确定的每一个图像块的类别以及每一个图像块对应的标记,确定出损失函数的取值;Determine the value of the loss function based on the determined category of each image block and the label corresponding to each image block;
基于所述损失函数的取值,对所述卷积神经网络模型进行参数调整,以根据参数调整后的卷积神经网络模型重新确定所述第一训练集中每一个图像块的类别,并重新确定所述损失函数的取值,直至所述损失函数的取值小于预设阈值时,确定所述卷积神经网络模型训练完成;Based on the value of the loss function, the parameters of the convolutional neural network model are adjusted to re-determine the category of each image block in the first training set according to the parameter-adjusted convolutional neural network model, and re-determine the category of each image block in the first training set. The value of the loss function, until the value of the loss function is less than a preset threshold, it is determined that the training of the convolutional neural network model is completed;
基于所述训练完成的所述卷积神经网络模型,获得第一训练模型。Based on the trained convolutional neural network model, a first training model is obtained.
在上述方案中,在所述基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息之前,所述方法还包括:In the above solution, before generating the replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information, the method further includes:
获取图像样本;其中,所述图像样本中每一张图像都包含有敏感信息;Obtain an image sample; wherein, each image in the image sample contains sensitive information;
基于第一训练模型对所述图像样本中每一张图像进行敏感信息检测;Perform sensitive information detection on each image in the image sample based on the first training model;
基于所述检测的结果,获取每一张图像中所述敏感信息的类型;Based on the detection result, obtain the type of the sensitive information in each image;
基于所述获取的多个类型对所述图像样本进行分组,获得多组图像集合;grouping the image samples based on the obtained multiple types to obtain multiple sets of images;
将所述多组图像集合作为第二训练集,通过对所述第二训练集中每一组图像集合进行单独训练,获得多组第二训练模型;其中,所述多组第二训练模型与所述多个类型之间具有对应关系。Using the multiple sets of image sets as the second training set, by performing separate training on each set of image sets in the second training set, multiple sets of second training models are obtained; wherein, the multiple sets of second training models are There is a corresponding relationship with the plurality of types.
在上述方案中,所述基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息,具体包括:In the above solution, generating the replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information specifically includes:
根据所述多组第二训练模型与所述多个类型之间的对应关系,获得所述敏感信息的类型对应的第二训练模型;obtaining a second training model corresponding to the type of the sensitive information according to the correspondence between the multiple groups of second training models and the multiple types;
基于所述对应的第二训练模型对所述敏感信息进行生成训练,获得与所述敏感信息对应的替换信息。The sensitive information is generated and trained based on the corresponding second training model to obtain replacement information corresponding to the sensitive information.
在上述方案中,所述根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像,具体包括:In the above solution, performing replacement processing on the sensitive information in the to-be-processed image according to the replacement information to obtain a processed image specifically includes:
确定所述待处理图像中所述敏感信息对应的敏感信息区域;determining the sensitive information area corresponding to the sensitive information in the to-be-processed image;
将所述替换信息覆盖于所述敏感信息区域之上,获得处理后的图像。The replacement information is overlaid on the sensitive information area to obtain a processed image.
在上述方案中,所述方法还包括:In the above scheme, the method further includes:
基于第一训练模型,若从所述待处理图像中没有检测出敏感信息,则结束所述待处理图像的信息处理流程。Based on the first training model, if no sensitive information is detected from the to-be-processed image, the information processing flow of the to-be-processed image is ended.
在上述方案中,在所述基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型之后,所述方法还包括:In the above solution, after the sensitive information is detected from the to-be-processed image based on the first training model and the type of the sensitive information is obtained, the method further includes:
发送咨询指令,所述咨询指令用于确认所述敏感信息是否需要处理;Send a consultation instruction, where the consultation instruction is used to confirm whether the sensitive information needs to be processed;
若接收到确认指令,则根据所述确认指令继续所述待处理图像的信息处理流程;If a confirmation instruction is received, continue the information processing flow of the to-be-processed image according to the confirmation instruction;
若接收到取消指令,则根据所述取消指令结束所述述待处理图像的信息处理流程。If a cancellation instruction is received, the information processing flow of the image to be processed is ended according to the cancellation instruction.
第二方面,本发明实施例提供了一种信息处理装置,所述信息处理装置包括:网络接口,存储器和处理器;其中,In a second aspect, an embodiment of the present invention provides an information processing apparatus, where the information processing apparatus includes: a network interface, a memory, and a processor; wherein,
所述网络接口,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The network interface is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
所述存储器,用于存储能够在所述处理器上运行的计算机程序;the memory for storing a computer program executable on the processor;
所述处理器,用于在运行所述计算机程序时,执行第一方面中任一项所述信息处理的方法的步骤。The processor is configured to execute the steps of the information processing method in any one of the first aspect when running the computer program.
第三方面,本发明实施例提供了一种计算机存储介质,所述计算机存储介质存储有信息处理程序,所述信息处理程序被至少一个处理器执行时实现第一方面中任一项所述信息处理的方法的步骤。In a third aspect, an embodiment of the present invention provides a computer storage medium, where an information processing program is stored in the computer storage medium, and when the information processing program is executed by at least one processor, implements the information in any one of the first aspects The steps of the method of processing.
本发明实施例所提供的一种信息处理方法、装置以及计算机存储介质,通过获取待处理图像;基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像;从而实现了对用户真实的敏感信息的隐藏,在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。An information processing method, a device, and a computer storage medium provided by the embodiments of the present invention acquire an image to be processed; based on a first training model, sensitive information is detected from the image to be processed and the type of the sensitive information is obtained ; Based on the second training model corresponding to the type of the sensitive information, generate replacement information corresponding to the sensitive information; Carry out replacement processing on the sensitive information in the to-be-processed image according to the replacement information, and obtain the processed Therefore, the real sensitive information of the user is hidden, and the real sensitive information of the user is protected without reducing the beauty of the original image.
附图说明Description of drawings
图1为本发明实施例提供的一种信息处理方法的流程示意图;1 is a schematic flowchart of an information processing method according to an embodiment of the present invention;
图2为本发明实施例提供的一种移动终端的硬件结构示意图;2 is a schematic diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention;
图3为本发明实施例提供的一种信息处理方法的详细流程示意图;3 is a detailed schematic flowchart of an information processing method provided by an embodiment of the present invention;
图4为本发明实施例提供的一种身份证原始图像的结构示意图;4 is a schematic structural diagram of an original image of an ID card provided by an embodiment of the present invention;
图5为本发明实施例提供的一种身份证原始图像划分块的结构示意图;5 is a schematic structural diagram of an identity card original image division block provided by an embodiment of the present invention;
图6为本发明实施例提供的一种处理后的身份证图像的结构示意图;6 is a schematic structural diagram of a processed ID card image according to an embodiment of the present invention;
图7为本发明实施例提供的一种信息处理装置的组成结构示意图;FIG. 7 is a schematic diagram of the composition and structure of an information processing apparatus according to an embodiment of the present invention;
图8为本发明实施例提供的另一种信息处理装置的组成结构示意图;FIG. 8 is a schematic diagram of the composition and structure of another information processing apparatus provided by an embodiment of the present invention;
图9为本发明实施例提供的又一种信息处理装置的组成结构示意图;FIG. 9 is a schematic diagram of the composition and structure of another information processing apparatus provided by an embodiment of the present invention;
图10为本发明实施例提供的再一种信息处理装置的组成结构示意图;FIG. 10 is a schematic diagram of the composition and structure of still another information processing apparatus provided by an embodiment of the present invention;
图11为本发明实施例提供的再一种信息处理装置的组成结构示意图;FIG. 11 is a schematic diagram of the composition and structure of still another information processing apparatus provided by an embodiment of the present invention;
图12为本发明实施例提供的一种信息处理装置的具体硬件结构示意图。FIG. 12 is a schematic diagram of a specific hardware structure of an information processing apparatus according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
卷积神经网络(Convolutional Neural Network,CNN)是一种前馈神经网络,已经成功地应用于图像识别。CNN的基本结构包括两层,其一为特征提取层,每个神经元的输入与前一层的局部接受域相连,并提取该局部的特征;其二为特征映射层,网络的每个计算层由多个特征映射组成,每个特征映射是一个平面,平面上所有神经元的权值相等。CNN主要用来识别位移、缩放、图像信息以及其他形式扭曲不变性的二维图形,而且CNN的特征提取层是通过训练数据进行学习,避免了显示的特征抽取,而隐式地从训练数据中进行学习;同时基于同一特征映射面上的神经元权值相同,CNN网络可以并行学习,这也是卷积神经网络相对于神经元彼此相连网络的一大优势。卷积神经网络以其局部权值共享的特殊结构在语音识别和图像处理方面有着独特的优越性,其布局更接近于实际的生物神经网络,权值共享降低了网络的复杂性,特别是多维输入向量的图像可以直接输入网络这一特点避免了特征提取和分类过程中数据重建的复杂度。Convolutional Neural Network (CNN) is a feedforward neural network that has been successfully applied to image recognition. The basic structure of CNN includes two layers, one is the feature extraction layer, the input of each neuron is connected to the local receptive field of the previous layer, and the local features are extracted; the other is the feature mapping layer, each calculation of the network. A layer consists of multiple feature maps, each feature map is a plane, and the weights of all neurons on the plane are equal. CNN is mainly used to identify displacement, scaling, image information and other forms of distortion invariant two-dimensional graphics, and the feature extraction layer of CNN is learned through training data, avoiding explicit feature extraction, and implicitly extracting features from training data. At the same time, based on the same neuron weights on the same feature mapping surface, the CNN network can learn in parallel, which is also a major advantage of the convolutional neural network compared to the network where neurons are connected to each other. Convolutional neural network has unique advantages in speech recognition and image processing with its special structure of local weight sharing, its layout is closer to the actual biological neural network, and weight sharing reduces the complexity of the network, especially multi-dimensional The fact that the image of the input vector can be directly fed into the network avoids the complexity of data reconstruction in the process of feature extraction and classification.
生成式对抗网络(Generative Adversarial Networks,GAN)是于2014年提出的一种深度学习模型,是近年来复杂分布上无监督学习最具前景的方法之一,该方法基于“博奕论”的思想,构造框架中(至少)两个模型:捕获数据分布的生成模型(Generative Model,G)和估计样本来自训练数据的概率的判别模型(Discriminative Model,D),两者同时训练,利用G和D所构成的动态“博弈过程”,在最理想的状态下,G可以生成足以“以假乱真”的数据,而D无法正确的区分生成数据和真实数据。Generative Adversarial Networks (GAN) is a deep learning model proposed in 2014. It is one of the most promising methods for unsupervised learning on complex distributions in recent years. This method is based on the idea of "game theory". There are (at least) two models in the construction framework: a Generative Model (G) that captures the distribution of the data, and a Discriminative Model (D) that estimates the probability that samples come from the training data. The dynamic "game process" constituted, in the most ideal state, G can generate enough data to be "real", while D cannot correctly distinguish the generated data from the real data.
深度学习是一种源于神经网络的强大技术,通过构建多层次的神经元,加上大量数据样本的反复训练,使得深度学习技术被越来越多地运用到图像识别和信息隐藏的应用中。在本发明实施例中,通过第一训练模型(比如卷积神经网络模型)从获取的图像中检测出个人的敏感信息,比如身份证号码、车牌号码、航班号码以及脸部图像等。通过第二训练模型(比如生成式对抗网络模型)来生成一组“以假乱真”的虚拟的替换信息,然后利用该虚拟的替换信息来覆盖原始图像中真实的敏感信息,从而实现了对用户真实的敏感信息的隐藏,在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用;下面将结合附图对本发明实施例进行详细描述。Deep learning is a powerful technology derived from neural networks. Through the construction of multi-level neurons and repeated training of a large number of data samples, deep learning technology is increasingly used in image recognition and information hiding applications. . In the embodiment of the present invention, sensitive personal information, such as ID card number, license plate number, flight number, and face image, is detected from the acquired image through a first training model (eg, a convolutional neural network model). A second training model (such as a generative adversarial network model) is used to generate a set of virtual replacement information that is "real", and then the virtual replacement information is used to cover the real sensitive information in the original image, so as to realize the real sensitive information to the user. The hiding of sensitive information also protects the user's real sensitive information without reducing the beauty of the original image; the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
实施例一Example 1
参见图1,其示出了本发明实施例提供的一种信息处理方法,该方法可以包括:Referring to FIG. 1, it shows an information processing method provided by an embodiment of the present invention. The method may include:
S101:获取待处理图像;S101: acquire the image to be processed;
S102:基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;S102: Based on the first training model, detect sensitive information from the to-be-processed image and obtain the type of the sensitive information;
S103:基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;S103: Generate replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information;
S104:根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像。S104: Perform replacement processing on the sensitive information in the to-be-processed image according to the replacement information to obtain a processed image.
基于图1所示的技术方案,通过获取待处理图像;基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像;从而实现了对用户真实的敏感信息的隐藏,在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。Based on the technical solution shown in FIG. 1, the image to be processed is acquired; based on the first training model, sensitive information is detected from the image to be processed and the type of the sensitive information is obtained; based on the type corresponding to the sensitive information The second training model generates replacement information corresponding to the sensitive information; performs replacement processing on the sensitive information in the to-be-processed image according to the replacement information, and obtains a processed image; thereby realizing the real user experience The hiding of sensitive information also protects the user's real sensitive information without reducing the beauty of the original image.
对于图1所示的技术方案,在一种可能的实现方式中,所述获取待处理图像,具体包括:For the technical solution shown in FIG. 1, in a possible implementation manner, the acquiring the image to be processed specifically includes:
接收摄像头开启指令以打开摄像头;Receive a camera turn-on command to turn on the camera;
接收拍照指令,根据所述拍照指令获取所述待处理图像。A photographing instruction is received, and the to-be-processed image is acquired according to the photographing instruction.
需要说明的是,获取待处理图像,该待处理图像中可能包含有敏感信息。其中,该待处理图像可以是从现有的图像库中得到的,也可以是从网上下载得到的,还可以是通过摄像头直接拍摄得到的;比如当摄像头开启之后,可以通过拍照指令来获取待处理图像。It should be noted that the to-be-processed image is acquired, and the to-be-processed image may contain sensitive information. The to-be-processed image may be obtained from an existing image library, downloaded from the Internet, or directly captured by a camera; for example, after the camera is turned on, a photo-taking instruction can be used to obtain the image to be processed. Process images.
对于图1所示的技术方案,在一种可能的实现方式中,在所述基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型之前,所述方法还包括:For the technical solution shown in FIG. 1, in a possible implementation manner, before the sensitive information is detected from the to-be-processed image based on the first training model and the type of the sensitive information is obtained, the Methods also include:
获取图像样本;其中,所述图像样本中每一张图像都包含有敏感信息;Obtain an image sample; wherein, each image in the image sample contains sensitive information;
将所述图像样本中每一张图像进行块划分,获得划分后的图像块集合;Perform block division on each image in the image sample to obtain a divided image block set;
将所述划分后的图像块集合中每一个图像块进行标记,获得标记后的图像块集合;Marking each image block in the divided image block set to obtain a marked image block set;
将所述标记后的图像块集合作为第一训练集,通过对所述第一训练集和所述第一训练集中每一个图像块对应的标记进行训练,获得第一训练模型;其中,所述第一训练模型用于检测所述待处理图像中是否包含有敏感信息以及所述敏感信息的类型。Taking the marked set of image blocks as the first training set, by training the first training set and the marking corresponding to each image block in the first training set, a first training model is obtained; wherein, the The first training model is used to detect whether the image to be processed contains sensitive information and the type of the sensitive information.
在上述实现方式中,具体地,所述标记包括所述图像块的类别和敏感信息的边界;其中,所述类别包括敏感信息的类型和非敏感信息。In the above implementation manner, specifically, the mark includes the category of the image block and the boundary of the sensitive information; wherein the category includes the type of the sensitive information and the non-sensitive information.
需要说明的是,所获取的图像样本包含有多张图像,每一张图像中都包含有敏感信息;其中,敏感信息是用于表征个人身份的隐私信息,比如身份证号码、手机号码、航班号码、车牌号码以及脸部图像等。具体地,图像样本可以是从网上或者本地的图像库中下载图像得到的,也可以是从预先建立的图像样本库中得到的;为了便于图像样本的统一,可以将图像样本中所有的图像归一化到一个统一分辨率,比如分辨率为448×448,或者分辨率为224×224;但是在本发明实施例中,对于图像样本的分辨率并不作具体限定。It should be noted that the obtained image sample contains multiple images, and each image contains sensitive information; among them, sensitive information is private information used to represent personal identity, such as ID number, mobile phone number, flight numbers, license plate numbers, face images, etc. Specifically, the image samples can be obtained by downloading images from an online or local image library, or can be obtained from a pre-established image sample library; in order to facilitate the unification of image samples, all images in the image samples can be classified into It is normalized to a uniform resolution, for example, the resolution is 448×448, or the resolution is 224×224; however, in this embodiment of the present invention, the resolution of the image sample is not specifically limited.
还需要说明的是,在获取到图像样本之后,为了方便后续的标记和模型训练,还可以对图像样本中的每一张图像进行块划分,比如将每一张图像划分为10×10个图像块;然后对每一个图像块进行标记,也就是说,针对每一个图像块添加一个标记,该标记包含有两部分:该图像块的类别和敏感信息的边界;该图像块的类别包括敏感信息的类型(比如身份证、联系电话、航班、车牌以及人脸等)和非敏感信息,而对于非敏感信息,敏感信息的边界(bounding box)是属于无效的;当图像块被标记之后,所标记的内容就作为该图像块的一个标签,可以用于确定该图像块是否包含敏感信息以及敏感信息的类型和边界;将标记后的图像块集合作为第一训练集,利用目前已有的卷积神经网络模型对所述第一训练集和所述标记进行训练,从而可以得到第一训练模型,比如VGG模型(Visual Geometry GroupNetwork,VGGNet)。It should also be noted that after obtaining the image samples, in order to facilitate subsequent labeling and model training, each image in the image samples can also be divided into blocks, for example, each image is divided into 10×10 images. Then mark each image block, that is, add a mark for each image block, the mark contains two parts: the category of the image block and the boundary of sensitive information; the category of the image block includes sensitive information type (such as ID card, contact number, flight, license plate, face, etc.) and non-sensitive information, and for non-sensitive information, the bounding box of sensitive information is invalid; when the image block is marked, all The marked content is used as a label of the image block, which can be used to determine whether the image block contains sensitive information and the type and boundary of sensitive information; the marked image block set is used as the first training set, using the existing volume The accumulated neural network model trains the first training set and the label, so as to obtain a first training model, such as a VGG model (Visual Geometry Group Network, VGGNet).
可以理解地,对于第一训练模型的具体训练过程,本发明实施例以卷积神经网络模型为例,在上述实现方式中,具体地,所述通过对所述第一训练集和所述第一训练集中每一个图像块对应的标记进行训练,获得第一训练模型,包括:It can be understood that, for the specific training process of the first training model, the embodiment of the present invention takes the convolutional neural network model as an example. The label corresponding to each image block in a training set is trained to obtain a first training model, including:
将所述第一训练集输入到卷积神经网络模型中,基于所述卷积神经网络模型进行图像识别,以确定所述第一训练集中每一个图像块的类别;Inputting the first training set into a convolutional neural network model, and performing image recognition based on the convolutional neural network model to determine the category of each image block in the first training set;
基于所述确定的每一个图像块的类别以及每一个图像块对应的标记,确定出损失函数的取值;Determine the value of the loss function based on the determined category of each image block and the label corresponding to each image block;
基于所述损失函数的取值,对所述卷积神经网络模型进行参数调整,以根据参数调整后的卷积神经网络模型重新确定所述第一训练集中每一个图像块的类别,并重新确定所述损失函数的取值,直至所述损失函数的取值小于预设阈值时,确定所述卷积神经网络模型训练完成;Based on the value of the loss function, the parameters of the convolutional neural network model are adjusted to re-determine the category of each image block in the first training set according to the parameter-adjusted convolutional neural network model, and re-determine the category of each image block in the first training set. The value of the loss function, until the value of the loss function is less than a preset threshold, it is determined that the training of the convolutional neural network model is completed;
基于所述训练完成的所述卷积神经网络模型,获得第一训练模型。Based on the trained convolutional neural network model, a first training model is obtained.
需要说明的是,预设阈值是用于衡量卷积神经网络模型是否训练完成的一个判定值。在本发明实施例中,假定所述确定的每一个图像块的类别定义为每一个图像块对应的标记定义为Yi,i=1,2,...,N,N表示第一训练集中图像块的数量;采用L2级范数,计算与Yi之间的差异,再将差异值取平方作为损失函数的取值,以Loss代表损失函数,则损失函数的取值为其中,将计算得到的损失函数的取值与预设阈值进行比较,若所述损失函数的取值大于预设阈值,则继续调整卷积神经网络模型的参数;并根据调整后的卷积神经网络模型重新确定出损失函数的取值;当损失函数的取值小于预设阈值时,可以确定出卷积神经网络模型训练完成,也就得到了第一训练模型。It should be noted that the preset threshold is a judgment value used to measure whether the training of the convolutional neural network model is completed. In this embodiment of the present invention, it is assumed that the determined category of each image block is defined as The label corresponding to each image block is defined as Y i , i=1,2,...,N, where N represents the number of image blocks in the first training set; L2 level norm is used to calculate The difference between Yi and Yi , and then take the square of the difference value as the value of the loss function, and use Loss to represent the loss function, then the value of the loss function is The calculated value of the loss function is compared with a preset threshold, and if the value of the loss function is greater than the preset threshold, the parameters of the convolutional neural network model are continuously adjusted; and according to the adjusted convolutional neural network The network model re-determines the value of the loss function; when the value of the loss function is less than the preset threshold, it can be determined that the training of the convolutional neural network model is completed, and the first training model is obtained.
对于图1所示的技术方案,在一种可能的实现方式中,在所述基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息之前,所述方法还包括:For the technical solution shown in FIG. 1, in a possible implementation manner, before the second training model corresponding to the type of the sensitive information generates replacement information corresponding to the sensitive information, the method Also includes:
获取图像样本;其中,所述图像样本中每一张图像都包含有敏感信息;Obtain an image sample; wherein, each image in the image sample contains sensitive information;
基于第一训练模型对所述图像样本中每一张图像进行敏感信息检测;Perform sensitive information detection on each image in the image sample based on the first training model;
基于所述检测的结果,获取每一张图像中所述敏感信息的类型;Based on the detection result, obtain the type of the sensitive information in each image;
基于所述获取的多个类型对所述图像样本进行分组,获得多组图像集合;grouping the image samples based on the obtained multiple types to obtain multiple sets of images;
将所述多组图像集合作为第二训练集,通过对所述第二训练集中每一组图像集合进行单独训练,获得多组第二训练模型;其中,所述多组第二训练模型与所述多个类型之间具有对应关系。Using the multiple sets of image sets as the second training set, by performing separate training on each set of image sets in the second training set, multiple sets of second training models are obtained; wherein, the multiple sets of second training models are There is a corresponding relationship with the plurality of types.
需要说明的是,所获取的图像样本包含有多张图像,每一张图像中都包含有敏感信息;此时可以根据第一训练模型对所述图像样本中每一张图像进行敏感信息检测,从而可以得到每一张图像的敏感信息以及所述敏感信息的类型;根据所得到的类型对图像样本进行分组,从而可以得到多组图像集合;比如身份证类型对应的图像集合、车牌类型对应的图像集合以及联系电话类型对应的图像集合等;将这多组图像集合作为第二训练集,对于第二训练集中的每一组图像集合单独训练,经过训练之后,也就得到了多组第二训练模型,而且多组第二训练模型是与多个敏感信息的类型相对应的;比如身份证类型对应的图像集合经过训练之后,得到了身份证类型对应的第二训练模型;车牌类型对应的图像集合经过训练之后,得到了车牌类型对应的第二训练模型;联系电话类型对应的图像集合经过训练之后,得到了联系电话类型对应的第二训练模型。It should be noted that the acquired image sample contains multiple images, and each image contains sensitive information; at this time, sensitive information detection can be performed on each image in the image sample according to the first training model, Thereby, the sensitive information of each image and the type of the sensitive information can be obtained; the image samples are grouped according to the obtained type, so that multiple sets of images can be obtained; for example, the image set corresponding to the ID card type and the license plate type The set of images and the set of images corresponding to the contact phone type, etc.; these sets of images are used as the second training set, and each set of images in the second training set is trained separately. After training, more A group of second training models, and multiple groups of second training models correspond to multiple types of sensitive information; for example, after the image set corresponding to the ID card type is trained, the second training model corresponding to the ID card type is obtained; license plate After the image set corresponding to the type is trained, a second training model corresponding to the license plate type is obtained; after the image set corresponding to the contact phone type is trained, the second training model corresponding to the contact phone type is obtained.
还需要说明的是,对于第二训练模型的具体训练过程,本发明实施例以生成式对抗网络模型为例,其中,生成式对抗网络模型包括生成模型G和判别模型D,根据生成式对抗网络模型对第二训练集中的某组图像集合进行训练,在训练过程中,生成模型G的目标就是尽量生成接近真实的图像去让判别网络D进行判别,而判别网络D的目标就是尽量把G所生成的图像和某组图像集合中的真实图像区分开来;从而G和D构成了一个动态的“博弈过程”;训练的最终结果使得G可以生成足以“以假乱真”的图像,而D难以判定G所生成的图像究竟是不是真实图像,判定概率分别为0.5;从而也就得到了第二训练模型,该第二训练模型可以生成“以假乱真”的虚拟信息。It should also be noted that, for the specific training process of the second training model, a generative adversarial network model is used as an example in the embodiment of the present invention, wherein the generative adversarial network model includes a generative model G and a discriminant model D, according to the generative adversarial network model. The model trains a certain set of images in the second training set. During the training process, the goal of generating model G is to generate images that are as close to real as possible to allow the discriminant network D to discriminate, and the goal of the discriminant network D is to try to make G The generated images are distinguished from the real images in a certain set of images; thus G and D constitute a dynamic "game process"; the final result of training enables G to generate images that are "real" enough, while D is difficult to It is determined whether the image generated by G is a real image, and the probability of determination is 0.5; thus, a second training model is obtained, which can generate virtual information that is "real".
在上述实现方式中,具体地,所述基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息,包括:In the above implementation manner, specifically, generating the replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information includes:
根据所述多组第二训练模型与所述多个类型之间的对应关系,获得所述敏感信息的类型对应的第二训练模型;obtaining a second training model corresponding to the type of the sensitive information according to the correspondence between the multiple groups of second training models and the multiple types;
基于所述对应的第二训练模型对所述敏感信息进行生成训练,获得与所述敏感信息对应的替换信息。The sensitive information is generated and trained based on the corresponding second training model to obtain replacement information corresponding to the sensitive information.
需要说明的是,当确定出待处理图像中敏感信息的类型之后,可以根据多组第二训练模型与多个类型之间的对应关系,从而得到了该敏感信息的类型所对应的第二训练模型;然后将该敏感信息输入到所对应的第二训练模型中进行训练,从而生成了无限接近于该敏感信息的虚拟的替换信息,也就是说,得到了与该敏感信息相对应的替换信息。It should be noted that, after determining the type of sensitive information in the image to be processed, the second training model corresponding to the type of sensitive information can be obtained according to the correspondence between multiple sets of second training models and multiple types. model; and then input the sensitive information into the corresponding second training model for training, thereby generating virtual replacement information that is infinitely close to the sensitive information, that is, obtaining the replacement information corresponding to the sensitive information .
对于图1所示的技术方案,在一种可能的实现方式中,所述根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像,具体包括:For the technical solution shown in FIG. 1, in a possible implementation manner, performing replacement processing on the sensitive information in the to-be-processed image according to the replacement information to obtain a processed image specifically includes:
确定所述待处理图像中所述敏感信息对应的敏感信息区域;determining the sensitive information area corresponding to the sensitive information in the to-be-processed image;
将所述替换信息覆盖于所述敏感信息区域之上,获得处理后的图像。The replacement information is overlaid on the sensitive information area to obtain a processed image.
需要说明的是,当得到与该敏感信息相对应的替换信息之后,为了便于隐藏待处理图像中的敏感信息;可以确定出待处理图像中的所述敏感信息对应的敏感信息区域,所述敏感信息区域是基于敏感信息的边界(bounding box)得到的;然后利用替换信息覆盖于所述敏感信息区域之上,从而可以得到处理后的图像。这里,处理后的图像中,真正的敏感信息已经被替换信息所隐藏,从而也就实现了在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。It should be noted that, after obtaining the replacement information corresponding to the sensitive information, in order to facilitate hiding the sensitive information in the image to be processed; the sensitive information area corresponding to the sensitive information in the image to be processed can be determined. The information area is obtained based on the bounding box of the sensitive information; then the sensitive information area is overlaid with the replacement information, so that the processed image can be obtained. Here, in the processed image, the real sensitive information has been hidden by the replacement information, so that the real sensitive information of the user can be protected without reducing the beauty of the original image.
可以理解地,待处理图像中可以包含敏感信息,也可以没有包含敏感信息;若检测出待处理图像中没有包含敏感信息,则不需要执行对待处理图像的信息处理流程;因此,对于图1所示的技术方案,在一种可能的实现方式中,所述方法还包括:Understandably, the image to be processed may or may not contain sensitive information; if it is detected that the image to be processed does not contain sensitive information, the information processing flow of the image to be processed does not need to be executed; The technical solution shown, in a possible implementation, the method further includes:
基于第一训练模型,若从所述待处理图像中没有检测出敏感信息,则结束所述待处理图像的信息处理流程。Based on the first training model, if no sensitive information is detected from the to-be-processed image, the information processing flow of the to-be-processed image is ended.
需要说明的是,基于第一训练模型,若从待处理图像中检测出敏感信息,则继续待处理图像的信息处理流程,比如得到所述敏感信息的类型,然后基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像;基于第一训练模型,若从待处理图像中没有检测出敏感信息,则结束待处理图像的信息处理流程,并不需要对待处理图像进行图像信息处理。It should be noted that, based on the first training model, if sensitive information is detected from the image to be processed, the information processing flow of the image to be processed is continued, such as obtaining the type of the sensitive information, and then corresponding to the type of the sensitive information based on the type of the sensitive information. The second training model of the second training model is used to generate replacement information corresponding to the sensitive information; according to the replacement information, the sensitive information in the to-be-processed image is subjected to replacement processing to obtain a processed image; based on the first training model, If no sensitive information is detected from the to-be-processed image, the information processing flow of the to-be-processed image is ended, and it is not necessary to perform image information processing on the to-be-processed image.
可以理解地,当检测出待处理图像中包含有敏感信息时,该敏感信息可能并不是那么敏感,也可能该待处理图像并不会公布于众,这种情况下不需要对敏感信息进行处理,也就不需要执行对待处理图像的信息处理流程;因此,对于图1所示的技术方案,在一种可能的实现方式中,所述方法还包括:Understandably, when it is detected that the image to be processed contains sensitive information, the sensitive information may not be so sensitive, or the image to be processed may not be released to the public, in which case the sensitive information does not need to be processed. , there is no need to execute the information processing flow of the image to be processed; therefore, for the technical solution shown in FIG. 1 , in a possible implementation manner, the method further includes:
在所述基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型之后,所述方法还包括:After the sensitive information is detected from the to-be-processed image based on the first training model and the type of the sensitive information is obtained, the method further includes:
发送咨询指令,所述咨询指令用于确认所述敏感信息是否需要处理;Send a consultation instruction, where the consultation instruction is used to confirm whether the sensitive information needs to be processed;
若接收到确认指令,则根据所述确认指令继续所述待处理图像的信息处理流程;If a confirmation instruction is received, continue the information processing flow of the to-be-processed image according to the confirmation instruction;
若接收到取消指令,则根据所述取消指令结束所述述待处理图像的信息处理流程。If a cancellation instruction is received, the information processing flow of the image to be processed is ended according to the cancellation instruction.
需要说明的是,当确定出待处理图像中包含有敏感信息时,这时候可以通过发送咨询指令;然后由用户来确认所述敏感信息是否需要处理;当接收到确认指令时,则确认该敏感信息需要处理,也就是说,此时还需要继续所述待处理图像的信息处理流程;当接收到取消指令时,则确认该敏感信息不需要处理,也就是说,此时可以结束所述述待处理图像的信息处理流程;从而既可以在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用,又可以避免一些非必要的敏感信息隐藏的处理操作,节省了系统资源。It should be noted that when it is determined that the image to be processed contains sensitive information, a consultation instruction can be sent at this time; then the user confirms whether the sensitive information needs to be processed; when a confirmation instruction is received, the sensitive information is confirmed. The information needs to be processed, that is to say, the information processing flow of the image to be processed needs to be continued at this time; when a cancellation instruction is received, it is confirmed that the sensitive information does not need to be processed, that is to say, the description can be ended at this time. The information processing flow of the image to be processed; thus, it can not only protect the user's real sensitive information without reducing the beauty of the original image, but also avoid some unnecessary processing operations to hide sensitive information, saving system resources .
本实施例提供了一种信息处理方法,通过获取待处理图像;基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像;从而实现了对用户真实的敏感信息的隐藏,在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。This embodiment provides an information processing method, by acquiring an image to be processed; based on a first training model, sensitive information is detected from the image to be processed and the type of the sensitive information is obtained; based on the type of the sensitive information The corresponding second training model generates replacement information corresponding to the sensitive information; performs replacement processing on the sensitive information in the to-be-processed image according to the replacement information, and obtains a processed image; The hiding of real sensitive information also protects the real sensitive information of users without reducing the beauty of the original image.
实施例二Embodiment 2
基于前述实施例相同的发明构思,参见图2,其示出了一种能够应用于前述实施例技术方案的移动终端结构示例,该移动终端200具有拍照功能和显示功能,可以但不限于是手机、平板电脑、个人数字助理、电子书阅读器、多媒体播放设备、智能拍照设备以及可穿戴设备等便携式电子设备。如图2所示,该移动终端200的结构可以包括:射频(RadioFrequency,RF)单元210、存储器220、输入单元230、显示单元240、摄像头250、传感器260、处理器270以及电源280等部件;其中,图2所示移动终端的各个部件的主要功能介绍如下:Based on the same inventive concept of the foregoing embodiments, referring to FIG. 2 , it shows a structural example of a mobile terminal that can be applied to the technical solutions of the foregoing embodiments. The mobile terminal 200 has a camera function and a display function, and may be, but not limited to, a mobile phone , tablet computers, personal digital assistants, e-book readers, multimedia playback devices, smart camera devices and portable electronic devices such as wearable devices. As shown in FIG. 2 , the structure of the mobile terminal 200 may include: a radio frequency (RadioFrequency, RF) unit 210, a memory 220, an input unit 230, a display unit 240, a camera 250, a sensor 260, a processor 270, a power supply 280 and other components; Among them, the main functions of each component of the mobile terminal shown in FIG. 2 are introduced as follows:
射频单元210用于收发信息或通话过程中信号的接收和发送;射频单元210包括但不限于天线、至少一个放大器、收发信机、双工器等;具体的,将基站的下行信息接收后,发送给处理器270处理;另外,将上行的数据发送给基站;The radio frequency unit 210 is used to send and receive information or to receive and transmit signals during a call; the radio frequency unit 210 includes but is not limited to an antenna, at least one amplifier, a transceiver, a duplexer, etc. Specifically, after receiving the downlink information of the base station, send to the processor 270 for processing; in addition, send the uplink data to the base station;
存储器220用于存储软件程序以及各种数据,存储器220主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如用于拍照的应用程序、用于检测敏感信息及敏感信息类型的第一训练模型应用程序、用于生成替换信息的第二训练模型应用程序等)等;存储数据区可存储根据移动终端的使用所创建的数据;The memory 220 is used to store software programs and various data. The memory 220 mainly includes a program storage area and a data storage area, wherein the storage program area can store an operating system, an application program required for at least one function (such as an application program for taking pictures) , the first training model application for detecting sensitive information and sensitive information types, the second training model application for generating replacement information, etc.), etc.; the storage data area can store data created according to the use of the mobile terminal;
输入单元230用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的按键信号输入;具体地,输入单元230可包括触控面板231(也称之为触摸屏)以及其他输入设备232(包括但不限于物理键盘、功能按键(比如音量控制按键、开关按键等)、鼠标等)。The input unit 230 is used for receiving input digital or character information, and generating key signal input related to user settings and function control of the mobile terminal; specifically, the input unit 230 may include a touch panel 231 (also called a touch screen) and Other input devices 232 (including but not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), mouse, etc.).
显示单元240用于显示由用户输入的信息或提供给用户的信息,显示单元240包括显示面板241,触控面板231可覆盖显示面板241;虽然在图2中,触控面板231与显示面板241是作为两个独立的部件来实现移动终端的输入和输入功能,但是在某些实施例中,可以将触控面板231与显示面板241集成而实现移动终端的输入和输出功能;The display unit 240 is used to display information input by the user or information provided to the user, the display unit 240 includes a display panel 241, and the touch panel 231 can cover the display panel 241; although in FIG. 2, the touch panel 231 and the display panel 241 It is used as two independent components to realize the input and input functions of the mobile terminal, but in some embodiments, the touch panel 231 and the display panel 241 can be integrated to realize the input and output functions of the mobile terminal;
摄像头250用于静态图片、连拍功能或者较短视频拍摄,摄像头250分为内置与外置,内置摄像头是指摄像头在移动终端内部,使用更方便;外置摄像头通过数据线或者移动终端的接口与外部摄像头相连来完成拍摄功能,可以减轻移动终端的重量;摄像头250一般具有视频摄像/传播和静态图像捕捉等功能,用于将所捕捉的信息通过串并口或其他接口传输到存储器107;The camera 250 is used for still pictures, continuous shooting function or short video shooting. The camera 250 is divided into built-in and external. The built-in camera means that the camera is inside the mobile terminal, which is more convenient to use; the external camera is connected through the data cable or the interface of the mobile terminal. Connecting with an external camera to complete the shooting function, the weight of the mobile terminal can be reduced; the camera 250 generally has functions such as video recording/distribution and still image capture, and is used to transmit the captured information to the memory 107 through a serial-parallel port or other interface;
移动终端还包括至少一种传感器260,比如光传感器、重力传感器、陀螺仪以及其他传感器;当移动终端内部的重力传感器或者陀螺仪检测到移动终端处于抖动状态时,可以通过处理器270执行对应的拍照处理方式,比如开启防抖动功能。The mobile terminal also includes at least one sensor 260, such as a light sensor, a gravity sensor, a gyroscope and other sensors; when the gravity sensor or gyroscope inside the mobile terminal detects that the mobile terminal is in a shaking state, the processor 270 can execute corresponding Photo processing methods, such as turning on the anti-shake function.
处理器270是移动终端的控制中心,利用各种接口和线路连接移动终端的各个部分,通过运行或执行存储在存储器220内的软件程序和/或模块,以及调用存储在存储器220内的数据,执行移动终端的各种功能和处理数据,从而实现对移动终端进行整体监控;The processor 270 is the control center of the mobile terminal, using various interfaces and lines to connect various parts of the mobile terminal, by running or executing the software programs and/or modules stored in the memory 220, and calling the data stored in the memory 220, Execute various functions of the mobile terminal and process data, so as to realize the overall monitoring of the mobile terminal;
移动终端还包括给各个部件供电的电源280(比如电池),优选的,电源可以通过电源管理系统与处理器270逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal also includes a power supply 280 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 270 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
本领域技术人员可以理解,图2中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 2 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than the one shown, or combine some components, or different components layout.
基于上述移动终端20的结构示例,参见图3,其示出了本发明实施例提供的一种信息处理方法的详细流程,该详细流程可以包括:Based on the above-mentioned structural example of the mobile terminal 20, see FIG. 3, which shows a detailed process of an information processing method provided by an embodiment of the present invention, and the detailed process may include:
S301:接收摄像头开启指令以打开摄像头;S301: Receive a camera turn-on instruction to turn on the camera;
S302:接收拍照指令,根据所述拍照指令获取所述待处理图像;S302: Receive a photographing instruction, and obtain the to-be-processed image according to the photographing instruction;
举例来说,以图2所示的移动终端200为例,当移动终端200需要拍照时,首先需要打开摄像头250,然后通过输入单元230(比如实体按键或者触控面板231上的拍照触控按钮)来输入一个拍照指令,根据该拍照指令就可以得到一张原始图像,以此作为待处理图像进行后续的敏感信息检测及处理。下面以身份证原始图像为例,参考图4,其示出了本发明实施例提供的一种移动终端拍摄的身份证原始图像示意图。For example, taking the mobile terminal 200 shown in FIG. 2 as an example, when the mobile terminal 200 needs to take a photo, the camera 250 needs to be turned on first, and then the camera 250 needs to be turned on through the input unit 230 (such as a physical button or a photo touch button on the touch panel 231 ). ) to input a photographing instruction, and an original image can be obtained according to the photographing instruction, which is used as an image to be processed for subsequent sensitive information detection and processing. The following takes an original image of an ID card as an example, referring to FIG. 4 , which shows a schematic diagram of an original image of an ID card captured by a mobile terminal according to an embodiment of the present invention.
S303:基于第一训练模型对所述待处理图像进行敏感信息检测;S303: Perform sensitive information detection on the to-be-processed image based on the first training model;
S304:若从所述待处理图像中检测出敏感信息,则获取所述敏感信息的类型;S304: If sensitive information is detected from the to-be-processed image, obtain the type of the sensitive information;
S305:若从所述待处理图像中没有检测出敏感信息,则结束所述待处理图像的信息处理流程;S305: If no sensitive information is detected from the to-be-processed image, end the information processing flow of the to-be-processed image;
举例来说,以图2所示的移动终端200为例,存储器220中已经预先存储有第一训练模型的应用程序和第二训练模型的应用程序;结合上述实例,以图4所示的身份证原始图像为例,由处理器270通过预先存储的第一训练模型对该身份证原始图像进行敏感信息检测;在敏感信息的检测过程中,处理器270还可以针对该原始图像进行图像块划分,比如图5所示,将身份证原始图像划分为5×5个图像块,然后由第一训练模型对每一个图像块进行敏感信息检测,本发明实施例对此并不作具体限定;其中,在经过第一训练模型的敏感信息检测之后,若从该原始图像中没有检测出敏感信息,比如从该原始图像中没有检测到身份证号码、手机号码、航班号码、车牌号码以及脸部图像等信息,则直接结束该原始图像的信息处理流程;若从该原始图像中检测出敏感信息,比如501所示区域内的信息检测为身份证号码,502所示区域内的信息检测为人脸图像;基于身份证号码和人脸图像均为敏感信息,则需要继续该原始图像的信息处理流程。For example, taking the mobile terminal 200 shown in FIG. 2 as an example, the application program of the first training model and the application program of the second training model have been pre-stored in the memory 220; Taking the original image of the ID card as an example, the processor 270 performs sensitive information detection on the original image of the ID card through the pre-stored first training model; in the process of detecting the sensitive information, the processor 270 can also perform image block division for the original image 5 , the original image of the ID card is divided into 5×5 image blocks, and then the first training model performs sensitive information detection on each image block, which is not specifically limited in the embodiment of the present invention; wherein, After the sensitive information detection of the first training model, if no sensitive information is detected from the original image, for example, no ID number, mobile phone number, flight number, license plate number, face image, etc. are detected from the original image. If sensitive information is detected from the original image, for example, the information in the area shown in 501 is detected as an ID card number, and the information in the area shown in 502 is detected as a face image; Since both the ID card number and the face image are sensitive information, the information processing flow of the original image needs to be continued.
S306:发送咨询指令,所述咨询指令用于确认所述敏感信息是否需要处理;S306: Send a consultation instruction, where the consultation instruction is used to confirm whether the sensitive information needs to be processed;
S307:若接收到确认指令,则根据所述确认指令继续所述待处理图像的信息处理流程;S307: if a confirmation instruction is received, continue the information processing flow of the to-be-processed image according to the confirmation instruction;
S308:若接收到取消指令,则根据所述取消指令结束所述述待处理图像的信息处理流程;S308: If a cancellation instruction is received, end the information processing flow of the to-be-processed image according to the cancellation instruction;
需要说明的是,在步骤S304之后,执行步骤S306;当确定敏感信息需要处理时,执行步骤S307;当确定敏感信息不需要处理时,执行步骤S308;It should be noted that, after step S304, step S306 is performed; when it is determined that the sensitive information needs to be processed, step S307 is performed; when it is determined that the sensitive information does not need to be processed, step S308 is performed;
举例来说,以图2所示的移动终端200为例,存储器220中已经预先存储有第一训练模型的应用程序和第二训练模型的应用程序;结合上述实例,仍以图4所示的身份证原始图像为例,当检测出该原始图像中有敏感信息时,由于考虑到有些敏感信息并不是那么敏感,或者该原始图像并不会公布于众,此时处理器270还会向用户发送咨询指令,比如通过弹出对话框的形式来咨询用户;当用户确认该敏感信息需要处理时,可以通过点击“确认”按钮来向移动终端200发送确认指令,处理器270根据所接收到的确认指令将继续该原始图像的信息处理流程;当用户确认该敏感信息不需要处理时,可以通过点击“取消”按钮来向移动终端200发送取消指令,处理器270根据所接收到的取消指令将直接结束该原始图像的信息处理流程;从而可以避免一些非必要的敏感信息隐藏的处理操作,节省了系统资源。For example, taking the mobile terminal 200 shown in FIG. 2 as an example, the application program of the first training model and the application program of the second training model have been pre-stored in the memory 220; Taking the original image of the ID card as an example, when it is detected that there is sensitive information in the original image, considering that some sensitive information is not so sensitive, or the original image will not be released to the public, the processor 270 will also notify the user at this time. Send a consultation instruction, for example, in the form of a pop-up dialog box to consult the user; when the user confirms that the sensitive information needs to be processed, the user can click the "Confirm" button to send a confirmation instruction to the mobile terminal 200, and the processor 270 receives the confirmation according to the instruction. The instruction will continue the information processing flow of the original image; when the user confirms that the sensitive information does not need to be processed, the user can click the "Cancel" button to send the cancellation instruction to the mobile terminal 200, and the processor 270 will directly send the cancellation instruction according to the received cancellation instruction. The information processing flow of the original image is ended; thus, some unnecessary processing operations of hiding sensitive information can be avoided, thereby saving system resources.
S309:基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;S309: Based on the second training model corresponding to the type of the sensitive information, generate replacement information corresponding to the sensitive information;
S310:确定所述待处理图像中所述敏感信息对应的敏感信息区域;S310: Determine the sensitive information area corresponding to the sensitive information in the to-be-processed image;
S311:将所述替换信息覆盖于所述敏感信息区域之上,获得处理后的图像。S311: Overlay the replacement information on the sensitive information area to obtain a processed image.
举例来说,以图2所示的移动终端200为例,存储器220中已经预先存储有第一训练模型的应用程序和第二训练模型的应用程序;结合上述实例,仍以图4所示的身份证原始图像为例,当确认原始图像中的敏感信息需要处理时,根据敏感信息的类型,比如对于身份证类型,则选取身份证类型对应的第二训练模型,以生成与身份证号码对应的替换信息;对于人脸图像类型,则选取人脸图像类型对应的第二训练模型,以生成与人脸图像对应的替换信息;其中,所生成的替换信息无限接近于真实的敏感信息;然后根据所确定的待处理图像中敏感信息对应的敏感信息区域,将所生成的替换信息覆盖于该敏感信息区域之后,也就得到了处理后的图像,比如图6所示的处理后的身份证图像示例;从而实现了在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。For example, taking the mobile terminal 200 shown in FIG. 2 as an example, the application program of the first training model and the application program of the second training model have been pre-stored in the memory 220; Take the original image of the ID card as an example. When it is confirmed that the sensitive information in the original image needs to be processed, according to the type of sensitive information, such as the type of ID card, the second training model corresponding to the type of ID card is selected to generate a corresponding model corresponding to the ID card number. replacement information; for the face image type, select the second training model corresponding to the face image type to generate the replacement information corresponding to the face image; wherein, the generated replacement information is infinitely close to the real sensitive information; then According to the determined sensitive information area corresponding to the sensitive information in the image to be processed, after covering the generated replacement information on the sensitive information area, a processed image is obtained, such as the processed ID card shown in FIG. 6 . Image example; thus realizing the protection of the user's real sensitive information without reducing the beauty of the original image.
通过上述实施例,对前述实施例的具体实现进行了详细阐述,从中可以看出,通过前述实施例的技术方案,从而实现了对用户真实的敏感信息的隐藏,在不降低原始图像美感的情况下还对用户真实的敏感信息起到了保护作用。Through the above embodiments, the specific implementation of the above embodiments is described in detail, from which it can be seen that through the technical solutions of the above embodiments, the user's real sensitive information can be hidden, without reducing the beauty of the original image. It also protects the user's real sensitive information.
实施例三Embodiment 3
基于前述实施例相同的发明构思,参见图7,其示出了本发明实施例提供的一种信息处理装置70的组成,所述信息处理装置70可以包括:第一获取部分701、第一检测部分702、生成部分703和替换部分704;其中,Based on the same inventive concept of the foregoing embodiments, see FIG. 7 , which shows the composition of an information processing apparatus 70 provided by an embodiment of the present invention. The information processing apparatus 70 may include: a first acquisition part 701 , a first detection part 701 part 702, generation part 703 and replacement part 704; where,
所述第一获取部分701,配置为获取待处理图像;The first acquisition part 701 is configured to acquire images to be processed;
所述第一检测部分702,配置为基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;The first detection part 702 is configured to detect sensitive information from the to-be-processed image and obtain the type of the sensitive information based on the first training model;
所述生成部分703,配置为基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;The generating part 703 is configured to generate replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information;
所述替换部分704,配置为根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像。The replacement part 704 is configured to perform replacement processing on the sensitive information in the to-be-processed image according to the replacement information to obtain a processed image.
在上述方案中,所述第一获取部分701,具体配置为:In the above solution, the first obtaining part 701 is specifically configured as:
接收摄像头开启指令以打开摄像头;Receive a camera turn-on command to turn on the camera;
接收拍照指令,根据所述拍照指令获取所述待处理图像。A photographing instruction is received, and the to-be-processed image is acquired according to the photographing instruction.
在上述方案中,参见图8,所述信息处理装置70还包括第一训练部分705,配置为:In the above solution, referring to FIG. 8 , the information processing apparatus 70 further includes a first training part 705 configured as:
获取图像样本;其中,所述图像样本中每一张图像都包含有敏感信息;Obtain an image sample; wherein, each image in the image sample contains sensitive information;
将所述图像样本中每一张图像进行块划分,获得划分后的图像块集合;Perform block division on each image in the image sample to obtain a divided image block set;
将所述划分后的图像块集合中每一个图像块进行标记,获得标记后的图像块集合;Marking each image block in the divided image block set to obtain a marked image block set;
将所述标记后的图像块集合作为第一训练集,通过对所述第一训练集和所述第一训练集中每一个图像块对应的标记进行训练,获得第一训练模型;其中,所述第一训练模型用于检测所述待处理图像中是否包含有敏感信息以及所述敏感信息的类型。Taking the marked set of image blocks as the first training set, by training the first training set and the marking corresponding to each image block in the first training set, a first training model is obtained; wherein, the The first training model is used to detect whether the image to be processed contains sensitive information and the type of the sensitive information.
在上述方案中,所述第一训练部分705,具体配置为:In the above solution, the first training part 705 is specifically configured as:
将所述第一训练集输入到卷积神经网络模型中,基于所述卷积神经网络模型进行图像识别,以确定所述第一训练集中每一个图像块的类别;Inputting the first training set into a convolutional neural network model, and performing image recognition based on the convolutional neural network model to determine the category of each image block in the first training set;
基于所述确定的每一个图像块的类别以及每一个图像块对应的标记,确定出损失函数的取值;Determine the value of the loss function based on the determined category of each image block and the label corresponding to each image block;
基于所述损失函数的取值,对所述卷积神经网络模型进行参数调整,以根据参数调整后的卷积神经网络模型重新确定所述第一训练集中每一个图像块的类别,并重新确定所述损失函数的取值,直至所述损失函数的取值小于预设阈值时,确定所述卷积神经网络模型训练完成;Based on the value of the loss function, the parameters of the convolutional neural network model are adjusted to re-determine the category of each image block in the first training set according to the parameter-adjusted convolutional neural network model, and re-determine the category of each image block in the first training set. The value of the loss function, until the value of the loss function is less than a preset threshold, it is determined that the training of the convolutional neural network model is completed;
基于所述训练完成的所述卷积神经网络模型,获得第一训练模型。Based on the trained convolutional neural network model, a first training model is obtained.
在上述方案中,参见图9,所述信息处理装置70还包括第二训练部分706,配置为:In the above solution, referring to FIG. 9 , the information processing apparatus 70 further includes a second training part 706 configured as:
获取图像样本;其中,所述图像样本中每一张图像都包含有敏感信息;Obtain an image sample; wherein, each image in the image sample contains sensitive information;
基于第一训练模型对所述图像样本中每一张图像进行敏感信息检测;Perform sensitive information detection on each image in the image sample based on the first training model;
基于所述检测的结果,获取每一张图像中所述敏感信息的类型;Based on the detection result, obtain the type of the sensitive information in each image;
基于所述获取的多个类型对所述图像样本进行分组,获得多组图像集合;grouping the image samples based on the obtained multiple types to obtain multiple sets of images;
将所述多组图像集合作为第二训练集,通过对所述第二训练集中每一组图像集合进行单独训练,获得多组第二训练模型;其中,所述多组第二训练模型与所述多个类型之间具有对应关系。Using the multiple sets of image sets as the second training set, by performing separate training on each set of image sets in the second training set, multiple sets of second training models are obtained; wherein, the multiple sets of second training models are There is a corresponding relationship with the plurality of types.
在上述方案中,所述生成部分703,具体配置为:In the above solution, the generating part 703 is specifically configured as:
根据所述多组第二训练模型与所述多个类型之间的对应关系,获得所述敏感信息的类型对应的第二训练模型;obtaining a second training model corresponding to the type of the sensitive information according to the correspondence between the multiple groups of second training models and the multiple types;
基于所述对应的第二训练模型对所述敏感信息进行生成训练,获得与所述敏感信息对应的替换信息。The sensitive information is generated and trained based on the corresponding second training model to obtain replacement information corresponding to the sensitive information.
在上述方案中,所述替换部分704,具体配置为:In the above solution, the replacement part 704 is specifically configured as:
确定所述待处理图像中所述敏感信息对应的敏感信息区域;determining the sensitive information area corresponding to the sensitive information in the to-be-processed image;
将所述替换信息覆盖于所述敏感信息区域之上,获得处理后的图像。The replacement information is overlaid on the sensitive information area to obtain a processed image.
在上述方案中,参见图10,所述信息处理装置70还包括第二检测部分707,配置为:In the above solution, referring to FIG. 10 , the information processing apparatus 70 further includes a second detection part 707 configured as:
基于第一训练模型,若从所述待处理图像中没有检测出敏感信息,则结束所述待处理图像的信息处理流程。Based on the first training model, if no sensitive information is detected from the to-be-processed image, the information processing flow of the to-be-processed image is ended.
在上述方案中,参见图11,所述信息处理装置70还包括咨询部分708,配置为:In the above solution, referring to FIG. 11 , the information processing device 70 further includes a consultation part 708, which is configured as:
发送咨询指令,所述咨询指令用于确认所述敏感信息是否需要处理;Send a consultation instruction, where the consultation instruction is used to confirm whether the sensitive information needs to be processed;
若接收到确认指令,则根据所述确认指令继续所述待处理图像的信息处理流程;If a confirmation instruction is received, continue the information processing flow of the to-be-processed image according to the confirmation instruction;
若接收到取消指令,则根据所述取消指令结束所述述待处理图像的信息处理流程。If a cancellation instruction is received, the information processing flow of the image to be processed is ended according to the cancellation instruction.
可以理解地,在本实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。It can be understood that, in this embodiment, a "part" may be a part of a circuit, a part of a processor, a part of a program or software, etc., of course, it may also be a unit, or a module or non-modularity.
另外,在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each component in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or The part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions for making a computer device (which can be It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, removable hard disk, Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.
因此,本实施例提供了一种计算机存储介质,该计算机存储介质存储有信息处理程序,所述信息处理程序被至少一个处理器执行时实现上述实施例一所述信息处理的方法的步骤。Therefore, this embodiment provides a computer storage medium, where the computer storage medium stores an information processing program, and when the information processing program is executed by at least one processor, implements the steps of the information processing method described in the first embodiment above.
基于上述信息处理装置70的组成以及计算机存储介质,参见图12,其示出了本发明实施例提供的信息处理装置70的具体硬件结构,可以包括:网络接口1201、存储器1202和处理器1203;各个组件通过总线系统1204耦合在一起。可理解,总线系统1204用于实现这些组件之间的连接通信。总线系统1204除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图12中将各种总线都标为总线系统1204。其中,网络接口1201,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;Based on the composition of the above-mentioned information processing apparatus 70 and the computer storage medium, see FIG. 12 , which shows the specific hardware structure of the information processing apparatus 70 provided by the embodiment of the present invention, which may include: a network interface 1201, a memory 1202, and a processor 1203; The various components are coupled together by a bus system 1204 . It will be appreciated that the bus system 1204 is used to implement connection communication between these components. In addition to the data bus, the bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 1204 in FIG. 12 . Among them, the network interface 1201 is used for receiving and sending signals in the process of sending and receiving information with other external network elements;
存储器1202,用于存储能够在处理器1203上运行的计算机程序;memory 1202 for storing computer programs that can run on processor 1203;
处理器1203,用于在运行所述计算机程序时,执行:The processor 1203 is configured to, when running the computer program, execute:
获取待处理图像;Get the image to be processed;
基于第一训练模型,从所述待处理图像中检测出敏感信息并得到所述敏感信息的类型;Based on the first training model, sensitive information is detected from the to-be-processed image and the type of the sensitive information is obtained;
基于所述敏感信息的类型对应的第二训练模型,生成与所述敏感信息对应的替换信息;generating replacement information corresponding to the sensitive information based on the second training model corresponding to the type of the sensitive information;
根据所述替换信息对所述待处理图像中的所述敏感信息进行替换处理,获得处理后的图像。Perform replacement processing on the sensitive information in the to-be-processed image according to the replacement information to obtain a processed image.
可以理解,本发明实施例中的存储器1202可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double DataRate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本文描述的系统和方法的存储器1202旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 1202 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Wherein, the non-volatile memory may be Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (Erasable PROM, EPROM), Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double DataRate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 1202 of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
而处理器1203可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1203中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1203可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1202,处理器1203读取存储器1202中的信息,结合其硬件完成上述方法的步骤。The processor 1203 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above-mentioned method can be completed by an integrated logic circuit of hardware in the processor 1203 or an instruction in the form of software. The above-mentioned processor 1203 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present invention may be directly embodied as executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory 1202, and the processor 1203 reads the information in the memory 1202, and completes the steps of the above method in combination with its hardware.
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable LogicDevice,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本发明所述功能的其它电子单元或其组合中。It will be appreciated that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more Application Specific Integrated Circuits (ASIC), Digital Signal Processing (DSP), Digital Signal Processing Device (DSP Device, DSPD), programmable logic Devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present invention or a combination thereof.
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described herein. Software codes may be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
可选地,作为另一个实施例,处理器1203还配置为在运行所述计算机程序时,执行上述实施例一所述信息处理的方法的步骤。Optionally, as another embodiment, the processor 1203 is further configured to execute the steps of the information processing method described in Embodiment 1 above when the computer program is executed.
可选地,本发明实施例还提供了一种移动终端,所述移动终端包含上述实施例中任一项所述的信息处理装置70。Optionally, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes the information processing apparatus 70 described in any one of the foregoing embodiments.
需要说明的是:本发明实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。It should be noted that the technical solutions described in the embodiments of the present invention may be combined arbitrarily unless there is a conflict.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810956986.8A CN109284684B (en) | 2018-08-21 | 2018-08-21 | An information processing method, device and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810956986.8A CN109284684B (en) | 2018-08-21 | 2018-08-21 | An information processing method, device and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109284684A true CN109284684A (en) | 2019-01-29 |
CN109284684B CN109284684B (en) | 2021-06-01 |
Family
ID=65182861
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810956986.8A Expired - Fee Related CN109284684B (en) | 2018-08-21 | 2018-08-21 | An information processing method, device and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109284684B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110009018A (en) * | 2019-03-25 | 2019-07-12 | 腾讯科技(深圳)有限公司 | A kind of image generating method, device and relevant device |
CN111768325A (en) * | 2020-04-03 | 2020-10-13 | 南京信息工程大学 | A security improvement method based on generated adversarial samples in big data privacy protection |
CN111931148A (en) * | 2020-07-31 | 2020-11-13 | 支付宝(杭州)信息技术有限公司 | Image processing method and device and electronic equipment |
CN112052347A (en) * | 2020-10-09 | 2020-12-08 | 北京百度网讯科技有限公司 | Image storage method and device and electronic equipment |
CN112069820A (en) * | 2020-09-10 | 2020-12-11 | 杭州中奥科技有限公司 | Model training method, model training device and entity extraction method |
CN112528318A (en) * | 2020-11-27 | 2021-03-19 | 国家电网有限公司大数据中心 | Image desensitization method and device and electronic equipment |
CN112634129A (en) * | 2020-11-27 | 2021-04-09 | 国家电网有限公司大数据中心 | Image sensitive information desensitization method and device |
CN112634382A (en) * | 2020-11-27 | 2021-04-09 | 国家电网有限公司大数据中心 | Image recognition and replacement method and device for unnatural object |
CN112750072A (en) * | 2020-12-30 | 2021-05-04 | 五八有限公司 | Information processing method and device |
CN113313215A (en) * | 2021-07-30 | 2021-08-27 | 腾讯科技(深圳)有限公司 | Image data processing method, image data processing device, computer equipment and storage medium |
CN113420322A (en) * | 2021-05-24 | 2021-09-21 | 阿里巴巴新加坡控股有限公司 | Model training and desensitizing method and device, electronic equipment and storage medium |
CN113971748A (en) * | 2020-07-24 | 2022-01-25 | 中移(苏州)软件技术有限公司 | Image processing method, device, equipment and computer readable storage medium |
CN114549951A (en) * | 2020-11-26 | 2022-05-27 | 未岚大陆(北京)科技有限公司 | Method for obtaining training data, related device, system and storage medium |
CN114567797A (en) * | 2021-03-23 | 2022-05-31 | 长城汽车股份有限公司 | Image processing method and device and vehicle |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447392A (en) * | 2014-08-22 | 2016-03-30 | 国际商业机器公司 | Method and system for protecting specific information |
CN107169329A (en) * | 2017-05-24 | 2017-09-15 | 维沃移动通信有限公司 | A kind of method for protecting privacy, mobile terminal and computer-readable recording medium |
CN107239666A (en) * | 2017-06-09 | 2017-10-10 | 孟群 | A kind of method and system that medical imaging data are carried out with desensitization process |
US20180004975A1 (en) * | 2016-06-29 | 2018-01-04 | Sophos Limited | Content leakage protection |
CN107590531A (en) * | 2017-08-14 | 2018-01-16 | 华南理工大学 | A kind of WGAN methods based on text generation |
-
2018
- 2018-08-21 CN CN201810956986.8A patent/CN109284684B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105447392A (en) * | 2014-08-22 | 2016-03-30 | 国际商业机器公司 | Method and system for protecting specific information |
US20180004975A1 (en) * | 2016-06-29 | 2018-01-04 | Sophos Limited | Content leakage protection |
CN107169329A (en) * | 2017-05-24 | 2017-09-15 | 维沃移动通信有限公司 | A kind of method for protecting privacy, mobile terminal and computer-readable recording medium |
CN107239666A (en) * | 2017-06-09 | 2017-10-10 | 孟群 | A kind of method and system that medical imaging data are carried out with desensitization process |
CN107590531A (en) * | 2017-08-14 | 2018-01-16 | 华南理工大学 | A kind of WGAN methods based on text generation |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110009018A (en) * | 2019-03-25 | 2019-07-12 | 腾讯科技(深圳)有限公司 | A kind of image generating method, device and relevant device |
CN111768325A (en) * | 2020-04-03 | 2020-10-13 | 南京信息工程大学 | A security improvement method based on generated adversarial samples in big data privacy protection |
CN113971748A (en) * | 2020-07-24 | 2022-01-25 | 中移(苏州)软件技术有限公司 | Image processing method, device, equipment and computer readable storage medium |
CN113971748B (en) * | 2020-07-24 | 2025-04-29 | 中移(苏州)软件技术有限公司 | Image processing method, device, equipment and computer readable storage medium |
CN111931148A (en) * | 2020-07-31 | 2020-11-13 | 支付宝(杭州)信息技术有限公司 | Image processing method and device and electronic equipment |
CN112069820A (en) * | 2020-09-10 | 2020-12-11 | 杭州中奥科技有限公司 | Model training method, model training device and entity extraction method |
CN112069820B (en) * | 2020-09-10 | 2024-05-24 | 杭州中奥科技有限公司 | Model training method, model training device and entity extraction method |
CN112052347A (en) * | 2020-10-09 | 2020-12-08 | 北京百度网讯科技有限公司 | Image storage method and device and electronic equipment |
CN112052347B (en) * | 2020-10-09 | 2024-06-04 | 北京百度网讯科技有限公司 | Image storage method and device and electronic equipment |
CN114549951B (en) * | 2020-11-26 | 2024-04-23 | 未岚大陆(北京)科技有限公司 | Method for obtaining training data, related device, system and storage medium |
CN114549951A (en) * | 2020-11-26 | 2022-05-27 | 未岚大陆(北京)科技有限公司 | Method for obtaining training data, related device, system and storage medium |
CN112634382B (en) * | 2020-11-27 | 2024-03-19 | 国家电网有限公司大数据中心 | Method and device for identifying and replacing images of unnatural objects |
CN112634382A (en) * | 2020-11-27 | 2021-04-09 | 国家电网有限公司大数据中心 | Image recognition and replacement method and device for unnatural object |
CN112634129A (en) * | 2020-11-27 | 2021-04-09 | 国家电网有限公司大数据中心 | Image sensitive information desensitization method and device |
CN112528318A (en) * | 2020-11-27 | 2021-03-19 | 国家电网有限公司大数据中心 | Image desensitization method and device and electronic equipment |
CN112750072A (en) * | 2020-12-30 | 2021-05-04 | 五八有限公司 | Information processing method and device |
CN114567797A (en) * | 2021-03-23 | 2022-05-31 | 长城汽车股份有限公司 | Image processing method and device and vehicle |
CN113420322A (en) * | 2021-05-24 | 2021-09-21 | 阿里巴巴新加坡控股有限公司 | Model training and desensitizing method and device, electronic equipment and storage medium |
CN113420322B (en) * | 2021-05-24 | 2023-09-01 | 阿里巴巴新加坡控股有限公司 | Model training and desensitizing method and device, electronic equipment and storage medium |
CN113313215A (en) * | 2021-07-30 | 2021-08-27 | 腾讯科技(深圳)有限公司 | Image data processing method, image data processing device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109284684B (en) | 2021-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109284684B (en) | An information processing method, device and computer storage medium | |
WO2020199611A1 (en) | Liveness detection method and apparatus, electronic device, and storage medium | |
US12148250B2 (en) | AI-based face recognition method and apparatus, device, and medium | |
CN109345553B (en) | Palm and key point detection method and device thereof, and terminal equipment | |
CN111275122B (en) | Label labeling method, device, equipment and readable storage medium | |
CN107944381B (en) | Face tracking method, face tracking device, terminal and storage medium | |
CN110866469B (en) | Facial five sense organs identification method, device, equipment and medium | |
CN111242273B (en) | Neural network model training method and electronic equipment | |
US20250182438A1 (en) | Detection of moment of perception | |
CN112989767B (en) | Medical term labeling method, medical term mapping device and medical term mapping equipment | |
CN110147533A (en) | Coding method, device, equipment and storage medium | |
CN111209377B (en) | Text processing method, device, equipment and medium based on deep learning | |
CN108922531B (en) | Slot position identification method and device, electronic equipment and storage medium | |
CN112733970A (en) | Image classification model processing method, image classification method and device | |
CN107968890A (en) | Theme setting method and device, terminal equipment and storage medium | |
CN113763931B (en) | Waveform feature extraction method, waveform feature extraction device, computer equipment and storage medium | |
CN114783070A (en) | Training method, device, electronic device and storage medium for living body detection model | |
CN112381064B (en) | Face detection method and device based on space-time diagram convolutional network | |
CN116883715A (en) | Data processing method and device | |
CN111881813A (en) | Data storage method and system of face recognition terminal | |
CN111897709B (en) | Method, device, electronic equipment and medium for monitoring user | |
CN111753813B (en) | Image processing method, device, equipment and storage medium | |
CN111695419B (en) | Image data processing method and related device | |
CN111260697A (en) | Target object identification method, system, device and medium | |
CN114943976B (en) | Model generation method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210601 |
|
CF01 | Termination of patent right due to non-payment of annual fee |