CN117034367A - Electronic seal key management method - Google Patents

Electronic seal key management method Download PDF

Info

Publication number
CN117034367A
CN117034367A CN202311293971.5A CN202311293971A CN117034367A CN 117034367 A CN117034367 A CN 117034367A CN 202311293971 A CN202311293971 A CN 202311293971A CN 117034367 A CN117034367 A CN 117034367A
Authority
CN
China
Prior art keywords
sampling matrix
area
matrix
sampling
clustering
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
CN202311293971.5A
Other languages
Chinese (zh)
Other versions
CN117034367B (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.)
Beijing Dianju Information Technology Co ltd
Original Assignee
Beijing Dianju Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dianju Information Technology Co ltd filed Critical Beijing Dianju Information Technology Co ltd
Priority to CN202311293971.5A priority Critical patent/CN117034367B/en
Publication of CN117034367A publication Critical patent/CN117034367A/en
Application granted granted Critical
Publication of CN117034367B publication Critical patent/CN117034367B/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
    • G06V10/267Segmentation 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 by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • 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/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Complex Calculations (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to an electronic seal key management method, which comprises the following steps: acquiring a binary image and a hash value sequence of the electronic seal; obtaining a plurality of sampling matrixes according to the binary image, obtaining a plurality of clustering areas in each sampling matrix, and constructing a graph structure of each sampling matrix according to the density of the clustering areas; obtaining the maximum merging scale of each sampling matrix, and processing the graph structure of each sampling matrix according to the maximum merging scale of each sampling matrix to obtain an updated graph structure of each sampling matrix; obtaining a characteristic value sequence according to the updated graph structure of the sampling matrix, obtaining a secret key according to the characteristic value sequence and the hash sequence, and carrying out encryption processing on the secret key to obtain an encrypted secret key, so that the secret key describing the unique information of each electronic seal is obtained by describing the distance relation between the pixel information of the electronic seal, and the problem that the confidentiality effect caused by hash collision is poor is effectively solved.

Description

Electronic seal key management method
Technical Field
The invention relates to the technical field of data processing, in particular to an electronic seal key management method.
Background
In the existing method, the hash value of the electronic seal is often used as a secret key to encrypt the electronic seal due to the irreversibility of the hash value. However, when the hash value is calculated by using the binary image of the electronic seal, as the two element values 0 and 1 are only included in the image, the binary image information of the electronic seal is less, the hash value sequence of the electronic seal obtained by using the binary image with less information is less in distinguishing, and the problem of collision of the hash values of different electronic seals is easy to occur. Therefore, the hash value of the seal can be cracked by utilizing the hash values of other electronic seals to form a key, so that the confidentiality effect of ciphertext data of the seal is reduced.
Disclosure of Invention
The invention provides an electronic seal key management method, which aims to solve the existing problems: how to solve the problem of hash collision generated when the hash value is used as a key and the problem of poor confidentiality caused by the hash collision.
The invention discloses a key management method of an electronic seal, which adopts the following technical scheme:
one embodiment of the present invention provides a method for managing an electronic seal key, including the steps of:
acquiring a binary image and a hash value sequence of the electronic seal;
performing expansion processing on the binary image to obtain a first sampling matrix and other multiple sampling matrixes, performing clustering processing on data points in each sampling matrix to obtain multiple clustering areas, calculating the density of each clustering area, and constructing a graph structure of each sampling matrix according to the density of each clustering area in each sampling matrix; obtaining the maximum merging scale of each sampling matrix according to the inclusion relation of the clustering area in each sampling matrix, and processing the graph structure of each sampling matrix according to the maximum merging scale of each sampling matrix to obtain an updated graph structure of each sampling matrix;
and (3) the clustering area in the first sampling matrix is called an initial area, a node vector sequence of each initial area is obtained according to the relation between the initial area and the nodes in the updating graph structure of each sampling matrix, a characteristic value sequence is obtained according to the node vector sequence of each initial area, the hash value sequence is adjusted according to the characteristic value sequence to obtain a key, and the key is encrypted to obtain an encrypted key.
Preferably, the expanding processing is performed on the binary image to obtain a first sampling matrix and other multiple sampling matrices, including the specific method that:
taking a binary image of an electronic seal as a first sampling matrix, taking each data point in the first sampling matrix as a first basic unit, uniformly dividing the first sampling matrix into a plurality of first matrix blocks with a size of a x a first basic units, taking 1 for each data in the first matrix blocks when any data in the first matrix blocks is 1, and keeping the data in the first matrix blocks unchanged when each data in the first matrix blocks is 0, so as to realize expansion processing of the first matrix blocks and complete expansion processing of each first matrix block in the first sampling matrix to obtain a second sampling matrix; taking a data point a in a second sampling matrix as a second basic unit, uniformly dividing the second sampling matrix into a plurality of second matrix blocks with a size of a second basic unit, taking 1 for each data in any one of the second matrix blocks when the data in any one of the second matrix blocks is 1, and keeping the data in the second matrix blocks unchanged when the data in the second matrix blocks are 0, so as to realize expansion processing of the second matrix blocks and complete expansion processing of each second matrix block in the second sampling matrix to obtain a third sampling matrix;
and so on, in the k-1 th sampling matrixUniformly dividing a k-1 sampling matrix into a plurality of k-1 matrix blocks with the size of a being a basic unit of k-1, taking 1 for each data in the k-1 matrix block when any one data in the k-1 matrix block is 1, and keeping the data in the k-1 matrix block unchanged when each data in the k-1 matrix block is 0, so as to realize expansion treatment of the k-1 matrix block and complete expansion treatment of each k-1 matrix block in the k-1 sampling matrix to obtain the k sampling matrix; and obtaining a sampling matrix obtained by each expansion treatment until the size of the basic unit is larger than or equal to that of the sampling matrix, wherein a represents a preset size.
Preferably, the clustering processing is performed on the data points in each sampling matrix to obtain a plurality of clustering areas, and the specific method includes:
and for any sampling matrix, clustering the data points with the median value of 1 in the sampling matrix by using a DBSCAN clustering method to obtain a plurality of clustering areas.
Preferably, the calculating the density of each clustering area includes the following specific methods:
for any sampling matrix, acquiring a first number of data points in an area surrounded by the minimum bounding rectangle of each clustering area as each clustering area, acquiring a second number of data points with a median value of 1 in the area surrounded by the minimum bounding rectangle of each clustering area as each clustering area, and taking the ratio of the second number of each clustering area to the first number as the density of each clustering area.
Preferably, the constructing the graph structure of each sampling matrix according to the density of each clustering area in each sampling matrix includes the following specific methods:
for any one sampling matrix, taking each clustering area in the sampling matrix as a node of the sampling matrix, taking the density of each clustering area in the sampling matrix as a node value, taking the ratio of the node values of two nodes as the edge weight value of the two nodes, and constructing the graph structure of the sampling matrix by utilizing all the nodes of the sampling matrix.
Preferably, the obtaining the maximum merging scale of each sampling matrix according to the inclusion relation of the clustering area in each sampling matrix includes the following specific steps:
and when the target area is different from the comparison area, the target area is used as a merging variable area of the target matrix, the comparison area of each merging variable area is used as a subarea of each merging variable area, any two subareas of each merging variable area form a subarea pair, the shortest path of corresponding nodes of two subareas in each subarea pair is acquired and is used as the shortest path of each subarea pair, the maximum value in the shortest path of all subareas in each merging variable area is used as the merging scale of each merging variable area, and the maximum value in the merging scale of all merging variable areas in the target matrix is used as the maximum merging scale of the target matrix.
Preferably, the processing the graph structure of each sampling matrix according to the maximum merging scale of each sampling matrix to obtain an updated graph structure of each sampling matrix includes the following specific methods:
and for any sampling matrix, taking the maximum merging scale of the sampling matrix as the Node range of the graph structure of the sampling matrix, and processing the graph structure of the sampling matrix by using a Node2Vec algorithm based on the Node range of the graph structure of the sampling matrix to obtain an updated graph structure of the sampling matrix.
Preferably, the node vector sequence of each initial area is obtained according to the relation between the initial area and the nodes in the updated graph structure of each sampling matrix, and the specific method includes:
taking any initial area as an analysis area, acquiring a clustering area at the analysis area from each sampling matrix except the first sampling matrix, and marking the clustering area as a reference area of the analysis area; acquiring a reference area of each initial area; and acquiring the node vector of each node in the updated graph structure of each sampling matrix, acquiring the node vector of the node corresponding to the reference area of the analysis area, and forming the node vector sequence of the analysis area by the node vectors of all the reference areas of the analysis area.
Preferably, the obtaining the characteristic value sequence according to the node vector sequence of each initial area includes the following specific methods:
and performing dimension reduction processing on the node vector sequence of each initial region by using a PCA algorithm to obtain a dimension reduction sequence of each initial region, taking the cosine similarity mean value of the dimension reduction sequence of each initial region and all other dimension reduction sequences as the characteristic value of each initial region, and forming the characteristic value sequence by the characteristic values of all the initial regions.
Preferably, the method for obtaining the key by adjusting the hash value sequence according to the characteristic value sequence includes the following specific steps:
each element in the hash sequence is called a hash value, the ratio of the number of each hash value to the number of all hash values is used as the frequency of each hash value, the frequency values of all hash values and all characteristic values in the characteristic value sequence are matched by using a KM algorithm, the matched characteristic value of the frequency value of each hash value is obtained, and the matched characteristic value of the frequency is used as the updating frequency of each hash value;
and (3) carrying out ascending arrangement on the updating frequencies of all the hash values to obtain an updating frequency sequence, carrying out exchange processing on the hash value corresponding to each updating frequency in the updating frequency sequence according to the arrangement sequence of the updating frequency sequence to obtain a first hash value sequence from the hash value exchange position corresponding to the first updating frequency and the last updating frequency in the hash value sequence, carrying out exchange processing on the hash value corresponding to each updating frequency in the updating frequency sequence to obtain a second hash value sequence from the hash value exchange position corresponding to the second updating frequency and the last updating frequency in the hash value sequence, and the like.
The technical scheme of the invention has the beneficial effects that: performing expansion processing on the binary image to obtain a first sampling matrix and other multiple sampling matrixes, performing clustering processing on data points in each sampling matrix to obtain multiple clustering areas, calculating the density of each clustering area, and constructing a graph structure of each sampling matrix according to the density of each clustering area in each sampling matrix; obtaining the maximum merging scale of each sampling matrix according to the inclusion relation of the clustering area in each sampling matrix, and processing the graph structure of each sampling matrix according to the maximum merging scale of each sampling matrix to obtain an updated graph structure of each sampling matrix; the clustering area in the first sampling matrix is called an initial area, a node vector sequence of each initial area is obtained according to the relation between the initial area and nodes in an updating graph structure of each sampling matrix, a characteristic value sequence is obtained according to the node vector sequence of each initial area, a hash value sequence is adjusted according to the characteristic value sequence to obtain a key, the key is encrypted to obtain an encrypted key, the distance relation between electronic seal pixels capable of reflecting unique information of each electronic seal is described to obtain the characteristic value sequence, and the hash value sequence is adjusted by the characteristic value sequence to obtain a final hash sequence capable of reflecting unique information of each electronic seal, so that the distinguishing property between the final hash sequences of each electronic seal is large, and the problem of hash collision is effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of the steps of a method for managing an electronic seal key according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, structure, characteristics and effects of an electronic seal key management method according to the invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the electronic seal key management method provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a method for managing an electronic seal key according to an embodiment of the present invention is shown, where the method includes the following steps:
step S001: and acquiring a binary image and a hash value sequence of the electronic seal.
It should be noted that, since the difference of data in the binary image of the electronic seal is small, the collision probability of the hash value sequence of the binary image of the electronic seal is high, so that the confidentiality effect of the ciphertext data obtained by encrypting the hash sequence is poor. In order to improve the confidentiality effect, the distribution of the hash sequence is changed by utilizing the unique characteristic information of the binary image of the electronic seal, so that the uniqueness of the adjusted hash sequence is improved, and the encryption effect on the binary image of the electronic seal is further improved.
Specifically, in order to implement the electronic seal key management method provided in this embodiment, a binary image and a hash sequence of an electronic seal are first acquired, and the electronic seal is scanned by using an electronic scanner to obtain an electronic seal image. And (3) carrying out segmentation processing on the electronic seal image by using an Ojin threshold segmentation method, setting the gray value of the pixel larger than the segmentation threshold to be 1, and setting the gray value of the pixel smaller than or equal to the segmentation threshold to be 0, so as to obtain a binary image of the electronic seal. And obtaining a hash sequence of the binary image of the electronic seal by using a hash algorithm. Pixels with gray values of 1 in the binary image of the electronic seal are called electronic seal pixels, and pixels with gray values of 0 are called background pixels.
So far, the binary image and the hash sequence of the electronic seal are obtained through the method.
Step S002: obtaining a plurality of sampling matrixes according to the binary image, obtaining a plurality of clustering areas of each sampling matrix, and calculating the density of each clustering area.
It should be noted that, the information between different electronic seals can be distinguished as the difference of characters in the electronic seal and the difference of distances between the characters, and the two differences are represented as the distance relationship between pixels of the electronic seal, so that the characteristic information of the electronic seal is obtained by describing the distance relationship between pixels of the electronic seal in the binary image of the electronic seal. The distance relation between electronic seal pixels in a binary image of the electronic seal can be reflected by the merging condition of electronic seal pixel clustering areas in the expansion processing process, wherein the electronic seal pixel clustering areas with a smaller distance can be merged into a large electronic seal pixel clustering area through one expansion processing, and the electronic seal pixel clustering areas with a larger distance can be merged into a large electronic seal pixel clustering area through multiple expansion processing. Therefore, the embodiment obtains the characteristic information capable of reflecting the unique information of the electronic seal by describing the merging condition of the pixel clustering areas of the electronic seal in the expansion processing process.
Taking a binary image of the electronic seal as a first sampling matrix, taking each data point in the first sampling matrix as a first basic unit, and uniformly dividing the first sampling matrix into a plurality of first matrix blocks with a size of a x a first basic units. For any one first matrix block in the first sampling matrix, when any one data in the first matrix block is 1, taking 1 for each data in the first matrix block, and when all the data in the first matrix block are 0, keeping each data in the first matrix block unchanged, realizing expansion processing of the first matrix block, and completing expansion processing of each first matrix block in the first sampling matrix to obtain a second sampling matrix; taking a data point a in a second sampling matrix as a second basic unit, uniformly dividing the second sampling matrix into a plurality of second matrix blocks with a size of a second basic unit, taking 1 for each data in any one of the second matrix blocks when the data in any one of the second matrix blocks is 1, and keeping the data in the second matrix blocks unchanged when the data in the second matrix blocks are 0, so as to realize the expansion processing of the second matrix blocks and complete the expansion processing of each second matrix block in the second sampling matrix to obtain a third sampling matrix.
And so on, in the k-1 th sampling matrixAnd taking data points as k-1 basic units, uniformly dividing a k-1 sampling matrix into a plurality of k-1 matrix blocks with the size of a being a k-1 basic units, taking 1 for each data in the k-1 matrix block when any data in the k-1 matrix block is 1, and keeping the data in the k-1 matrix block unchanged when each data in the k-1 matrix block is 0, so as to realize the expansion processing of the k-1 matrix block and finish the expansion processing of each k-1 matrix block in the k-1 sampling matrix to obtain the k sampling matrix. And obtaining a sampling matrix obtained by each expansion treatment until the size of the basic unit is larger than or equal to the sampling matrix. a represents a preset size, and in this embodiment, a is taken as an example of 2, and other values may be taken in other embodiments, and the embodiment is not particularly limited.
In order to reflect the combination condition of the electronic seal pixel clustering areas in the expansion processing process, the clustering areas in each sampling matrix need to be acquired firstly.
Further, for any one sampling matrix, clustering is carried out on data points with the value of 1 in the sampling matrix by using a DBSCAN clustering method to obtain a plurality of clustering areas.
So far, all the clustering areas in each sampling matrix are obtained, and the description is carried out below according to the distribution density condition of the pixels of the electronic seal in each clustering area.
Further, for any one sampling matrix, the number of data points in the area surrounded by the minimum bounding rectangle of each clustering area is obtained and is recorded as the first number of each clustering area, the number of data points with the median value of 1 in the area surrounded by the minimum bounding rectangle of each clustering area is obtained and is recorded as the second number of each clustering area, and the ratio of the second number of each clustering area to the first number is used as the density of each clustering area.
And similarly, obtaining the density of each clustering area in each sampling matrix.
Thus, the density of each clustering area in each sampling matrix is obtained.
Step S003: and constructing a graph structure of each sampling matrix according to the density of all the clustering areas in each sampling matrix, obtaining an updated graph structure of each sampling matrix according to the relation among the clustering areas of different sampling matrices, and obtaining a characteristic value sequence according to the updated graph structure of each sampling matrix.
The density of each clustering area in each sampling matrix is obtained in the above process, a graph structure is built according to the merging condition of the clustering areas of the corresponding clustering areas in the sampling matrixes and the density of each clustering area, the change condition of the clustering areas is reflected by the graph structure, and then the character distance and the character difference condition in the binary image of the electronic seal are reflected.
Specifically, for any one sampling matrix, taking each clustering area in the sampling matrix as a node of the sampling matrix, taking the density of each clustering area in the sampling matrix as a node value, taking the ratio of the node values of two nodes as the edge weights of two nodes, constructing a graph structure of the sampling matrix by utilizing all nodes of the sampling matrix, removing connecting edges with the edge weights smaller than a preset edge weight threshold Y in the graph structure, and obtaining the graph structure after pruning, wherein the graph structure after pruning is still recorded as the graph structure of the sampling matrix for convenience of description. In this embodiment, Y is taken as an example of 0.7, and other values may be taken in other embodiments, and the embodiment is not particularly limited.
And similarly, obtaining the graph structure of each sampling matrix.
Further, any one sampling matrix is marked as a target matrix, any one clustering area in the target matrix is marked as a target area, all the clustering areas at the positions of the target areas are acquired in the previous sampling matrix of the target matrix, the clustering areas are marked as comparison areas of the target areas, the target areas are compared with each comparison area, when the target areas are different from the comparison areas, the target areas are used as merging variable areas of the target matrix, the comparison areas of each merging variable area are marked as subareas of each merging variable area, any two subareas of each merging variable area form subarea pairs, shortest paths of nodes corresponding to two subareas in each subarea pair are marked as shortest paths of each subarea pair, and the maximum value in the shortest paths of all subareas of each merging variable area is used as the merging scale of each merging variable area. And taking the maximum value in the merging scales of all the merging variation areas in the target matrix as the maximum merging scale of the target matrix.
And similarly, obtaining the maximum merging scale of each sampling matrix.
And for any sampling matrix, taking the maximum merging scale of the sampling matrix as the Node range of the graph structure of the sampling matrix, and processing the graph structure of the sampling matrix by using a Node2Vec algorithm based on the Node range of the graph structure of the sampling matrix to obtain an updated graph structure of the sampling matrix.
The method comprises the steps that an updated graph structure of each sampling matrix is obtained, node scales of the updated graph structure are set according to the distance between sub-areas of each combined variable area, wherein the node scales of the updated graph structure are scales which can just comprise a plurality of sub-areas, the node scales are set by the scales which can just comprise the plurality of sub-areas, the distance condition between the sub-areas can be reflected, the distance condition of character information of an electronic seal is reflected, and the distance relation between pixels of the electronic seal in a binary image of the electronic seal can be reflected based on the node scales.
Further, each cluster region in the first sampling matrix is referred to as an initial region. Taking any initial area as an analysis area, and acquiring a clustering area at the analysis area in each other sampling matrix, and marking the clustering area as a reference area of the analysis area. And similarly obtaining a reference area of each initial area. And acquiring the node vector of each node in the updated graph structure of each sampling matrix, acquiring the node vector of the node corresponding to the reference area of the analysis area, and forming the node vector sequence of the analysis area by the node vectors of all the reference areas of the analysis area. And similarly, obtaining a node vector sequence of each initial region.
Further, the node vector sequence of each initial area is subjected to dimension reduction processing by using a PCA algorithm to obtain a dimension reduction sequence of each initial area. Taking the cosine similarity mean value of the dimension reduction sequence of each initial region and all other dimension reduction sequences as the characteristic value of each initial region, and forming the characteristic value sequence by the characteristic values of all the initial regions.
Thus, the characteristic value sequence is obtained, and the distance relation between the pixels of the electronic seal can be better described through the characteristic value sequence. And then can reflect the unique information of each electronic seal.
Step S004: and obtaining a key according to the characteristic value sequence and the hash value sequence, and carrying out encryption processing on the key to obtain an encrypted key.
Specifically, each element in the hash sequence is called a hash value, the ratio of the number of each hash value to the number of all hash values is used as the frequency of each hash value, the frequency values of all hash values and all characteristic values in the characteristic value sequence are matched by using a KM algorithm, the matched characteristic value of the frequency value of each hash value is obtained, and the matched characteristic value of the frequency is used as the updating frequency of each hash value;
and (3) carrying out ascending arrangement on the updating frequencies of all the hash values to obtain an updating frequency sequence, carrying out exchange processing on the hash value corresponding to each updating frequency in the updating frequency sequence according to the arrangement sequence of the updating frequency sequence to obtain a first hash value sequence from the hash value exchange position corresponding to the first updating frequency and the last updating frequency in the hash value sequence, carrying out exchange processing on the hash value corresponding to each updating frequency in the updating frequency sequence to obtain a second hash value sequence from the hash value exchange position corresponding to the second updating frequency and the last updating frequency in the hash value sequence, and the like.
The final hash value sequence is obtained, and the most useful hash value sequence is obtained by adjusting the characteristic value sequence capable of representing the unique information of the electronic seal, so that the unique information of each electronic seal can be reflected in the final hash value sequence, and the risk of hash collision is further effectively avoided.
And taking the final hash value sequence as a secret key, and encrypting the secret key by using a DES method to obtain an encrypted secret key.
This embodiment is completed.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. An electronic seal key management method, characterized in that the method comprises the following steps:
acquiring a binary image and a hash value sequence of the electronic seal;
performing expansion processing on the binary image to obtain a first sampling matrix and other multiple sampling matrixes, performing clustering processing on data points in each sampling matrix to obtain multiple clustering areas, calculating the density of each clustering area, and constructing a graph structure of each sampling matrix according to the density of each clustering area in each sampling matrix; obtaining the maximum merging scale of each sampling matrix according to the inclusion relation of the clustering area in each sampling matrix, and processing the graph structure of each sampling matrix according to the maximum merging scale of each sampling matrix to obtain an updated graph structure of each sampling matrix;
and (3) the clustering area in the first sampling matrix is called an initial area, a node vector sequence of each initial area is obtained according to the relation between the initial area and the nodes in the updating graph structure of each sampling matrix, a characteristic value sequence is obtained according to the node vector sequence of each initial area, the hash value sequence is adjusted according to the characteristic value sequence to obtain a key, and the key is encrypted to obtain an encrypted key.
2. The method for managing the electronic seal key according to claim 1, wherein the expanding the binary image to obtain the first sampling matrix and the other plurality of sampling matrices comprises the following specific steps:
taking a binary image of an electronic seal as a first sampling matrix, taking each data point in the first sampling matrix as a first basic unit, uniformly dividing the first sampling matrix into a plurality of first matrix blocks with a size of a x a first basic units, taking 1 for each data in the first matrix blocks when any data in the first matrix blocks is 1, and keeping the data in the first matrix blocks unchanged when each data in the first matrix blocks is 0, so as to realize expansion processing of the first matrix blocks and complete expansion processing of each first matrix block in the first sampling matrix to obtain a second sampling matrix;
and so on, in the k-1 th sampling matrixUniformly dividing a k-1 sampling matrix into a plurality of k-1 matrix blocks with the size of a being a basic unit of k-1, taking 1 for each data in the k-1 matrix block when any one data in the k-1 matrix block is 1, and keeping the data in the k-1 matrix block unchanged when each data in the k-1 matrix block is 0, so as to realize expansion treatment of the k-1 matrix block and complete expansion treatment of each k-1 matrix block in the k-1 sampling matrix to obtain the k sampling matrix; and obtaining a sampling matrix obtained by each expansion treatment until the size of the basic unit is larger than or equal to that of the sampling matrix, wherein a represents a preset size.
3. The method for managing the electronic seal key according to claim 1, wherein the clustering processing is performed on the data points in each sampling matrix to obtain a plurality of clustered areas, and the specific method comprises the following steps:
and for any sampling matrix, clustering the data points with the median value of 1 in the sampling matrix by using a DBSCAN clustering method to obtain a plurality of clustering areas.
4. The method for managing the electronic seal key according to claim 1, wherein the calculating the density of each cluster area comprises the following specific steps:
for any sampling matrix, acquiring a first number of data points in an area surrounded by the minimum bounding rectangle of each clustering area as each clustering area, acquiring a second number of data points with a median value of 1 in the area surrounded by the minimum bounding rectangle of each clustering area as each clustering area, and taking the ratio of the second number of each clustering area to the first number as the density of each clustering area.
5. The method for managing the electronic seal key according to claim 1, wherein the constructing the graph structure of each sampling matrix according to the density of each clustering area in each sampling matrix comprises the following specific steps:
for any one sampling matrix, taking each clustering area in the sampling matrix as a node of the sampling matrix, taking the density of each clustering area in the sampling matrix as a node value, taking the ratio of the node values of two nodes as the edge weight value of the two nodes, and constructing the graph structure of the sampling matrix by utilizing all the nodes of the sampling matrix.
6. The method for managing the electronic seal key according to claim 1, wherein the obtaining the maximum merging dimension of each sampling matrix according to the inclusion relation of the clustering area in each sampling matrix comprises the following specific steps:
and when the target area is different from the comparison area, the target area is used as a merging variable area of the target matrix, the comparison area of each merging variable area is used as a subarea of each merging variable area, any two subareas of each merging variable area form a subarea pair, the shortest path of corresponding nodes of two subareas in each subarea pair is acquired and is used as the shortest path of each subarea pair, the maximum value in the shortest path of all subareas in each merging variable area is used as the merging scale of each merging variable area, and the maximum value in the merging scale of all merging variable areas in the target matrix is used as the maximum merging scale of the target matrix.
7. The method for managing the electronic seal key according to claim 1, wherein the processing the graph structure of each sampling matrix according to the maximum merging scale of each sampling matrix to obtain the updated graph structure of each sampling matrix comprises the following specific steps:
and for any sampling matrix, taking the maximum merging scale of the sampling matrix as the Node range of the graph structure of the sampling matrix, and processing the graph structure of the sampling matrix by using a Node2Vec algorithm based on the Node range of the graph structure of the sampling matrix to obtain an updated graph structure of the sampling matrix.
8. The method for managing the electronic seal key according to claim 1, wherein the obtaining the node vector sequence of each initial area according to the relation between the initial area and the nodes in the updated graph structure of each sampling matrix comprises the following specific steps:
taking any initial area as an analysis area, acquiring a clustering area at the analysis area from each sampling matrix except the first sampling matrix, and marking the clustering area as a reference area of the analysis area; acquiring a reference area of each initial area; and acquiring the node vector of each node in the updated graph structure of each sampling matrix, acquiring the node vector of the node corresponding to the reference area of the analysis area, and forming the node vector sequence of the analysis area by the node vectors of all the reference areas of the analysis area.
9. The method for managing the electronic seal key according to claim 1, wherein the step of obtaining the feature value sequence from the node vector sequence of each initial area comprises the following specific steps:
and performing dimension reduction processing on the node vector sequence of each initial region by using a PCA algorithm to obtain a dimension reduction sequence of each initial region, taking the cosine similarity mean value of the dimension reduction sequence of each initial region and all other dimension reduction sequences as the characteristic value of each initial region, and forming the characteristic value sequence by the characteristic values of all the initial regions.
10. The method for managing the electronic seal key according to claim 1, wherein the step of adjusting the hash value sequence according to the feature value sequence to obtain the key comprises the following specific steps:
each element in the hash sequence is called a hash value, the ratio of the number of each hash value to the number of all hash values is used as the frequency of each hash value, the frequency values of all hash values and all characteristic values in the characteristic value sequence are matched by using a KM algorithm, the matched characteristic value of the frequency value of each hash value is obtained, and the matched characteristic value of the frequency is used as the updating frequency of each hash value;
and (3) carrying out ascending arrangement on the updating frequencies of all the hash values to obtain an updating frequency sequence, carrying out exchange processing on the hash value corresponding to each updating frequency in the updating frequency sequence according to the arrangement sequence of the updating frequency sequence to obtain a first hash value sequence from the hash value exchange position corresponding to the first updating frequency and the last updating frequency in the hash value sequence, carrying out exchange processing on the hash value corresponding to each updating frequency in the updating frequency sequence to obtain a second hash value sequence from the hash value exchange position corresponding to the second updating frequency and the last updating frequency in the hash value sequence, and the like.
CN202311293971.5A 2023-10-09 2023-10-09 Electronic seal key management method Active CN117034367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311293971.5A CN117034367B (en) 2023-10-09 2023-10-09 Electronic seal key management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311293971.5A CN117034367B (en) 2023-10-09 2023-10-09 Electronic seal key management method

Publications (2)

Publication Number Publication Date
CN117034367A true CN117034367A (en) 2023-11-10
CN117034367B CN117034367B (en) 2024-01-26

Family

ID=88632271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311293971.5A Active CN117034367B (en) 2023-10-09 2023-10-09 Electronic seal key management method

Country Status (1)

Country Link
CN (1) CN117034367B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815362A (en) * 2017-01-22 2017-06-09 福州大学 One kind is based on KPCA multilist thumbnail Hash search methods
CN111429337A (en) * 2020-02-28 2020-07-17 上海电力大学 Image hash acquisition method based on transform domain and shape characteristics
CN111787179A (en) * 2020-05-30 2020-10-16 上海电力大学 Image hash acquisition method, image security authentication method and device
US20200410304A1 (en) * 2019-06-26 2020-12-31 Huazhong University Of Science And Technology Method for valuation of image dark data based on similarity hashing
EP3840289A1 (en) * 2019-12-18 2021-06-23 Hahn-Schickard-Gesellschaft für angewandte Forschung e.V. Apparatus for obtaining a hash value associated with an object, object identifier, methods and computer program
CN113095380A (en) * 2021-03-26 2021-07-09 上海电力大学 Image hash processing method based on adjacent gradient and structural features
CN114244538A (en) * 2022-02-10 2022-03-25 南京信息工程大学 Digital watermark method for generating media content perception hash based on multiple attacks
CN115632780A (en) * 2022-12-23 2023-01-20 无锡弘鼎软件科技有限公司 Use management system and method for seal of Internet of things
CN116828203A (en) * 2023-08-30 2023-09-29 北京点聚信息技术有限公司 Intelligent encryption protection method for electronic seal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815362A (en) * 2017-01-22 2017-06-09 福州大学 One kind is based on KPCA multilist thumbnail Hash search methods
US20200410304A1 (en) * 2019-06-26 2020-12-31 Huazhong University Of Science And Technology Method for valuation of image dark data based on similarity hashing
EP3840289A1 (en) * 2019-12-18 2021-06-23 Hahn-Schickard-Gesellschaft für angewandte Forschung e.V. Apparatus for obtaining a hash value associated with an object, object identifier, methods and computer program
CN111429337A (en) * 2020-02-28 2020-07-17 上海电力大学 Image hash acquisition method based on transform domain and shape characteristics
CN111787179A (en) * 2020-05-30 2020-10-16 上海电力大学 Image hash acquisition method, image security authentication method and device
CN113095380A (en) * 2021-03-26 2021-07-09 上海电力大学 Image hash processing method based on adjacent gradient and structural features
CN114244538A (en) * 2022-02-10 2022-03-25 南京信息工程大学 Digital watermark method for generating media content perception hash based on multiple attacks
CN115632780A (en) * 2022-12-23 2023-01-20 无锡弘鼎软件科技有限公司 Use management system and method for seal of Internet of things
CN116828203A (en) * 2023-08-30 2023-09-29 北京点聚信息技术有限公司 Intelligent encryption protection method for electronic seal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁海华: "面向隐私保护的加密图像检索研究", 中国博士学位论文全文数据库 *

Also Published As

Publication number Publication date
CN117034367B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
Joseph et al. Retracted article: a multimodal biometric authentication scheme based on feature fusion for improving security in cloud environment
Liao et al. New cubic reference table based image steganography
CN106952212B (en) A kind of HOG image characteristics extraction algorithm based on vector homomorphic cryptography
CN107241182B (en) Privacy protection hierarchical clustering method based on vector homomorphic encryption
CN112597519B (en) Non-key decryption method based on convolutional neural network in OFDM encryption system
Kim et al. Efficient Privacy‐Preserving Fingerprint‐Based Authentication System Using Fully Homomorphic Encryption
CN111597574B (en) Parallel image encryption system and method based on spatial diffusion structure
Cho et al. Sphynx: A deep neural network design for private inference
Yin et al. GSAPSO-MQC: medical image encryption based on genetic simulated annealing particle swarm optimization and modified quantum chaos system
CN116226471B (en) Data storage method for homeland resource planning
CN112990276A (en) Federal learning method, device, equipment and storage medium based on self-organizing cluster
CN115037556B (en) Authorized sharing method for encrypted data in smart city system
Saeif et al. The day-after-tomorrow: On the performance of radio fingerprinting over time
CN116091394A (en) Deep learning-based insect type and number image recognition algorithm
CN116319110A (en) Data acquisition and management method for industrial multi-source heterogeneous time sequence data
CN118116554B (en) Medical image caching processing method based on big data processing
Yi et al. An algorithm of image encryption based on AES & Rossler hyperchaotic modeling
CN117034367B (en) Electronic seal key management method
Wang et al. A dynamic image encryption algorithm based on improved ant colony walking path thought
Ren et al. Reversible data hiding scheme in encrypted images based on homomorphic encryption and pixel value ordering
CN115861034B (en) Wireless routing data intelligent management system
Ahmad et al. A pixel-based encryption method for privacy-preserving deep learning models
Jaya Prakash et al. Improved reversible data hiding scheme employing dual image-based least significant bit matching for secure image communication using style transfer
CN108924379B (en) Digital image encryption method
CN107886463B (en) Digital image encryption method based on Chen system and cellular automaton

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
GR01 Patent grant