Blockchain-based image feature extraction method, device, equipment and medium

By performing image feature extraction on the blockchain, the repetitive work, privacy and insufficient data samples of image recognition institutions during the feature extraction process are solved, and efficient and secure feature sharing and recognition are achieved.

CN113239935BActive Publication Date: 2024-11-12GRG BANKING EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110403136.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-15
Publication Date
2024-11-12
Estimated Expiration
2041-04-15

AI Technical Summary

Technical Problem

Existing image recognition and computer vision institutions have problems with duplicate work, insufficient privacy and insufficient data samples during feature extraction, especially the lack of public data sharing platforms among demanders using the same algorithm or similar picture collections.

Method used

Using a blockchain-based image feature extraction method, the data provider uploads images and performs grayscale processing and homomorphic encryption, extracts features and stores them on the blockchain, and the data user downloads and decrypts features according to the ring signature to ensure that Data confidentiality and efficiency.

Benefits of technology

It avoids duplicate work, improves feature extraction efficiency, enhances privacy protection, expands the number of data samples, and improves the accuracy of image recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113239935B_ABST
    Figure CN113239935B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for extracting image features based on blockchain, and the method includes: a data provider uploads a target image to an image upload module; an image grayscale processing module converts the target image into a grayscale image, and homomorphically encrypts the grayscale image to obtain an encrypted image; an image feature extraction module extracts features from the encrypted image; the extracted features are stored in an algorithm and feature management module of the blockchain; a data user selects a target feature in the algorithm and feature management module; download authority is determined according to the ring signature of the data user, and the target feature is downloaded through the image feature download module according to the download authority; and the target feature is homomorphically decrypted. The present invention realizes image feature extraction through blockchain technology, can ensure data confidentiality and improve feature extraction efficiency, and can be widely used in the field of image processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a blockchain-based image feature extraction method, device, equipment and medium. Background Art

[0002] Blockchain technology has the characteristics of decentralization, openness, transparency, immutability and traceability, which makes it widely used in various business fields. Institutions in different business fields generally upload, share, trace and supervise information through public chains or alliance chains.

[0003] In the field of image processing and computer vision, feature extraction is an advanced stage of digital image processing and also the primary task of image recognition. Image features can be widely used in machine learning, training sets of image classification algorithms, image recognition and other businesses.

[0004] There are many types of feature extraction algorithms, and the selection and use of them should be analyzed according to the specific business, which is subjective. Today, when image classification and image recognition are widely used, there is a high probability that different data providers will choose the same image feature extraction solution. However, due to the characteristics of the business itself and the subjectivity of algorithm selection, there is no public, data-sharing platform for data providers using the same algorithm to provide them with image features.

[0005] At present, most organizations that apply image recognition and computer vision still choose to extract image features on their own platforms. This centralized approach has the following problems:

[0006] 1. For demanders who use the same algorithm or extract similar image collections, since there is no connection between them, each demander will perform feature extraction on the images used. In the long run, this is a duplication of work and causes a waste of resources.

[0007] 2. The packaged feature extraction algorithms provided by centralized organizations pose a trust crisis for businesses with a high degree of privacy and are insufficient to guarantee the privacy of users.

[0008] 3. Centralized institutions have a single business type and a small data set sample. If data samples can be provided by the entire network or alliance, the number of samples will be greatly increased, enhancing the efficiency of subsequent image recognition. Summary of the invention

[0009] In view of this, embodiments of the present invention provide a blockchain-based image feature extraction method, device, equipment and medium with high data confidentiality and efficiency.

[0010] The first aspect of the present invention provides an image feature extraction method based on blockchain, comprising:

[0011] The data provider uploads the target image to the image upload module;

[0012] The target image is converted into a grayscale image by an image grayscale processing module, and the grayscale image is homomorphically encrypted to obtain an encrypted image;

[0013] Performing feature extraction on the encrypted image by an image feature extraction module;

[0014] The extracted features are stored in the algorithm and feature management module of the blockchain;

[0015] The data user selects the target features in the algorithm and feature management module;

