Search

CN-121567481-B - Color and gravity sensing-based electronic identity card sensitive information transmission method

CN121567481BCN 121567481 BCN121567481 BCN 121567481BCN-121567481-B

Abstract

The invention discloses a color and gravity sensing-based electronic identity card sensitive information transmission method, which comprises the steps of S10, conducting encryption-decryption model training to obtain an encryption-decryption model, S20, generating a public key private key pair for each user by a user platform according to an RSA algorithm, conducting encryption transmission storage by utilizing a public key when the sensitive information is uploaded by the user, generating a binary secret message by a private key value, conducting segmented sequencing on the secret message according to color information of an original image of the electronic identity card to generate a new binary message, embedding the original image of the electronic identity card through the encryption-decryption model to form a secret-containing image, generating a mask image according to the color information, S30, displaying the secret-containing electronic identity card according to a physical gravity information of equipment in a mobile terminal display process, combining a mask layer and the secret-containing image, S40, separating the secret-containing image by the encryption-decryption model and the physical gravity information, conducting decryption to restore the private key, and conducting decryption of the corresponding secret message.

Inventors

  • SHEN YONGSHENG
  • CHEN WEIFENG
  • Fu Qianna
  • CHEN CHONGJIE
  • ZHAO PENGWEI
  • YU LIAN

Assignees

  • 杭州城市大脑有限公司

Dates

Publication Date
20260508
Application Date
20260123
Priority Date
20251210

