CN116664514A - Data processing method, device and equipment - Google Patents

Data processing method, device and equipment Download PDF

Info

Publication number
CN116664514A
CN116664514A CN202310628033.XA CN202310628033A CN116664514A CN 116664514 A CN116664514 A CN 116664514A CN 202310628033 A CN202310628033 A CN 202310628033A CN 116664514 A CN116664514 A CN 116664514A
Authority
CN
China
Prior art keywords
feature vector
feature
detection model
image
target image
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.)
Pending
Application number
CN202310628033.XA
Other languages
Chinese (zh)
Inventor
赵诗云
刘健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202310628033.XA priority Critical patent/CN116664514A/en
Publication of CN116664514A publication Critical patent/CN116664514A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the specification provides a data processing method, a device and equipment, wherein the method comprises the following steps: image feature extraction processing is carried out on a target image based on a pre-trained detection model to obtain a first feature vector, encoding processing is carried out on the first feature vector based on the pre-trained detection model to obtain a second feature vector, similarity between feature vectors obtained by carrying out feature extraction processing on the second feature vector respectively by different feature extraction layers in the pre-trained detection model is determined, a third feature vector is determined, decoding processing is carried out on the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, the target feature vector corresponding to the target image is determined based on the third feature vector and the fourth feature vector, classification processing is carried out on the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and whether the target image is a tampered image or not is determined based on the prediction label.

Description