[0016] Determine the download authority according to the ring signature of the data user, and download the target feature through the image feature download module according to the download authority;

[0017] The target feature is homomorphically decrypted.

[0018] Optionally, in the step of converting the target image into a grayscale image by the image grayscale processing module, the conversion formula of the grayscale image is:

[0019] Gray=0.3*R+0.59G+0.11B

[0020] Among them, Gray represents the pixel value after grayscale processing; R represents the pixel value of red among the three primary colors before grayscale processing; G represents the pixel value of green among the three primary colors before grayscale processing; B represents the pixel value of blue among the three primary colors before grayscale processing.

[0021] Optionally, performing homomorphic encryption on the grayscale image to obtain an encrypted image includes:

[0022] The blockchain manager generates the public and private keys of the Paillier algorithm;

[0023] Distributing the public key and the private key to each node in the blockchain; wherein the public keys of different nodes are the same and the private keys are different;

[0024] The grayscale image is homomorphically encrypted according to the public key to obtain an encrypted image.

[0025] Optionally, extracting features from the encrypted image by an image feature extraction module includes:

[0026] Calculating the gradient value and gradient direction of the encrypted image in vertical and horizontal directions;

[0027] According to the gradient value and the gradient direction, a gradient direction histogram of the encrypted image is calculated;

[0028] Perform feature normalization processing on the gradient direction histogram to obtain a feature vector group.

[0029] Optionally, the extracting features of the encrypted image by an image feature extraction module further includes:

[0030] Performing a convolution operation on the encrypted image and a preset Gaussian function to determine a scale space of the encrypted image;

[0031] Performing Gaussian blur processing and downsampling processing on the encrypted image to determine a Gaussian pyramid;

[0032] Performing local extreme value detection on the Gaussian pyramid by using the DoG function to determine the extreme value points;

[0033] Determine key feature points according to the extreme value points;

[0034] The gradient values ​​and gradient directions of the pixels of the key feature points are calculated to obtain a feature vector group.

[0035] Optionally, the data user selects the target feature in the algorithm and feature management module, including:

[0036] The extracted features are stored and displayed in categories through the algorithm and feature management module;

[0037] Determine the target features based on the feature selection instructions issued by the data user.

[0038] Optionally, the ring signature of the data user is generated according to the public key set in the blockchain;

[0039] The homomorphic decryption of the target feature is specifically:

[0040] The data user decrypts the target feature according to the private key of its own node.

[0041] A second aspect of an embodiment of the present invention provides an image feature extraction device based on blockchain, including:

[0042] An uploading unit, used for the data provider to upload the target image to the image uploading module;

[0043] A conversion unit, used for converting the target image into a grayscale image through an image grayscale processing module, and performing homomorphic encryption on the grayscale image to obtain an encrypted image;

[0044] An extraction unit, used for extracting features from the encrypted image through an image feature extraction module;

[0045] A storage unit, used to store the extracted features in the algorithm and feature management module of the blockchain;

[0046] A selection unit, used for the data user to select target features in the algorithm and feature management module;

[0047] A downloading unit, configured to determine the download authority according to the ring signature of the data user, and download the target feature through an image feature downloading module according to the download authority;

[0048] A decryption unit is used to perform homomorphic decryption on the target feature.

[0049] A third aspect of an embodiment of the present invention provides an electronic device, including a processor and a memory;

[0050] The memory is used to store programs;

[0051] The processor executes the program to implement the method described above.

[0052] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0053] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0054] In the embodiment of the present invention, the data provider uploads the target image to the image upload module; the target image is converted into a grayscale image by the image grayscale processing module, and the grayscale image is homomorphically encrypted to obtain an encrypted image; the encrypted image is subjected to feature extraction by the image feature extraction module; the extracted features are stored in the algorithm and feature management module of the blockchain; the data user selects the target feature in the algorithm and feature management module; the download authority is determined according to the ring signature of the data user, and the target feature is downloaded through the image feature download module according to the download authority; and the target feature is homomorphically decrypted. The present invention realizes image feature extraction through blockchain technology, which can ensure data confidentiality and improve feature extraction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 Schematic diagram of local extreme value detection of DoG function;

