CN115150818B - Communication transmission encryption method based on artificial intelligence - Google Patents
Communication transmission encryption method based on artificial intelligence Download PDFInfo
- Publication number
- CN115150818B CN115150818B CN202211078209.0A CN202211078209A CN115150818B CN 115150818 B CN115150818 B CN 115150818B CN 202211078209 A CN202211078209 A CN 202211078209A CN 115150818 B CN115150818 B CN 115150818B
- Authority
- CN
- China
- Prior art keywords
- binary image
- initial
- structural element
- data
- target
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000005540 biological transmission Effects 0.000 title claims abstract description 28
- 238000004891 communication Methods 0.000 title claims abstract description 28
- 238000013473 artificial intelligence Methods 0.000 title claims abstract description 16
- 239000011159 matrix material Substances 0.000 claims abstract description 28
- 230000000877 morphologic effect Effects 0.000 claims abstract description 15
- 230000009466 transformation Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 3
- 230000007797 corrosion Effects 0.000 abstract description 8
- 238000005260 corrosion Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 11
- 239000006185 dispersion Substances 0.000 description 7
- 238000011084 recovery Methods 0.000 description 5
- 238000007906 compression Methods 0.000 description 3
- 230000006835 compression Effects 0.000 description 3
- 241001391944 Commicarpus scandens Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000010339 dilation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003628 erosive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/03—Protecting confidentiality, e.g. by encryption
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0006—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
- H04L1/0007—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/04—Key management, e.g. using generic bootstrapping architecture [GBA]
- H04W12/041—Key generation or derivation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20036—Morphological image processing
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Facsimile Transmission Control (AREA)
Abstract
The invention relates to a communication transmission encryption method based on artificial intelligence, belonging to the technical field of data transmission; the method comprises the following steps: acquiring a data sequence to be transmitted, dividing Huffman coded data obtained by converting the data sequence to be transmitted, arranging the divided data to obtain an initial two-dimensional data matrix, and representing different numerical values in the initial two-dimensional data matrix by using black points and white points respectively to obtain an initial binary image; randomly selecting a rectangular structural element when the morphological operation is carried out on the initial binary image; and encrypting the initial binary image by using the target structural element to obtain an encrypted binary image, and decrypting the encrypted binary image according to the target structural element to obtain a decrypted data sequence to be transmitted. The invention uses the randomly selected structural elements as the key to carry out corrosion and expansion operation on the binary image, thereby realizing encryption and decryption of data and ensuring the security of data transmission.
Description
Technical Field
The invention belongs to the technical field of data transmission, and particularly relates to a communication transmission encryption method based on artificial intelligence.
Background
In the wireless communication, a radio signal is used as an information carrier, so that the restriction of wired communication on the position of a communication terminal is eliminated, and the wireless communication is rapidly and deeply conscious of flexibility and portability, and has been rapidly developed in the last decade. However, as wireless communication technology develops and is more and more widely applied, security problems in wireless communication become more and more exposed. While wireless communication brings convenience to people, the openness of wireless channels makes security of wireless communication face a serious challenge.
At present, the most common encryption mode is HTTPS, and the HTTPS protocol is an HTTP channel with security as a target, and the security of a transmission process is ensured by transmission encryption and identity authentication on the basis of HTTP. Although the HTTPS protocol is widely used, the HTTPS protocol has a high cost, and meanwhile, the HTTPS protocol has a small security defect, and is hardly effective in hacking, denial of service attack, server hijacking, and the like, and thus, it is necessary to provide a new communication transmission encryption method.
Disclosure of Invention
The invention provides a communication transmission encryption method based on artificial intelligence, which is characterized in that a two-dimensional data matrix is obtained by reconstructing data, the two-dimensional data matrix is converted into a binary image, and the binary image is corroded and expanded by using a randomly selected structural element as a key, so that the encryption and decryption of the data are realized, and the safety of data transmission can be ensured.
The invention relates to a communication transmission encryption method based on artificial intelligence, which adopts the following technical scheme: the method comprises the following steps:
acquiring a data sequence to be transmitted, and carrying out Huffman coding on the data sequence to be transmitted to obtain Huffman coded data;
dividing the Huffman coded data into a plurality of character strings with equal length, arranging the character strings according to a dividing sequence to obtain an initial two-dimensional data matrix, and respectively representing different numerical values in the initial two-dimensional data matrix by using black points and white points to convert the numerical values into an initial binary image;
randomly selecting rectangular structural elements when morphological operation is carried out on the initial binary image, and recording the selected rectangular structural elements as target structural elements;
performing sliding window traversal on the initial binary image by using the target structure element, and marking the position, corresponding to the central point of the target structure element, on the initial binary image as a core node when all black points in the target structure element are completely matched with the black points on the initial binary image; replacing black points matched with the target structural elements except the core nodes on the initial binary image with white points, and marking the black points which are not matched with the initial binary image as mask points;
reconstructing by using the obtained core node and the mask point to obtain an encrypted binary image, and transmitting the encrypted binary image;
and after receiving the encrypted binary image, the receiving end decrypts the encrypted binary image by using the target structural element to obtain a decrypted binary image, and performs inverse transformation on the decrypted binary image to obtain a decrypted data sequence to be transmitted.
Further, the transmitting the encrypted binary image includes:
acquiring core node position data and mask point position data in the encrypted binary image;
and transmitting the encrypted binary image, the core node position data in the encrypted binary image and the mask point position data in the encrypted binary image together.
Further, the decrypting the encrypted binary image by using the target structural element to obtain a decrypted binary image includes:
after receiving the encrypted binary image at the receiving end, acquiring the position data of the core node and the position data of the mask point at the same time;
performing sliding window expansion operation on the position of each core node in the encrypted binary image by using the target structural element;
and during each sliding window expansion operation, replacing the position corresponding to the target structural element in the encrypted binary image with the target structural element, and reserving the mask point during replacement to obtain the decrypted binary image.
Further, the inverse transforming the decrypted binary image to obtain a decrypted data sequence to be transmitted includes:
replacing black points and white points in the decrypted binary image with numerical values to obtain a decrypted two-dimensional data matrix;
splicing the decrypted two-dimensional data matrix according to the arrangement sequence to obtain decrypted Huffman encoded data;
and carrying out inverse Huffman transform on the decrypted Huffman coded data to obtain a decrypted data sequence to be transmitted.
Further, the performing sliding window traversal on the initial binary image by using the target structural element, and when all black points in the target structural element are completely matched with black points on the initial binary image, marking a position on the initial binary image corresponding to a central point of the target structural element as a core node, includes:
matching the center point of the target structural element with a first point in the initial binary image, and traversing all points in the initial binary image by the target structural element in a sliding mode in sequence;
calculating the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image once every sliding of the target structural element, and considering that the target structural element is matched with the initial binary image when the matching degree is equal to 1;
and when the target structure element is matched with the initial binary image, marking the position corresponding to the central point of the target structure element on the initial binary image as a core node.
Further, a calculation formula of the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image is shown as follows:
wherein,representing the number of black points of the target structural element on the matching of the current position and the overlapping region in the binary image;representing the number of black points in the target structural element;and representing the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image.
Further, the randomly selecting a rectangular structural element when performing morphological operation on the initial binary image includes:
determining a rectangular structural element with the shape of the structural element being the minimum size when the initial binary image is subjected to morphological operation according to the characteristics of the initial binary image;
acquiring a connected domain formed by all black points in the initial binary image by adopting a region growing method;
calculating the discrete degree of the distribution of the black points in the binary image by utilizing the number of the black points contained in the maximum area covered by the rectangular structural element with the minimum size in the connected domain in a sliding manner;
and randomly selecting a rectangular structural element when the morphological operation is carried out on the initial binary image according to the discrete degree.
The invention has the beneficial effects that:
the invention provides a communication transmission encryption method based on artificial intelligence, which is characterized in that a two-dimensional data matrix is obtained by reconstructing data, the two-dimensional data matrix is converted into a binary image, the binary image is corroded by using a randomly selected structural element as a key to encrypt the data, the binary image is expanded by using the randomly selected structural element as the key to decrypt the data, and the structural element conforming to the two-dimensional data matrix can be selected as the key according to the characteristics of the two-dimensional data matrix, so that different keys corresponding to different transmission data are different, the randomness of an encryption process is realized, and the safety of the data transmission process can be ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating the general steps of an embodiment of an artificial intelligence based encryption method for communication transmission according to the present invention;
FIG. 2 is a schematic diagram of an initial two-dimensional data matrix according to the present invention;
FIG. 3 is a diagram illustrating an initial binary image according to the present invention;
FIG. 4 is a schematic diagram of one type of rectangular structural element in accordance with the present invention;
FIG. 5 is a schematic diagram of one type of rectangular structural element in the present invention;
FIG. 6 is a schematic diagram of one type of rectangular structural element in the present invention;
FIG. 7 is a schematic diagram of one type of rectangular structural element in the present invention;
FIG. 8 is a schematic diagram of one type of rectangular structural element in the present invention;
FIG. 9 is a schematic diagram of any connected domain;
FIG. 10 is a schematic diagram of the process of the present invention for performing dilation recovery using a target structural element;
fig. 11 is a schematic diagram of the whole process of data encryption and decryption in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the communication transmission encryption method based on artificial intelligence of the present invention is shown in fig. 1, and the method includes:
s1, acquiring a data sequence to be transmitted, and performing Huffman coding on the data sequence to be transmitted to obtain Huffman coded data.
The method compresses the collected data sequence to be transmitted, generally, the most common data compression algorithm is Huffman coding, only two values of 0 and 1 exist in data subjected to Huffman coding, the data structure performance after the Huffman coding is greatly improved, and as communication data are various and structured data and unstructured data, different types of data need to be unified in order to process different types of data, the communication data are subjected to Huffman coding compression before being encrypted, and the Huffman coding compression is lossless compression, so that original data cannot be lost.
S2, dividing the Huffman coded data into a plurality of character strings with equal length, arranging the character strings according to a dividing sequence to obtain an initial two-dimensional data matrix, and respectively representing different numerical values in the initial two-dimensional data matrix by using black points and white points to convert the numerical values into an initial binary image.
The data processed by the Huffman coding is a one-dimensional Huffman coding data sequence, and because the associated characters of a certain character of the one-dimensional Huffman coding data sequence are only related to the characters on the left and the right, the association of the data is not strong, and the data is easy to break when being encrypted, in order to increase the association between the data and increase the safety of data transmission, the one-dimensional Huffman coding data sequence is arranged, combined and spliced, and is converted into a two-dimensional data matrix form. Dividing a certain number of one-dimensional Huffman coded data into M binary character strings with the length of N, arranging the M divided binary character strings with the length of N according to a dividing sequence, and if the number of characters contained in the binary character strings with the length of N in the last division is not more than M, completing the division by 0. Dividing one-dimensional Huffman coding data sequence, and arranging according to the dividing sequence to obtain the size ofThe initial two-dimensional data matrix of (2) is the resulting initial two-dimensional data matrix as shown in fig. 2. Converting the initial two-dimensional data matrix into an initial binary image, the number in the initial two-dimensional data matrixWord 1 is represented by a black dot and the number 0 in the matrix by a white dot, as shown in fig. 3, which is a schematic diagram of the resulting initial binary image.
And S3, randomly selecting the rectangular structural elements when the morphological operation is carried out on the initial binary image, and recording the selected rectangular structural elements as target structural elements.
The initial binary image has a plurality of black points with the value of 1, the distribution of the black points is different, the distribution of the black points in the binary image obtained by partial data is more concentrated, and the distribution of the black points in the binary image obtained by partial data is more dispersed. And randomly selecting different target structural elements according to the distribution condition of the black points in the binary image, wherein the target structural elements are keys. If the distribution concentration and the distribution dispersion of the black points in the initial binary image all select the same key, the encryption process is single, and the confidentiality is poor. Therefore, more choices can be provided for the binary image with concentrated black point distribution so as to improve the randomness of encryption, and the improvement of the randomness is also improved along with the improvement of the confidentiality. Because the initial binary image consists of black points and white points, the shape of the structural element is as follows when the initial binary image is subjected to morphological operationA rectangular structural element of size. Commonly usedThe kinds of the large rectangular structural elements are many, and five different types of rectangular structural elements are shown in fig. 4, 5, 6, 7 and 8.
And if the binary images corresponding to different data are different, selecting a structural element for performing morphological operation on the initial binary image from the five different types of rectangular structural elements as a target structural element according to the characteristics of the initial binary image. Specifically, randomly selecting a rectangular structural element when morphological operation is performed on the initial binary image includes: determining a rectangular structural element with the shape of the structural element being the minimum size when the initial binary image is subjected to morphological operation according to the characteristics of the initial binary image; acquiring a connected domain formed by all black points in the initial binary image by adopting a region growing method; calculating the discrete degree of the distribution of the black points in the binary image by utilizing the number of the black points contained in the maximum area covered by the rectangular structural element with the minimum size in the connected domain in a sliding manner; and randomly selecting a rectangular structural element when the morphological operation is carried out on the initial binary image according to the discrete degree.
Calculating the dispersion degree of the black point distribution in the binary image: because the target structural elements are all selected in the inventionThe size of the rectangular structural element is larger than that of the rectangular structural element, so that the connected domain formed by the black points in the binary image can be completely satisfied with the condition that the size is larger than or equal to that of the rectangular structural elementThe more connected domains of the rectangular structural elements with the same size, the more concentrated the distribution of the black points in the binary image is, and the more discrete the black points are. Therefore, the connected domain formed by all black points in the binary image is obtained by adopting a region growing method, and the discrete degree is as follows:
wherein,representing the discrete degree of the distribution of the black points in the binary image; k denotes coincidence with full coverageThe number of connected domains of the large rectangular structural element; s represents the total number of black points in the binary image;representing connected domainsThe number of black dots contained in the maximum area covered by the sliding of the large rectangular structural element. As shown in FIG. 9, if the number of black dots in a certain communication area is 17, thenThe number of black points contained in the maximum area covered by the sliding of the large rectangular structural element is 12, thenIs 12.
After the dispersion degree of the black point distribution in the binary image is calculated, if the dispersion degree of the black point distribution in the binary image is large, the dispersion degree of the black point distribution in the rectangular structural element when the initial binary image is morphologically operated is selected to be larger, and if the dispersion degree of the black point distribution in the binary image is small, the dispersion degree of the black point distribution in the rectangular structural element when the initial binary image is morphologically operated is selected to be smaller.
S4, performing sliding window traversal on the initial binary image by using the target structure element, and marking the position, corresponding to the center point of the target structure element, on the initial binary image as a core node when all black points in the target structure element are completely matched with the black points on the initial binary image; and replacing black points matched with the target structural element except the core node on the initial binary image with white points, and marking the black points which are not matched with the initial binary image as mask points.
The method comprises the following steps of performing sliding window traversal on an initial binary image by using a target structure element, and marking a position corresponding to a central point of the target structure element on the initial binary image as a core node when all black points in the target structure element are completely matched with black points on the initial binary image, wherein the method comprises the following steps: matching the center point of the target structural element with a first point in the initial binary image, and traversing all points in the initial binary image by the target structural element in a sliding mode in sequence; calculating the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image once every sliding of the target structural element, and considering that the target structural element is matched with the initial binary image when the matching degree is equal to 1; and when the target structure element is matched with the initial binary image, marking the position corresponding to the central point of the target structure element on the initial binary image as a core node.
The calculation formula of the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image is shown as the following formula:
wherein,representing the number of black points of the target structural element on the matching of the current position and the overlapping region in the binary image;representing the number of black points in the target structural element;and representing the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image. When the temperature is higher than the set temperatureWhen the number of the target structural elements is 1, the target structural elements are matched with the initial binary image at the position, and at the moment, the positions, corresponding to the center points of the target structural elements, on the initial binary image are marked as core nodes. And traversing all points in the binary image by using the target structure element sliding window to obtain n core nodes.
All core nodes in the initial binary image have been acquired in this step. And performing sliding window corrosion operation on the initial binary image by using the target structural element, only preserving core nodes in the initial binary image, and replacing all the other black points with white points. When the target structural element is adopted to perform expansion recovery on the corroded image, it can be found that part of black spots in the recovered initial binary image are lost and cannot be recovered, and data loss is caused by part of loss at the moment, so that in order to ensure the integrity of original data, a mask needs to be added to the original data, and the problem that the binary image cannot be recovered when the selected target structural element is adopted to perform sliding window corrosion operation on the binary image is solved.
Through analysis, the expansion recovery is carried out based on the core node when the target structural element is adopted for expansion recovery, namely when the core node is taken as a central point,the addition of black dots to the window of the large and small target structural elements, as shown in fig. 10, is a process of expansion recovery using the target structural elements. As shown in fig. 11, the whole process of encrypting and decrypting data is completed. The method comprises the steps that core node data are obtained after an initial binary image is subjected to target structure element corrosion operation, expansion operation is carried out after the core node and a target structure element act to obtain a decrypted binary image, at the moment, it is found that black points of gray parts in the decrypted image are lost, data identical to original data cannot be obtained after data are restored, and therefore the fact that encryption of the black points of the gray positions is damaged during encryption needs to be achieved, the positions of the points need to be obtained first, a mask needs to be produced, the points need not be processed during encryption, therefore, superposition operation needs to be carried out on the initial binary image according to the generated mask, namely, the positions corresponding to the mask points are marked, the structure element does not process when the mask points are covered by the initial binary image during encryption, and the mask points serve as white points to be processed.
The specific mask point acquisition process comprises the following steps: matching the center point of the target structural element with a first point in the initial binary image to carry out corrosion operation on the initial binary image; when each black point in the target structural element and the corresponding position on the initial binary image are all black points, namely the target structural element is matched with the initial binary image, and the points on the initial binary image corresponding to each black point in the target structural element are replaced by white points; when the corresponding positions of each black point in the target structural element and the initial binary image are not the black points, namely the target structural element is not matched with the initial binary image, the corrosion operation is not performed on the initial binary image; according to the step of carrying out corrosion operation on the first point in the initial binary image by using the target structure element, carrying out sliding window corrosion operation on each point in the initial binary image by using the target structure element to obtain a corroded binary image, marking the residual black points in the corroded binary image as mask points, namely replacing the black points matched with the target structure element in the initial binary image with white points, and marking the black points which are not matched in the initial binary image as the mask points.
And S5, reconstructing by using the obtained core node and the mask point to obtain an encrypted binary image, and transmitting the encrypted binary image.
The transmission of the encrypted binary image includes: acquiring core node position data and mask point position data in the encrypted binary image; and transmitting the encrypted binary image, the core node position data in the encrypted binary image and the mask point position data in the encrypted binary image together.
The core node and the mask point are obtained in the step S4, the obtained core node and the mask point are used for reconstruction to obtain the encrypted binary image, and the encrypted binary image is transmitted.
And S6, after receiving the encrypted binary image, the receiving end decrypts the encrypted binary image by using the target structural element to obtain a decrypted binary image, and performs inverse transformation on the decrypted binary image to obtain a decrypted data sequence to be transmitted.
The method for decrypting the encrypted binary image by using the target structural element to obtain the decrypted binary image comprises the following steps: after receiving the encrypted binary image at the receiving end, acquiring core node position data and mask point position data at the same time; performing sliding window expansion operation on the position of each core node in the encrypted binary image by using the target structural element; and during each sliding window expansion operation, replacing the position corresponding to the target structural element in the encrypted binary image with the target structural element, and reserving the mask point during replacement to obtain the decrypted binary image.
The inverse transformation of the decrypted binary image to obtain a decrypted data sequence to be transmitted includes: replacing black points and white points in the decrypted binary image with numerical values to obtain a decrypted two-dimensional data matrix; splicing the decrypted two-dimensional data matrix according to the arrangement sequence to obtain decrypted Huffman encoded data; and carrying out inverse Huffman transform on the decrypted Huffman coded data to obtain a decrypted data sequence to be transmitted.
In summary, the present invention provides an artificial intelligence based communication transmission encryption method, which reconstructs data to obtain a two-dimensional data matrix, converts the two-dimensional data matrix into a binary image, and performs erosion and expansion operations on the binary image by using a randomly selected structural element as a key, thereby implementing encryption and decryption of data and ensuring security of data transmission.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (7)
1. A communication transmission encryption method based on artificial intelligence is characterized by comprising the following steps:
acquiring a data sequence to be transmitted, and performing Huffman coding on the data sequence to be transmitted to obtain Huffman coded data;
dividing the Huffman coded data into a plurality of character strings with equal length, arranging the character strings according to a dividing sequence to obtain an initial two-dimensional data matrix, and respectively representing different numerical values in the initial two-dimensional data matrix by using black points and white points to convert the numerical values into an initial binary image;
randomly selecting rectangular structural elements when morphological operation is carried out on the initial binary image, and recording the selected rectangular structural elements as target structural elements;
performing sliding window traversal on the initial binary image by using the target structure element, and marking the position, corresponding to the central point of the target structure element, on the initial binary image as a core node when all black points in the target structure element are completely matched with the black points on the initial binary image; replacing black points matched with the target structural elements except the core nodes on the initial binary image with white points, and marking the black points which are not matched with the initial binary image as mask points;
reconstructing by using the obtained core node and the mask point to obtain an encrypted binary image, and transmitting the encrypted binary image;
and after receiving the encrypted binary image, the receiving end decrypts the encrypted binary image by using the target structural element to obtain a decrypted binary image, and performs inverse transformation on the decrypted binary image to obtain a decrypted data sequence to be transmitted.
2. The artificial intelligence based communication transmission encryption method according to claim 1, wherein the transmitting the encrypted binary image comprises:
acquiring core node position data and mask point position data in the encrypted binary image;
and transmitting the encrypted binary image, the core node position data in the encrypted binary image and the mask point position data in the encrypted binary image together.
3. The artificial intelligence based communication transmission encryption method according to claim 2, wherein the decrypting the encrypted binary image with the target structural element to obtain the decrypted binary image includes:
after receiving the encrypted binary image at the receiving end, acquiring core node position data and mask point position data at the same time;
performing sliding window expansion operation on the position of each core node in the encrypted binary image by using the target structural element;
and during each sliding window expansion operation, replacing the position corresponding to the target structural element in the encrypted binary image with the target structural element, and reserving the mask point during replacement to obtain the decrypted binary image.
4. The artificial intelligence based communication transmission encryption method according to claim 3, wherein the inverse transformation of the decrypted binary image to obtain the decrypted data sequence to be transmitted includes:
replacing black points and white points in the decrypted binary image with numerical values to obtain a decrypted two-dimensional data matrix;
splicing the decrypted two-dimensional data matrix according to the arrangement sequence to obtain decrypted Huffman encoded data;
and carrying out inverse Huffman transform on the decrypted Huffman coded data to obtain a decrypted data sequence to be transmitted.
5. The method according to claim 1, wherein the performing a sliding window traversal on the initial binary image by using the target structure element, and when all black points in the target structure element are completely matched with black points on the initial binary image, marking a position on the initial binary image corresponding to a center point of the target structure element as a core node comprises:
matching the center point of the target structural element with a first point in the initial binary image, and traversing all points in the initial binary image by the target structural element in a sliding mode in sequence;
calculating the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image once each sliding of the target structural element, and considering that the target structural element is matched with the initial binary image when the matching degree is equal to 1;
and when the target structure element is matched with the initial binary image, marking the position corresponding to the central point of the target structure element on the initial binary image as a core node.
6. The artificial intelligence based communication transmission encryption method according to claim 5, wherein the calculation formula of the matching degree of the black point position in the target structure element and the corresponding position on the initial binary image is as follows:
wherein,representing the number of black points of the target structural element on the matching of the current position and the overlapping region in the binary image;representing the number of black points in the target structural element;and representing the matching degree of the black point position in the target structural element and the corresponding position on the initial binary image.
7. The artificial intelligence based communication transmission encryption method according to claim 1, wherein the randomly selecting rectangular structural elements for morphological operations on the initial binary image comprises:
determining a rectangular structural element with the shape of the structural element being the minimum size when the initial binary image is subjected to morphological operation according to the characteristics of the initial binary image;
acquiring a connected domain formed by all black points in the initial binary image by adopting a region growing method;
calculating the discrete degree of the distribution of the black points in the binary image by utilizing the number of the black points contained in the maximum area covered by the rectangular structural element with the minimum size in the connected domain in a sliding manner;
and randomly selecting a rectangular structural element when the morphological operation is carried out on the initial binary image according to the discrete degree.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211078209.0A CN115150818B (en) | 2022-09-05 | 2022-09-05 | Communication transmission encryption method based on artificial intelligence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211078209.0A CN115150818B (en) | 2022-09-05 | 2022-09-05 | Communication transmission encryption method based on artificial intelligence |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115150818A CN115150818A (en) | 2022-10-04 |
CN115150818B true CN115150818B (en) | 2022-11-04 |
Family
ID=83415317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211078209.0A Active CN115150818B (en) | 2022-09-05 | 2022-09-05 | Communication transmission encryption method based on artificial intelligence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115150818B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115580865B (en) * | 2022-11-22 | 2023-03-10 | 南京智轩诚网络科技有限公司 | Artificial intelligence-based 5G communication transmission encryption system and method |
CN115861034B (en) * | 2023-02-20 | 2023-06-20 | 深圳市欣博跃电子有限公司 | Wireless routing data intelligent management system |
CN115879138B (en) * | 2023-02-27 | 2023-06-27 | 北京厚方科技有限公司 | Lightweight data encryption method for chip |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006333140A (en) * | 2005-05-26 | 2006-12-07 | Canon Inc | Image processing apparatus and image processing method |
EP2106119A2 (en) * | 2008-03-25 | 2009-09-30 | Fujitsu Limited | Image encryption apparatus and image decryption apparatus |
WO2010046104A2 (en) * | 2008-10-23 | 2010-04-29 | University Of Ulster | An encryption method |
CN103414549A (en) * | 2013-07-16 | 2013-11-27 | 广东工业大学 | QR two-dimensional code binary image partition-based key varying chaotic encryption method |
WO2020029334A1 (en) * | 2018-08-08 | 2020-02-13 | 山东科技大学 | Visual encryption method for grayscale image |
WO2021066163A1 (en) * | 2019-10-04 | 2021-04-08 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device |
CN114863352A (en) * | 2022-07-07 | 2022-08-05 | 光谷技术有限公司 | Personnel group behavior monitoring method based on video analysis |
-
2022
- 2022-09-05 CN CN202211078209.0A patent/CN115150818B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006333140A (en) * | 2005-05-26 | 2006-12-07 | Canon Inc | Image processing apparatus and image processing method |
EP2106119A2 (en) * | 2008-03-25 | 2009-09-30 | Fujitsu Limited | Image encryption apparatus and image decryption apparatus |
WO2010046104A2 (en) * | 2008-10-23 | 2010-04-29 | University Of Ulster | An encryption method |
CN103414549A (en) * | 2013-07-16 | 2013-11-27 | 广东工业大学 | QR two-dimensional code binary image partition-based key varying chaotic encryption method |
WO2020029334A1 (en) * | 2018-08-08 | 2020-02-13 | 山东科技大学 | Visual encryption method for grayscale image |
WO2021066163A1 (en) * | 2019-10-04 | 2021-04-08 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device |
CN114863352A (en) * | 2022-07-07 | 2022-08-05 | 光谷技术有限公司 | Personnel group behavior monitoring method based on video analysis |
Also Published As
Publication number | Publication date |
---|---|
CN115150818A (en) | 2022-10-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115150818B (en) | Communication transmission encryption method based on artificial intelligence | |
Fu et al. | Effective reversible data hiding in encrypted image with adaptive encoding strategy | |
CN112202984B (en) | Ciphertext domain reversible information hiding method based on error correction redundancy | |
CN115694784B (en) | Data security storage method | |
CN116032474B (en) | Safety protection system based on big data computer network | |
CN110086616B (en) | Forward one-time pad secret communication method based on wireless channel | |
CN114640523B (en) | Computer data security encryption method and system | |
CN112202511A (en) | Physical layer key generation method and system based on channel characteristics | |
CN115865431A (en) | Network security sharing method for private data | |
Zeng et al. | Cryptanalyzing a novel couple images encryption algorithm based on DNA subsequence operation and chaotic system | |
CN113114869A (en) | Ciphertext domain high-capacity image reversible data hiding method based on MSB prediction | |
Xu et al. | Reversible data hiding with hierarchical block variable length coding for cloud security | |
CN117596346B (en) | Cloud data encryption transmission method and device | |
Raghuvanshi et al. | Investigation of piecewise linear chaotic map as a diffusion model for image encryption | |
CN114239779A (en) | Data transmission method, transmission system, acquisition equipment and receiving equipment | |
Ren et al. | Reversible data hiding scheme in encrypted images based on homomorphic encryption and pixel value ordering | |
CN105718978B (en) | QR code generation method and device, and decoding method and device | |
CN117527984A (en) | Image encryption method based on sine and cosine two-dimensional chaotic system | |
US20020136400A1 (en) | R-conversion encryption method and system | |
Ahmad | Cryptanalysis of chaos based secure satellite imagery cryptosystem | |
CN115103080B (en) | Image encryption method and system based on DNA triploid variation | |
CN114697671B (en) | Building engineering quality management system | |
Xu | Cryptanalysis of an image encryption algorithm based on dna sequence operation and hyper-chaotic system | |
CN115834163A (en) | Method, device, equipment and storage medium for generating secret key of encrypted data | |
Bartwal et al. | Lossless and Reversible Data Hiding in Encrypted Images With Public Key Cryptography. |
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 |