Claims (12)

  1. 1. The method for transmitting the sensitive information of the electronic identity card based on color and gravity sensing is characterized by comprising the following steps of: S10, performing encryption-decryption model training to obtain an encryption-decryption model; S20, the user platform generates a specific public key and private key pair for each user according to an RSA algorithm, and encrypts, transmits and stores the public key when the user uploads sensitive information, generates a binary secret message by using the private key value, re-sorts the secret message in a segmented mode according to the color information of the original image of the electronic identity card to generate a new binary message, and embeds the new binary message into the original image of the electronic identity card through an encryption-decryption model to form a secret-contained image; S30, in the process of displaying the electronic identity card at the mobile terminal, displaying the electronic identity card with the secret according to the physical gravity information of the equipment by combining the mask picture and the secret-containing picture; S40, separating the picture containing the secret by the decryption party through the encryption-decryption model and the physical gravity information, cracking and restoring the private key, and decrypting the corresponding secret message.
  2. 2. The method for transmitting sensitive information of an electronic identity card based on color and gravity sensing according to claim 1, wherein the training of the encryption-decryption model in S10 comprises an encryption training part, specifically comprising: s101, generating a random binary string BKey 'and a random binary string BKey'; s102, randomly generating an electronic identity card training diagram; S103, dividing the color of an electronic identity card training diagram of a user into three HLS channels, counting the values of the corresponding channels, and generating three matrixes MatrixH, matrixL, matrixS with the size of ImageW x ImageH for one ImageW x ImageH image; s104, generating two matrices m0 and n0 of 3 x 64, wherein m0 is used for recording weight values of hue, brightness and saturation, for subsequent reordering, n0 is used for recording a maximum value of the duty ratio of hue, brightness and saturation, and for subsequent restoration of the image to optimize the image color; s105, each block is based on the weight value of the hue Weight value of brightness And a weight value for saturation Sum calculation interval weight ; S106, forming a mask picture MASKIMAGE by using the generated n0 matrix; S107, using a random binary string BKey' as a secret message, using an electronic identity card training diagram as a carrier picture, and putting the secret message into a coding network to generate a secret-containing picture a; S108, judging the electronic identity card training diagram and the secret-containing picture a by using a discriminator, and feeding back to the encoder for multiple iterations to obtain the secret-containing picture b which is more similar to the electronic identity card training diagram.
  3. 3. The method for transmitting electronic identity card sensitive information based on color and gravity sensing according to claim 2, wherein m0 and n0 are calculated as follows: S1041, dividing the training chart of the electronic identity card into 64 blocks, calculating the hue H average value of each block, finding the bucket interval corresponding duty ratio corresponding to the hue H average value, and obtaining the hue H weight value with the largest block duty ratio Hue H value with maximum block pixel ratio ; S1042, dividing the training chart into 64 blocks, calculating the average value of brightness L of each block, finding the corresponding duty ratio of the barrel region corresponding to the average value of brightness L, and the brightness L value with the largest duty ratio of the block to obtain the brightness L weight value And the brightness L value with the largest block pixel ratio ; S1043, dividing the training diagram into 64 blocks, calculating the saturation S average value of each block, finding the bucket interval corresponding duty ratio corresponding to the saturation S average value, and obtaining the saturation S weight value with the maximum duty ratio of the block Saturation S value with maximum pixel ratio of block 。
  4. 4. The method for transmitting sensitive information of electronic identity card based on color and gravity sensing according to claim 3, wherein the training of encryption-decryption model in S10 comprises a decryption part, specifically comprising: S109, adding a mask picture MASKIMAGE, randomly adding a mask picture MASKIMAGE with transparency of 0.1-0.5 through a mixed mode, and mixing a secret-containing picture b to form a secret-containing electronic identity card training picture; s110, training the secret-containing electronic identity card training diagram through a decryption network, and separating a mask picture and a secret-containing picture to obtain a mask picture MASKIMAGE And picture b containing a secret ; S111, separating the dense-containing picture b By the same method as S103-S104, S1041-S1043 and S105, an n0' matrix is obtained to be , , And , , Comparing j with the serial numbers of 64 blocks, calculating the difference ratio of the HSL distribution maximum value corresponding to each block, feeding back to the discriminator, and performing multiple iterations to make the separated dense picture b More closely to an electronic identity card training diagram; S112, for the separated dense-containing picture b Analyzing by using a decryption network to obtain encrypted data; s113, judging the decoding result by using the loss function, and feeding back to the decoder to obtain a more accurate decoding result.
  5. 5. The method for transmitting sensitive information of electronic identity card based on color and gravity sensing according to claim 4, wherein the user platform generates a specific public key and private key pair for each user according to RSA algorithm in S20, and encrypts, transmits and stores the sensitive information by using the public key when the user uploads the sensitive information, and generating the binary secret message by using the private key value specifically comprises: s201, a user platform generates a public Key and private Key pair comprising a public Key Key1 and a private Key Key2 for each user according to an RSA algorithm; S202, a public Key Key1 is transmitted to a front end and is used for filling data for a user to carry out encryption transmission storage; s203, a first binary string BKey with the length of 64 times is generated by using the private Key Key2 through the mode of 0 complement at the end.
  6. 6. The method for transmitting sensitive information of electronic identity card based on color and gravity sensing according to claim 5, wherein in S20, the secret information is rearranged and sorted according to the color information of the electronic identity card itself to generate new binary information, and the new binary information is embedded into the original image of the electronic identity card to form a secret-containing image, which comprises: s204, dividing the original color of the electronic identity card of the user into HLS three channels, counting the values of the corresponding channels, and generating three matrixes MatrixH, matrixL, matrixS with the size of ImageW x ImageH for one ImageW x ImageH image; S205, generating two matrices m and n of 3 x 64, wherein m is used for recording weight values of hue, brightness and saturation, for subsequent reordering, n is used for recording a maximum value of the duty ratio of hue, brightness and saturation, and for subsequent restoration of image optimization image color; s206, each block is based on the weight value of the hue Weight value of brightness And a weight value for saturation Sum calculation interval weight ; S207, dividing the first binary string BKey into 64 segments according to Reordering from large to small, generating a second binary string BKey2'; S208, generating a mask picture MASKIMAGE by using the n matrix; s209, taking the obtained second binary string BKey' as a secret message, taking the original image of the electronic identity card as a carrier picture, and putting the secret message into a coding network to generate a secret-containing image, namely the secret-containing electronic identity card.
  7. 7. The method for transmitting electronic identity card sensitive information based on color and gravity sensing according to claim 6, wherein m and n are calculated as follows: s2051, dividing an original image of the electronic identity card into 64 blocks, calculating a hue H average value of each block, finding a bucket interval corresponding duty ratio corresponding to the hue H average value, and obtaining a hue H weight value with the largest block duty ratio Hue H value with maximum block pixel ratio ; S2052, dividing the original image of the electronic identity card into 64 blocks, calculating the brightness L average value of each block, finding the barrel interval corresponding duty ratio corresponding to the brightness L average value, and obtaining the brightness L weight value with the maximum brightness L duty ratio of the block And the brightness L value with the largest block pixel ratio ; S2053, dividing the original image of the electronic identity card into 64 blocks, calculating the saturation S average value of each block, finding the bucket interval corresponding duty ratio corresponding to the saturation S average value, and obtaining the saturation S weight value with the maximum duty ratio of the block Saturation S value with maximum pixel ratio of block 。
  8. 8. The method for transmitting the electronic identity card sensitive information based on color and gravity sensing according to claim 6, wherein in S204 MatrixH is a color phase value of counting pixels at corresponding positions, the range of the value is 0-360, the value of the data is divided into 12 barrels, each barrel interval is 30, and a distribution histogram is generated; MatrixL is the brightness value of the pixel at the corresponding position, the value range is 0-1, the value of the data is divided into 5 barrels, each barrel interval is 0.2, and a distribution histogram is generated; MatrixS is the saturation of the corresponding position pixel, the value range is 0-100, the value of the data is divided into 5 barrels, each barrel interval is 20, and a distribution histogram is generated.
  9. 9. The method of claim 6, wherein the step S208 of generating the mask picture MASKIMAGE by using the n matrix is specifically performed by reducing the original image of the electronic identity card to 1/64, generating 64 pieces of the mask picture, each piece being Maski, wherein i represents the number of the 64 pieces, and performing a transformation process on Maski, including performing a rotation on Maski Deg) rotation, blur ) Wherein the rotate () function is a transformation that rotates the element around a fixed point without deformation, deg is the rotation angle, the blur () function applies a blurring effect to the element, px is the blurring pixel unit, and And then the processed 64 Mask pictures are spliced into a whole Mask picture MASKIMAGE with the same size as the original picture of the electronic identity card, wherein the Mask picture is generated, namely the reduced original picture is processed by using n matrix data, and then the 64 processed reduced original pictures are spliced into a Mask picture with the same size as the original picture of the electronic identity card.
  10. 10. The method for transmitting electronic identity card sensitive information based on color and gravity sensing according to claim 6, wherein S30 specifically comprises: S301, acquiring physical gravity information of mobile terminal equipment through deviceorientation events of h5, and simultaneously acquiring a confidential electronic identity card and a mask picture MASKIMAGE by a mobile terminal, wherein deviceorientation is a standard DOM event defined by HTML5 DEVICEAPI specification and is used for acquiring physical direction information of the equipment; s302, superposing a layer of html block-level elements on a confidential electronic identity card, wherein the html block-level elements take MASKIMAGE as background pictures; And S303, confirming the position of a center point according to physical gravity information returned by deviceorientation events in real time, giving transparency of MASKIMAGE mask pictures 0.1 when the center position is in the center of the pictures, namely, the center 2 x 2 area in 8 x 8 or 64 parts, and giving transparency of 0.5 when the center point is expanded outwards and gradually increases the transparency value until the center point is at the outermost circle, and mixing the processed mask pictures MASKIMAGE with the electronic identity card containing the density.
  11. 11. The method for transmitting electronic identity card sensitive information based on color and gravity sensing according to claim 10, wherein the physical gravity information in S301 is obtained by: the method comprises the steps of obtaining an object of an event triggered when the direction of equipment changes through a deviceorientation event of h5, wherein the object comprises alpha, beta and gamma, alpha is a rotation angle around a z axis and ranges from 0 to 360 degrees to represent the azimuth angle of the equipment, beta is a front-back inclination angle around an x axis and ranges from-180 degrees to 180 degrees, gamma is a left-right inclination angle around a y axis and ranges from-90 degrees to 90 degrees, acquiring an acceleration value containing gravity of equipment moving through a devicemotion event of h5 to obtain the acceleration of the gravity of the x axis, the y axis and the z axis, and the rotation speed of the equipment moving is obtained through the rotation speed value of the equipment moving around the beta axis, gamma axis and alpha axis, removing high-frequency noise by low-pass filtering and separating stable gravity vectors, mapping the gravity vectors to a screen coordinate system to obtain physical gravity information of the equipment in reality, and devicemotion is a standard DOM event defined by an HTML5 DEVICEAPI specification and used for obtaining the acceleration information of the equipment.
  12. 12. The method for transmitting electronic identity card sensitive information based on color and gravity sensing according to claim 6, wherein S40 specifically comprises: s401, the decryption end obtains a dense picture containing a mask picture, and the mobile end returns corresponding physical gravity information; S402, putting the pictures containing the secret into an encryption-decryption model, and combining physical gravity information to obtain a second binary string Bkey 'of the secret message and a separated original picture IMG'; S403, obtaining weights of the pictures subjected to color recovery according to S103-S104, S1041-S1043 and S105-S106 in the encryption step, and performing inverse operation on the second binary string Bkey' according to the weights to obtain a corresponding private Key Key2; S404, obtaining original privacy data according to the encrypted privacy data transmitted by the user platform and the corresponding private Key Key2, and if the original privacy data is correctly decoded, considering that the original privacy data passes the anti-counterfeiting verification.

