CN117951754A - Electronic seal encryption and decryption method, device and medium based on deep learning - Google Patents

Electronic seal encryption and decryption method, device and medium based on deep learning Download PDF

Info

Publication number
CN117951754A
CN117951754A CN202410353432.4A CN202410353432A CN117951754A CN 117951754 A CN117951754 A CN 117951754A CN 202410353432 A CN202410353432 A CN 202410353432A CN 117951754 A CN117951754 A CN 117951754A
Authority
CN
China
Prior art keywords
image
target
electronic seal
generator
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410353432.4A
Other languages
Chinese (zh)
Other versions
CN117951754B (en
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.)
Jinan Power Supply Co of State Grid Shandong Electric Power Co Ltd
Original Assignee
Jinan Power Supply Co of State Grid Shandong Electric Power 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 Jinan Power Supply Co of State Grid Shandong Electric Power Co Ltd filed Critical Jinan Power Supply Co of State Grid Shandong Electric Power Co Ltd
Priority to CN202410353432.4A priority Critical patent/CN117951754B/en
Publication of CN117951754A publication Critical patent/CN117951754A/en
Application granted granted Critical
Publication of CN117951754B publication Critical patent/CN117951754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • 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/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to an electronic seal encryption and decryption method, device and medium based on deep learning, and relates to the technical field of electronic seal encryption and decryption. The application combines the electronic seal image and the electronic seal image tracing two-dimensional code and embeds the combination into the target first image to form an embedded image; processing the target first image and the target second image through a pre-trained feature extraction neural network to obtain target first image features and target second image features; the mosaic image and the target second image feature are spliced and then input into a first pre-trained generator for processing to generate an encrypted image; combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal; and when decryption is carried out, the encrypted image and the target first image feature are spliced, the mosaic image is restored through the second pre-trained generator, and the electronic seal image traceability two-dimensional code are extracted from the mosaic image. The application realizes the encryption transmission of the electronic seal image and protects seal safety.

Description