[0057] Figure 2 A schematic diagram of the implementation process of the image feature extraction system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] In view of the problems existing in the prior art, an embodiment of the present invention provides an image feature extraction method based on blockchain, comprising:

[0060] The data provider uploads the target image to the image upload module;

[0061] The target image is converted into a grayscale image by an image grayscale processing module, and the grayscale image is homomorphically encrypted to obtain an encrypted image;

[0062] Performing feature extraction on the encrypted image by an image feature extraction module;

[0063] The extracted features are stored in the algorithm and feature management module of the blockchain;

[0064] The data user selects the target features in the algorithm and feature management module;

[0065] Determine the download authority according to the ring signature of the data user, and download the target feature through the image feature download module according to the download authority;

[0066] The target feature is homomorphically decrypted.

[0067] Optionally, in the step of converting the target image into a grayscale image by the image grayscale processing module, the conversion formula of the grayscale image is:

[0068] Gray=0.3*R+0.59G+0.11B

[0069] Among them, Gray represents the pixel value after grayscale processing; R represents the pixel value of red among the three primary colors before grayscale processing; G represents the pixel value of green among the three primary colors before grayscale processing; B represents the pixel value of blue among the three primary colors before grayscale processing.

[0070] Optionally, performing homomorphic encryption on the grayscale image to obtain an encrypted image includes:

[0071] The blockchain manager generates the public and private keys of the Paillier algorithm;

[0072] Distributing the public key and the private key to each node in the blockchain; wherein the public keys of different nodes are the same and the private keys are different;

[0073] The grayscale image is homomorphically encrypted according to the public key to obtain an encrypted image.

[0074] Optionally, extracting features from the encrypted image by an image feature extraction module includes:

[0075] Calculating the gradient value and gradient direction of the encrypted image in vertical and horizontal directions;

[0076] According to the gradient value and the gradient direction, a gradient direction histogram of the encrypted image is calculated;

[0077] Perform feature normalization processing on the gradient direction histogram to obtain a feature vector group.

[0078] Optionally, the extracting features of the encrypted image by an image feature extraction module further includes:

[0079] Performing a convolution operation on the encrypted image and a preset Gaussian function to determine a scale space of the encrypted image;

[0080] Performing Gaussian blur processing and downsampling processing on the encrypted image to determine a Gaussian pyramid;

[0081] Performing local extreme value detection on the Gaussian pyramid by using the DoG function to determine the extreme value points;

[0082] Determine key feature points according to the extreme value points;

[0083] The gradient values ​​and gradient directions of the pixels of the key feature points are calculated to obtain a feature vector group.

[0084] Optionally, the data user selects the target feature in the algorithm and feature management module, including:

[0085] The extracted features are stored and displayed in categories through the algorithm and feature management module;

[0086] Determine the target features based on the feature selection instructions issued by the data user.

[0087] Optionally, the ring signature of the data user is generated according to the public key set in the blockchain;

[0088] The homomorphic decryption of the target feature is specifically:

[0089] The data user decrypts the target feature according to the private key of its own node.

[0090] A second aspect of an embodiment of the present invention provides an image feature extraction device based on blockchain, including:

[0091] An uploading unit, used for the data provider to upload the target image to the image uploading module;

[0092] A conversion unit, used for converting the target image into a grayscale image through an image grayscale processing module, and performing homomorphic encryption on the grayscale image to obtain an encrypted image;

[0093] An extraction unit, used for extracting features from the encrypted image through an image feature extraction module;

[0094] A storage unit, used to store the extracted features in the algorithm and feature management module of the blockchain;

[0095] A selection unit, used for the data user to select target features in the algorithm and feature management module;

[0096] A downloading unit, configured to determine the download authority according to the ring signature of the data user, and download the target feature through an image feature downloading module according to the download authority;

[0097] A decryption unit is used to perform homomorphic decryption on the target feature.