Data processing method, device and equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, and device.
Background
With the development and maturity of image synthesis technology, the situation that malicious third parties tamper images through the synthesis technology to steal user information is becoming more and more vigorous. Since the image is tampered by the synthesis technology, new technologies such as artificial intelligence, machine learning, big data mining and the like are applied to scenes such as malicious theft, the tampered image has higher technological means content and more deceptive and confusing, and therefore, a solution capable of improving detection accuracy of detecting whether the image to be detected is the tampered image is needed.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a data processing method, apparatus, and device, so as to provide a solution capable of improving detection accuracy of detecting whether an image to be detected is a tampered image.
In order to achieve the above technical solution, the embodiments of the present specification are implemented as follows:
in a first aspect, embodiments of the present disclosure provide a data processing method, including: acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image; based on the pre-trained detection model, carrying out coding processing on the first feature vector to obtain a second feature vector; determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model; decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector; and classifying the target feature vector based on the pre-trained detection model to obtain a predictive label of the target image, and determining whether the target image is a tampered image based on the predictive label.
In a second aspect, embodiments of the present disclosure provide a data processing apparatus, the apparatus comprising: the first image acquisition module is used for acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image; the first coding module is used for coding the first characteristic vector based on the pre-trained detection model to obtain a second characteristic vector; the first determining module is used for determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model; the first decoding module is used for decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector; the first classification module is used for classifying the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and determining whether the target image is a tampered image based on the prediction label.
In a third aspect, embodiments of the present specification provide a data processing apparatus, the data processing apparatus comprising: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to: acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image; based on the pre-trained detection model, carrying out coding processing on the first feature vector to obtain a second feature vector; determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model; decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector; and classifying the target feature vector based on the pre-trained detection model to obtain a predictive label of the target image, and determining whether the target image is a tampered image based on the predictive label.
In a fourth aspect, embodiments of the present description provide a storage medium for storing computer-executable instructions that, when executed, implement the following: acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image; based on the pre-trained detection model, carrying out coding processing on the first feature vector to obtain a second feature vector; determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model; decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector; and classifying the target feature vector based on the pre-trained detection model to obtain a predictive label of the target image, and determining whether the target image is a tampered image based on the predictive label.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a data processing system of the present specification;
FIG. 2A is a flow chart of an embodiment of a data processing method of the present disclosure;
FIG. 2B is a schematic diagram illustrating a data processing method according to the present disclosure;
FIG. 3 is a schematic diagram of a detection model structure according to the present disclosure;
FIG. 4 is a schematic diagram illustrating a data processing method according to the present disclosure;
FIG. 5 is a schematic diagram of another test model structure according to the present disclosure;
FIG. 6 is a schematic diagram of another test model structure according to the present disclosure;
FIG. 7 is a schematic diagram of an embodiment of a data processing apparatus according to the present disclosure;
fig. 8 is a schematic diagram of a data processing apparatus according to the present specification.
Detailed Description
The embodiment of the specification provides a data processing method, a device and equipment.
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The embodiment of the specification provides a data processing method, a device and equipment.
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The technical scheme of the specification can be applied to a data processing system, as shown in fig. 1, where the data processing system may have a terminal device and a server, where the server may be an independent server, or may be a server cluster formed by multiple servers, and the terminal device may be a device such as a personal computer, a mobile terminal device such as a mobile phone, a tablet computer, or the terminal device may also be an internet of things device configured with a camera assembly, or the like.
The data processing system may include n terminal devices and m servers, where n and m are positive integers greater than or equal to 1, where the terminal devices may be used to collect image samples, for example, the terminal devices may detect scenes for different composite images, obtain corresponding image samples, for example, for a composite image detection scene for identity authentication, the terminal devices may collect an image of a user through a configured camera component, or the terminal devices may also receive an image of the user, and the terminal devices may use the obtained image as an image sample.
The terminal device may send the collected image sample to any server in the data processing system, the server may use the image sample collected by the terminal device as a target image to be detected, so as to perform composite image detection on the target image, or the server may further store the collected image sample, so that the stored image sample is used as a historical image when a model training period is reached, and train the detection model based on the historical image.
When the malicious third party tampers the user image, a certain area in the image may be tampered, so that when identity authentication is performed, the malicious third party may tamper the area containing the face image of the user in the document image (for example, replace the face image of the user in the original document image with the face image of the malicious third party), and retain the rest of the area in the document image.
Therefore, the feature difference between the tampered area and the non-tampered area in the tampered image may be smaller, the accuracy of detecting whether the image is the tampered image or not through the segmentation network is poor, the difference between different areas in the image can be learned through different feature extraction layers of the detection model, so that the detection model can better learn the feature difference between the tampered area and the non-tampered area in the image, and the feature vector obtained through the encoding processing and the decoding processing of the detection model is fused, so that whether the image is the tampered image or not can be detected, the detection accuracy of whether the image to be detected is the tampered image or not is improved, and the safety of identity verification is further improved.
The data processing method in the following embodiments can be implemented based on the above-described data processing system configuration.
Example 1
As shown in fig. 2A and fig. 2B, the embodiment of the present disclosure provides a data processing method, where an execution body of the method may be a server, and the server may be an independent server or may be a server cluster formed by a plurality of servers. The method specifically comprises the following steps:
in S202, a target image to be detected is acquired, and image feature extraction processing is performed on the target image based on a detection model trained in advance, so as to obtain a first feature vector corresponding to the target image.
The target image may be any image applied to a security scene such as identity verification, for example, the target image may be an image including a user biological feature, specifically, the target image may be an image including a user iris, an image including a user fingerprint, an image including a user facial feature, or the like, and the detection model may be a model constructed based on a preset deep learning algorithm and used for detecting whether the image is a tampered image.
In implementation, with the development and maturity of image synthesis technology, the situation that malicious third parties tamper images through the synthesis technology to steal user information is more and more vigorous. Since the image is tampered by the synthesis technology, new technologies such as artificial intelligence, machine learning, big data mining and the like are applied to scenes such as malicious theft, the tampered image has higher technological means content and more deceptive and confusing, and therefore, a solution capable of improving detection accuracy of detecting whether the image to be detected is the tampered image is needed. For this reason, the embodiments of the present specification provide a technical solution that can solve the above-mentioned problems, and specifically, reference may be made to the following.
Taking a certificate detection scene as an example, the terminal device can acquire an image of a certificate presented by a user under the condition that the terminal device receives an identity recognition instruction triggered by the user, for example, the terminal device can perform image acquisition processing (such as image shooting processing, image scanning processing and the like) on the certificate presented by the user. The terminal device may send the acquired image to a server, which may determine the image as a target image.
The server may input the target image into a pre-trained detection model to perform image feature extraction processing on the target image through the pre-trained detection model to obtain a first feature vector, where the detection model may include a feature extraction module, an encoding module, a contrast detection module, a decoding module, and a classification module as shown in fig. 3.
The detection model may perform image feature extraction processing through a feature extraction module, where the feature extraction module may be a module constructed based on a convolutional neural network (Convolutional Neural Networks, CNN) algorithm.
In S204, the first feature vector is encoded based on a detection model trained in advance, and a second feature vector is obtained.
Wherein the dimension of the second feature vector may be smaller than the dimension of the first feature vector.
In implementation, as shown in fig. 3, the detection model may perform encoding processing on the first feature vector output by the feature extraction module through the encoding module to obtain a second feature vector, that is, the detection module may convert the first feature vector into a low-dimensional second feature vector, where the encoding module may be a module for performing compression processing on the feature vector, which is constructed based on an algorithm such as a preset multi-layer perceptron (Multilayer Perceptron, MLP) algorithm, a convolutional neural network algorithm, and the like.
In S206, a third feature vector is determined based on the similarity between feature vectors obtained by performing feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model.
In an implementation, the detection model may include a plurality of feature extraction layers, and feature extraction processing may be performed on the second feature vector by the plurality of feature extraction layers, and a third feature vector may be determined based on a similarity between feature vectors output by the plurality of feature extraction layers, where parameters of the plurality of feature extraction layers may not be shared, that is, the plurality of feature extraction layers are not identical, so as to learn a difference between a tampered region and a non-tampered region in the image based on feature vectors extracted by different feature extraction layers.
In determining the third feature vector, the similarity between the feature vectors output by each two feature extraction layers may be determined based on a preset similarity algorithm (such as a cosine similarity algorithm, etc.). If the contrast detection module includes two feature extraction layers, the similarity between the feature vectors output by the two feature extraction layers may be determined as a third feature vector, and if the contrast detection module includes more than two feature extraction layers, the average (or maximum, intermediate, etc.) of the similarities may be determined as the third feature vector.
The above-mentioned third feature vector determining method is an optional and implementable determining method, and in the actual application scenario, there may be a plurality of different determining methods, and different determining methods may be selected according to different actual application scenarios, which is not specifically limited in the embodiment of the present disclosure.
In S208, the second feature vector is decoded based on the detection model trained in advance to obtain a fourth feature vector, and a target feature vector corresponding to the target image is determined based on the third feature vector and the fourth feature vector.
In an implementation, the server may input the second feature vector to the decoding module to perform decoding processing on the second feature vector by the decoding module to obtain a fourth feature vector, where the decoding module may be configured to convert the second feature vector with a low dimension into an original data space to obtain the fourth feature vector, that is, the dimension of the fourth feature vector is the same as the dimension of the first feature vector. The coding module may also be a module for compressing the feature vector, which is constructed based on algorithms such as a preset multi-layer perceptron (Multilayer Perceptron, MLP) algorithm, a convolutional neural network algorithm, and the like.
The server may perform feature fusion processing on the third feature vector and the fourth feature vector to obtain a target feature vector, for example, the server may determine a sum (or average) of the third feature vector and the fourth feature vector as the target feature vector, and in addition, the method for determining the target feature vector may also be multiple, and may be different according to different practical application scenarios, which is not specifically limited in this embodiment of the present disclosure.
In S210, the target feature vector is classified based on a detection model trained in advance to obtain a predictive label of the target image, and whether the target image is a tampered image is determined based on the predictive label.
In implementation, the classification module of the detection model may be a fully connected layer (Fully Connected layer, FC layer), and the FC layer may perform classification processing on the image by using the feature data to obtain a prediction tag of the image.
The server can input the fused feature vector (namely the target feature vector) into the FC layer so as to classify the target feature vector through the FC layer and obtain a prediction tag of the target image.
Wherein the predictive label may be used to characterize whether the target image is a tampered image, and therefore, the server may determine whether the target image is a tampered image based on the predictive label.
In addition, if the server determines that the target image is a tampered image, the server may determine that the identity authentication fails and send preset alarm information to the terminal device.
The embodiment of the specification provides a data processing method, which is used for acquiring a target image to be detected, carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image, carrying out coding processing on the first feature vector based on the pre-trained detection model to obtain a second feature vector, respectively carrying out feature extraction processing on the second feature vector based on different feature extraction layers in the pre-trained detection model to obtain similarity among feature vectors, determining a third feature vector, carrying out decoding processing on the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector, carrying out classification processing on the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and determining whether the target image is a tampered image based on the prediction label. Therefore, the difference of different areas in the image can be learned through different feature extraction layers of the detection model, so that the detection model can better learn the feature difference of the tampered area and the non-tampered area in the image, and the feature vector obtained through the encoding processing and the decoding processing of the detection model is fused, so that whether the image is a tampered image can be detected, the detection accuracy of whether the image to be detected is a tampered image is improved, and the safety of identity verification is further improved.
Example two
As shown in fig. 4, the embodiment of the present disclosure provides a data processing method, where an execution body of the method may be a server, where the server may be an independent server or may be a server cluster formed by a plurality of servers. The method specifically comprises the following steps:
in S402, a history image for training a detection model is acquired, together with a type tag corresponding to the history image data.
Wherein the type tag may be used to characterize whether the history image is a tampered image.
In implementation, the historical image may be an image corresponding to the detection model, which is acquired by the terminal device in a model training period, for example, assuming that the detection model is a model for detecting whether a document image in an identity authentication scene is composite data, the terminal device may send the acquired image of the document of the user to the server in the model training period (such as the last month, the last three months, etc.), and the server may store the received image of the document of the user in a database corresponding to the detection model, and select a preset number of images from the database as the historical image to train the detection model when the model training period is reached.
In addition, in order to improve the model training effect, a preset number of tampered images can be obtained for training the detection model, that is, a history image for training the detection model can contain a preset number of negative sample data. For example, the server may acquire an image determined to be a falsified image by detection in the model training period as a history image.
In S404, image feature extraction processing is performed on the history image based on the detection model, and a fifth feature vector corresponding to the history image is obtained.
The specific processing procedure of S404 may be referred to the content related to S204 in the first embodiment, and will not be described herein.
In S406, the fifth feature vector is encoded based on the detection model, to obtain a sixth feature vector.
The detection model may include a plurality of data processing layers, the data processing layers may include a plurality of encoding layers and a plurality of decoding layers corresponding to the plurality of encoding layers, a node number included in an encoding layer may be smaller than a node number included in a previous encoding layer of the encoding layers, a node number included in a decoding layer may be larger than a node number included in a previous encoding layer of the encoding layers, input data of the decoding layer may be determined based on feature vectors output by the previous data processing layer, and feature vectors obtained by comparing and detecting feature vectors output by the encoding layers corresponding to the previous decoding layer based on the feature detection module.
In implementation, for example, as shown in fig. 5, the data processing layers 1 to n may be encoding layers, and the data processing layers n ' to 1' may be decoding layers, where n is equal to n ' and n is a positive integer greater than 1. The number of nodes included in each of the data processing layers 1 to n may be sequentially reduced, that is, the number of nodes included in the data processing layer 1 is greater than the number of nodes included in the data processing layer 2, and, contrary to the encoding layer, the number of nodes included in each of the data processing layers n 'to 1' may be sequentially increased, that is, the number of nodes included in the data processing layer 2 'is less than the number of nodes included in the data processing layer 1'.
As shown in fig. 5, the input data of the encoding layer is the output data of the previous encoding layer, and the input data of the decoding layer is the feature vector determined based on the feature vector output by the previous data processing layer and the feature vector obtained by comparing and detecting the feature vector output by the encoding layer corresponding to the previous decoding layer based on the feature detection module. For example, since the previous data processing layer of the first decoding layer is the encoding layer, the input data of the first decoding layer (i.e., the data processing layer n ') is the output data of the last encoding layer (i.e., the data processing layer n), and the previous data processing layer of the second decoding layer is the encoding layer, therefore, the input data of the second decoding layer (i.e., the data processing layer n-1 ') may be determined based on the output data of the data processing layer n-1', and the feature vector obtained by performing the contrast detection processing on the output data of the data processing layer n-1 (i.e., the encoding layer corresponding to the previous decoding layer) by the contrast detection model.
Taking the detection module with the above structure as an example, the detection model includes two coding layers, and the corresponding sixth feature vector may include a first sub-feature vector and a second sub-feature vector, and the following provides an alternative implementation manner for determining the sixth feature vector, which may be specifically referred to the following steps one to two:
and step one, based on a first coding layer of the detection model, carrying out coding processing on the fifth feature vector to obtain a first sub feature vector.
And secondly, based on a second coding layer of the detection model, carrying out coding processing on the first sub-feature vector to obtain a second sub-feature vector.
In S408, a seventh feature vector is determined based on the similarity between feature vectors obtained by performing feature extraction processing on the sixth feature vector by different feature extraction layers in the detection model, respectively.
The detection model may include a first feature extraction layer and a second feature extraction layer, where the first feature extraction layer and the second feature extraction layer have the same network structure and different network parameters, i.e., the first feature extraction layer and the second feature extraction layer do not share network parameters in the model training process.
In practice, the above-mentioned processing manner of S408 may be varied, and the following provides an alternative implementation manner, which can be seen from the following steps one to two:
Step one, carrying out feature extraction processing on a sixth feature vector based on the first feature extraction layer to obtain a first vector, and carrying out feature extraction processing on the sixth feature vector based on the second feature extraction layer to obtain a second vector.
In implementation, since the sixth feature vector is data obtained through encoding processing, that is, the sixth feature vector is compressed data, in order to improve a detection effect of the detection model, the model can learn a difference between a tampered area and a non-tampered area in an image more accurately, the server can amplify the sixth feature vector based on a preset amplification dimension to obtain an amplified sixth feature vector, perform feature extraction processing on the amplified sixth feature vector based on the first feature extraction layer to obtain a first vector, and perform feature extraction processing on the amplified sixth feature vector based on the second feature extraction layer to obtain a second vector.
And step two, determining a seventh feature vector based on the similarity between the first vector and the second vector.
In implementations, the server may determine a similarity between the first vector and the second vector based on a preset similarity algorithm, and determine the seventh feature vector based on the similarity between the first vector and the second vector.
In addition, the feature extraction processing is performed by using the detection model through two feature extraction layers, that is, the comparison detection module of the detection model may include two feature extraction layers, the comparison detection module of the detection model in the actual application scene may further include a plurality of feature extraction layers, and different numbers of feature extraction layers may be selected according to different actual application scenes, which is not specifically limited in the embodiment of the present disclosure.
In S410, decoding is performed on the sixth feature vector based on the detection model to obtain an eighth feature vector, and a ninth feature vector corresponding to the history image is determined based on the seventh feature vector and the eighth feature vector.
In an implementation, when the sixth feature vector includes a first sub feature vector and a second sub feature vector, the seventh feature vector includes a contrast detection module based on a detection model, a third sub feature vector obtained by performing contrast detection on the first sub feature vector, and a fourth sub feature vector obtained by performing contrast detection on the second sub feature vector based on a contrast detection module of a detection model, and the eighth feature vector includes a fifth sub feature vector and a sixth sub feature vector, an alternative implementation is provided below for determining the ninth feature vector, which can be specifically referred to the following steps one to four:
And step one, decoding the second sub-feature data based on a first decoding layer of the detection model to obtain a fifth sub-feature vector.
And step two, determining a first input vector based on the fourth sub-feature vector and the fifth sub-feature vector.
And thirdly, decoding the first input vector based on a second decoding layer of the detection model to obtain a sixth sub-feature vector.
And step four, determining a ninth feature vector corresponding to the historical image based on the third sub feature vector and the sixth sub feature vector.
In implementation, taking the example that the detection model includes four data processing layers (i.e., two encoding layers and two decoding layers), two feature extraction layers (i.e., the contrast detection module includes two feature extraction layers), the server may perform feature extraction processing on the historical image through the feature extraction module to obtain a fifth feature vector.
The server can encode the fifth feature vector through the first encoding layer to obtain a first sub-feature vector, and the server can input the first sub-feature vector into the contrast detection module to perform contrast detection processing to obtain a third sub-feature vector corresponding to the first sub-feature vector. Then, the server may further input the first sub-feature vector into a second encoding layer, and encode the first sub-feature vector through the second encoding layer to obtain a second sub-feature vector. Meanwhile, the server can also input the second sub-feature vector into the comparison detection module to perform comparison detection processing, so as to obtain a fourth sub-feature vector corresponding to the second sub-feature vector.
The server may decode the second sub-feature data based on the first decoding layer of the detection model to obtain a fifth sub-feature vector. Then, the server may perform feature fusion processing on the fourth sub-feature vector and the fifth sub-feature vector to obtain a first input vector, the server may input the first input vector into a second decoding layer to perform decoding processing on the first input vector through the second decoding layer to obtain a sixth sub-feature vector, and finally, the server may determine a ninth feature vector corresponding to the historical image based on the third sub-feature vector and the sixth sub-feature vector.
In addition, the detection model includes four data processing layers (i.e., two encoding layers and two decoding layers), and two feature extraction layers (i.e., the comparison detection module includes two feature extraction layers), in an actual application scenario, the detection model may include a plurality of data processing layers and a plurality of feature extraction layers, for example, as shown in fig. 6, the server may perform encoding processing through three encoding layers and perform decoding processing through three corresponding decoding layers, and so on, and different detection models may be constructed according to different actual application scenarios, which is not limited in this embodiment of the present disclosure.
In S412, classification processing is performed on the ninth feature vector based on the detection model, to obtain a prediction tag of the history image.
In an implementation, the server may input the ninth feature vector into the FC layer of the detection model, so as to classify the ninth feature vector by the FC layer, to obtain the prediction tag of the historical image.
In S414, based on the type label and the predictive label of the history image, the detection model is iteratively trained until the detection model converges, and a trained detection model is obtained.
In an implementation, the server may determine a loss value for the detection model based on the type tag and the predictive tag of the historical image, determine whether the detection model converges based on the loss value, and in a case that it is determined that the detection model does not converge, the server may continue to train the detection model based on the historical image and the type tag thereof until the detection model converges, to obtain a trained detection model.
Therefore, the detection module can learn the difference between the tampered area and the non-tampered area in the image through multi-scale feature fusion, the distinction degree between the tampered area and the non-tampered area is larger in a high-dimensional space, interference is reduced, and the image with smaller tampering amplitude can be accurately detected.
In S202, a target image to be detected is acquired, and image feature extraction processing is performed on the target image based on a detection model trained in advance, so as to obtain a first feature vector corresponding to the target image.
In S204, the first feature vector is encoded based on a detection model trained in advance, and a second feature vector is obtained.
In S206, a third feature vector is determined based on the similarity between feature vectors obtained by performing feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model.
In S208, the second feature vector is decoded based on the detection model trained in advance to obtain a fourth feature vector, and a target feature vector corresponding to the target image is determined based on the third feature vector and the fourth feature vector.
In an implementation, taking the network structure of the detection model as shown in fig. 6 as an example, the server may input the target image into the detection model to obtain the target feature vector corresponding to the target image through a plurality of encoding processes, a plurality of contrast detection processes, and a plurality of decoding processes.
In S210, the target feature vector is classified based on a detection model trained in advance to obtain a predictive label of the target image, and whether the target image is a tampered image is determined based on the predictive label.
In S416, in the case where the target image is determined to be a tampered image based on the predictive label, the positional information of the tampered region in the target image is determined based on the detection model trained in advance and the target image.
In practice, the server may determine the location information of the tampered region in the target image based on the classification information of the pixels of the target image included in the prediction tag of the target image output by the pre-trained detection model.
The server may convert the target image into a classified image based on a preset conversion algorithm and on classification information of pixels of the target image included in the prediction tag of the target image, for example, may convert pixels in the target image into 0 or 255, and the server may determine location information of the tampered region in the target image according to the converted classified image.
The above method for determining the location information of the tampered area in the target image is an optional and implementable method, and in the actual application scenario, there may be a plurality of different determining methods, and may be different according to the actual application scenario, which is not specifically limited in the embodiment of the present disclosure.
In S418, the risk detection processing is performed on the target image based on the position information, and a risk detection result for the target image is obtained.
In implementation, the server may determine a corresponding detection policy based on a detection scenario corresponding to the target image, and determine a risk detection result for the target image based on the determined detection policy and the location information.
For example, if the determined detection policy is tampered with in an area where the image contains text, then it may be determined that the image is at risk, whereas the image is not at risk. For the detection policy, the server may determine, based on the location information, whether the tampered area in the target image includes text, and if the tampered area includes text, may determine that the risk detection result for the target image is that the target image is at risk.
In addition, the above-mentioned method for determining the risk detection result is an optional and implementable method, and in an actual application scenario, there may be a plurality of different determining methods, for example, the detection policy may be that whether the area including the user biological feature in the image is tampered is detected, etc., and may be different according to the actual application scenario, which is not specifically limited in the embodiment of the present disclosure.
The embodiment of the specification provides a data processing method, which is used for acquiring a target image to be detected, carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image, carrying out coding processing on the first feature vector based on the pre-trained detection model to obtain a second feature vector, respectively carrying out feature extraction processing on the second feature vector based on different feature extraction layers in the pre-trained detection model to obtain similarity among feature vectors, determining a third feature vector, carrying out decoding processing on the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector, carrying out classification processing on the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and determining whether the target image is a tampered image based on the prediction label. Therefore, the difference of different areas in the image can be learned through different feature extraction layers of the detection model, so that the detection model can better learn the feature difference of the tampered area and the non-tampered area in the image, and the feature vector obtained through the encoding processing and the decoding processing of the detection model is fused, so that whether the image is a tampered image can be detected, the detection accuracy of whether the image to be detected is a tampered image is improved, and the safety of identity verification is further improved.
Example III
The data processing method provided in the embodiment of the present disclosure is based on the same concept, and the embodiment of the present disclosure further provides a data processing device, as shown in fig. 7.
The data processing apparatus includes: an image acquisition module 701, a first encoding module 702, a first determination module 703, a first decoding module 704 and a first classification module 705, wherein:
the image acquisition module 701 is configured to acquire a target image to be detected, and perform image feature extraction processing on the target image based on a pre-trained detection model, so as to obtain a first feature vector corresponding to the target image;
a first encoding module 702, configured to encode the first feature vector based on the pre-trained detection model to obtain a second feature vector;
a first determining module 703, configured to determine the third feature vector based on similarities between feature vectors obtained by performing feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model;
a first decoding module 704, configured to decode the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determine a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector;
The first classification module 705 is configured to perform classification processing on the target feature vector based on the pre-trained detection model, obtain a prediction tag of the target image, and determine whether the target image is a tampered image based on the prediction tag.
In an embodiment of the present disclosure, the apparatus further includes:
the sample acquisition module is used for acquiring a historical image used for training the detection model and a type label corresponding to the historical image data, wherein the type label is used for representing whether the historical image is a tampered image or not;
the feature extraction module is used for carrying out image feature extraction processing on the historical image based on the detection model to obtain a fifth feature vector corresponding to the historical image;
the second coding module is used for coding the fifth feature vector based on the detection model to obtain a sixth feature vector;
the second determining module is used for determining a seventh feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the sixth feature vector by different feature extraction layers in the detection model;
the second decoding module is used for decoding the sixth feature vector based on the detection model to obtain an eighth feature vector, and determining a ninth feature vector corresponding to the historical image based on the seventh feature vector and the eighth feature vector;
The second classification module is used for classifying the ninth feature vector based on the detection model to obtain a prediction tag of the historical image;
and the model training module is used for carrying out iterative training on the detection model based on the type label and the prediction label of the historical image until the detection model converges to obtain a trained detection model.
In an embodiment of the present disclosure, the detection model includes a first feature extraction layer and a second feature extraction layer, the first feature extraction layer and the second feature extraction layer have the same network structure and different network parameters,
the second determining module is configured to:
performing feature extraction processing on the sixth feature vector based on the first feature extraction layer to obtain a first vector, and performing feature extraction processing on the sixth feature vector based on the second feature extraction layer to obtain a second vector;
the seventh feature vector is determined based on a similarity between the first vector and the second vector.
In an embodiment of the present disclosure, the second determining module is configured to:
amplifying the sixth feature vector based on a preset amplifying dimension to obtain an amplified sixth feature vector;
And carrying out feature extraction processing on the amplified sixth feature vector based on the first feature extraction layer to obtain the first vector, and carrying out feature extraction processing on the amplified sixth feature vector based on the second feature extraction layer to obtain the second vector.
In this embodiment of the present disclosure, the detection model includes a plurality of data processing layers, where the data processing layers include a plurality of encoding layers and a plurality of decoding layers corresponding to the plurality of encoding layers, the number of nodes included in the encoding layers is smaller than the number of nodes included in a previous encoding layer of the encoding layers, the number of nodes included in the decoding layers is greater than the number of nodes included in a previous encoding layer of the encoding layers, input data of the decoding layers is determined based on feature vectors output by a previous data processing layer, and based on feature vectors obtained by performing contrast detection processing on feature vectors output by the encoding layers corresponding to the decoding layers by the feature detection module.
In an embodiment of the present disclosure, the sixth feature vector includes a first sub-feature vector and a second sub-feature vector, and the second encoding module is configured to:
based on the first coding layer of the detection model, coding the fifth feature vector to obtain a first sub-feature vector;
Based on a second coding layer of the detection model, coding the first sub-feature vector to obtain a second sub-feature vector;
the seventh feature vector includes a third sub feature vector obtained by performing contrast detection on the first sub feature vector based on the contrast detection module of the detection model, and a fourth sub feature vector obtained by performing contrast detection on the second sub feature vector based on the contrast detection module of the detection model, and the eighth feature vector includes a fifth sub feature vector and a sixth sub feature vector, and the second decoding module is configured to:
decoding the second sub-feature data based on the first decoding layer of the detection model to obtain the fifth sub-feature vector;
determining a first input vector based on the fourth sub-feature vector and the fifth sub-feature vector;
decoding the first input vector based on a second decoding layer of the detection model to obtain the sixth sub-feature vector;
a ninth feature vector corresponding to the historical image is determined based on the third sub-feature vector and the sixth sub-feature vector.
In an embodiment of the present disclosure, the apparatus further includes:
the position determining module is used for determining the position information of a tampered area in the target image based on the pre-trained detection model and the target image when the target image is determined to be a tampered image based on the prediction label;
and the risk detection module is used for carrying out risk detection processing on the target image based on the position information to obtain a risk detection result aiming at the target image.
In an embodiment of the present disclosure, the location determining module is configured to:
and determining the position information of the tampered area in the target image based on the classification information of the pixel points of the target image, which is included in the predictive label of the target image and is output by the pre-trained detection model.
The embodiment of the specification provides a data processing device, which is used for acquiring a target image to be detected, carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image, carrying out coding processing on the first feature vector based on the pre-trained detection model to obtain a second feature vector, respectively carrying out feature extraction processing on the second feature vector based on different feature extraction layers in the pre-trained detection model to obtain similarity among feature vectors, determining a third feature vector, carrying out decoding processing on the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector, carrying out classification processing on the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and determining whether the target image is a tampered image based on the prediction label. Therefore, the difference of different areas in the image can be learned through different feature extraction layers of the detection model, so that the detection model can better learn the feature difference of the tampered area and the non-tampered area in the image, and the feature vector obtained through the encoding processing and the decoding processing of the detection model is fused, so that whether the image is a tampered image can be detected, the detection accuracy of whether the image to be detected is a tampered image is improved, and the safety of identity verification is further improved.
Example IV
Based on the same idea, the embodiment of the present disclosure further provides a data processing apparatus, as shown in fig. 8.
The data processing apparatus may vary considerably in configuration or performance and may include one or more processors 801 and memory 802, where the memory 802 may store one or more stored applications or data. Wherein the memory 802 may be transient storage or persistent storage. The application programs stored in memory 802 may include one or more modules (not shown) each of which may include a series of computer executable instructions for use in a data processing apparatus. Still further, the processor 801 may be arranged to communicate with a memory 802 to execute a series of computer executable instructions in the memory 802 on a data processing apparatus. The data processing device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input/output interfaces 805, and one or more keyboards 806.
In particular, in this embodiment, the data processing apparatus includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the data processing apparatus, and the one or more programs configured to be executed by the one or more processors comprise instructions for:
Acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image;
based on the pre-trained detection model, carrying out coding processing on the first feature vector to obtain a second feature vector;
determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model;
decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector;
and classifying the target feature vector based on the pre-trained detection model to obtain a predictive label of the target image, and determining whether the target image is a tampered image based on the predictive label.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for data processing apparatus embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The embodiment of the specification provides data processing equipment, which is used for acquiring a target image to be detected, carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image, carrying out coding processing on the first feature vector based on the pre-trained detection model to obtain a second feature vector, respectively carrying out feature extraction processing on the second feature vector based on different feature extraction layers in the pre-trained detection model to obtain similarity among feature vectors, determining a third feature vector, carrying out decoding processing on the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector, carrying out classification processing on the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and determining whether the target image is a tampered image based on the prediction label. Therefore, the difference of different areas in the image can be learned through different feature extraction layers of the detection model, so that the detection model can better learn the feature difference of the tampered area and the non-tampered area in the image, and the feature vector obtained through the encoding processing and the decoding processing of the detection model is fused, so that whether the image is a tampered image can be detected, the detection accuracy of whether the image to be detected is a tampered image is improved, and the safety of identity verification is further improved.
Example five
The embodiments of the present disclosure further provide a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements each process of the embodiments of the data processing method, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The embodiment of the specification provides a computer readable storage medium, which is used for acquiring a target image to be detected, carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image, carrying out coding processing on the first feature vector based on the pre-trained detection model to obtain a second feature vector, respectively carrying out feature extraction processing on the second feature vector based on different feature extraction layers in the pre-trained detection model to obtain similarity among the feature vectors, determining a third feature vector, carrying out decoding processing on the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector, carrying out classification processing on the target feature vector based on the pre-trained detection model to obtain a predictive tag of the target image, and determining whether the target image is a tampered image based on the predictive tag. Therefore, the difference of different areas in the image can be learned through different feature extraction layers of the detection model, so that the detection model can better learn the feature difference of the tampered area and the non-tampered area in the image, and the feature vector obtained through the encoding processing and the decoding processing of the detection model is fused, so that whether the image is a tampered image can be detected, the detection accuracy of whether the image to be detected is a tampered image is improved, and the safety of identity verification is further improved.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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 the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
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 the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. A data processing method, comprising:
acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image;
based on the pre-trained detection model, carrying out coding processing on the first feature vector to obtain a second feature vector;
determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model;
decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector;
and classifying the target feature vector based on the pre-trained detection model to obtain a predictive label of the target image, and determining whether the target image is a tampered image based on the predictive label.
2. The method of claim 1, further comprising, prior to the encoding the target image based on the pre-trained detection model to obtain a first feature vector corresponding to the target image:
Acquiring a historical image for training the detection model and a type label corresponding to the historical image data, wherein the type label is used for representing whether the historical image is a tampered image or not;
performing image feature extraction processing on the historical image based on the detection model to obtain a fifth feature vector corresponding to the historical image;
based on the detection model, carrying out coding processing on the fifth feature vector to obtain a sixth feature vector;
determining a seventh feature vector based on the similarity between feature vectors obtained by performing feature extraction processing on the sixth feature vector by different feature extraction layers in the detection model;
decoding the sixth feature vector based on the detection model to obtain an eighth feature vector, and determining a ninth feature vector corresponding to the historical image based on the seventh feature vector and the eighth feature vector;
classifying the ninth feature vector based on the detection model to obtain a prediction tag of the historical image;
and carrying out iterative training on the detection model based on the type label and the predictive label of the historical image until the detection model converges to obtain a trained detection model.
3. The method of claim 2, the detection model comprising a first feature extraction layer and a second feature extraction layer, the first feature extraction layer having the same network structure and different network parameters than the second feature extraction layer,
the determining a seventh feature vector based on the similarity between feature vectors obtained by performing feature extraction processing on the sixth feature vector by different feature extraction layers in the detection model includes:
performing feature extraction processing on the sixth feature vector based on the first feature extraction layer to obtain a first vector, and performing feature extraction processing on the sixth feature vector based on the second feature extraction layer to obtain a second vector;
the seventh feature vector is determined based on a similarity between the first vector and the second vector.
4. A method according to claim 3, wherein the performing feature extraction processing on the sixth feature vector based on the first feature extraction layer to obtain a first vector, and performing feature extraction processing on the sixth feature vector based on the second feature extraction layer to obtain a second vector, includes:
amplifying the sixth feature vector based on a preset amplifying dimension to obtain an amplified sixth feature vector;
And carrying out feature extraction processing on the amplified sixth feature vector based on the first feature extraction layer to obtain the first vector, and carrying out feature extraction processing on the amplified sixth feature vector based on the second feature extraction layer to obtain the second vector.
5. The method according to claim 4, wherein the detection model includes a plurality of data processing layers, the data processing layers include a plurality of encoding layers and a plurality of decoding layers corresponding to the plurality of encoding layers, the encoding layers include a node number smaller than a node number included in a previous encoding layer of the encoding layers, the decoding layers include a node number larger than a node number included in a previous encoding layer of the encoding layers, the input data of the decoding layers is determined based on feature vectors output by a previous data processing layer, and the feature vectors obtained by performing the comparison detection processing on the feature vectors output by the encoding layers corresponding to the previous decoding layer are determined based on the feature detection module.
6. The method of claim 5, the sixth feature vector comprising a first sub-feature vector and a second sub-feature vector, the encoding the fifth feature vector based on the detection model to obtain a sixth feature vector, comprising:
Based on the first coding layer of the detection model, coding the fifth feature vector to obtain a first sub-feature vector;
based on a second coding layer of the detection model, coding the first sub-feature vector to obtain a second sub-feature vector;
the seventh feature vector includes a third sub feature vector obtained by performing contrast detection on the first sub feature vector based on the contrast detection module of the detection model, and a fourth sub feature vector obtained by performing contrast detection on the second sub feature vector based on the contrast detection module of the detection model, the eighth feature vector includes a fifth sub feature vector and a sixth sub feature vector, the sixth feature vector is decoded based on the detection model to obtain an eighth feature vector, and a ninth feature vector corresponding to the historical image is determined based on the seventh feature vector and the eighth feature vector, and the seventh feature vector includes:
decoding the second sub-feature data based on the first decoding layer of the detection model to obtain the fifth sub-feature vector;
Determining a first input vector based on the fourth sub-feature vector and the fifth sub-feature vector;
decoding the first input vector based on a second decoding layer of the detection model to obtain the sixth sub-feature vector;
a ninth feature vector corresponding to the historical image is determined based on the third sub-feature vector and the sixth sub-feature vector.
7. The method of claim 1, the method further comprising:
determining position information of a tampered region in the target image based on the pre-trained detection model and the target image under the condition that the target image is determined to be the tampered image based on the predictive label;
and carrying out risk detection processing on the target image based on the position information to obtain a risk detection result aiming at the target image.
8. The method of claim 7, the determining location information of a tampered region in the target image based on the pre-trained detection model and the target image, comprising:
and determining the position information of the tampered area in the target image based on the classification information of the pixel points of the target image, which is included in the predictive label of the target image and is output by the pre-trained detection model.
9. A data processing apparatus comprising:
the image acquisition module is used for acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image;
the first coding module is used for coding the first characteristic vector based on the pre-trained detection model to obtain a second characteristic vector;
the first determining module is used for determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model;
the first decoding module is used for decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector;
the first classification module is used for classifying the target feature vector based on the pre-trained detection model to obtain a prediction label of the target image, and determining whether the target image is a tampered image based on the prediction label.
10. A data processing apparatus, the data processing apparatus comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a target image to be detected, and carrying out image feature extraction processing on the target image based on a pre-trained detection model to obtain a first feature vector corresponding to the target image;
based on the pre-trained detection model, carrying out coding processing on the first feature vector to obtain a second feature vector;
determining the third feature vector based on the similarity between feature vectors obtained by respectively carrying out feature extraction processing on the second feature vector by different feature extraction layers in the pre-trained detection model;
decoding the second feature vector based on the pre-trained detection model to obtain a fourth feature vector, and determining a target feature vector corresponding to the target image based on the third feature vector and the fourth feature vector;
and classifying the target feature vector based on the pre-trained detection model to obtain a predictive label of the target image, and determining whether the target image is a tampered image based on the predictive label.
CN202310628033.XA 2023-05-30 2023-05-30 Data processing method, device and equipment Pending CN116664514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310628033.XA CN116664514A (en) 2023-05-30 2023-05-30 Data processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310628033.XA CN116664514A (en) 2023-05-30 2023-05-30 Data processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN116664514A true CN116664514A (en) 2023-08-29

