CN113239935A - Image feature extraction method, device, equipment and medium based on block chain - Google Patents

Image feature extraction method, device, equipment and medium based on block chain Download PDF

Info

Publication number
CN113239935A
CN113239935A CN202110403136.7A CN202110403136A CN113239935A CN 113239935 A CN113239935 A CN 113239935A CN 202110403136 A CN202110403136 A CN 202110403136A CN 113239935 A CN113239935 A CN 113239935A
Authority
CN
China
Prior art keywords
image
feature
target
module
algorithm
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
CN202110403136.7A
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.)
GRG Banking Equipment Co Ltd
Original Assignee
GRG Banking Equipment 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 GRG Banking Equipment Co Ltd filed Critical GRG Banking Equipment Co Ltd
Priority to CN202110403136.7A priority Critical patent/CN113239935A/en
Publication of CN113239935A publication Critical patent/CN113239935A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/469Contour-based spatial representations, e.g. vector-coding
    • G06V10/473Contour-based spatial representations, e.g. vector-coding using gradient analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image feature extraction method, device, equipment and medium based on a block chain, wherein the method comprises the following steps: uploading the target image to an image uploading module by a data provider; converting the target image into a gray image through an image graying processing module, and carrying out homomorphic encryption on the gray image to obtain an encrypted image; carrying out feature extraction on the encrypted image through an image feature extraction module; the algorithm and feature management module stores the extracted features in a block chain; selecting a target feature in an algorithm and feature management module by a data user; determining a downloading authority according to the ring signature of the data user, and downloading the target feature through an image feature downloading module according to the downloading authority; and homomorphic decryption is carried out on the target characteristics. The invention realizes image feature extraction through the block chain technology, can ensure data confidentiality and improve feature extraction efficiency, and can be widely applied to the technical field of image processing.

Description