[0098] A third aspect of an embodiment of the present invention provides an electronic device, including a processor and a memory;

[0099] The memory is used to store programs;

[0100] The processor executes the program to implement the method described above.

[0101] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0102] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0103] The following is a detailed description of the implementation process of the image feature extraction method according to the embodiment of the present invention in conjunction with the accompanying drawings.

[0104] The present invention provides an image feature extraction system based on blockchain technology, which includes an image uploading module, an image grayscale processing module, an image feature extraction module, an algorithm and feature management module, and an image feature downloading module.

[0105] In the present invention, the data provider uploads the image to the image upload module, the image grayscale processing module converts the image into a grayscale image and performs homomorphic encryption, and the image feature extraction module extracts features from the encrypted image, and the encrypted image feature extraction HOG algorithm, encrypted image feature extraction SIFT algorithm or other feature extraction algorithms can be selected. The extracted image features and algorithm information are stored in the algorithm and feature management module.

[0106] The data user selects the required features in the algorithm and feature management module and enters the image feature download module. The download authority is confirmed based on the ring signature. The features can be used to characterize the image after homomorphic decryption.

[0107] The "image upload module" is a file upload plug-in at the network front end of the present invention, which stores the uploaded image on the server side and waits for it to be uploaded to the chain.

[0108] The "image grayscale processing module" performs grayscale image conversion on the RGB components of the color image.

[0109] The conversion formula of the “grayscale image” is as follows:

[0110] Gray=0.3*R+0.59G+0.11B

[0111] The "homomorphic encryption" is introduced into this system to encrypt images and protect the privacy of portraits, important confidential information, etc. The administrator needs to generate the public key and private key of the Paillier algorithm and distribute them to each node Ni of the alliance chain of this system. Ni has a pair of public keys and private keys (PK, SKi), where the public keys are the same and the private keys are different.

[0112] The “Manager” mentioned above is the alliance administrator. The alliance creator is the alliance administrator by default. The alliance administrator can add or delete members of the organization as alliance administrators.

[0113] The "Paillier algorithm" is a probabilistic asymmetric algorithm based on public key cryptography. It selects two large prime numbers p, q, and a random number g and obtains the public key and private key through a series of function operations.

[0114] When the image illumination is uneven, gamma correction can be used to increase or decrease the overall brightness of the image.

[0115] The "Gamma correction" is an algorithm for adjusting the brightness of an image. Here, the square root method is used, and the formula is as follows (where γ = 0.5):

[0116] Y(x,y)=I(x,y) γ

[0117] Among them, (x, y) represents the coordinates of the image pixel; Y(x, y) represents the pixel value at the coordinate (x, y); I(x, y) γ Represents the pixel value at the coordinate (x, y) after Gamma correction;

[0118] The color space normalized image is homomorphically encrypted with the public key PK:

[0119] C(x,y)=E(Y(x,y),r)=g Y(x,y) r n modn 2

[0120] Wherein, C(x,y) represents the homomorphically encrypted image, E(Y(x,y),r) represents the homomorphic encryption process, that is, the original image Y(x,y) is homomorphically encrypted using a random number r; r is a random number, and n is the product of two large prime numbers p and q that satisfy gcd(pq,(p-1)(q-1))=1.

[0121] The "image feature extraction module" uploads the encrypted image information and algorithm information to the blockchain and performs feature extraction on the blockchain.

[0122] The "encrypted image feature extraction HOG algorithm" is an algorithm for extracting features from encrypted images based on the traditional image feature extraction algorithm HOG. The algorithm includes three processes: image gradient calculation, gradient histogram statistics, and L2-norm feature normalization algorithm.

[0123] The “image gradient calculation” performs gradient and gradient direction calculation on the encrypted image in the vertical and horizontal directions:

[0124] Gx(x,y)=I(||x+1||,||y||)-I(||x-1||,||y||)

[0125] Gy(x,y)=I(||x||,||y+1||)-I(||x||,||y-1||)

[0126]

[0127]