Description

Color and gravity sensing-based electronic identity card sensitive information transmission method Technical Field The invention belongs to the technical field of electronic identity information processing, and particularly relates to a color and gravity sensing-based electronic identity card sensitive information transmission method. Background Steganography is a method for encrypting and transmitting information, which can transmit secret information in a manner of being not easily perceived by naked eyes, and can also be used as a digital watermark to identify a file. Conventional steganography generally conceals based on a spatial domain or conceals based on a frequency domain. However, the conventional steganography method has certain limitations on the anti-steganography capability, robustness and capacity. In the electronic identity card processing process, the current scheme mostly takes the encrypted data as secret information directly, and then obtains a private key through a customed mode such as a password platform and the like to decrypt the sensitive data. Firstly, how to guarantee safety in the private key obtaining process is a problem, and secondly, the two-dimensional code is frequently generated due to the change of sensitive information, so that energy consumption is increased. In addition, the secret-containing pictures are directly displayed, so that the interference of the confusing pictures is not increased, and the safety is reduced. Disclosure of Invention The invention aims to solve the technical problem of providing a color and gravity sensing-based electronic identity card sensitive information transmission method which is used for encrypting encrypted data by utilizing a coding-decoding neural network and encrypting the color space of a picture and gravity sensing information of a mobile terminal, increasing confusion data and enhancing the safety of the data. In order to solve the technical problems, the invention adopts the following technical scheme: a method for transmitting sensitive information of an electronic identity card based on color and gravity sensing comprises the following steps: S10, performing encryption-decryption model training to obtain an encryption-decryption model; S20, the user platform generates a specific public key and private key pair for each user according to an RSA algorithm, and encrypts, transmits and stores the public key when the user uploads sensitive information, generates a binary secret message by using the private key value, re-sorts the secret message in a segmented mode according to the color information of the original image of the electronic identity card to generate a new binary message, and embeds the new binary message into the original image of the electronic identity card through an encryption-decryption model to form a secret-contained image; S30, in the process of displaying the electronic identity card at the mobile terminal, displaying the electronic identity card with the secret according to the physical gravity information of the equipment by combining the mask picture and the secret-containing picture; S40, separating the picture containing the secret by the decryption party through the encryption-decryption model and the physical gravity information, cracking and restoring the private key, and decrypting the corresponding secret message. In a possible implementation manner, the encryption-decryption model training in S10 includes an encryption training part, specifically including: s101, generating a random binary string BKey 'and a random binary string BKey'; s102, randomly generating an electronic identity card training diagram; S103, dividing the color of an electronic identity card training diagram of a user into three HLS channels, counting the values of the corresponding channels, and generating three matrixes MatrixH, matrixL, matrixS with the size of ImageW x ImageH for one ImageW x ImageH image; s104, generating two matrices m0 and n0 of 3 x 64, wherein m0 is used for recording weight values of hue, brightness and saturation, for subsequent reordering, n0 is used for recording a maximum value of the duty ratio of hue, brightness and saturation, and for subsequent restoration of the image to optimize the image color; s105, each block is based on the weight value of the hue Weight value of brightnessAnd a weight value for saturationSum calculation interval weight; S106, forming a mask picture MASKIMAGE by using the generated n0 matrix; S107, using a random binary string BKey' as a secret message, using an electronic identity card training diagram as a carrier picture, and putting the secret message into a coding network to generate a secret-containing picture a; S108, judging the electronic identity card training diagram and the secret-containing picture a by using a discriminator, and feeding back to the encoder for multiple iterations to obtain the secret-containing picture b which is more similar to the electro