Electronic seal encryption and decryption method, device and medium based on deep learning
Technical Field
The invention relates to the technical field of electronic seal encryption and decryption, in particular to an electronic seal encryption and decryption method, device and medium based on deep learning.
Background
The electronic seal technology simulates a traditional physical seal through a digital technology, and an electronic file with the electronic seal has the same appearance and effect as a paper file with the physical seal.
After the physical seal is digitized, the cost can be saved, and the method is more efficient and convenient; however, at the same time, the electronic seal is intercepted and acquired by the outside in the network transmission process of the electronic seal, so that the electronic seal flows out, the security is reduced, and the important electronic seal is easily copied and abused, thereby causing the property loss and the reduced public confidence of the company to which the electronic seal belongs. In the prior art, a mode of encrypting a digital image by combining a chaotic system comprises an image scrambling and image diffusion process, wherein the image scrambling is to scramble the pixel value arrangement sequence of the image, and then the pixel value is changed through the image diffusion process after scrambling, so that the image safety and concealment are enhanced.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the invention provides an electronic seal encryption and decryption method, device and medium based on deep learning.
In a first aspect, the present invention provides an electronic seal encryption and decryption method based on deep learning, including:
acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code and embedding the electronic seal image and the electronic seal image tracing two-dimensional code into a target first image to form an embedded image, wherein the object type of the target first image is A;
Processing a target first image and a target second image through a pre-trained feature extraction neural network to respectively acquire a target first image feature for decryption and a target second image feature for encryption, wherein the object type of the target second image is B;
splicing the mosaic image and the target second image features, and processing the splicing result of the mosaic image and the target second image features through a pre-trained first generator to generate an encrypted image, wherein the object type of the formed encrypted image is B;
Combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal;
and during decryption, the encrypted image and the target first image feature are spliced, an mosaic image is restored by processing the splicing result of the encrypted image and the first image feature through a pre-trained second generator, and the electronic seal image traceability two-dimensional code are extracted from the mosaic image.
Further, the feature extraction neural network adopts any one of the following, including: a residual convolutional neural network, a Unet encoder and an expansion convolutional of Unet semantic segmentation model, and a backbone encoding network and an expansion convolutional of a YOLO model;
The residual convolutional neural network includes: a stacked residual convolution block, wherein the residual convolution block comprises a convolution layer, an activation function, a normalization layer and a connection input and output jump connection so as to combine the input and the output, and finally the residual convolution block is connected with a full connection layer; when the residual convolution neural network is trained, an image data set containing an object type A and an object type B is provided, and the residual convolution neural network is trained to identify the category of the object in the image data set through a cross entropy loss function;
Providing an image data set with an object type A and an object type B and a semantic segmentation label, training the Unet semantic segmentation model to carry out semantic segmentation on the object A or the object B, outputting shallow layer, middle layer and deep layer characteristics by a Unet encoder, performing expansion convolution processing on the output characteristics to be consistent with the size of an input image, and taking the output characteristics as one channel of three channels of a target first image characteristic or a target second image characteristic respectively;
Providing an image data set with an object type A and an object type B and a semantic segmentation label, training a YOLO model to detect and identify the object A or the object B, outputting shallow layer, middle layer and deep layer characteristics by a backbone coding network, performing expansion convolution processing on the output characteristics to be consistent with the size of an input image, and taking the output characteristics as one channel of a target first image characteristic or a target second image characteristic.
Further, processing the target first image and the target second image through the pre-trained feature extraction neural network to obtain target first image features for decryption and target second image features for encryption, respectively, includes: and selecting a shallow layer, a middle layer and a deep layer feature output layer from the feature extraction neural network, and taking the extracted features of the shallow layer, the middle layer and the deep layer feature output layer as one channel of three channels of the target first image feature or the target second image feature respectively.
Further, the first generator and the second generator are identical in structure and comprise an encoder, a residual convolution neck and a decoder; the encoder adopts a dimension-reducing convolutional neural network, the decoder adopts a dimension-increasing convolutional neural network, and the residual convolution neck is connected with the encoder output and the decoder input.
Further, while training the first generator and the second generator, constructing a first image set containing class a objects and a second image set containing class B objects, creating a first arbiter and a second arbiter;
randomly selecting a target second image from the second image set, randomly selecting a target first image from the first image set, and expanding the number of target first images in the first image set to enable the number of non-target first images to be consistent with that of target first images;
Processing each object of the first image set and the second image set through a pre-trained residual convolution neural network to respectively acquire a corresponding first image feature set and a corresponding second image feature set;
randomly selecting a first image from a first image set, acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code, and then embedding the combined electronic seal image and the electronic seal image tracing two-dimensional code into the selected first image to form a mosaic image;
The mosaic image and the target second image feature are spliced and input into a first generator, the first generator generates a training encryption image, the training encryption image is spliced with the first image feature of the first image, the first image feature of the first image is input into a second generator, and the second generator generates a training mosaic image;
the first discriminator discriminates whether the object of the training encryption image generated by the first generator and the object of the target second image belong to the type B in the training process, and the second discriminator discriminates whether the object of the training mosaic image restored by the second generator and the object of the selected first image belong to the type B;
Constraining the L2 loss of the input mosaic image and the restored training mosaic image to make the input mosaic image and the restored training mosaic image consistent; the training mosaic image generated by the second generator based on the output of the first generator is input to the first generator in combination with the target second image feature, the generated training encryption image is restrained from losing L2 of the two training encryption images generated by the second generator, and the two training encryption images are consistent.
Further, training the first generator and the second generator in combination with a residual convolutional neural network, comprising:
inputting the target second image and the selected first image into a residual convolution neural network for classification processing;
inputting the training mosaic image generated by the second generator based on the output of the first generator into a residual convolution neural network for classification processing;
The training mosaic image generated by the second generator based on the output of the first generator is input into the first generator in combination with the target second image characteristic, the generated training encryption image is input into a residual convolution neural network for classification processing;
And accumulating the characteristic differences of the target second image extracted by the shallow, middle and deep residual convolution blocks of the residual convolution neural network and the training encrypted image, and restricting the accumulated sum to be zero.
Furthermore, the structures of the first discriminator and the second discriminator are consistent, the first discriminator and the second discriminator are convolutional neural networks, the first discriminator and the second discriminator spread the characteristics of the input image through convolution, finally the spread characteristics are weighted into a classification weight through convolution, and the type of the input image is judged according to the classification weight.
Further, the electronic seal image tracing two-dimensional code records an item of electronic seal application, time of the electronic seal application, an electronic seal authorized party and an electronic seal authorized party.
In a second aspect, the present invention provides an electronic seal encryption and decryption device based on deep learning, which is characterized in that the device includes: the electronic seal encryption and decryption method based on deep learning is realized when the processing unit reads and executes the computer program.
In a third aspect, the present invention provides a computer readable storage medium, where the computer readable storage medium stores computer instructions that, when executed by a processor, implement the deep learning-based electronic seal encryption and decryption method.
Compared with the prior art, the technical scheme provided by the embodiment of the invention has the following advantages:
The application combines the electronic seal image and the electronic seal image tracing two-dimensional code and embeds the combination into the target first image to form an embedded image; processing a target first image and a target second image through a pre-trained residual convolution neural network to respectively acquire a target first image characteristic and a target second image characteristic; the mosaic image and the target second image feature are spliced, an encrypted image is generated through the processing of a pre-trained first generator, and the encrypted image has clear meaning and confusion in a non-messy mode; combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal; and when decryption is carried out, the encrypted image and the target first image feature are spliced, an embedded image is restored through a second pre-trained generator, and the electronic seal image traceability two-dimensional code are extracted from the embedded image. The encryption and decryption process is realized based on a neural network. Because of confidentiality of the neural network model parameters, compared with the openness of encryption and decryption algorithms, the external replicability of the encryption and decryption process is low. The first image feature and the second image feature of the target extracted by the application have confidentiality and high dimensionality, the mosaic image is encrypted by the second image feature of the target, the encrypted image is decrypted by the first image feature of the target to form an asymmetric encryption and decryption architecture, and the first generator and the second generator which are pre-trained are combined for encryption and decryption, so that the probability of cracking is low, and the seal using safety is protected.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of an electronic seal encryption and decryption method based on deep learning according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a neural network architecture of an electronic seal encryption and decryption method based on deep learning according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram of a residual convolutional neural network according to an embodiment of the disclosure.
Fig. 4 is a schematic diagram of a neural network architecture when training a first generator and a second generator according to an embodiment of the disclosure.
Fig. 5 is a flowchart of training a first generator and a second generator provided by an embodiment of the present disclosure.
Fig. 6 is a flowchart of a training joint training residual convolutional neural network, a first generator, and a second generator provided in an embodiment of the present disclosure.
Fig. 7 is a schematic diagram of an electronic seal encryption and decryption device based on deep learning according to an embodiment of the present disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Example 1
Referring to fig. 1 and fig. 2 in combination, an embodiment of the present invention provides an electronic seal encryption and decryption method based on deep learning, including:
And acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, wherein the electronic seal image tracing two-dimensional code records an item of electronic seal application, time of the electronic seal application, an electronic seal authorized party and an electronic seal authorized party. Combining the electronic seal image and the electronic seal image traceable two-dimensional code and embedding the electronic seal image traceable two-dimensional code into a target first image to form a mosaic image, wherein the object type of the target first image is A. The electronic seal image, the first image and the mosaic image formed by splicing are all RGB images and comprise three channels.
And processing the target first image and the target second image through the pre-trained feature extraction neural network to respectively acquire the target first image feature for decryption and the target second image feature for encryption, wherein the object type of the target second image is B. Processing the target first image and the target second image through the pre-trained feature extraction neural network to respectively acquire target first image features for decryption and target second image features for encryption comprises: and selecting a shallow layer, a middle layer and a deep layer feature output layer from the feature extraction neural network, and taking the extracted features of the shallow layer, the middle layer and the deep layer feature output layer as one channel of three channels of the target first image feature or the target second image feature respectively.
In a specific implementation process, taking a residual convolution neural network as an example, as shown in fig. 3, the residual convolution neural network includes: a stacked residual convolution block, wherein the residual convolution block comprises a convolution layer, an activation function, a normalization layer and a connection input and output jump connection so as to combine the input and the output, and finally the residual convolution block is connected with a full connection layer; and when the residual convolution neural network is trained, providing an image data set containing an object type A and an object type B, and training the residual convolution neural network through a cross entropy loss function to identify the category of the object in the image data set. The method for processing the target first image and the target second image through the pre-trained residual convolution neural network to obtain the target first image feature for decryption and the target second image feature for encryption respectively comprises the following steps: selecting shallow, middle and deep residual convolution blocks from a residual convolution neural network, taking the extracted features of the shallow, middle and deep residual convolution blocks as one of three channels of target first image features or target second image features respectively, and then:
Target first image feature= [ CNN L Shallow layer (Picture1),CNNL Middle layer (Picture1),CNNL Deep layer (Picture1) ],
Target second image feature= [ CNN L Shallow layer (Picture2),CNNL Middle layer (Picture2),CNNL Deep layer (Picture2) ], wherein Picture 1 represents the target first image, picture 2 represents the target second image, CNN represents a residual convolution neural network, wherein subscripts L shallow, L middle and L deep represent residual convolution block levels of the residual convolution neural network for forming the target first image feature or the target second image feature.
And splicing the mosaic image and the target second image features, and processing the splicing result of the mosaic image and the target second image features by a pre-trained first generator to generate an encrypted image, wherein the object type of the formed encrypted image is B.
And combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal.
And during decryption, the encrypted image and the target first image feature are spliced, an mosaic image is restored by processing the splicing result of the encrypted image and the first image feature through a pre-trained second generator, and the electronic seal image traceability two-dimensional code are extracted from the mosaic image.
In the implementation process, the first generator and the second generator are consistent in structure and comprise an encoder, a residual convolution neck and a decoder; the encoder adopts a dimension-reducing convolutional neural network, the decoder adopts a dimension-increasing convolutional neural network, and the residual convolution neck is connected with the encoder output and the decoder input. The first generator compresses input features through a convolution neural network with reduced dimension, takes mosaic image features as a 'condition' through a residual convolution neck, and generates an encrypted image consistent with the type of a target second image object under the regulation and control of the 'condition' features on the basis of the compressed target second image features through the convolution neural network with increased dimension. The second generator compresses input features through a dimension-reducing convolutional neural network, takes target first image features as 'conditions' through residual convolution neck, and restores mosaic images under the regulation and control of 'conditions' features on the basis of compressed encrypted image features through a dimension-increasing convolutional neural network.
Referring to fig. 4 and 5 in combination, the present application trains the first generator and the second generator as follows.
When training the first generator and the second generator, a first image set containing class A objects and a second image set containing class B objects are constructed, and a first discriminator and a second discriminator are created. In the specific implementation process, the structures of the first discriminator and the second discriminator are consistent, the first discriminator and the second discriminator are convolutional neural networks, the first discriminator and the second discriminator spread the characteristics of the input image through convolution, finally the spread characteristics are weighted into a classification weight through convolution, and the type of the input image is judged according to the classification weight.
Randomly selecting a target second image from the second image set, randomly selecting a target first image from the first image set, and expanding the number of target first images in the first image set so that the number of non-target first images is consistent with the number of target first images.
And processing each object of the first image set and the second image set through a pre-trained residual convolution neural network to acquire a corresponding first image feature set and a corresponding second image feature set respectively.
And randomly selecting a first image from the first image set, acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code, and then embedding the combined electronic seal image and the electronic seal image tracing two-dimensional code into the selected first image to form a mosaic image.
The mosaic image and the target second image feature are spliced and input into a first generator, the first generator generates a training encryption image, the training encryption image is spliced with the first image feature of the first image, the first image feature is input into a second generator, and the second generator generates a training mosaic image.
The first discriminator discriminates whether the object of the training encrypted image generated by the first generator and the object of the target second image belong to the type B in the training process, and the second discriminator discriminates whether the object of the training mosaic image restored by the second generator and the object of the selected first image belong to the type B.
Constraining the L2 loss of the input mosaic image and the restored training mosaic image to make the input mosaic image and the restored training mosaic image consistent; the training mosaic image generated by the second generator based on the output of the first generator is input to the first generator in combination with the target second image feature, the generated training encryption image is restrained from losing L2 of the two training encryption images generated by the second generator, and the two training encryption images are consistent.
The present application, based on the training process shown in fig. 5, referring to fig. 6, further adopts the following means to train the first generator and the second generator of the residual convolutional neural network, including:
inputting the target second image and the selected first image into a residual convolution neural network for classification processing;
inputting the training mosaic image generated by the second generator based on the output of the first generator into a residual convolution neural network for classification processing;
The training mosaic image generated by the second generator based on the output of the first generator is input into the first generator in combination with the target second image characteristic, the generated training encryption image is input into a residual convolution neural network for classification processing;
And accumulating the characteristic differences of the target second image extracted by the shallow, middle and deep residual convolution blocks of the residual convolution neural network and the training encrypted image, and restricting the accumulated sum to be zero.
The application combines the electronic seal image and the electronic seal image tracing two-dimensional code and embeds the combination into the target first image to form an embedded image; processing a target first image and a target second image through a pre-trained residual convolution neural network to respectively acquire a target first image characteristic and a target second image characteristic; splicing the mosaic image and the target second image features, and generating an encrypted image through the processing of a pre-trained first generator; combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal; and when decryption is carried out, the encrypted image and the target first image feature are spliced, an embedded image is restored through a second pre-trained generator, and the electronic seal image traceability two-dimensional code are extracted from the embedded image. The encryption and decryption process is realized based on a neural network. Because of confidentiality of the neural network model parameters, compared with the openness of encryption and decryption algorithms, the external replicability of the encryption and decryption process is low. The first image feature and the second image feature of the target extracted by the application have confidentiality and high dimensionality, the mosaic image is encrypted by the second image feature of the target, the encrypted image is decrypted by the first image feature of the target to form an asymmetric encryption and decryption architecture, and the first generator and the second generator which are pre-trained are combined for encryption and decryption, so that the probability of cracking is low, and the seal using safety is protected.
In some embodiments, the residual convolutional neural network may be replaced by a Unet encoder and an expanded convolution of a pre-trained Unet semantic segmentation model, which provides an image dataset and a semantic segmentation label comprising an object type a and an object type B, the Unet semantic segmentation model is trained to perform semantic segmentation on the object a or the object B, the Unet encoder also outputs shallow, middle and deep features, and the output features are processed by the expanded convolution to be one of three channels respectively serving as a target first image feature or a target second image feature after the output features are consistent with the input image size.
In some embodiments, the residual convolution neural network may be replaced by a backbone coding network and an expansion convolution of a YOLO model, which is trained to detect and identify the object a or the object B, to provide an image dataset including the object type a and the object type B, and a semantic segmentation label, where the backbone coding network outputs shallow, middle and deep features, and the output features are processed by the expansion convolution to be one of three channels respectively serving as a target first image feature or a target second image feature after the output features are consistent with the input image size.
Example 2
Referring to fig. 7, the invention provides an electronic seal encryption and decryption device based on deep learning, comprising: the electronic seal encryption and decryption method based on deep learning is realized when the processing unit reads and executes the computer program, and comprises the following steps:
acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code and embedding the electronic seal image and the electronic seal image tracing two-dimensional code into a target first image to form an embedded image, wherein the object type of the target first image is A;
Processing a target first image and a target second image through a pre-trained feature extraction neural network to respectively acquire a target first image feature for decryption and a target second image feature for encryption, wherein the type of an object of the target second image is B;
Splicing the mosaic image and the target second image features, processing the splicing result of the mosaic image and the target second image features through a pre-trained first generator, and generating an encrypted image based on the splicing result, wherein the object type of the formed encrypted image is B;
Combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal;
And when decryption is carried out, the encrypted image and the target first image feature are spliced, a splicing result of the encrypted image and the target first image feature is processed through a second pre-trained generator, an embedded image is restored based on the splicing result, and the electronic seal image traceability two-dimensional code are extracted from the embedded image.
Of course, the storage unit in the electronic seal encryption and decryption device based on deep learning provided by the embodiment of the invention is not limited to the method operation described above, and the related operation in the electronic seal encryption and decryption method based on deep learning provided by any embodiment of the invention can be executed.
Example 3
The embodiment of the invention provides a computer readable storage medium, which stores computer instructions, and the computer instructions realize the electronic seal encryption and decryption method based on deep learning when being executed by a processor, and the method comprises the following steps:
acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code and embedding the electronic seal image and the electronic seal image tracing two-dimensional code into a target first image to form an embedded image, wherein the object type of the target first image is A;
Processing a target first image and a target second image through a pre-trained feature extraction neural network to respectively acquire a target first image feature for decryption and a target second image feature for encryption, wherein the type of an object of the target second image is B;
Splicing the mosaic image and the target second image features, processing the splicing result of the mosaic image and the target second image features through a pre-trained first generator, and generating an encrypted image based on the splicing result, wherein the object type of the formed encrypted image is B;
Combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal;
And when decryption is carried out, the encrypted image and the target first image feature are spliced, a splicing result of the encrypted image and the target first image feature is processed through a second pre-trained generator, an embedded image is restored based on the splicing result, and the electronic seal image traceability two-dimensional code are extracted from the embedded image.
Of course, the computer readable storage medium provided by the embodiment of the invention stores a computer program which is not limited to the method operation described above, and can also execute the related operation in the electronic seal encryption and decryption method based on deep learning provided by any embodiment of the invention.
In the embodiments provided in the present invention, it should be understood that the disclosed structures and methods may be implemented in other manners. For example, the structural embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via interfaces, structures or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An electronic seal encryption and decryption method based on deep learning is characterized by comprising the following steps:
acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code and embedding the electronic seal image and the electronic seal image tracing two-dimensional code into a target first image to form an embedded image, wherein the object type of the target first image is A;
Processing a target first image and a target second image through a pre-trained feature extraction neural network to respectively acquire a target first image feature for decryption and a target second image feature for encryption, wherein the object type of the target second image is B;
splicing the mosaic image and the target second image features, and processing the splicing result of the mosaic image and the target second image features through a pre-trained first generator to generate an encrypted image, wherein the object type of the formed encrypted image is B;
Combining and transmitting the encrypted image and the target first image characteristic to realize the encrypted transmission of the electronic seal;
And during decryption, the encrypted image and the target first image feature are spliced, an mosaic image is restored by processing the splicing junction of the encrypted image and the first image feature through a pre-trained second generator, and the electronic seal image traceability two-dimensional code are extracted from the mosaic image.
2. The deep learning-based electronic seal encryption and decryption method as set forth in claim 1, wherein the feature extraction neural network adopts any one of the following: a residual convolutional neural network, a Unet encoder and an expansion convolutional of Unet semantic segmentation model, and a backbone encoding network and an expansion convolutional of a YOLO model;
The residual convolutional neural network includes: a stacked residual convolution block, wherein the residual convolution block comprises a convolution layer, an activation function, a normalization layer and a connection input and output jump connection so as to combine the input and the output, and finally the residual convolution block is connected with a full connection layer; when the residual convolution neural network is trained, an image data set containing an object type A and an object type B is provided, and the residual convolution neural network is trained to identify the category of the object in the image data set through a cross entropy loss function;
Providing an image data set with an object type A and an object type B and a semantic segmentation label, training the Unet semantic segmentation model to carry out semantic segmentation on the object A or the object B, outputting shallow layer, middle layer and deep layer characteristics by a Unet encoder, performing expansion convolution processing on the output characteristics to be consistent with the size of an input image, and taking the output characteristics as one channel of three channels of a target first image characteristic or a target second image characteristic respectively;
Providing an image data set with an object type A and an object type B and a semantic segmentation label, training a YOLO model to detect and identify the object A or the object B, outputting shallow layer, middle layer and deep layer characteristics by a backbone coding network, performing expansion convolution processing on the output characteristics to be consistent with the size of an input image, and taking the output characteristics as one channel of a target first image characteristic or a target second image characteristic.
3. The method for encrypting and decrypting the electronic seal based on deep learning according to claim 1, wherein the processing the target first image and the target second image through the pre-trained feature extraction neural network to obtain the target first image feature for decryption and the target second image feature for encryption respectively comprises: and selecting a shallow layer, a middle layer and a deep layer feature output layer from the feature extraction neural network, and taking the extracted features of the shallow layer, the middle layer and the deep layer feature output layer as one channel of three channels of the target first image feature or the target second image feature respectively.
4. The deep learning-based electronic seal encryption and decryption method according to claim 1, wherein the first generator and the second generator are identical in structure and comprise an encoder, a residual convolution neck and a decoder; the encoder adopts a dimension-reducing convolutional neural network, the decoder adopts a dimension-increasing convolutional neural network, and the residual convolution neck is connected with the encoder output and the decoder input.
5. The deep learning-based electronic seal encryption and decryption method according to claim 1, wherein when the first generator and the second generator are trained, a first image set containing a class-a object and a second image set containing a class-B object are constructed, and a first discriminator and a second discriminator are created;
randomly selecting a target second image from the second image set, randomly selecting a target first image from the first image set, and expanding the number of target first images in the first image set to enable the number of non-target first images to be consistent with that of target first images;
randomly selecting a first image from a first image set, acquiring an electronic seal image and an electronic seal image tracing two-dimensional code, combining the electronic seal image and the electronic seal image tracing two-dimensional code, and then embedding the combined electronic seal image and the electronic seal image tracing two-dimensional code into the selected first image to form a mosaic image;
The mosaic image and the target second image feature are spliced and input into a first generator, the first generator generates a training encryption image, the training encryption image is spliced with the first image feature of the first image, the first image feature of the first image is input into a second generator, and the second generator generates a training mosaic image;
the first discriminator discriminates whether the object of the training encryption image generated by the first generator and the object of the target second image belong to the type B in the training process, and the second discriminator discriminates whether the object of the training mosaic image restored by the second generator and the object of the selected first image belong to the type B;
Constraining the L2 loss of the input mosaic image and the restored training mosaic image to make the input mosaic image and the restored training mosaic image consistent; the training mosaic image generated by the second generator based on the output of the first generator is input to the first generator in combination with the target second image feature, the generated training encryption image is restrained from losing L2 of the two training encryption images generated by the second generator, and the two training encryption images are consistent.
6. The deep learning-based electronic seal encryption and decryption method according to claim 5, wherein training the first generator and the second generator in combination with a residual convolutional neural network comprises:
inputting the target second image and the selected first image into a residual convolution neural network for classification processing;
inputting the training mosaic image generated by the second generator based on the output of the first generator into a residual convolution neural network for classification processing;
The training mosaic image generated by the second generator based on the output of the first generator is input into the first generator in combination with the target second image characteristic, the generated training encryption image is input into a residual convolution neural network for classification processing;
And accumulating the characteristic differences of the target second image extracted by the shallow, middle and deep residual convolution blocks of the residual convolution neural network and the training encrypted image, and restricting the accumulated sum to be zero.
7. The deep learning-based electronic seal encryption and decryption method according to claim 5, wherein the first discriminator and the second discriminator have the same structure and are convolutional neural networks, the first discriminator and the second discriminator spread the features of the input image through convolution, finally the spread features are weighted into a classification weight through convolution, and the type of the input image is judged according to the classification weight.
8. The method for encrypting and decrypting the electronic seal based on the deep learning according to claim 1, wherein the electronic seal image traceability two-dimensional code records an item of an electronic seal application, a time of the electronic seal application, an electronic seal authorizer and an electronic seal authorizer.
9. An electronic seal encryption and decryption device based on deep learning is characterized by comprising: the electronic seal encryption and decryption method based on deep learning as claimed in any one of claims 1-8 is realized when the processing unit reads and executes the computer program.
10. A computer readable storage medium storing computer instructions which when executed by a processor implement the deep learning based electronic seal encryption and decryption method of any one of claims 1-8.
CN202410353432.4A 2024-03-27 2024-03-27 Electronic seal encryption and decryption method, device and medium based on deep learning Active CN117951754B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410353432.4A CN117951754B (en) 2024-03-27 2024-03-27 Electronic seal encryption and decryption method, device and medium based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410353432.4A CN117951754B (en) 2024-03-27 2024-03-27 Electronic seal encryption and decryption method, device and medium based on deep learning