Image feature extraction method, device, equipment and medium based on block chain
Technical Field
The invention relates to the technical field of image processing, in particular to a block chain-based image feature extraction method, device, equipment and medium.
Background
The block chain technology has the characteristics of decentralization, openness and transparency, no tampering and traceability, so that the block chain technology can be widely applied to various business fields. Organizations in different business fields generally upload, share, trace, monitor, etc. information in a public chain or alliance chain manner.
In the field of image processing and computer vision, feature extraction is a high-level stage of digital image processing and is also a primary task for image recognition. The image characteristics can be widely applied to businesses such as machine learning, training sets of image classification algorithms, image recognition and the like.
The algorithms for feature extraction are various, specific service analysis is needed during selection and use, and certain subjectivity is achieved. Today, image classification and image recognition are widely applied, the situation that different data providers can select the same image feature extraction scheme is high in probability, but due to the characteristics of the business and the subjectivity of the selection algorithm, no public data providers using the same algorithm exist, and a data sharing platform provides image features for the data providers.
At present, most mechanisms applying image recognition and computer vision still select to extract image features on respective platforms, and the centralized mode has the following problems:
1. for the demanders who use the same algorithm or extract a similar picture set, since there is no relation between them, each demander will perform feature extraction once on the used image, which is a kind of repeated work in the long run, resulting in waste of resources.
2. The packaged feature extraction algorithm provided by the centralized organization has a trust crisis for services with higher privacy degree, and the privacy of a user is not ensured enough.
3. The centralized organization has single service type and small data set samples, and if the data samples can be provided by the whole network or the alliance together, the number of the samples can be greatly increased, and the efficiency of subsequent image identification can be enhanced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a medium for extracting image features based on a block chain, which have high data confidentiality and high efficiency.
The invention provides an image feature extraction method based on a block chain, which comprises the following steps:
uploading the target image to an image uploading module by a data provider;
converting the target image into a gray image through an image graying processing module, and carrying out homomorphic encryption on the gray image to obtain an encrypted image;
carrying out feature extraction on the encrypted image through an image feature extraction module;
the algorithm and feature management module stores the extracted features in a block chain;
selecting a target feature in an algorithm and feature management module by a data user;
determining a downloading authority according to the ring signature of the data user, and downloading the target feature through an image feature downloading module according to the downloading authority;
and homomorphic decryption is carried out on the target characteristics.
Optionally, in the step of converting the target image into a grayscale image by the image graying processing module, the conversion formula of the grayscale image is as follows:
Gray=0.3*R+0.59G+0.11B
wherein Gray represents a pixel value after graying; r represents the pixel value of red in three primary colors before the graying treatment; g represents a pixel value representing green in three primary colors before graying processing; b represents a pixel value representing blue among the three primary colors before the graying process.
Optionally, the homomorphic encrypting the grayscale image to obtain an encrypted image includes:
generating a public key and a private key of a Paillier algorithm by a block chain manager;
distributing the public key and the private key to each node in the block chain; the public keys of different nodes are the same, and the private keys of different nodes are different;
and carrying out homomorphic encryption on the gray level image according to the public key to obtain an encrypted image.
Optionally, the performing, by an image feature extraction module, feature extraction on the encrypted image includes:
calculating gradient values and gradient directions of the encrypted image from vertical and horizontal directions;
according to the gradient value and the gradient direction, counting a gradient direction histogram of the encrypted image;
and carrying out feature standardization processing on the gradient direction histogram to obtain a feature vector group.
Optionally, the performing, by an image feature extraction module, feature extraction on the encrypted image further includes:
performing convolution operation on the encrypted image and a preset Gaussian function to determine a scale space of the encrypted image;
performing Gaussian blur processing and downsampling processing on the encrypted image to determine a Gaussian pyramid;
carrying out local extreme value detection on the Gaussian pyramid through a DoG function to determine an extreme value point;
determining key feature points according to the extreme points;
and calculating gradient values and gradient directions of the pixels of the key feature points to obtain a feature vector group.
Optionally, the selecting by the data consumer of the target feature in the algorithm and feature management module comprises
The extracted features are classified, stored and displayed through an algorithm and feature management module;
and determining the target characteristics according to the characteristic selection instruction sent by the data user.
Optionally, the ring signature of the data consumer is generated according to a public key set in a block chain;
the homomorphic decryption of the target feature specifically includes:
and decrypting the target characteristics by the data user according to the private key of the node.
A second aspect of the embodiments of the present invention provides an image feature extraction device based on a block chain, including:
the uploading unit is used for uploading the target image to the image uploading module by the data provider;
the conversion unit is used for converting the target image into a gray image through an image graying processing module and carrying out homomorphic encryption on the gray image to obtain an encrypted image;
the extraction unit is used for extracting the characteristics of the encrypted image through an image characteristic extraction module;
the storage unit is used for storing the extracted features in an algorithm and feature management module of the block chain;
a selection unit for selecting a target feature in the algorithm and feature management module by the data consumer;
the downloading unit is used for determining downloading authority according to the ring signature of the data user and downloading the target characteristics through an image characteristic downloading module according to the downloading authority;
and the decryption unit is used for homomorphically decrypting the target characteristics.
A third aspect of embodiments of the present invention provides an electronic device, including a processor and a memory;
the memory is used for storing programs;
the processor executes the program to implement the method as described above.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a program for execution by a processor to implement the method as described above.
The embodiment of the invention also discloses a computer program product or a computer program, which comprises computer instructions, and the computer instructions are stored in a computer readable storage medium. The computer instructions may be read by a processor of a computer device from a computer-readable storage medium, and the computer instructions executed by the processor cause the computer device to perform the foregoing method.
In the embodiment of the invention, a data provider uploads a target image to an image uploading module; converting the target image into a gray image through an image graying processing module, and carrying out homomorphic encryption on the gray image to obtain an encrypted image; carrying out feature extraction on the encrypted image through an image feature extraction module; the algorithm and feature management module stores the extracted features in a block chain; selecting a target feature in an algorithm and feature management module by a data user; determining a downloading authority according to the ring signature of the data user, and downloading the target feature through an image feature downloading module according to the downloading authority; and homomorphic decryption is carried out on the target characteristics. The invention realizes image feature extraction through the block chain technology, can ensure data confidentiality and improve feature extraction efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of local extremum detection of a DoG function;
fig. 2 is a schematic flow chart of an implementation of the image feature extraction system according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Aiming at the problems in the prior art, the embodiment of the invention provides an image feature extraction method based on a block chain, which comprises the following steps:
uploading the target image to an image uploading module by a data provider;
converting the target image into a gray image through an image graying processing module, and carrying out homomorphic encryption on the gray image to obtain an encrypted image;
carrying out feature extraction on the encrypted image through an image feature extraction module;
the algorithm and feature management module stores the extracted features in a block chain;
selecting a target feature in an algorithm and feature management module by a data user;
determining a downloading authority according to the ring signature of the data user, and downloading the target feature through an image feature downloading module according to the downloading authority;
and homomorphic decryption is carried out on the target characteristics.
Optionally, in the step of converting the target image into a grayscale image by the image graying processing module, the conversion formula of the grayscale image is as follows:
Gray=0.3*R+0.59G+0.11B
wherein Gray represents a pixel value after graying; r represents the pixel value of red in three primary colors before the graying treatment; g represents a pixel value representing green in three primary colors before graying processing; b represents a pixel value representing blue among the three primary colors before the graying process.
Optionally, the homomorphic encrypting the grayscale image to obtain an encrypted image includes:
generating a public key and a private key of a Paillier algorithm by a block chain manager;
distributing the public key and the private key to each node in the block chain; the public keys of different nodes are the same, and the private keys of different nodes are different;
and carrying out homomorphic encryption on the gray level image according to the public key to obtain an encrypted image.
Optionally, the performing, by an image feature extraction module, feature extraction on the encrypted image includes:
calculating gradient values and gradient directions of the encrypted image from vertical and horizontal directions;
according to the gradient value and the gradient direction, counting a gradient direction histogram of the encrypted image;
and carrying out feature standardization processing on the gradient direction histogram to obtain a feature vector group.
Optionally, the performing, by an image feature extraction module, feature extraction on the encrypted image further includes:
performing convolution operation on the encrypted image and a preset Gaussian function to determine a scale space of the encrypted image;
performing Gaussian blur processing and downsampling processing on the encrypted image to determine a Gaussian pyramid;
carrying out local extreme value detection on the Gaussian pyramid through a DoG function to determine an extreme value point;
determining key feature points according to the extreme points;
and calculating gradient values and gradient directions of the pixels of the key feature points to obtain a feature vector group.
Optionally, the selecting by the data consumer of the target feature in the algorithm and feature management module comprises
The extracted features are classified, stored and displayed through an algorithm and feature management module;
and determining the target characteristics according to the characteristic selection instruction sent by the data user.
Optionally, the ring signature of the data consumer is generated according to a public key set in a block chain;
the homomorphic decryption of the target feature specifically includes:
and decrypting the target characteristics by the data user according to the private key of the node.
A second aspect of the embodiments of the present invention provides an image feature extraction device based on a block chain, including:
the uploading unit is used for uploading the target image to the image uploading module by the data provider;
the conversion unit is used for converting the target image into a gray image through an image graying processing module and carrying out homomorphic encryption on the gray image to obtain an encrypted image;
the extraction unit is used for extracting the characteristics of the encrypted image through an image characteristic extraction module;
the storage unit is used for storing the extracted features in an algorithm and feature management module of the block chain;
a selection unit for selecting a target feature in the algorithm and feature management module by the data consumer;
the downloading unit is used for determining downloading authority according to the ring signature of the data user and downloading the target characteristics through an image characteristic downloading module according to the downloading authority;
and the decryption unit is used for homomorphically decrypting the target characteristics.
A third aspect of embodiments of the present invention provides an electronic device, including a processor and a memory;
the memory is used for storing programs;
the processor executes the program to implement the method as described above.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a program for execution by a processor to implement the method as described above.
The embodiment of the invention also discloses a computer program product or a computer program, which comprises computer instructions, and the computer instructions are stored in a computer readable storage medium. The computer instructions may be read by a processor of a computer device from a computer-readable storage medium, and the computer instructions executed by the processor cause the computer device to perform the foregoing method.
The following describes in detail the implementation process of the image feature extraction method according to the embodiment of the present invention with reference to the drawings in the specification:
the invention provides an image feature extraction system based on a block chain technology, which comprises an image uploading module, an image graying processing module, an image feature extraction module, an algorithm and feature management module and an image feature downloading module.
In the invention, a data provider uploads an image to an image uploading module, the image is converted into a gray image through an image graying processing module and is subjected to homomorphic encryption, the encrypted image is subjected to feature extraction through an image feature extraction module, and an encrypted image feature extraction HOG algorithm, an encrypted image feature extraction SIFT algorithm or other feature extraction algorithms can be selected. The extracted image features and the algorithm information are stored in an algorithm and feature management module.
The data user selects the needed characteristics from the algorithm and the characteristic management module to enter the image characteristic downloading module, the downloading authority is confirmed according to the ring signature, and the characteristics can be used for representing the image after homomorphic decryption.
The image uploading module is a file uploading plug-in at the front end of the network, and stores the uploaded image in a server end for uplink waiting.
The image graying processing module is used for carrying out RGB component to gray level image processing on the color image.
The conversion formula of the gray-scale image is as follows:
Gray=0.3*R+0.59G+0.11B
the homomorphic encryption is introduced into the system and is used for encrypting the image and protecting the privacy of the portrait, important confidential information and the like in the image. The manager is required to generate a public key and a private key of a Paillier algorithm, the public key and the private key are distributed to each node Ni and Ni of the system alliance chain, the node Ni and the node Ni are provided with a pair of public keys and private keys (PK and SKi), wherein the public keys are the same, and the private keys are different.
The administrator is a alliance administrator, the alliance creator is defaulted to be the alliance administrator, and the alliance administrator can add or delete the member of the local organization to be the alliance administrator.
The Paillier algorithm is a probability asymmetric algorithm based on cryptography and public key science, and two large prime numbers p and q and a random number g are selected to obtain a public key and a private key through a series of function operations.
When the image illuminance is not uniform, the brightness of the entire image can be increased or decreased by Gamma correction.
The "Gamma correction" is an algorithm for adjusting the brightness of an image, and a square root method is adopted here, and the formula is as follows (where γ is 0.5):
Y(x,y)=I(x,y)γ
wherein, (x, y) represents the coordinates of the image pixel points; y (x, Y) represents a pixel value at coordinates (x, Y); i (x, y)γRepresents a pixel value at the Gamma-corrected coordinates (x, y);
and homomorphic encryption is carried out on the image subjected to color space normalization by using a public key PK:
C(x,y)=E(Y(x,y),r)=gY(x,y)rnmodn2
c (x, Y) represents the image after homomorphic encryption, E (Y (x, Y), r) represents homomorphic encryption process, namely, the original image Y (x, Y) is homomorphic encrypted by a random number r; r is a random number, and n is the product of two large prime numbers p and q satisfying gcd (pq, (p-1) (q-1)) ═ 1.
The image feature extraction module uploads the encrypted image information and the encrypted algorithm information to a block chain, and feature extraction is performed on the block chain.
The encrypted image feature extraction HOG algorithm is an algorithm for extracting features of an encrypted image on the basis of a traditional image feature extraction algorithm HOG. The algorithm comprises three processes of image gradient calculation, gradient histogram statistics and an L2-norm feature standardization algorithm.
The image gradient calculation performs gradient and gradient direction on the encrypted image, and calculates in the vertical and horizontal directions:
Gx(x,y)=I(||x+1||,||y||)-I(||x-1||,||y||)
Gy(x,y)=I(||x||,||y+1||)-I(||x||,||y-1||)
Figure BDA0003021153640000071
Figure BDA0003021153640000072
wherein Gray represents a pixel value after graying; r represents the pixel value of red in three primary colors before the graying treatment; g represents a pixel value representing green in three primary colors before graying processing; b represents the pixel value of blue in the three primary colors before the graying process, and I (| x |, | y |) is the pixel value of the (x, y) point after the homomorphic encryption of the image.
The traditional HOG algorithm of the gradient histogram statistics divides an image into a plurality of non-overlapping 8 × 8 cells, and a gradient direction histogram is counted in each cell, wherein the gradient direction is an included angle of a vector, and an accumulated value of gradient values corresponding to an angle range is the length of the vector.
The "L2-norm feature normalization algorithm" improved HOG algorithm uses a feature normalization method when generating gradient direction histograms due to the influence of illumination and background. For example, 2 × 2 cells adjacent to each other, i.e., up, down, left, right, are taken as a block, and adjacent blocks are overlapped, so that adjacent pixel information is effectively utilized, and a detection result is greatly facilitated.
The feature vectors in the block are normalized in the L2-norm manner, and the formula is as follows:
Figure BDA0003021153640000081
wherein | υ | non-calculationkRepresenting a k norm, ε is a normalization constant to prevent divide-by-0 anomalies.
After the histograms of all the overlapped blocks are normalized, combining the feature vectors of all the blocks to form the encrypted HOG features of the image, wherein the feature vectors and the method for forming the feature vectors are stored in a block chain and can be used by a data user, and the algorithm can be optimized and improved by other nodes in a union chain.
The encrypted image feature extraction SIFT algorithm is characterized in that on the basis of the traditional SIFT algorithm, an original image I (x, y) is encrypted in a homomorphic mode to obtain an encrypted image I (x, y) I, the encrypted image and SIFT algorithm information are uploaded to a block chain, and SIFT feature extraction of the image is carried out on the block chain. The method comprises the processes of Gaussian blur, Gaussian pyramid, key feature point detection, pixel gradient calculation and the like.
The 'Gaussian blur' represents the scale space of an image by performing convolution operation on an image I (x, y) I which is homomorphically encrypted by an original image and a 2-dimensional Gaussian function G (x, y, sigma) with a variable scale.
L(x,y,σ)=G(x,y,σ)*||I(x,y)||
Figure BDA0003021153640000082
Wherein, L (x, y, sigma) represents the encrypted image after Gaussian blur; g (x, y, sigma) represents a two-dimensional Gaussian function, and sigma is a scale space factor and is used for representing the smooth degree of the image.
The Gaussian pyramid forms a Gaussian pyramid by using the encrypted image after Gaussian blur and the encrypted image after down sampling, and local extreme value detection is carried out by using a DoG function.
Each pixel of the 'DoG function' needs to be compared with all its neighboring points to see whether it is larger or smaller than its neighboring points of the image domain and the scale domain. As shown in fig. 1, the middle detection point is compared with 26 points, which are 8 adjacent points of the same scale and 9 × 2 points of the upper and lower adjacent scales, to ensure that extreme points are detected in both scale space and two-dimensional image space.
L(x,y,σ)=G(x,y,σ)*I(x,y)
D(x,y,σ)=[G(x,y,kσ)-G(x,y,σ)]*I(x,y)
=L(x,y,kσ)-L(x,y,σ)
The DOG operator needs to remove the edge effect, and obtains a Hessian matrix at the characteristic point:
Figure BDA0003021153640000083
Tr(H)=Dxx+Dyy
Figure BDA0003021153640000084
tr (H) represents the sum of diagonal elements of the matrix, and Det (H) represents the determinant of the matrix. When in use
Figure BDA0003021153640000091
And removing the edge effect characteristic points, and otherwise, keeping the edge effect characteristic points as key characteristic points.
For the retained key points, the gradient value and gradient direction of the pixel are obtained by adopting the following formulas:
Figure BDA0003021153640000092
θ(x,y)=tan-1(L(x+1,y)-L(x,y-1))/(L(x,y+1)-L(x,y-1))
the vector characterization of 4 multiplied by 8-128 dimensions is adopted, and the comprehensive effect is optimal.
The feature management module is used for storing and displaying the extracted image features and algorithms in a classified manner, and a data provider can select downloading according to the service types during use and selection.
The image characteristic downloading module is a characteristic downloading inlet provided for a data user, the data user provides a ring signature to acquire downloading authority, if the signature is valid, a characteristic value obtained through an encrypted image characteristic extraction algorithm is subjected to homomorphic decryption before downloading, and the downloaded characteristic value is a characteristic capable of representing an image after decryption.
The ring signature is a block chain signature technology, the identity of each node in a alliance chain can be protected while a node is verified to be one member in the alliance chain, when a data user acquires characteristics, n public keys in a public key set are used for generating the ring signature, the public key set is as follows, PiIs the public key of the user.
Pk={P1,P2,P3…Pi-1,Pi,Pi+1…Pn}
The signer generates n-1 random numbers, wherein the random numbers correspond to the public keys one by one, and riIs a random number of the user side and is not generated here.
R′={r1,r2,r3…ri-1,ri+1…rn}
According to the recursion formula cx=Hash(m,rx-1*G+cx-1*Px-1) Separately calculate ci. Wherein, the key pair of the user i is (x, Pi), G satisfies Pi ═ x G
ciAnd the random number k satisfies: k G ri*G+ci*Pi
It can be concluded that: r isi=k-ci*x。
R={r1,r2,r3…ri-1,k-ci*x,ri+1…rn}
C is to1R, Pk and signature message m are assembled into a ring signature which is sent to a data provider by using a recursive formula cx=Hash(m,rx-1*G+cx-1*Px-1) Sequentially find c2,c3,c4…cnFinally according to cnFind c1'. If c is1=c1', the signature is valid, otherwise invalid.
The 'homomorphic decryption' is a decryption process of homomorphic encryption, and a data user side is used for comparing an existing image feature F 'on a block chain'hDecrypted with the private key, which, for node Ni, is SKi ═ lcm (p-1, q-1).
Fh=D(F′h,SKi)=(L((F′h)λmodn2)/L(PKλmodn2))modn
Wherein l (u) ═ 1/N.
Decrypted image feature vector FhCan be used to characterize images as an important parameter for subsequent image processing or computer vision.
The invention provides an image feature extraction system based on a block chain, as shown in fig. 2, the operation of the system comprises the following steps:
step S101: and the data provider provides image information, the image uploading module 1 selects image types and algorithms, and uploads the uploaded images to the server where the nodes are located in batch.
Step S102: the image is grayed by the image graying processing module 2. If the data provider directly provides gray image information, the image type and algorithm can be selected in the image graying processing module 2, and the uploaded images are uploaded to the server where the nodes are located in batch.
Step S103: the grayed image is homomorphic encrypted in the image feature extraction module 3, image feature extraction is carried out according to an algorithm, and the extracted features are uploaded to a alliance chain. The extracted feature types and algorithms will be presented as options in the algorithm and feature management module 4.
Step S104: if the data provider directly provides the extracted image features, the feature type and the feature type can be selected in the algorithm and feature management module 4, the extracted image features are uploaded, and the uploaded features are uploaded to a alliance chain after homomorphic encryption.
Step S105: if the data provider provides new feature extraction algorithm information, the algorithm information can be added to the algorithm and feature management module 4, and the algorithm model is uploaded to the node server.
Step S106: the data user selects the needed characteristics in the algorithm and characteristic management module 4, enters the image characteristic downloading module 5, provides the ring signature verification identity, and can download the decrypted characteristics to the local server.
In summary, compared with the prior art, the invention has the following advantages:
1. for a plurality of data extraction users using the same algorithm or extracting similar image sets, the image characteristics of various common algorithms of similar images can be directly obtained from the block chain after the alliance chain is added, so that the repeated work is avoided, and the machine learning efficiency is improved.
2. By using the ring signature technology, the privacy of a data provider and a data user is protected, and a good guarantee is provided for demanding parties with high privacy requirements, such as medical treatment, traffic and the like.
3. The centralized organization has single service type and small data set samples, and if the data samples can be provided by the whole network or the alliance together, the number of the samples can be greatly increased, and the efficiency of subsequent image identification can be enhanced.
In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the described functions and/or features may be integrated in a single physical device and/or software module, or one or more functions and/or features may be implemented in a separate physical device or software module. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be understood within the ordinary skill of an engineer, given the nature, function, and internal relationship of the modules. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An image feature extraction method based on a block chain is characterized by comprising the following steps:
uploading the target image to an image uploading module by a data provider;
converting the target image into a gray image through an image graying processing module, and carrying out homomorphic encryption on the gray image to obtain an encrypted image;
carrying out feature extraction on the encrypted image through an image feature extraction module;
the algorithm and feature management module stores the extracted features in a block chain;
selecting a target feature in an algorithm and feature management module by a data user;
determining a downloading authority according to the ring signature of the data user, and downloading the target feature through an image feature downloading module according to the downloading authority;
and homomorphic decryption is carried out on the target characteristics.
2. The method according to claim 1, wherein in the step of converting the target image into a grayscale image by the image graying processing module, the conversion formula of the grayscale image is as follows:
Gray=0.3*R+0.59G+0.11B
wherein Gray represents a pixel value after graying; r represents the pixel value of red in three primary colors before the graying treatment; g represents a pixel value representing green in three primary colors before graying processing; b represents a pixel value representing blue among the three primary colors before the graying process.
3. The method according to claim 1, wherein the homomorphic encrypting the grayscale image to obtain an encrypted image comprises:
generating a public key and a private key of a Paillier algorithm by a block chain manager;
distributing the public key and the private key to each node in the block chain; the public keys of different nodes are the same, and the private keys of different nodes are different;
and carrying out homomorphic encryption on the gray level image according to the public key to obtain an encrypted image.
4. The method for extracting image features based on block chains according to claim 1, wherein the extracting features of the encrypted image by an image feature extraction module comprises:
calculating gradient values and gradient directions of the encrypted image from vertical and horizontal directions;
according to the gradient value and the gradient direction, counting a gradient direction histogram of the encrypted image;
and carrying out feature standardization processing on the gradient direction histogram to obtain a feature vector group.
5. The method according to claim 1, wherein the feature extraction of the encrypted image by the image feature extraction module further comprises:
performing convolution operation on the encrypted image and a preset Gaussian function to determine a scale space of the encrypted image;
performing Gaussian blur processing and downsampling processing on the encrypted image to determine a Gaussian pyramid;
carrying out local extreme value detection on the Gaussian pyramid through a DoG function to determine an extreme value point;
determining key feature points according to the extreme points;
and calculating gradient values and gradient directions of the pixels of the key feature points to obtain a feature vector group.
6. The method according to claim 1, wherein the selecting of the target feature in the algorithm and feature management module by the data user comprises
The extracted features are classified, stored and displayed through an algorithm and feature management module;
and determining the target characteristics according to the characteristic selection instruction sent by the data user.
7. The method according to claim 1, wherein the ring signature of the data consumer is generated from a public key set in the block chain;
the homomorphic decryption of the target feature specifically includes:
and decrypting the target characteristics by the data user according to the private key of the node.
8. An image feature extraction device based on a block chain, comprising:
the uploading unit is used for uploading the target image to the image uploading module by the data provider;
the conversion unit is used for converting the target image into a gray image through an image graying processing module and carrying out homomorphic encryption on the gray image to obtain an encrypted image;
the extraction unit is used for extracting the characteristics of the encrypted image through an image characteristic extraction module;
the storage unit is used for storing the extracted features in an algorithm and feature management module of the block chain;
a selection unit for selecting a target feature in the algorithm and feature management module by the data consumer;
the downloading unit is used for determining downloading authority according to the ring signature of the data user and downloading the target characteristics through an image characteristic downloading module according to the downloading authority;
and the decryption unit is used for homomorphically decrypting the target characteristics.
9. An electronic device comprising a processor and a memory;
the memory is used for storing programs;
the processor executing the program realizes the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the storage medium stores a program, which is executed by a processor to implement the method according to any one of claims 1-7.
CN202110403136.7A 2021-04-15 2021-04-15 Image feature extraction method, device, equipment and medium based on block chain Pending CN113239935A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110403136.7A CN113239935A (en) 2021-04-15 2021-04-15 Image feature extraction method, device, equipment and medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110403136.7A CN113239935A (en) 2021-04-15 2021-04-15 Image feature extraction method, device, equipment and medium based on block chain