[0128] Among them, Gray represents the pixel value after grayscale processing; R represents the pixel value of red among the three primary colors before grayscale processing; G represents the pixel value of green among the three primary colors before grayscale processing; B represents the pixel value of blue among the three primary colors before grayscale processing, and I(||x||,||y||) is the pixel value of the point (x, y) after image homomorphic encryption.

[0129] The traditional HOG algorithm of "gradient histogram statistics" divides the image into several non-overlapping 8*8 cells, and counts the gradient direction histogram in each cell. The gradient direction is the angle of the vector, and the accumulated value of the gradient value corresponding to the angle range is the length of the vector.

[0130] Due to the influence of illumination and background, the improved HOG algorithm uses a feature normalization method when generating the gradient direction histogram. For example, the 2x2 cells adjacent to each other in the upper, lower, left, and right directions are taken as a block as a whole, and there is overlap between adjacent blocks. This effectively utilizes the information of adjacent pixels, which is of great help to the detection results.

[0131] Use L2-norm to standardize the feature vector in the block. The formula is as follows:

[0132]

[0133] Among them, ||υ|| k represents the k-norm, and ε is a normalization constant to prevent division by zero.

[0134] After normalizing the histogram of all overlapping blocks, the feature vectors of all blocks are combined to form the encrypted HOG feature of the image. This feature vector and the method of forming the feature vector are stored on the blockchain and can be used by data users. The algorithm can be optimized and improved by other nodes on the alliance chain.

[0135] The "encrypted image feature extraction SIFT algorithm" is based on the traditional SIFT algorithm, which homomorphically encrypts the original image I(x,y) to obtain the encrypted image ||I(x,y)||, uploads the encrypted image and SIFT algorithm information to the blockchain, and performs SIFT feature extraction on the blockchain. It includes Gaussian blur, Gaussian pyramid, key feature point detection, pixel gradient calculation and other processes.

[0136] The “Gaussian blur” uses the homomorphically encrypted image ||I(x,y)|| of the original image to perform a convolution operation with a variable-scale 2D Gaussian function G(x,y,σ) to represent the scale space of the image.

[0137] L(x,y,σ)=G(x,y,σ)*||I(x,y)||

[0138]

[0139] Among them, L(x, y, σ) represents the encrypted image after Gaussian blur; G(x, y, σ) represents the two-dimensional Gaussian function, and σ is the scale space factor used to characterize the degree of image smoothing.

[0140] The “Gaussian pyramid” uses the encrypted image after Gaussian blur and the encrypted image after downsampling to form a Gaussian pyramid, and uses the DoG function to perform local extreme value detection.

[0141] The "DoG function" compares each pixel with all its neighboring points to see whether it is larger or smaller than its neighboring points in the image domain and scale domain. Figure 1 As shown, the middle detection point is compared with its 8 adjacent points of the same scale and 9×2 points corresponding to the upper and lower adjacent scales, a total of 26 points, to ensure that extreme points are detected in both scale space and two-dimensional image space.

[0142] L(x,y,σ)=G(x,y,σ)*I(x,y)

[0143] D(x,y,σ)=[G(x,y,kσ)-G(x,y,σ)]*I(x,y)

[0144] =L(x,y,kσ)-L(x,y,σ)

[0145] The DOG operator needs to remove the edge effect and obtain the Hessian matrix at the feature point:

[0146] Tr(H)=D xx +D yy

[0147]

[0148] Tr(H) represents the sum of the diagonal elements of the matrix, and Det(H) represents the determinant of the matrix. When , it is removed as an edge effect feature point, otherwise it is retained as a key feature point.

[0149] The “pixel gradient calculation” uses the following formula to obtain the gradient value and gradient direction of the pixel for the retained key points:

[0150]

[0151] θ(x,y)=tan -1 (L(x+1,y)-L(x,y-1)) / (L(x,y+1)-L(x,y-1))

[0152] Using 4×4×8=128-dimensional vector representation has the best overall effect.

[0153] The "feature management module" stores and displays the extracted image features and algorithms in categories, and the data provider can choose to download according to the business type when using and selecting.

[0154] The "image feature download module" is a feature download entry provided to data users. The data user provides a ring signature to obtain download permissions. If the signature is valid, the feature values ​​of the encrypted image feature extraction algorithm will be homomorphically decrypted before downloading. The downloaded feature values ​​are the features that can characterize the image after decryption.

[0155] The "ring signature" is a blockchain signature technology that can protect the identity of each node in the alliance chain while verifying that the node is a member of the alliance chain. When the data user obtains the feature, the ring signature is first generated using n public keys in the public key set. The public key set is as follows: i It is the public key of the user.

[0156] Pk={P 1 ,P 2 ,P 3 …P i-1 ,P i ,P i+1 …P n}

[0157] The signer generates n-1 random numbers, where the random numbers correspond to the public keys one by one. i It is the user's random number and does not need to be generated here.

[0158] R′={r 1 ,r 2 ,r 3 …r i-1 ,r i+1 …r n}

[0159] According to the recursive formula c x =Hash(m,r x-1 *G+c x-1 *P x-1 ), calculate c i . Among them, the key pair of user i is (x, Pi), and G satisfies Pi=x*G

[0160] c i And the random number k satisfies: k*G=r i *G+c i *P i

[0161] It can be concluded that: i =kc i *x.

[0162] R = {r 1 ,r 2 ,r 3 …r i-1 ,kc i *x,r i+1 …r n}

[0163] c 1 , R, Pk and the signature message m are assembled into a ring signature and sent to the data provider. x =Hash(m,r x-1 *G+c x-1 *P x-1 ), find c in sequence 2 ,c 3 ,c 4 …c n , and finally according to c n Find c 1 ′. If c 1 =c 1 ′, the signature is valid, otherwise it is invalid.

[0164] The “homomorphic decryption” is the decryption process of homomorphic encryption. The data user uses the image feature F′ already on the blockchain. h Decrypt with the private key. For node Ni, the private key SKi=lcm(p-1,q-1).

[0165] F h =D(F′ h ,SKi)=(L((F′ h ) λ modn 2 ) / L(PK λ modn 2 ))modn

[0166] Among them, L(u)=(u-1) / N.

[0167] Decrypted image feature vector F h It can be used to characterize images and serve as an important parameter for subsequent image processing or computer vision.

[0168] The present invention provides an image feature extraction system based on blockchain, such as Figure 2 As shown, the operation of the system includes the following steps:

[0169] Step S101: The data provider provides image information, and the image uploading module 1 selects the image category and algorithm, and uploads the uploaded images in batches to the server where the node is located.

[0170] Step S102: The image is grayed in the image graying processing module 2. If the data provider directly provides gray image information, the image category and algorithm can be selected in the image graying processing module 2, and the uploaded images are batch uploaded to the server where the node is located.

[0171] Step S103: The grayscale processed image is homomorphically encrypted in the image feature extraction module 3, and image features are extracted according to the algorithm, and the extracted features are uploaded to the alliance chain. The extracted feature type and algorithm will be displayed as options in the algorithm and feature management module 4.

[0172] Step S104: If the data provider directly provides the extracted image features, the feature type and algorithm can be selected in the algorithm and feature management module 4, and the extracted image features can be uploaded. The uploaded features are homomorphically encrypted and then uploaded to the alliance chain.

[0173] 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 can be uploaded to the node server.

[0174] Step S106: The data user selects the required features in the algorithm and feature management module 4 and enters the image feature download module 5. The data user provides a ring signature to verify the identity and can download the decrypted features to the local server.

[0175] In summary, compared with the prior art, the present invention has the following advantages:

[0176] 1. For multiple data users who use the same algorithm or extract similar image collections, after joining the alliance chain, they can directly obtain the image features of various commonly used algorithms for similar images from the blockchain, avoiding duplication of work and improving the efficiency of machine learning.

[0177] 2. Use ring signature technology to protect the privacy of data providers and data users, and provide good protection for parties with high privacy requirements, such as medical care, transportation, etc.

[0178] 3. Centralized institutions have a single business type and a small data set sample. If data samples can be provided by the entire network or alliance, the number of samples will be greatly increased, enhancing the efficiency of subsequent image recognition.

[0179] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0180] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0181] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0182] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0183] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0184] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0185] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0186] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0187] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A blockchain-based image feature extraction method, It is characterized in that include: The data provider uploads the target image to the image upload module; The blockchain manager generates the public and private keys of the Paillier algorithm; Distribute the public key and private key to each node in the blockchain; Among them, the public keys between different nodes are the same but the private keys are different; Converting the target image into a grayscale image by an image grayscale processing module; Homomorphically encrypt the grayscale image according to the public key to obtain an encrypted image; Calculating the gradient value and gradient direction of the encrypted image in vertical and horizontal directions; According to the gradient value and the gradient direction, a gradient direction histogram of the encrypted image is calculated; Performing feature normalization processing on the gradient direction histogram to obtain a feature vector group; Performing a 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; Performing local extreme value detection on the Gaussian pyramid by using the DoG function to determine the extreme value points; Determine key feature points according to the extreme value points; Calculating the gradient value and gradient direction of the pixel of the key feature point to obtain a feature vector group; The extracted features and the method of forming feature vectors are stored in the algorithm and feature management module of the blockchain; The data user selects the target features in the algorithm and feature management module; Determine the download authority according to the ring signature of the data user, and download the target feature through the image feature download module according to the download authority; The ring signature of the data user is generated according to the public key set in the blockchain; The target feature is homomorphically decrypted, specifically: the data user decrypts the target feature according to the private key of its own node.

2. According to the blockchain-based image feature extraction method of claim 1, It is characterized in that In the step of converting the target image into a grayscale image by the image grayscale processing module, the conversion formula of the grayscale image is: Gray=0.3*R+0.59G+0.11B Among them, Gray represents the pixel value after grayscale processing; R represents the pixel value of red among the three primary colors before grayscale processing; G represents the pixel value of green among the three primary colors before grayscale processing; B represents the pixel value of blue among the three primary colors before grayscale processing.

3. According to the blockchain-based image feature extraction method of claim 1, It is characterized in that The data user selects the target feature in the algorithm and feature management module, including The extracted features are stored and displayed in categories through the algorithm and feature management module; Determine the target features based on the feature selection instructions issued by the data user.

4. An image feature extraction device based on blockchain, It is characterized in that include: An uploading unit, used for the data provider to upload the target image to the image uploading module; A conversion unit, configured to generate a public key and a private key of the Paillier algorithm by a blockchain manager, and distribute the public key and the private key to each node in the blockchain, wherein the public keys of different nodes are the same and the private keys are different, convert the target image into a grayscale image through an image grayscale processing module, and homomorphically encrypt the grayscale image according to the public key to obtain an encrypted image; An extraction unit, used for calculating the gradient value and gradient direction of the encrypted image in vertical and horizontal directions; According to the gradient value and the gradient direction, a gradient direction histogram of the encrypted image is calculated; Performing feature normalization processing on the gradient direction histogram to obtain a feature vector group; Performing a 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; Performing local extreme value detection on the Gaussian pyramid by using the DoG function to determine the extreme value points; Determine key feature points according to the extreme value points; Calculating the gradient value and gradient direction of the pixel of the key feature point to obtain a feature vector group; A storage unit, used to store the extracted features and the method of forming feature vectors in the algorithm and feature management module of the blockchain; A selection unit, used for the data user to select target features in the algorithm and feature management module; A downloading unit, configured to determine the download authority according to the ring signature of the data user, and download the target feature through an image feature downloading module according to the download authority; The decryption unit is used to perform homomorphic decryption on the target feature, specifically: the data user decrypts the target feature according to the private key of its own node, and the ring signature of the data user is generated according to the public key set in the blockchain.

5. An electronic device, It is characterized in that including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 3.

6. A computer-readable storage medium, It is characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 3.