Publications (2)

Publication Number Publication Date
CN117951754A true CN117951754A (en) 2024-04-30
CN117951754B CN117951754B (en) 2024-06-07

Family

ID=90796602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410353432.4A Active CN117951754B (en) 2024-03-27 2024-03-27 Electronic seal encryption and decryption method, device and medium based on deep learning

Country Status (1)

Country Link
CN (1) CN117951754B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118214813A (en) * 2024-05-16 2024-06-18 中电科大数据研究院有限公司 Data security transmission method and system based on intelligent pipe network

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008234643A (en) * 2007-03-14 2008-10-02 Konica Minolta Systems Lab Inc Barcode and low-resolution reconstruction of document image
US20100027853A1 (en) * 2008-07-31 2010-02-04 Hon Hai Precision Industry Co., Ltd. Image encryption system and method for automatically encrypting image of at least partially nude person and digital image capture device having same
CN105205778A (en) * 2015-11-09 2015-12-30 河南师范大学 RBF neural network-based image watermark embedding and extraction method and device
CN112383523A (en) * 2020-11-02 2021-02-19 国网电子商务有限公司 Image encryption method and related device
CN113658032A (en) * 2021-10-20 2021-11-16 广东迅维信息产业股份有限公司 Image watermark encryption and decryption method and system based on deep learning and image processing
CN115470503A (en) * 2022-09-13 2022-12-13 长沙理工大学 Color image encryption method, system and equipment based on chaotic neural network
CN116468633A (en) * 2023-04-12 2023-07-21 平安银行股份有限公司 Image restoration method and device and electronic equipment
CN116664128A (en) * 2023-06-01 2023-08-29 中国银行股份有限公司 Electronic certificate encryption method, device, equipment and medium
US20230394299A1 (en) * 2022-06-03 2023-12-07 Kongju National University Industry-University Cooperation Foundation Method, computing device and computer-readable medium for classification of encrypted data using deep learning model

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008234643A (en) * 2007-03-14 2008-10-02 Konica Minolta Systems Lab Inc Barcode and low-resolution reconstruction of document image
US20100027853A1 (en) * 2008-07-31 2010-02-04 Hon Hai Precision Industry Co., Ltd. Image encryption system and method for automatically encrypting image of at least partially nude person and digital image capture device having same
CN105205778A (en) * 2015-11-09 2015-12-30 河南师范大学 RBF neural network-based image watermark embedding and extraction method and device
CN112383523A (en) * 2020-11-02 2021-02-19 国网电子商务有限公司 Image encryption method and related device
CN113658032A (en) * 2021-10-20 2021-11-16 广东迅维信息产业股份有限公司 Image watermark encryption and decryption method and system based on deep learning and image processing
US20230394299A1 (en) * 2022-06-03 2023-12-07 Kongju National University Industry-University Cooperation Foundation Method, computing device and computer-readable medium for classification of encrypted data using deep learning model
CN115470503A (en) * 2022-09-13 2022-12-13 长沙理工大学 Color image encryption method, system and equipment based on chaotic neural network
CN116468633A (en) * 2023-04-12 2023-07-21 平安银行股份有限公司 Image restoration method and device and electronic equipment
CN116664128A (en) * 2023-06-01 2023-08-29 中国银行股份有限公司 Electronic certificate encryption method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王勇;李金阳;王瑛;: "Hopfield神经网络和AES结合的超混沌图像加密算法", 计算机工程与应用, no. 17, 12 October 2017 (2017-10-12), pages 202 - 207 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118214813A (en) * 2024-05-16 2024-06-18 中电科大数据研究院有限公司 Data security transmission method and system based on intelligent pipe network