Publications (1)

Publication Number Publication Date
CN113239935A true CN113239935A (en) 2021-08-10

Family

ID=77128296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110403136.7A Pending CN113239935A (en) 2021-04-15 2021-04-15 Image feature extraction method, device, equipment and medium based on block chain

Country Status (1)

Country Link
CN (1) CN113239935A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792305A (en) * 2021-08-18 2021-12-14 广州城建职业学院 Encryption and decryption method, system, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077512A (en) * 2012-10-18 2013-05-01 北京工业大学 Feature extraction and matching method and device for digital image based on PCA (principal component analysis)
CN106952212A (en) * 2017-03-14 2017-07-14 电子科技大学 A kind of HOG image characteristics extraction algorithms based on vectorial homomorphic cryptography
CN110097051A (en) * 2019-04-04 2019-08-06 平安科技(深圳)有限公司 Image classification method, device and computer readable storage medium
CN111385301A (en) * 2020-03-06 2020-07-07 湖南智慧政务区块链科技有限公司 Block chain data sharing encryption and decryption method, equipment and storage medium
WO2021046668A1 (en) * 2019-09-09 2021-03-18 深圳市网心科技有限公司 Blockchain system, information transmission method, system and apparatus, and computer medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077512A (en) * 2012-10-18 2013-05-01 北京工业大学 Feature extraction and matching method and device for digital image based on PCA (principal component analysis)
CN106952212A (en) * 2017-03-14 2017-07-14 电子科技大学 A kind of HOG image characteristics extraction algorithms based on vectorial homomorphic cryptography
CN110097051A (en) * 2019-04-04 2019-08-06 平安科技(深圳)有限公司 Image classification method, device and computer readable storage medium
WO2021046668A1 (en) * 2019-09-09 2021-03-18 深圳市网心科技有限公司 Blockchain system, information transmission method, system and apparatus, and computer medium
CN111385301A (en) * 2020-03-06 2020-07-07 湖南智慧政务区块链科技有限公司 Block chain data sharing encryption and decryption method, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792305A (en) * 2021-08-18 2021-12-14 广州城建职业学院 Encryption and decryption method, system, equipment and computer readable storage medium
CN113792305B (en) * 2021-08-18 2023-11-14 广州城建职业学院 Encryption and decryption method, system, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
Zhou et al. Coverless image steganography using partial-duplicate image retrieval
Muhammad et al. Image steganography using uncorrelated color space and its application for security of visual contents in online social networks
Yang et al. Source camera identification based on content-adaptive fusion residual networks
Lin et al. A novel data hiding algorithm for high dynamic range images
Swaminathan et al. Digital image forensics via intrinsic fingerprints
Rocha et al. Vision of the unseen: Current trends and challenges in digital image and video forensics
Zhou et al. A novel lossless medical image encryption scheme based on game theory with optimized ROI parameters and hidden ROI position
Li et al. Chaotic image encryption using pseudo-random masks and pixel mapping
CN109871845B (en) Certificate image extraction method and terminal equipment
Hsu et al. Enhancing the robustness of image watermarking against cropping attacks with dual watermarks
Swain Two new steganography techniques based on quotient value differencing with addition-subtraction logic and PVD with modulus function
Lee et al. A data hiding method based on information sharing via PNG images for applications of color image authentication and metadata embedding
CN109977686A (en) A kind of image encryption method and image processing equipment based on Composite Chaotic System
Lee et al. An efficient reversible data hiding with reduplicated exploiting modification direction using image interpolation and edge detection
Liu et al. A digital data hiding scheme based on pixel-value differencing and side match method
Castiglione et al. Experimentations with source camera identification and online social networks
Kumar et al. Feature based steganalysis using wavelet decomposition and magnitude statistics
CN113239935A (en) Image feature extraction method, device, equipment and medium based on block chain
Chen et al. Detecting anti-forensic attacks on demosaicing-based camera model identification
Saeed et al. An accurate texture complexity estimation for quality-enhanced and secure image steganography
Swain et al. Image steganography using remainder replacement, adaptive QVD and QVC
Jafar et al. SARDH: A novel sharpening-aware reversible data hiding algorithm
Comesana et al. The optimal attack to histogram-based forensic detectors is simple (x)
Liang et al. Invertible color-to-grayscale conversion using lossy compression and high-capacity data hiding
Rajput et al. CryptoCT: towards privacy preserving color transfer and storage over cloud

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