CN117544430B - Intelligent data encryption method and system - Google Patents

Intelligent data encryption method and system Download PDF

Info

Publication number
CN117544430B
CN117544430B CN202410033797.9A CN202410033797A CN117544430B CN 117544430 B CN117544430 B CN 117544430B CN 202410033797 A CN202410033797 A CN 202410033797A CN 117544430 B CN117544430 B CN 117544430B
Authority
CN
China
Prior art keywords
encrypted
data
sequence
pixel
semantic
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
Application number
CN202410033797.9A
Other languages
Chinese (zh)
Other versions
CN117544430A (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 Jiaxin Information Technology Co ltd
Original Assignee
Beijing Jiaxin 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 Jiaxin Information Technology Co ltd filed Critical Beijing Jiaxin Information Technology Co ltd
Priority to CN202410033797.9A priority Critical patent/CN117544430B/en
Publication of CN117544430A publication Critical patent/CN117544430A/en
Application granted granted Critical
Publication of CN117544430B publication Critical patent/CN117544430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • H04N1/448Rendering the image unintelligible, e.g. scrambling
    • H04N1/4486Rendering the image unintelligible, e.g. scrambling using digital data encryption

Abstract

The invention discloses an intelligent data encryption method and system, which relate to the technical field of intelligent encryption and acquire data to be encrypted; performing feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted; encrypting the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm to generate a public key and a private key; transmitting the low-dimensional representation of the data to be encrypted and the public key to a recipient; the receiver decrypts the low-dimensional representation of the data to be encrypted using a public key to obtain the low-dimensional representation of the data to be encrypted; and performing feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted. The low-dimensional representation of the data to be encrypted can be obtained by extracting and compressing the characteristics of the data to be encrypted, so that the dimension and complexity of the data are reduced, the encryption and decryption efficiency is improved, and the encryption strength and security can be enhanced by utilizing the semantic information of the data.

Description

Intelligent data encryption method and system
Technical Field
The present disclosure relates to the field of intelligent encryption technologies, and in particular, to an intelligent data encryption method and system.
Background
With the development of the internet, data security and privacy protection are increasingly emphasized. Data encryption is a common method of data protection that converts data into unreadable ciphertext, thereby preventing unauthorized access and tampering. However, conventional data encryption methods typically require encryption of the entire data, which can result in inefficiency in encryption and excessive ciphertext volume. In addition, the traditional data encryption method cannot effectively utilize semantic information of data, so that encryption strength and security are reduced.
Accordingly, an intelligent data encryption scheme is desired.
Disclosure of Invention
The present application has been made in order to solve the above technical problems. The embodiment of the application provides an intelligent data encryption method and system, which acquire data to be encrypted; performing feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted; encrypting the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm to generate a public key and a private key; transmitting the low-dimensional representation of the data to be encrypted and the public key to a recipient; the receiver decrypts the low-dimensional representation of the data to be encrypted using a public key to obtain the low-dimensional representation of the data to be encrypted; and performing feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted. In this way, the low-dimensional representation of the data to be encrypted can be obtained by extracting and compressing the characteristics of the data to be encrypted, so that the dimension and complexity of the data are reduced, and the encryption and decryption efficiency is improved. The encryption efficiency and the compression ratio can be improved, and the encryption strength and the security can be enhanced by utilizing the semantic information of the data.
In a first aspect, an intelligent data encryption method is provided, which includes:
acquiring data to be encrypted;
performing feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted;
encrypting the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm to generate a public key and a private key;
transmitting the low-dimensional representation of the data to be encrypted and the public key to a recipient;
the receiver decrypts the low-dimensional representation of the data to be encrypted using a public key to obtain the low-dimensional representation of the data to be encrypted;
and performing feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted.
In a second aspect, there is provided an intelligent data encryption system comprising:
the data to be encrypted acquisition module is used for acquiring data to be encrypted;
the feature extraction and compression module is used for carrying out feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted;
the encryption module is used for encrypting the low-dimensional representation of the data to be encrypted by using an asymmetric encryption algorithm to generate a public key and a private key;
the sending module is used for sending the low-dimensional representation of the data to be encrypted and the public key to a receiver;
the decryption module is used for decrypting the low-dimensional representation of the data to be encrypted by the receiver by using the public key so as to obtain the low-dimensional representation of the data to be encrypted;
and the feature restoration and decompression module is used for carrying out feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, 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 flowchart of an intelligent data encryption method according to an embodiment of the present application.
Fig. 2 is a schematic architecture diagram of an intelligent data encryption method according to an embodiment of the application.
Fig. 3 is a block diagram of an intelligent data encryption system according to an embodiment of the present application.
Fig. 4 is a schematic view of a scenario of an intelligent data encryption method according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Unless defined otherwise, all technical and scientific terms used in the examples of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present application.
In the description of the embodiments of the present application, unless otherwise indicated and defined, the term "connected" should be construed broadly, and for example, may be an electrical connection, may be a communication between two elements, may be a direct connection, or may be an indirect connection via an intermediary, and it will be understood by those skilled in the art that the specific meaning of the term may be understood according to the specific circumstances.
It should be noted that, the term "first\second\third" in the embodiments of the present application is merely to distinguish similar objects, and does not represent a specific order for the objects, it is to be understood that "first\second\third" may interchange a specific order or sequence where allowed. It is to be understood that the "first\second\third" distinguishing objects may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in sequences other than those illustrated or described herein.
Data encryption is a common data protection method, and by using a cryptographic algorithm to convert original data into unreadable ciphertext, unauthorized access and tampering are prevented, and the purpose of data encryption is to ensure the security of data during storage, transmission and processing. The data encryption uses a key to execute encryption and decryption operations, the encryption process takes plaintext data and the key as input, ciphertext data is generated through a cryptographic algorithm, the decryption process takes ciphertext data and the same key as input, and the original plaintext data is restored through a corresponding decryption algorithm.
Data encryption may be applied to a variety of data types including text, images, audio, video, and the like. Common data encryption algorithms include symmetric encryption algorithms and asymmetric encryption algorithms. The symmetric encryption algorithm uses the same secret key to carry out encryption and decryption operations, common symmetric encryption algorithms comprise DES (Data Encryption Standard), AES (Advanced Encryption Standard), IDEA (International Data Encryption Algorithm) and the like, and the symmetric encryption algorithm has the advantages of high encryption and decryption speed, but the security of the secret key needs to be ensured. The asymmetric encryption algorithm uses a pair of keys, namely a public key and a private key, to encrypt and decrypt, the public key can be disclosed for anyone to use, the private key can only be kept by the owner of the data, the common asymmetric encryption algorithm comprises RSA (Rivest-Shamir-Adleman), DSA (Digital Signature Algorithm) and the like, and the asymmetric encryption algorithm has the advantages of higher key security and slower encryption and decryption speed.
Data encryption plays an important role in protecting confidentiality of data, and can prevent an unauthorized visitor from reading sensitive data, and even if the data is stolen or leaked, plaintext data cannot be directly obtained. In addition, data encryption can also be used to verify the integrity of data, and by cryptographically hashing or digitally signing the data, it can be detected whether the data has been tampered with.
Conventional data encryption methods generally employ symmetric encryption or asymmetric encryption algorithms to encrypt the entire data. These methods suffer from several drawbacks, including inefficiency and lack of semantic security. Among them, the conventional data encryption method requires processing a large amount of data when encrypting the entire data, which results in low encryption and decryption efficiency, and particularly, when processing large-scale data or real-time communication, the overhead of encryption and decryption is more remarkable. Since conventional methods encrypt the entire data, the resulting ciphertext is typically much larger than the plaintext data, which increases the cost of data storage and transmission and may negatively impact the performance of the system. The conventional data encryption method only focuses on confidentiality of data, but ignores semantic information of the data, which means that even if the encrypted data cannot be cracked, an attacker can still acquire some information about the data by analyzing the mode, size and other metadata of the data, which may cause some privacy and security problems.
To solve the drawbacks of the conventional data encryption method, some new encryption techniques are proposed, such as: partial encryption techniques allow one portion of the data to be encrypted while maintaining the plaintext form of the other portion, which may reduce the overhead of encryption and decryption and may better utilize the semantic information of the data. For example, only the sensitive field or sensitive portion may be encrypted, while the other portion is kept in plaintext. The search encryption technology allows searching operations to be performed on encrypted data without decrypting the whole data set, so that the confidentiality of the data can be maintained, efficient searching and inquiring of the encrypted data can be realized, and the search encryption technology can be applied to scenes such as cloud computing, database, file storage and the like. Homomorphic encryption techniques allow computational operations to be performed on data in an encrypted state without decrypting the data, which enables computation and analysis to be performed on the encrypted data while maintaining confidentiality of the data. Homomorphic encryption technology has important significance in the fields of secure computing, privacy protection, data sharing and the like.
Fig. 1 is a flowchart of an intelligent data encryption method according to an embodiment of the present application. As shown in fig. 1, the intelligent data encryption method includes: 110, obtaining data to be encrypted; 120, performing feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted; 130, encrypting the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm to generate a public key and a private key; 140, transmitting the low-dimensional representation of the data to be encrypted and the public key to a receiver; 150, the receiver decrypts the low-dimensional representation of the data to be encrypted using the public key to obtain the low-dimensional representation of the data to be encrypted; and, 160, performing feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted.
In the step 110, the data to be encrypted is obtained, and the obtained data to be encrypted is ensured to be correct and complete. Appropriate security measures need to be taken during data transmission to prevent data from being tampered with or compromised. The data to be encrypted is obtained on the premise of carrying out subsequent encryption protection, so that confidentiality and integrity of the data can be protected.
In the step 120, the data to be encrypted is feature extracted and compressed to obtain a low-dimensional representation of the data to be encrypted. Appropriate feature extraction and compression methods are chosen to ensure that the low-dimensional representation is able to retain key information of the data and is not easily restored to the original data. By means of feature extraction and compression, the dimension of data can be reduced, the calculation cost of encryption and decryption is reduced, and the privacy and safety of the data can be protected.
In the step 130, the low-dimensional representation of the data to be encrypted is encrypted using an asymmetric encryption algorithm, generating a public key and a private key. A secure and reliable asymmetric encryption algorithm is selected and a public key and a private key of sufficient strength are generated, the private key needs to be kept well to ensure that only legitimate recipients can decrypt the data. The asymmetric encryption algorithm provides higher security, can protect data from being stolen and tampered with by unauthorized visitors, and the generated public key can be used for encrypting the data and the private key can be used for decrypting the data.
In the step 140, the low-dimensional representation of the data to be encrypted and the public key are transmitted to a recipient. Appropriate security measures, such as encrypted transmission or the use of secure channels, are taken during data transmission to prevent access to the data by unauthorized third parties. By sending the low-dimensional representation and the public key to the recipient, the recipient can decrypt the data using the public key and obtain the original low-dimensional representation.
In the step 150, the recipient decrypts the low-dimensional representation of the data to be encrypted using a public key to obtain the low-dimensional representation of the data to be encrypted. Ensuring that the recipient has the correct private key and taking appropriate security measures to prevent the private key from being obtained by an unauthorized visitor. The receiver decrypts the data using the private key, recovering the original low-dimensional representation so that the data can be further processed and analyzed.
In the step 160, feature restoration and decompression are performed on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted. Proper characteristic restoration and decompression methods are selected, and the integrity and accuracy of data are ensured. By means of feature restoration and decompression, the low-dimensional representation can be restored to original data to be encrypted, so that the data can be used for subsequent data processing and analysis.
The data encryption method based on the asymmetric encryption and the low-dimensional representation can provide higher security and efficiency, can reduce the dimension and the size of data through feature extraction and compression, reduces the calculation cost of encryption and decryption, and provides higher security for protecting the data from being stolen and tampered by unauthorized visitors. Meanwhile, the security and the correct use of the secret key are ensured, so that the confidentiality and the integrity of data are ensured.
Fig. 2 is a schematic architecture diagram of an intelligent data encryption method according to an embodiment of the application. As shown in fig. 2, performing feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted, including: firstly, carrying out blocking processing on the data to be encrypted to obtain a sequence of image blocks to be encrypted; then, extracting features of the sequence of the image blocks to be encrypted to obtain a sequence of semantic feature vectors of the image blocks to be encrypted; then, calculating a pseudo class center of the sequence of the semantic feature vectors of the image block to be encrypted, wherein the pseudo class center is a per-position mean value vector of the sequence of the semantic feature vectors of the image block to be encrypted; then, carrying out pixel-by-pixel semantic measurement on each image block semantic feature vector to be encrypted in the sequence of image block semantic feature vectors to be encrypted and the pseudo class center to obtain a sequence of pixel-by-pixel semantic measurement vectors; and finally, splicing the pseudo class center and the sequence of the pixel-by-pixel semantic metric vector to obtain a low-dimensional representation of the data to be encrypted.
Aiming at the technical problems, in the technical scheme of the application, an intelligent data encryption method is provided, which comprises the following steps: acquiring data to be encrypted; extracting and compressing the characteristics of the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted; encrypting the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm, such as RSA, ECC, elGamal, to generate a public key and a private key; transmitting the low-dimensional representation of the data to be encrypted and the public key to a recipient; the receiver decrypts the low-dimensional representation of the data to be encrypted using a public key to obtain the low-dimensional representation of the data to be encrypted; and performing feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted.
In particular, the scheme can obtain the low-dimensional representation of the data to be encrypted by extracting and compressing the characteristics of the data to be encrypted, so that the dimension and complexity of the data are reduced, and the encryption and decryption efficiency is improved. Meanwhile, important features are reserved through feature extraction, and the original data can be restored more accurately after decryption. Therefore, the encryption efficiency and the compression ratio can be improved, and the encryption strength and the security can be enhanced by utilizing the semantic information of the data.
Specifically, in order to achieve better data feature extraction and compression to obtain a low-dimensional representation of data, the technical concept of the application is to introduce a data processing and analyzing algorithm at the back end to analyze the data to be encrypted after the data to be encrypted is obtained, so that the feature information of the data to be encrypted is utilized to generate the low-dimensional representation of the data, and therefore the efficiency and quality of data encryption and decryption are improved.
More specifically, after the data to be encrypted, such as image data, is acquired, feature extraction is performed on the data to be encrypted to capture image semantic features in the data, so as to facilitate subsequent data compression and encryption. In particular, considering that the data amount of the data to be encrypted is large, for large-scale data to be encrypted, directly processing and encrypting the entire data may cause difficulty in calculation and storage. Meanwhile, pixels of different areas may have different characteristics and importance for the entire data to be encrypted, such as image data. Therefore, in order to better perform feature extraction and encryption on data, in the technical scheme of the application, after the data to be encrypted is further subjected to block processing to obtain a sequence of image blocks to be encrypted, the sequence of image blocks to be encrypted is passed through an image feature extractor based on a ViT model to obtain a sequence of semantic feature vectors of the image blocks to be encrypted. It should be appreciated that the ViT model-based image feature extractor may learn the semantic features and contextual associations of various local regions in the image data to be encrypted and ignore some redundancy and noise.
In a specific embodiment of the present application, feature extraction is performed on the sequence of image blocks to be encrypted to obtain a sequence of semantic feature vectors of the image blocks to be encrypted, including: and passing the sequence of the image blocks to be encrypted through an image feature extractor based on a ViT model to obtain the sequence of semantic feature vectors of the image blocks to be encrypted.
Then, consider that the sequence of image block semantic feature vectors to be encrypted contains semantic features of a plurality of image blocks, which have different degrees of importance. Meanwhile, in the sequence of semantic feature vectors of the image block to be encrypted, there may be some noise and redundant feature vectors, which may have an unnecessary influence on the encryption and decryption process. Therefore, in order to better capture the key semantic feature information of the data to be encrypted, so as to better perform low-dimensional representation and encryption processing, in the technical scheme of the application, a pseudo-class center of the sequence of the semantic feature vectors of the image block to be encrypted is further calculated, wherein the pseudo-class center is a per-position mean vector of the sequence of the semantic feature vectors of the image block to be encrypted. And then, calculating pixel-by-pixel semantic metric vectors between each image block semantic feature vector to be encrypted and the pseudo class center in the sequence of image block semantic feature vectors to be encrypted to obtain the sequence of pixel-by-pixel semantic metric vectors.
It should be appreciated that by computing the pseudo-class center, the dimensions of the data features to be encrypted may be reduced, i.e., the generated vector may occupy less memory space and may be less computationally complex than the original vector sequence, which may increase the efficiency of the encryption and decryption process. Meanwhile, the influence of noise and redundant feature vectors can be reduced by calculating the pseudo-class center, and more important key data semantic feature information is reserved, so that the method is beneficial to subsequent low-dimensional representation generation and encryption processing. In addition, by calculating the pixel-by-pixel semantic metric vector between each image block semantic feature vector to be encrypted and the pseudo-class center, the feature difference between each image block semantic feature and the pseudo-class center can be measured. Therefore, the difference characteristic information between the semantics of different image blocks and the central key characteristic can be captured, so that the image block characteristic information with larger difference degree with the data key characteristic is hidden, irrelevant noise and redundancy can be better filtered, and the efficiency of encryption and confidentiality processes is improved.
In a specific embodiment of the present application, performing pixel-by-pixel semantic measurement on each image block semantic feature vector to be encrypted in the sequence of image block semantic feature vectors to be encrypted and the pseudo class center to obtain a sequence of pixel-by-pixel semantic measurement vectors, including: and calculating pixel-by-pixel semantic metric vectors between each image block semantic feature vector to be encrypted and the pseudo class center in the sequence of image block semantic feature vectors to be encrypted to obtain the sequence of pixel-by-pixel semantic metric vectors.
More specifically, calculating a pixel-by-pixel semantic metric vector between each image block semantic feature vector to be encrypted and the pseudo class center in the sequence of image block semantic feature vectors to be encrypted to obtain the sequence of pixel-by-pixel semantic metric vectors, includes: calculating pixel-by-pixel semantic metric vectors between each image block semantic feature vector to be encrypted and the pseudo class center in the sequence of image block semantic feature vectors to be encrypted according to the following semantic metric formula to obtain the sequence of pixel-by-pixel semantic metric vectors; wherein, the semantic measurement formula is:
wherein,is the feature value of each position of the semantic feature vector of each image block to be encrypted in the sequence of semantic feature vectors of the image block to be encrypted,/a->Is the eigenvalue of each position of the pixel-by-pixel semantic metric vector between the pseudo-class centers,/>Is a feature value for each position of each pixel-wise semantic metric vector in the sequence of pixel-wise semantic metric vectors.
Further, the pseudo class center and the sequence of pixel-by-pixel semantic metric vectors are stitched to obtain a low-dimensional representation of the data to be encrypted. It should be appreciated that the sequence of pseudo-class centers and the pixel-wise semantic metric vector represent semantic expressions of the pseudo-class centers of a plurality of image data blocks to be encrypted in the data to be encrypted, respectively, and that the low-dimensional semantic expressions of the respective image data blocks to be encrypted differ with respect to the semantic expressions of the pseudo-class centers. By stitching them, different characteristic information can be fused together to form a comprehensive characteristic representation, i.e. a low-dimensional representation of the data to be encrypted. In this way, different characteristic information of the data to be encrypted can be comprehensively utilized to generate a low-dimensional representation of the data, so that the efficiency and quality of data encryption and decryption are improved.
In one embodiment of the present application, the intelligent data encryption method further includes a training step: for training the ViT model-based image feature extractor. The training step comprises the following steps: acquiring training data to be encrypted; performing blocking processing on the training data to be encrypted to obtain a sequence of training image blocks to be encrypted; passing the sequence of training image blocks to be encrypted through the ViT model-based image feature extractor to obtain a sequence of training image block semantic feature vectors to be encrypted; calculating a training pseudo-class center of the sequence of the training image block semantic feature vectors to be encrypted, wherein the training pseudo-class center is a training per-position mean value vector of the sequence of the training image block semantic feature vectors to be encrypted; carrying out pixel-by-pixel semantic measurement on each training image block semantic feature vector to be encrypted in the training image block semantic feature vector sequence to be encrypted and the training pseudo-class center to obtain a training pixel-by-pixel semantic measurement vector sequence; splicing the training pseudo-class center and the sequence of the training pixel-by-pixel semantic metric vector to obtain a low-dimensional representation of the training data to be encrypted; calculating the sequence of the semantic feature vector of the training image block to be encrypted and the loss function value of the training pseudo-class center; the ViT model-based image feature extractor is trained based on the loss function values.
In particular, in the technical solution of the present application, each training image block semantic feature vector to be encrypted in the sequence of training image block semantic feature vectors to be encrypted is used to represent a context semantic association feature representation based on an image transducer structure of each image block of training image data to be encrypted. And the pseudo class center of the sequence of training the semantic feature vectors of the image blocks to be encrypted is a training per-position mean value vector of the sequence of training the semantic feature vectors of the image blocks to be encrypted. Further, a training pixel-by-pixel semantic measurement vector between each training image block semantic feature vector in the sequence of training image block semantic feature vectors to be encrypted and the training pseudo-class center is calculated, so that the semantic expression difference of the low-dimensional semantic expression of each image data block to be encrypted relative to the pseudo-class center is represented. However, because the feature group density representation difference of each training image block semantic feature vector to be encrypted in the sequence of the training image block semantic feature vectors to be encrypted and the training pseudo-class center in the overall feature distribution dimension can affect the calculation accuracy of the training pixel-by-pixel semantic metric vector.
Therefore, the applicant of the present application considers that the consistency of the feature group density representation of each training image block semantic feature vector to be encrypted and the training pseudo-class center in the sequence of the training image block semantic feature vectors to be encrypted is improved, so that a loss function for the sequence of the training image block semantic feature vector to be encrypted and the training pseudo-class center is further introduced, and is expressed as: calculating a sequence of the semantic feature vectors of the training image block to be encrypted and a loss function value of the training pseudo-class center according to the following optimization formula; wherein, the optimization formula is:
wherein,is the first feature vector obtained by cascading the sequence of training the semantic feature vectors of the image block to be encrypted,/->Is the training pseudo-class center, +.>Is the length of the feature vector, and +.>Representing the square of the two norms of the vector, +.>Is a loss function value,/->Representing the calculation of a value of the natural exponent function raised to a power of a value, ">Representing per-position subtraction.
Here, the loss function performs group count attention based on feature group density, and performs adaptive attention of different density representation modes between a first feature vector obtained by cascading the sequence of training semantic feature vectors of the image block to be encrypted and the training pseudo-class center by recursively mapping the group count as output feature group density. By taking the model as a loss function to train the model, the model can avoid overestimation and underestimation aiming at different density modes under the characteristic distribution of the first characteristic vector obtained by cascading the sequence of the semantic characteristic vector of the image block to be encrypted and the training pseudo-type center, and learn the corresponding relation between the characteristic value distribution and the group density distribution, thereby realizing the consistency optimization of the characteristic group density representation between the first characteristic vector obtained by cascading the sequence of the semantic characteristic vector of the image block to be encrypted and the training pseudo-type center with different characteristic densities, and improving the calculation accuracy of the training pixel-by-pixel semantic metric vector. In this way, key features of the data to be encrypted can be utilized to generate a low-dimensional representation of the data, thereby reducing the dimensionality and complexity of the data, thereby improving the efficiency and quality of encryption and decryption, while enhancing the encryption strength and security.
In summary, the intelligent data encryption method according to the embodiments of the present application is illustrated, which obtains a low-dimensional representation of the data to be encrypted by extracting and compressing the features of the data to be encrypted, so as to reduce the dimension and complexity of the data and improve the encryption and decryption efficiency. Meanwhile, important features are reserved through feature extraction, and the original data can be restored more accurately after decryption. Therefore, the encryption efficiency and the compression ratio can be improved, and the encryption strength and the security can be enhanced by utilizing the semantic information of the data.
In one embodiment of the present application, FIG. 3 is a block diagram of an intelligent data encryption system according to an embodiment of the present application. As shown in fig. 3, an intelligent data encryption system 200 according to an embodiment of the present application includes: a data to be encrypted acquisition module 210, configured to acquire data to be encrypted; a feature extraction and compression module 220, configured to perform feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted; an encryption module 230, configured to encrypt the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm, to generate a public key and a private key; a transmitting module 240, configured to transmit the low-dimensional representation of the data to be encrypted and the public key to a receiver; a decryption module 250, configured to decrypt the low-dimensional representation of the data to be encrypted by the receiver using a public key to obtain the low-dimensional representation of the data to be encrypted; and a feature restoration and decompression module 260, configured to perform feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted.
In the intelligent data encryption system, the feature extraction and compression module includes: the blocking processing unit is used for carrying out blocking processing on the data to be encrypted to obtain a sequence of image blocks to be encrypted; the feature extraction unit is used for extracting features of the sequence of the image blocks to be encrypted to obtain a sequence of semantic feature vectors of the image blocks to be encrypted; the pseudo-class center calculating unit is used for calculating a pseudo-class center of the sequence of the semantic feature vectors of the image block to be encrypted, wherein the pseudo-class center is a per-position mean value vector of the sequence of the semantic feature vectors of the image block to be encrypted; the pixel-by-pixel semantic measurement unit is used for carrying out pixel-by-pixel semantic measurement on each image block semantic feature vector to be encrypted in the sequence of the image block semantic feature vectors to be encrypted and the pseudo class center so as to obtain a sequence of pixel-by-pixel semantic measurement vectors; and the splicing unit is used for splicing the pseudo class center and the sequence of the pixel-by-pixel semantic metric vector to obtain a low-dimensional representation of the data to be encrypted.
In the intelligent data encryption system, the feature extraction unit is configured to: and passing the sequence of the image blocks to be encrypted through an image feature extractor based on a ViT model to obtain the sequence of semantic feature vectors of the image blocks to be encrypted.
Here, it will be understood by those skilled in the art that the specific functions and operations of the respective units and modules in the above-described intelligent data encryption system have been described in detail in the above description of the intelligent data encryption method with reference to fig. 1 to 2, and thus, repetitive descriptions thereof will be omitted.
As described above, the intelligent data encryption system 200 according to the embodiment of the present application can be implemented in various terminal devices, such as a server or the like for intelligent data encryption. In one example, the intelligent data encryption system 200 according to embodiments of the present application may be integrated into a terminal device as a software module and/or hardware module. For example, the intelligent data encryption system 200 may be a software module in the operating system of the terminal device or may be an application developed for the terminal device; of course, the intelligent data encryption system 200 could equally be one of many hardware modules of the terminal device.
Alternatively, in another example, the intelligent data encryption system 200 and the terminal device may be separate devices, and the intelligent data encryption system 200 may be connected to the terminal device through a wired and/or wireless network and transmit the interactive information in a agreed data format.
Fig. 4 is a schematic view of a scenario of an intelligent data encryption method according to an embodiment of the present application. As shown in fig. 4, in this application scenario, first, data to be encrypted is acquired (e.g., C as illustrated in fig. 4); the acquired data to be encrypted is then input into a server (e.g., S as illustrated in fig. 4) deployed with an intelligent data encryption algorithm, wherein the server is capable of processing the data to be encrypted based on the intelligent data encryption algorithm to perform feature restoration and decompression on a low-dimensional representation of the data to be encrypted to obtain the data to be encrypted.
It is also noted that in the apparatus, devices and methods of the present application, the components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered as equivalent to the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (8)

1. An intelligent data encryption method, comprising:
acquiring data to be encrypted;
performing feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted;
encrypting the low-dimensional representation of the data to be encrypted using an asymmetric encryption algorithm to generate a public key and a private key;
transmitting the low-dimensional representation of the data to be encrypted and the public key to a recipient;
the receiver decrypts the low-dimensional representation of the data to be encrypted using a public key to obtain the low-dimensional representation of the data to be encrypted;
performing feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted;
the feature extraction and compression of the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted comprises the following steps:
performing blocking processing on the data to be encrypted to obtain a sequence of image blocks to be encrypted;
extracting features of the sequence of the image blocks to be encrypted to obtain a sequence of semantic feature vectors of the image blocks to be encrypted;
calculating a pseudo class center of the sequence of the image block semantic feature vectors to be encrypted, wherein the pseudo class center is a per-position mean value vector of the sequence of the image block semantic feature vectors to be encrypted;
carrying out pixel-by-pixel semantic measurement on each image block semantic feature vector to be encrypted in the sequence of image block semantic feature vectors to be encrypted and the pseudo class center to obtain a sequence of pixel-by-pixel semantic measurement vectors;
and splicing the pseudo class center and the sequence of the pixel-by-pixel semantic metric vector to obtain a low-dimensional representation of the data to be encrypted.
2. The method according to claim 1, wherein the feature extraction of the sequence of image blocks to be encrypted to obtain a sequence of semantic feature vectors of the image blocks to be encrypted comprises: and passing the sequence of the image blocks to be encrypted through an image feature extractor based on a ViT model to obtain the sequence of semantic feature vectors of the image blocks to be encrypted.
3. The method according to claim 2, wherein performing pixel-by-pixel semantic measurement on each image block semantic feature vector to be encrypted in the sequence of image block semantic feature vectors to be encrypted and the pseudo-class center to obtain the sequence of pixel-by-pixel semantic measurement vectors comprises: and calculating pixel-by-pixel semantic metric vectors between each image block semantic feature vector to be encrypted and the pseudo class center in the sequence of image block semantic feature vectors to be encrypted to obtain the sequence of pixel-by-pixel semantic metric vectors.
4. A method of intelligent data encryption according to claim 3, wherein computing pixel-by-pixel semantic metric vectors between each image block semantic feature vector to be encrypted and the pseudo-class center in the sequence of image block semantic feature vectors to be encrypted to obtain the sequence of pixel-by-pixel semantic metric vectors comprises:
calculating pixel-by-pixel semantic metric vectors between each image block semantic feature vector to be encrypted and the pseudo class center in the sequence of image block semantic feature vectors to be encrypted according to the following semantic metric formula to obtain the sequence of pixel-by-pixel semantic metric vectors;
wherein, the semantic measurement formula is: wherein,/> is the semanteme special of the image block to be encrypted The ith image block semantic feature vector to be encrypted in the sequence of syndrome vectors/> The characteristic value of the individual position is used,/> is said pseudo-class Pixel-by-pixel semantic metric vector between centers/> The characteristic value of the individual position is used,/> is the pixel-by-pixel semantic metric vector The ith pixel-by-pixel semantic metric vector in the sequence of (a)/> Characteristic values of the individual positions.
5. The intelligent data encryption method according to claim 4, further comprising the training step of: for training the ViT model-based image feature extractor.
6. The method of intelligent data encryption according to claim 5, wherein the training step comprises:
acquiring training data to be encrypted;
performing blocking processing on the training data to be encrypted to obtain a sequence of training image blocks to be encrypted;
passing the sequence of training image blocks to be encrypted through the ViT model-based image feature extractor to obtain a sequence of training image block semantic feature vectors to be encrypted;
calculating a training pseudo-class center of the sequence of the training image block semantic feature vectors to be encrypted, wherein the training pseudo-class center is a training per-position mean value vector of the sequence of the training image block semantic feature vectors to be encrypted;
carrying out pixel-by-pixel semantic measurement on each training image block semantic feature vector to be encrypted in the training image block semantic feature vector sequence to be encrypted and the training pseudo-class center to obtain a training pixel-by-pixel semantic measurement vector sequence;
splicing the training pseudo-class center and the sequence of the training pixel-by-pixel semantic metric vector to obtain a low-dimensional representation of the training data to be encrypted;
calculating the sequence of the semantic feature vector of the training image block to be encrypted and the loss function value of the training pseudo-class center;
the ViT model-based image feature extractor is trained based on the loss function values.
7. An intelligent data encryption system, comprising:
the data to be encrypted acquisition module is used for acquiring data to be encrypted;
the feature extraction and compression module is used for carrying out feature extraction and compression on the data to be encrypted to obtain a low-dimensional representation of the data to be encrypted;
the encryption module is used for encrypting the low-dimensional representation of the data to be encrypted by using an asymmetric encryption algorithm to generate a public key and a private key;
the sending module is used for sending the low-dimensional representation of the data to be encrypted and the public key to a receiver;
the decryption module is used for decrypting the low-dimensional representation of the data to be encrypted by the receiver by using the public key so as to obtain the low-dimensional representation of the data to be encrypted;
the feature restoration and decompression module is used for carrying out feature restoration and decompression on the low-dimensional representation of the data to be encrypted to obtain the data to be encrypted;
wherein, the characteristic extraction and compression module includes:
the blocking processing unit is used for carrying out blocking processing on the data to be encrypted to obtain a sequence of image blocks to be encrypted;
the feature extraction unit is used for extracting features of the sequence of the image blocks to be encrypted to obtain a sequence of semantic feature vectors of the image blocks to be encrypted;
the pseudo-class center calculating unit is used for calculating a pseudo-class center of the sequence of the semantic feature vectors of the image block to be encrypted, wherein the pseudo-class center is a per-position mean value vector of the sequence of the semantic feature vectors of the image block to be encrypted;
the pixel-by-pixel semantic measurement unit is used for carrying out pixel-by-pixel semantic measurement on each image block semantic feature vector to be encrypted in the sequence of the image block semantic feature vectors to be encrypted and the pseudo class center so as to obtain a sequence of pixel-by-pixel semantic measurement vectors;
and the splicing unit is used for splicing the pseudo class center and the sequence of the pixel-by-pixel semantic metric vector to obtain a low-dimensional representation of the data to be encrypted.
8. The intelligent data encryption system according to claim 7, wherein the feature extraction unit is configured to: and passing the sequence of the image blocks to be encrypted through an image feature extractor based on a ViT model to obtain the sequence of semantic feature vectors of the image blocks to be encrypted.
CN202410033797.9A 2024-01-10 2024-01-10 Intelligent data encryption method and system Active CN117544430B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410033797.9A CN117544430B (en) 2024-01-10 2024-01-10 Intelligent data encryption method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410033797.9A CN117544430B (en) 2024-01-10 2024-01-10 Intelligent data encryption method and system

Publications (2)

Publication Number Publication Date
CN117544430A CN117544430A (en) 2024-02-09
CN117544430B true CN117544430B (en) 2024-03-29

Family

ID=89790449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410033797.9A Active CN117544430B (en) 2024-01-10 2024-01-10 Intelligent data encryption method and system

Country Status (1)

Country Link
CN (1) CN117544430B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105553639A (en) * 2015-12-10 2016-05-04 北京理工大学 Multi-image encryption and decryption method based on compression sensing
CN106302452A (en) * 2016-08-15 2017-01-04 北京信安世纪科技有限公司 Data encryption and decryption method and apparatus
CN108881186A (en) * 2018-05-31 2018-11-23 西安电子科技大学 A kind of shared compressed sensing encryption method with Error Control of achievable key
CN114338241A (en) * 2022-03-10 2022-04-12 成都网讯优速信息技术有限公司 Data encryption and decryption method and device and network router adopting device
CN115801232A (en) * 2022-09-27 2023-03-14 杭州安恒信息技术股份有限公司 Private key protection method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9715710B2 (en) * 2007-03-30 2017-07-25 International Business Machines Corporation Method and system for forecasting using an online analytical processing database
JP7424503B2 (en) * 2020-09-18 2024-01-30 富士通株式会社 Judgment control program, device, and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105553639A (en) * 2015-12-10 2016-05-04 北京理工大学 Multi-image encryption and decryption method based on compression sensing
CN106302452A (en) * 2016-08-15 2017-01-04 北京信安世纪科技有限公司 Data encryption and decryption method and apparatus
CN108881186A (en) * 2018-05-31 2018-11-23 西安电子科技大学 A kind of shared compressed sensing encryption method with Error Control of achievable key
CN114338241A (en) * 2022-03-10 2022-04-12 成都网讯优速信息技术有限公司 Data encryption and decryption method and device and network router adopting device
CN115801232A (en) * 2022-09-27 2023-03-14 杭州安恒信息技术股份有限公司 Private key protection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN117544430A (en) 2024-02-09

Similar Documents

Publication Publication Date Title
Ahmed et al. An efficient chaos-based feedback stream cipher (ECBFSC) for image encryption and decryption
US8300828B2 (en) System and method for a derivation function for key per page
Wang et al. A compressive sensing based secure watermark detection and privacy preserving storage framework
US20160119119A1 (en) Compact fuzzy private matching using a fully-homomorphic encryption scheme
CN109840425B (en) File encryption method and device
JP3917679B2 (en) High bandwidth cryptographic system with low bandwidth cryptographic module
JP2014126865A (en) Device and method for encryption processing
CN102932650B (en) Video data integrity protection and verification method, equipment and system
Koppu et al. A fast enhanced secure image chaotic cryptosystem based on hybrid chaotic magic transform
Yang et al. Efficient Secure Data Provenance Scheme in Multimedia Outsourcing and Sharing.
Zhou et al. Separable reversible data hiding scheme in homomorphic encrypted domain based on NTRU
CN114357418A (en) Encryption authentication method, system, terminal device, server and storage medium
CN112380404B (en) Data filtering method, device and system
Atee et al. Cryptography and image steganography using dynamic encryption on LSB and color image based data hiding
CN117544430B (en) Intelligent data encryption method and system
Chen et al. Efficient and secure image authentication with robustness and versatility
Srivastava et al. Design and implementation of crypto based water marking techniques for EHR security
Bhardwaj et al. An efficient reversible and secure patient data hiding algorithm for E-healthcare
CN112288757B (en) Encryption domain image segmentation optimization method based on data packing technology
Jin et al. Efficient blind face recognition in the cloud
Hu et al. Security and privacy protocols for perceptual image hashing
Kayani et al. Efficient Region of Interest Encryption Based on a New Chaotic Map
Quist-Aphetsi et al. Validating of digital forensic images using SHA-256
Mantoro et al. Stegano-image as a digital signature to improve security authentication system in mobile computing
Ye et al. Research on Reversible Information Hiding Algorithm in Encrypted Domain Based on Histogram Translation

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