Also Published As

Publication number Publication date
CN117951754B (en) 2024-06-07

Similar Documents

Publication Publication Date Title
Katzenbeisser et al. Information hiding
CN117951754B (en) Electronic seal encryption and decryption method, device and medium based on deep learning
TWI769753B (en) Image classification method and device for protecting data privacy
Selva Mary et al. Secure grayscale image communication using significant visual cryptography scheme in real time applications
Bouslimi et al. Data hiding in encrypted images based on predefined watermark embedding before encryption process
CN110110535A (en) A kind of low distortion steganography method based on picture element matrix
Ilasariya et al. Image steganography using Blowfish algorithm and transmission via apache kafka
Shi et al. A robust and secure zero-watermarking copyright authentication scheme based on visual cryptography and block GH feature
Al-Kadei Robust video data security using hybrid cryptography-steganography technique
Yalla et al. GUI Implementation of Modified and Secure Image Steganography Using Least Significant Bit Substitution.
Teotia et al. Enhancing audio and video steganography technique using hybrid algorithm
Chinniyan et al. Image Steganography Using Deep Neural Networks.
Cauvery Water marking on digital image using genetic algorithm
Deepthi et al. Pre Encryption Data Hiding Techniques using Reserving Room Approach
Shawkat et al. Evolutionary programming approach for securing medical images using genetic algorithm and standard deviation
Hegde et al. Exploring the Effectiveness of Steganography Techniques: A Comparative Analysis
Mishra et al. Information security through digital image steganography using multilevel and compression technique
Rafiqi Features Analysis and Extraction Techniques for the Image Steganography
Sulfi et al. A Secure Watermarking Based Image Integrity Verification in IoMT
Priya et al. Reversible Information Hiding in Videos
Rajput et al. An enhanced image security using improved RSA cryptography and spatial orientation tree compression method
Al_Dawla et al. Steganography enhancement by combining text and image through wavelet technique
Chaudhary et al. Hiding MP3 in Colour Image using Whale Optimization
Kumar et al. A secure system for digital video applications using an intelligent crypto model
Shawkat Enhancing steganography techniques in digital images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant