A data compression, encryption and decoding processing method, system and medium
By performing analog-to-digital conversion and sparse transformation of the original analog signal, using encryption description tags to build an encryption framework, and using cross-domain focus encoding method, the problems of high data entropy and decoding complexity after encryption are solved, and more efficient data transmission and Safe decoding.
Patent Information
- Application Number
- CN202411364741.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The existing encrypted data compression methods have high data entropy after encryption, resulting in unsatisfactory compression rate and increased decoding complexity, and are susceptible to noise interference and packet loss during transmission.
By performing analog-to-digital conversion, sparse transformation and encryption processing on the original analog signal, a data encryption framework is constructed using the encryption description tag, and a cross-domain focus encoding method based on the Transformer structure is adopted to encrypt and decode the encrypted signal, reducing the amount of data reconstruction calculation .
It improves the targeted and fast decoding of encrypted signals, enhances data transmission security, reduces the amount of data reconstruction calculations, and improves data transmission quality.
Smart Images

Figure CN118900204B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and more specifically, to a data compression, encryption and decoding processing method, system and medium. Background Art
[0002] The encrypted data compression theory is a new data encryption transmission method proposed by Mark Johnson, Prakash Ishwar and others in 2004. The encryption methods mainly include adding pseudo-random codes or random scrambling. Adding pseudo-random codes mainly achieves the encryption effect by adding noise-like disturbances to the data pixel values, while random scrambling is to scramble the pixel values according to a certain rule so that the scrambled data is as different from the original data as possible to achieve the encryption effect. The encrypted data compression method is different from the traditional data encoding method of compressing first and then encrypting. It is to encode and quantize the encrypted data at the encoding end, and then reconstruct it at the decoding end after transmission. Therefore, the encoding part does not need to know the encryption method or key, so as to better ensure the security of the data at the encoding end and during the transmission process, and meet the requirements of data compression.
[0003] However, the disadvantage of this method is that the encrypted data usually has a higher entropy, which means that it may not be easy to compress effectively, the compression rate may not be as expected, and the decoding complexity is increased, and a lot of time is needed for decoding calculations. At the same time, if there is noise interference or packet loss during the transmission process, the data transmission quality will be seriously degraded.
[0004] Therefore, an optimized data compression, encryption and decoding processing method is desired. Summary of the invention
[0005] The present invention provides a data compression, encryption and decoding processing method, system and medium, which enable better data transmission by adding encryption description tags, encrypt and decode signals through new constraints, make the decoding of encrypted signals more targeted and quick, and greatly reduce the calculation amount of data reconstruction while ensuring data security.
[0006] In a first aspect, a method for data compression, encryption and decoding includes: obtaining an original analog signal; performing analog-to-digital conversion on the original analog signal to obtain a digital signal; performing sparse transformation on the digital signal to obtain a sparse signal; encrypting the sparse signal to obtain an encrypted signal; and transmitting the encrypted signal to a data receiving end.
[0007] In a possible implementation, at the data receiving end, the data compression, encryption and decoding processing method includes: reconstructing and decoding the encrypted signal to obtain a decrypted sparse signal; performing a sparse inverse transform on the decrypted sparse signal to obtain a decrypted digital signal; and performing a digital-to-analog conversion on the decrypted digital signal to obtain a decrypted original analog signal.
[0008] In one possible implementation, the sparse signal is encrypted to obtain an encrypted signal, including: using a compression matrix to sample and compress the sparse signal to obtain a compressed signal; using an empty matrix to encrypt the compressed signal to obtain the encrypted signal, wherein each column vector in the empty matrix is an encrypted description label vector.
[0009] In a possible implementation, the compressed signal is encrypted using an empty matrix to obtain the encrypted signal, including: using the compressed signal as a query vector and the empty matrix as an initial key matrix, and performing cross-domain attention encoding on the compressed signal and the empty matrix based on local correlation enhancement of the key matrix to obtain the encrypted signal.
[0010] In a possible implementation, the compressed signal is used as a query vector and the empty matrix is used as an initial key matrix, and the compressed signal and the empty matrix are encoded with cross-domain attention based on local correlation enhancement of the key matrix to obtain the encrypted signal, including: based on the heterogeneity between the compressed signal and each encrypted description label vector in the empty matrix, local correlation enhancement is performed on the empty matrix to obtain an updated key matrix; and a cross-domain attention query based on a self-attention mechanism is performed on the compressed signal and the updated key matrix to obtain the encrypted signal.
[0011] In a possible implementation, based on the heterogeneity between the compressed signal and each encrypted description label vector in the empty matrix, the empty matrix is locally associated with the enhanced to obtain an updated key matrix, including: calculating the distribution heterogeneity measurement factor between the compressed signal and each encrypted description label vector in the empty matrix to obtain a set of distribution heterogeneity measurement factors; comparing each distribution heterogeneity measurement factor in the set of distribution heterogeneity measurement factors with a predetermined threshold, and in response to the distribution heterogeneity measurement factor being less than the predetermined threshold, using the mean vector between the encrypted description label vector corresponding to the distribution heterogeneity measurement factor and the compressed signal as the updated column vector to obtain the updated key matrix.
[0012] In a possible implementation, the distribution heterogeneity measurement factor between the compressed signal and each encrypted description label vector in the empty matrix is calculated to obtain a set of distribution heterogeneity measurement factors, including: extracting the association features between the compressed signal and each encrypted description label vector in the empty matrix respectively to obtain a set of compressed signal-encrypted description association feature vectors; calculating the energy coefficient of each compressed signal-encrypted description association feature vector in the set of compressed signal-encrypted description association feature vectors to obtain the set of distribution heterogeneity measurement factors.
[0013] In one possible implementation, a cross-domain attention query based on a self-attention mechanism is performed on the compressed signal and the updated key matrix to obtain the encrypted signal, including: using a value embedding matrix to process the compressed signal to obtain a value vector; using the compressed signal as a query vector, using each column vector in the updated key matrix as a key vector, inputting the query vector, the key vector and the value vector into a cross-domain attention query module based on a Transformer structure to obtain a set of compressed signal-encrypted description cross-domain query attention vectors; calculating the positional mean vector of the set of compressed signal-encrypted description cross-domain query attention vectors to obtain the encrypted signal.
[0014] In a second aspect, a data compression, encryption and decoding processing system is provided, comprising: one or more memories for storing instructions; and one or more processors for calling and running the instructions from the memories to execute the data compression, encryption and decoding processing method.
[0015] In a third aspect, a medium is provided, comprising: a data compression, encryption and decoding processing program is stored on the medium, and when the data compression, encryption and decoding processing program is executed by a processor, the data compression, encryption and decoding processing method described in the first aspect is implemented.
[0016] The present invention provides a data compression, encryption and decoding processing method, system and medium, firstly, the original analog signal is converted into a digital signal, and the digital signal obtained after the conversion is obtained by sparse representation to obtain a sparse signal, then a data encryption framework is constructed using multiple encryption description tags, the sparse signal is compressed and encrypted in a description label matrix to obtain an encrypted signal, and then the encryption algorithm reconstruction equation is set to solve the encryption algorithm reconstruction equation using constraints to obtain a decoded signal. In this way, by adding encryption description tags, data can be better transmitted, and the signal is encrypted and decoded by new constraints, so that the decoding of the encrypted signal is more targeted and quick, which greatly reduces the calculation amount of data reconstruction while ensuring data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0018] Figure 1 The present invention is a schematic flowchart of a method for data compression, encryption and decoding according to an embodiment of the present invention.
[0019] Figure 2 A data flow diagram of a data compression, encryption and decoding processing method according to an embodiment of the present invention.
[0020] Figure 3 The present invention is a schematic flowchart of a method for processing data compression, encryption and decoding at the data receiving end according to an embodiment of the present invention.
[0021] Figure 4 This is a schematic flow chart of encrypting the sparse signal to obtain an encrypted signal in the data compression, encryption and decoding processing method according to an embodiment of the present invention.
[0022] Figure 5 In the data compression, encryption and decoding processing method of an embodiment of the present invention, the compressed signal is used as a query vector, and the empty matrix is used as an initial key matrix, and the compressed signal and the empty matrix are subjected to cross-domain attention encoding based on local correlation enhancement of the key matrix to obtain a schematic flow chart of the encrypted signal.
[0023] Figure 6 A flowchart of another embodiment of the data compression, encryption and decoding processing method of the present invention;
[0024] Figure 7 Establish a flow chart for the encryption framework of the present invention;
[0025] Figure 8 The encryption framework of the present invention describes the encoding and decoding framework diagram;
[0026] Fig. 9 1 is a peak signal-to-noise ratio comparison diagram in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work also fall within the scope of protection of the present invention.
[0028] Traditional data encryption methods often encrypt data after compressing it. In this way, the encoder needs to know the specific details of encryption, including encryption methods and keys, which increases the security risks of data during transmission to a certain extent. In contrast, the encrypted data compression method encodes and quantizes the data after it is encrypted. In this way, the encoder does not need to know the specific encryption details, thereby improving the security of data during the encoding stage and transmission process.
[0029] However, this method of compressing encrypted data has certain drawbacks. Because the encrypted data usually has a higher information entropy, it is difficult to compress the data effectively, that is, the compression ratio may not be as high as expected. In addition, the decoding process will become more complicated and require more time to perform the decoding operation. In addition, if noise interference or data packet loss occurs during the data transmission process, these factors will seriously affect the quality of data transmission.
[0030] In view of the above technical problems, the technical concept of the present invention is as follows: first, the original analog signal is converted into a digital signal, and the digital signal obtained after the conversion is sparsely represented to obtain a sparse signal, and then a data encryption framework is constructed using multiple encryption description tags, and the sparse signal is compressed and encrypted in a description label matrix to obtain an encrypted signal, and then the encryption signal reconstruction algorithm equation is set, and the encryption algorithm reconstruction equation is solved using constraint conditions to obtain a decoded signal. In this way, by adding encryption description tags, data can be better transmitted, and the signal is encrypted and decoded by new constraint conditions, so that the decoding of the encrypted signal is more targeted and faster, which greatly reduces the calculation amount of data reconstruction while ensuring data security.
[0031] Figure 1 FIG. 1 is a schematic flow chart of a method for processing data compression, encryption and decoding according to an embodiment of the present invention. Figure 1 As shown, the data compression, encryption and decoding processing method shown includes: S11, obtaining an original analog signal; S12, performing analog-to-digital conversion on the original analog signal to obtain a digital signal; S13, performing sparse transformation on the digital signal to obtain a sparse signal; S14, encrypting the sparse signal to obtain an encrypted signal; S15, transmitting the encrypted signal to a data receiving end.
[0032] In the above-mentioned processing method based on data compression, encryption and decoding, the S11 obtains the original analog signal. Optionally, in one embodiment of the present invention, obtaining the original analog signal includes: using a microphone to capture the sound in the environment, and the microphone converts the sound wave into an electrical signal, which is the form of the original analog signal. The camera captures visual information and converts the optical signal into an electrical signal to form a continuously changing analog image signal. Various types of sensors such as thermometers, pressure gauges, accelerometers, etc. can detect the parameters of the physical world and convert them into analog electrical signals. In scientific research, the experimental data recorded by various instruments and equipment (such as oscilloscopes, spectrum analyzers, etc.) are usually analog signals.
[0033] In the above processing method based on data compression, encryption and decoding, the S12 performs analog-to-digital conversion on the original analog signal to obtain a digital signal. It should be understood that in order to facilitate the storage, transmission and encryption of the signal, the original analog signal is further digitized and converted into a digital signal through analog-to-digital conversion technology to improve the stability of the signal.
[0034] Optionally, in one embodiment of the present invention, the original analog signal is converted into a digital signal by analog-to-digital conversion, including: using an analog-to-digital converter (ADC) to convert a continuous analog signal into a series of digital sample points. There will be a clock control circuit inside the ADC to generate a stable sampling clock signal. The analog signal passes through a sample and hold circuit to keep the signal unchanged at each sampling moment for accurate measurement. The sampled signal enters a quantizer to convert the continuous voltage level into a discrete voltage level. Finally, the quantized signal is encoded into a digital form through an encoding circuit to form a final digital signal output. Through the above steps, the conversion from analog signal to digital signal can be achieved, thereby facilitating the storage, transmission and further digital signal processing of the signal.
[0035] In the above-mentioned processing method based on data compression, encryption and decoding, the S13 performs a sparse transformation on the digital signal to obtain a sparse signal. It should be understood that in order to remove redundant information in the signal and achieve effective data compression, the digital signal is further sparsely transformed, and the signal is represented as a linear combination of a small number of non-zero coefficients to obtain a sparse signal. Due to the characteristics of sparse signals, only a small number of non-zero coefficients need to be paid attention to when encrypting and decoding the signal, which greatly reduces the computational complexity, thereby simplifying the data processing flow while ensuring data security and improving the speed and efficiency of data processing.
[0036] Optionally, in one embodiment of the present invention, the digital signal is subjected to a sparse transform to obtain a sparse signal, including: first determining a sparse representation basis suitable for the signal to be processed. This basis can be a wavelet transform, a discrete cosine transform (DCT) or other transforms that can effectively express the sparsity of the signal. The selection of the sparse representation basis depends on the characteristics of the signal and its application scenario. The digital signal is applied to the corresponding domain through the selected transform. For example, if the wavelet transform is selected, the signal is subjected to a wavelet transform; if the DCT is selected, the DCT transform is performed. This process converts the signal from the time domain or the space domain to another domain, such as the frequency domain. In the transformed domain, the signal is represented as a few non-zero coefficients plus a large number of coefficients that are close to zero or actually zero. Ideally, most of the coefficients are zero or very close to zero, which indicates that the signal is sparse in this domain. For the obtained transform coefficients, a threshold is set to determine which coefficients are important (non-zero), and the remaining coefficients less than the threshold can be ignored or set to zero. This can further reduce the amount of data while retaining the main features of the signal. The last step is to encode the screened non-zero coefficients to form a sparse signal.
[0037] In the above-mentioned processing method based on data compression, encryption and decoding, the S14 encrypts the sparse signal to obtain an encrypted signal. It should be understood that in the data processing process, the sparse signal has usually removed redundant information through sparse transformation, thereby achieving effective data compression. However, there is still a risk of being stolen when directly transmitting these sparse signals. In order to ensure the security of data during transmission, encryption processing can further ensure the security of data and prevent unauthorized access or tampering.
[0038] Optionally, in one embodiment of the present invention, Figure 4 The present invention is a schematic flow chart of a method for data compression, encryption and decoding in which the sparse signal is encrypted to obtain an encrypted signal. Figure 4 As shown, the sparse signal is encrypted to obtain an encrypted signal, including: S141, using a compression matrix to sample and compress the sparse signal to obtain a compressed signal; S142, using an empty matrix to encrypt the compressed signal to obtain the encrypted signal, wherein each column vector in the empty matrix is an encrypted description label vector.
[0039] In the above-mentioned processing method based on data compression, encryption and decoding, the S141 uses a compression matrix to sample and compress the sparse signal to obtain a compressed signal. It should be understood that in order to further reduce the data volume of the signal and enhance the signal security, the present invention uses a compression matrix to sample and compress the sparse signal, further reducing the number of non-zero values in the signal, so as to facilitate more efficient data transmission and storage, and reduce the computing resources required for subsequent signal encryption and decoding processes. In addition, the signal compression signal is compressed before it is encrypted, which means that even if the data is intercepted, the attacker needs to face more complex decompression and decryption problems, which enhances the security of the data.
[0040] In the above-mentioned processing method based on data compression, encryption and decoding, the S142 uses an empty matrix to encrypt the compressed signal to obtain the encrypted signal, wherein each column vector in the empty matrix is an encrypted description label vector. Specifically, the present invention further introduces a plurality of encrypted description labels to construct an empty matrix, and performs a description label matrix-type encryption process on the compressed signal to avoid problems such as error codes or packet loss during signal transmission in a bad channel. It should be understood that the encrypted description label is identification information used to assist data encryption and decryption, and describes the characteristics and attributes of the encrypted data. In the technical solution of the present invention, each encrypted description is independent of each other, allowing each to adopt different encoding and decoding strategies. Moreover, each description is different from each other but can complement each other, which means that when the decoder receives all the descriptions, it can reconstruct a high-quality signal; when only part or one description is received, it can still reconstruct a satisfactory signal. In addition, each description has equal importance, and data information of similar quality can be restored using any description label, and as the number of available description labels increases, the quality of data transmission will be further improved. Specifically, in order to improve the encryption effect of the compressed signal, the present invention proposes a cross-domain attention query fusion method, which takes the compressed signal as the query feature vector and the empty matrix as the initial key matrix. Based on the self-attention mechanism, the empty matrix and the compressed signal are cross-domain interactively processed to obtain an encrypted signal.
[0041] Optionally, in one embodiment of the present invention, the compressed signal is encrypted using an empty matrix to obtain the encrypted signal, including: using the compressed signal as a query vector and the empty matrix as an initial key matrix, and performing cross-domain attention encoding on the compressed signal and the empty matrix based on local correlation enhancement of the key matrix to obtain the encrypted signal.
[0042] Figure 5The present invention is a schematic flow chart of a method for data compression, encryption and decoding in an embodiment of the present invention, wherein the compressed signal is used as a query vector and the empty matrix is used as an initial key matrix, and the compressed signal and the empty matrix are subjected to cross-domain attention encoding based on local correlation enhancement of the key matrix to obtain the encrypted signal. Figure 5 As shown, optionally, in one embodiment of the present invention, the compressed signal is used as a query vector, and the empty matrix is used as an initial key matrix, and the compressed signal and the empty matrix are cross-domain attention encoded based on local correlation enhancement of the key matrix to obtain the encrypted signal, including: S1411, based on the heterogeneity between the compressed signal and each encrypted description label vector in the empty matrix, local correlation enhancement is performed on the empty matrix to obtain an updated key matrix; S1412, a cross-domain attention query based on a self-attention mechanism is performed on the compressed signal and the updated key matrix to obtain the encrypted signal.
[0043] Optionally, in one embodiment of the present invention, based on the heterogeneity between the compressed signal and each encrypted description label vector in the empty matrix, the empty matrix is locally associated with the matrix to obtain an updated key matrix, including: calculating the distribution heterogeneity measurement factor between the compressed signal and each encrypted description label vector in the empty matrix to obtain a set of distribution heterogeneity measurement factors; comparing each distribution heterogeneity measurement factor in the set of distribution heterogeneity measurement factors with a predetermined threshold, and in response to the distribution heterogeneity measurement factor being less than the predetermined threshold, using the mean vector between the encrypted description label vector corresponding to the distribution heterogeneity measurement factor and the compressed signal as the updated column vector to obtain the updated key matrix.
[0044] Optionally, in one embodiment of the present invention, the distribution heterogeneity measurement factor between the compressed signal and each encrypted description label vector in the empty matrix is calculated to obtain a set of distribution heterogeneity measurement factors, including: respectively extracting the association features between the compressed signal and each encrypted description label vector in the empty matrix to obtain a set of compressed signal-encrypted description association feature vectors; calculating the energy coefficient of each compressed signal-encrypted description association feature vector in the set of compressed signal-encrypted description association feature vectors to obtain the set of distribution heterogeneity measurement factors.
[0045] Optionally, in one embodiment of the present invention, a cross-domain attention query based on a self-attention mechanism is performed on the compressed signal and the updated key matrix to obtain the encrypted signal, including: using a value embedding matrix to process the compressed signal to obtain a value vector; using the compressed signal as a query vector, and each column vector in the updated key matrix as a key vector, and inputting the query vector, the key vector and the value vector into a cross-domain attention query module based on a Transformer structure to obtain a set of compressed signal-encrypted description cross-domain query attention vectors; calculating the positional mean vector of the set of compressed signal-encrypted description cross-domain query attention vectors to obtain the encrypted signal.
[0046] Optionally, in one embodiment of the present invention, the correlation features between the compressed signal and each encrypted description label vector in the empty matrix are extracted respectively to obtain a set of compressed signal-encrypted description correlation feature vectors, including: calculating the position point addition, position point subtraction and position point multiplication between the compressed signal and the encrypted description label vector to obtain a first correlation fusion result, a second correlation fusion result and a third correlation fusion result; after cascading the first correlation fusion result, the second correlation fusion result and the third correlation fusion result into a multi-scale correlation feature vector, one-dimensional convolution processing and maximum pooling processing are performed on them to obtain the compressed signal-encrypted description correlation feature vector.
[0047] Optionally, in one embodiment of the present invention, the energy coefficient of each compressed signal-encrypted description associated feature vector in the set of compressed signal-encrypted description associated feature vectors is calculated to obtain a set of distribution heterogeneity measurement factors, including: weighted summing up the square of the difference between the maximum eigenvalue of the compressed signal-encrypted description associated difference feature vector and its eigenmean, the feature variance of the compressed signal-encrypted description associated difference feature vector, and the bias term to obtain a weighted sum value, and dividing the sum of the feature variance of the compressed signal-encrypted description associated difference feature vector and the bias term by the weighted sum value to obtain the distribution heterogeneity measurement factor.
[0048] In summary, in the embodiment of the present invention, the compressed signal and the empty matrix are processed by the following cross-domain attention encoding formula to obtain the encrypted signal, wherein the cross-domain attention encoding formula is:
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056] in, represents the empty matrix, , , and are the first, second, and and column vector, i.e., the encrypted description label vector, The value of is the number of the encrypted description label vectors, represents dot product, Indicates point addition, Indicates point reduction, Indicates cascade operation, represents the maximum pooling operation, represents a one-dimensional convolution operation, Indicates A compressed signal-encrypted description associated difference feature vector, , and Respectively represent the compressed signal - encrypted description of the associated difference eigenvector's eigenvariance, maximum eigenvalue and eigenmean, and are different bias terms, is the first factor in the set of distribution heterogeneity measurement factors. A distribution heterogeneity measure, is the predetermined threshold, represents the updated key matrix, represents the first column vector, represents the compressed signal, is the value embedding matrix, is a value vector, is the normalized exponential function, The value of is the length of the column vector in the update key matrix, represents the transpose of a vector, It is A compressed signal-encrypted description of the cross-domain query attention vector, represents the encrypted signal.
[0057] In the above cross-domain attention encoding formula, in order to further improve the pertinence and quality of the empty matrix, a key matrix association strengthening method is also introduced. First, the compressed signal is used as a common soft anchor reference point, and the distribution heterogeneity measurement factor between the compressed signal and each column vector (encrypted description label vector) in the empty matrix is calculated to reveal the local correlation strength contained in each column vector. Secondly, based on the gating mechanism, for the column vector corresponding to the distribution heterogeneity measurement factor less than the predetermined threshold, its mean vector with the compressed signal is used to update its data representation, thereby further strengthening the correlation between the empty matrix and the compressed signal, so as to improve the pertinence and encryption quality of the key matrix and generate an updated key matrix. Furthermore, based on the compressed signal, a query vector and a value vector are constructed, and each column vector in the updated key matrix is used as a key vector. Through the self-attention calculation of the Transformer structure, cross-domain information interaction fusion is performed to obtain a cross-domain query attention vector between the compressed signal and each encrypted description label vector. Finally, by calculating the positional mean of each cross-domain query attention vector to integrate all the encrypted description information, the final encrypted signal is obtained, thereby achieving high-quality encryption of the compressed signal.
[0058] In the above-mentioned processing method based on data compression, encryption and decoding, the S15 transmits the encrypted signal to the data receiving end. It should be understood that in order to ensure that only authorized recipients can decrypt and access the information carried by the signal, the encrypted signal is transmitted to the data receiving end. The encrypted signal plays a protective role in the transmission process to prevent unauthorized users from intercepting and reading the signal content. This practice is crucial in data communication, especially in the transmission of sensitive information, such as financial transaction data, personal privacy information, etc., which need to be encrypted before transmission to prevent data leakage.
[0059] Optionally, in one embodiment of the present invention, the encrypted signal is transmitted to the data receiving end, including: first, according to the needs and scenarios of data transmission, different transmission media can be selected, such as the Internet, local area network, wireless network (Wi-Fi, cellular network, etc.), optical fiber or satellite communication, etc. Then, a reliable communication connection is established between the sending end and the receiving end to ensure that the encrypted signal can be transmitted to the receiving end without error. This may involve a handshake process in the TCP / IP protocol stack to confirm that both parties are ready to start data exchange. Then, the encrypted signal is divided into data packets of appropriate size for transmission in the network. Each data packet is usually attached with some control information (such as source address, destination address, sequence number, etc.) to ensure that they can reach the destination correctly. Then, the data packet is transmitted from the sending end to the receiving end through the selected network transmission protocol (such as TCP, UDP, etc.). In this process, network devices (such as routers, switches, etc.) are responsible for routing the data packet to the correct path. Then, during the transmission process, data packet loss or damage may occur. At this time, means such as CRC check and retransmission mechanism are needed to detect and correct errors to ensure the integrity of the data packet. Finally, after receiving the data packets, the receiver will send a confirmation message to the sender to inform which data packets have been successfully received. If any data packets are lost, the receiver will also request to resend them.
[0060] After the signal encryption is completed, the encrypted signal is transmitted to a data receiving end, where the encrypted signal is reconstructed and decoded to obtain a decrypted sparse signal. Specifically, Figure 2 FIG. 1 is a schematic flow chart of a method for processing data compression, encryption and decoding at the data receiving end according to an embodiment of the present invention. Figure 3 As shown, at the data receiving end, the data compression, encryption and decoding processing method includes: S21, signal reconstruction and decoding of the encrypted signal to obtain a decrypted sparse signal; S22, sparse inverse transformation of the decrypted sparse signal to obtain a decrypted digital signal; S23, digital-to-analog conversion of the decrypted digital signal to obtain a decrypted original analog signal. The present invention sets an encrypted signal reconstruction algorithm equation and constraints, and uses the constraints to solve the encrypted signal reconstruction algorithm equation to obtain a decrypted sparse signal. Then, the decrypted sparse signal is subjected to sparse inverse transformation and digital-to-analog conversion to restore its original data form, thereby obtaining a decrypted original analog signal.
[0061] Further, in another embodiment of the present invention, Figure 6As shown, a data compression, encryption and decoding processing method is also provided, comprising the following steps: data compression; obtaining a digital signal, converting the data to be compressed into a digital signal through a DAC; obtaining a sparse signal through a sparse representation of the digital signal, constructing a compression matrix for the sparse signal and performing sampling compression to obtain a compressed signal; constructing a data encryption framework: constructing an empty matrix In the empty matrix, Des is an encryption description tag. By constructing multiple encryption description tags, problems such as error code or packet loss can be avoided during signal transmission in a bad channel. The encryption framework of the present invention is established as a flowchart as shown in FIG. Figure 7 shown.
[0062] The main features of the multi-encrypted description tag include the following aspects: each description is independent of each other, that is, each description can choose a different encoding and decoding method; each description is different from each other but can complement each other; this means that when the decoder receives all the descriptions, the decoder can reconstruct a high-quality signal; when only part or one description is received, the decoder can still reconstruct a satisfactory signal; each description of the multi-description encoding has equal importance; using each single description, data information of similar quality can be restored, and as more descriptions can be used, the data transmission quality is getting better and better. The compressed signal is imported into an empty matrix to obtain a data encryption framework. For example, an encryption algorithm is assigned to the encryption framework to obtain an encrypted signal. The encryption framework multi-description encoding and decoding framework of the present invention is shown in FIG. Figure 8 shown.
[0063] Encrypted signal data decoding: Set the encrypted signal reconstruction algorithm equation as:
[0064] ,
[0065] In the formula, represents the first coefficient, represents the measurement matrix, Indicates the data obtained after measurement;
[0066] Define constraints:
[0067] ,
[0068] In the formula, Represents the encrypted image data, represents the decryption function, represents a constant, and the encryption algorithm reconstruction equation is solved by the constraint condition to obtain a decoded signal.
[0069] The encryption algorithm is used to reconstruct the equation solution process for the constraint conditions as follows:
[0070] For the constraints, the following solution is obtained:
[0071]
[0072] By solving the formula, we can get ;
[0073] From the triangle inequality, we can get:
[0074] ,
[0075] Thus, it is concluded The lower bound of .
[0076] Therefore, by maximizing To maximize requirements, and because , so the above formula can be converted into:
[0077] ,
[0078] By Lagrange multiplier method, we get:
[0079] ,
[0080] Since the reconstruction algorithm is used for sparse signals, is a set of linear maps, so we have,
[0081] ,
[0082] in Representation Matrix The maximum eigenvalue of , substituting the above formula into the constraint formula, we have,
[0083] ,
[0084] in, ;
[0085] It can be seen that the regular function of the above formula also includes and norm, so when When it is smaller, the equation is relative to norm optimization problem, the solution speed is faster and can be guaranteed to be close to The reconstruction accuracy of
[0086] This embodiment further analyzes the technical method.
[0087] The split Bregman algorithm is used to solve the problem. First, the intermediate variable is introduced. ,get:
[0088] ,
[0089] You can see It is split into a function form consisting of two different variables, so that the ridge regression method can be used to calculate the solution to the problem.
[0090] Here we use the Bregman iterative regularization algorithm
[0091]
[0092] in .
[0093] The above formula can be decomposed into:
[0094] ,
[0095] This embodiment is based on the encrypted image compressed sensing solution algorithm based on the split Bregman iteration, and also utilizes and norm, so its convergence speed is relatively faster than that of only using The solution algorithm can achieve a faster convergence speed. In the solution process, the ridge regression method and threshold algorithm are used to ensure the accuracy of reconstruction and obtain better recovery effect, which also makes the solution calculation simpler.
[0096] Furthermore, this embodiment provides a simulation experiment of encrypted data compression sampling reconstruction based on split Bregman iteration; first, the reconstruction effect under different measurement dimensions is shown in Table 1 and Fig. 9 As shown, the test data is and The standard data, the measurement matrix is a Gaussian distribution random matrix, and the sparse basis is selected Biorthogonal wavelet basis, the data is processed in blocks, the size of the block is , the encryption method is Arnold transformation, and the algorithm convergence condition is , choose choose Select 0.05; then give a comparison of reconstruction effect and reconstruction time of different solution algorithms and the above algorithm when the sampling rate is 0.5, as shown in Table 1; it can be seen that the solution algorithm provided by the present invention can effectively reduce the reconstruction time required for calculation on the basis of ensuring reconstruction accuracy.
[0097] Table 1 shows the reconstruction time at different sampling rates.
[0098]
[0099] Furthermore, when the received encrypted description tag is lost, the specific steps for data reconstruction are as follows:
[0100] Setting data Divided into , whose subscript set is , the received sub-data index set is , establish the local information formula for missing data:
[0101] ,
[0102] In the formula: ,use You can calculate the data , reuse data Establish global data information, Representation data The gradient operator in the x-axis direction, Representation data The gradient operator in the y-axis direction, Indicates the received sub-data:
[0103] ,
[0104] Use the received sub-data information to replace the data The corresponding data in the data to obtain complete data;
[0105] In the formula, Representation data The gradient operator in the x-axis direction, Representation data Gradient operator in the y-direction.
[0106] Furthermore, the specific steps of sampling and compressing sparse signals are described:
[0107] Build the compressed structure: , in the structure, y is the sparse signal before compression, x is the compressed sparse signal, is the measurement matrix, let Size The matrix of .
[0108] Furthermore, the specific steps of assigning an encryption algorithm to the encryption framework to obtain an encrypted signal are as follows:
[0109] Encrypt each subset in the encryption framework to obtain an encryption matrix , the encryption matrix Any row vector of The coefficient size of is the same as any other row vector The same, that is: encryption matrix satisfy It should be noted that this paper is to encrypt sparse signals and satisfy the linear scrambling encryption algorithm, that is, for any sparse signal , encryption function satisfy:
[0110] , such encryption can make the encryption matrix full rank, and the result of decrypting the encrypted signal is unique.
[0111] In summary, the processing method of data compression, encryption and decoding according to the embodiment of the present invention is explained, which first performs analog-to-digital conversion on the original analog signal, and obtains a sparse signal by sparsely representing the digital signal obtained after the conversion, and then uses multiple encryption description tags to build a data encryption framework, and compresses and encrypts the sparse signal in a description label matrix to obtain an encrypted signal, and then sets the encryption signal reconstruction algorithm equation, and solves the encryption algorithm reconstruction equation using constraints to obtain a decoded signal. In this way, by adding encryption description tags, data can be better transmitted, and the signal is encrypted and decoded through new constraints, making the decoding of the encrypted signal more targeted and quick, while ensuring data security, it also greatly reduces the amount of calculation for data reconstruction.
[0112] In one embodiment of the present invention, a signal processing system is also provided, which includes: one or more memories for storing instructions; and one or more processors for calling and running the instructions from the memories to perform a processing method such as data compression, encryption and decoding.
[0113] In one embodiment of the present invention, a medium is also provided, on which a data compression, encryption and decoding processing program is stored. When the data compression, encryption and decoding processing program is executed by a processor, the data compression, encryption and decoding processing method as described in the embodiment of the present invention is implemented.
[0114] Optionally, the memory is a storage unit within the chip, such as a register, cache, etc. The memory can also be a storage unit within the system located outside the chip, such as ROM or other types of static storage devices that can store static information and instructions, RAM, etc.
[0115] It can be understood that the memory in the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
[0116] The non-volatile memory may be a ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), or a flash memory.
[0117] The volatile memory may be a RAM, which is used as an external cache. There are many different types of RAM, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct memory bus RAM.
[0118] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0119] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A method for data compression, encryption and decoding, characterized in that: include: Get the original analog signal; Performing analog-to-digital conversion on the original analog signal to obtain a digital signal; Performing sparse transformation on the digital signal to obtain a sparse signal; Performing encryption processing on the sparse signal to obtain an encrypted signal; Transmitting the encrypted signal to a data receiving end; At the data receiving end, the data compression, encryption and decoding processing method includes: Reconstructing and decoding the encrypted signal to obtain a decrypted sparse signal; Performing a sparse inverse transform on the decrypted sparse signal to obtain a decrypted digital signal; Performing digital-to-analog conversion on the decrypted digital signal to obtain a decrypted original analog signal; The sparse signal is encrypted to obtain an encrypted signal, comprising: Using a compression matrix to perform sampling compression on the sparse signal to obtain a compressed signal; The compressed signal is encrypted using an empty matrix to obtain the encrypted signal, wherein each column vector in the empty matrix is an encrypted description label vector.
2. The data compression, encryption and decoding processing method according to claim 1, characterized in that: Using an empty matrix to encrypt the compressed signal to obtain the encrypted signal includes: Using the compressed signal as a query vector and the empty matrix as an initial key matrix, performing cross-domain attention encoding based on key matrix local correlation enhancement on the compressed signal and the empty matrix to obtain the encrypted signal; The compressed signal is used as a query vector and the empty matrix is used as an initial key matrix, and the compressed signal and the empty matrix are subjected to cross-domain attention encoding based on local correlation enhancement of the key matrix to obtain the encrypted signal, including: Based on the heterogeneity between the compressed signal and each encrypted description label vector in the empty matrix, locally enhancing the empty matrix to obtain an updated key matrix; Performing a cross-domain attention query based on a self-attention mechanism on the compressed signal and the updated key matrix to obtain the encrypted signal; Based on the heterogeneity between the compressed signal and each encrypted description label vector in the empty matrix, locally enhancing the empty matrix to obtain an updated key matrix, including: Calculating a distribution heterogeneity measurement factor between the compressed signal and each encrypted description label vector in the empty matrix to obtain a set of distribution heterogeneity measurement factors; Comparing each distribution heterogeneity measurement factor in the set of distribution heterogeneity measurement factors with a predetermined threshold, and in response to the distribution heterogeneity measurement factor being less than the predetermined threshold, using a mean vector between the encrypted description label vector corresponding to the distribution heterogeneity measurement factor and the compressed signal as an updated column vector to obtain the updated key matrix; Performing a cross-domain attention query based on a self-attention mechanism on the compressed signal and the updated key matrix to obtain the encrypted signal includes: Processing the compressed signal using a value embedding matrix to obtain a value vector; Using the compressed signal as a query vector and each column vector in the update key matrix as a key vector, the query vector, the key vector and the value vector are input into a cross-domain attention query module based on a Transformer structure to obtain a set of compressed signal-encrypted description cross-domain query attention vectors; The compressed signal-encrypted description cross-domain query focus vector set is calculated by position mean vector to obtain the encrypted signal.
3. The data compression, encryption and decoding processing method according to claim 2, characterized in that: Calculating the distribution heterogeneity measurement factor between the compressed signal and each encrypted description label vector in the empty matrix to obtain a set of distribution heterogeneity measurement factors, including: Respectively extracting correlation features between the compressed signal and each encrypted description label vector in the empty matrix to obtain a set of compressed signal-encrypted description correlation feature vectors; The energy coefficient of each compressed signal-encrypted description associated feature vector in the set of compressed signal-encrypted description associated feature vectors is calculated to obtain the set of distribution heterogeneity measurement factors.
4. A data compression, encryption and decoding processing system, characterized in that: include: one or more memories for storing instructions; One or more processors, used to call and run the instructions from the memory to execute a data compression, encryption and decoding processing method as described in any one of claims 1 to 3.
5. A medium, characterized in that include: The medium stores a data compression, encryption and decoding processing program, and when the data compression, encryption and decoding processing program is executed by the processor, the data compression, encryption and decoding processing method as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Image compression encryption algorithm based on parallel compressive sensing and Arnold scrambling
CN105915911A
Signal compression method and device, signal reconstruction method and device and compressed sensing system
CN108632256A
Fracturing data transmission method and system based on compressed sensing and RSA encryption algorithm
CN115996144A
High-safety optical transmission method and system based on compressed sensing chaotic encryption
CN116016800A
Method and systems for multilevel data security
US20140064479A1