Family

ID=87725514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310628033.XA Pending CN116664514A (en) 2023-05-30 2023-05-30 Data processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN116664514A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117527449A (en) * 2024-01-05 2024-02-06 之江实验室 Intrusion detection method, device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117527449A (en) * 2024-01-05 2024-02-06 之江实验室 Intrusion detection method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112398838B (en) Authentication method, device, equipment and storage medium based on privacy protection
CN111401273B (en) User feature extraction system and device for privacy protection
CN112800468B (en) Data processing method, device and equipment based on privacy protection
CN115712866B (en) Data processing method, device and equipment
CN111368795B (en) Face feature extraction method, device and equipment
CN116664514A (en) Data processing method, device and equipment
CN116049761A (en) Data processing method, device and equipment
CN116152933A (en) Training method, device, equipment and storage medium of anomaly detection model
CN118428404A (en) Knowledge distillation method, device and equipment for model
CN117612269A (en) Biological attack detection method, device and equipment
CN117541963A (en) Method and device for extracting key video frames containing text risks
CN116186330B (en) Video deduplication method and device based on multi-mode learning
CN113569873B (en) Image processing method, device and equipment
CN114662706B (en) Model training method, device and equipment
CN116631033A (en) Data processing method, device and equipment
CN116070916B (en) Data processing method, device and equipment
CN115600155B (en) Data processing method, device and equipment
CN112115952B (en) Image classification method, device and medium based on full convolution neural network
CN115953559B (en) Virtual object processing method and device
CN118193797B (en) Method and device for executing service, storage medium and electronic equipment
CN116186540A (en) Data processing method, device and equipment
CN118898760A (en) Image recognition method and device for network security
CN116563581A (en) Training method and device for image detection model
CN115905876A (en) Model processing method, device and equipment
CN116935176A (en) Image processing method and device

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