Data encryption method, system and equipment based on key-driven compressed sensing

By employing a key-driven compressed sensing data encryption method, which utilizes dynamically generated measurement matrices and permutation vectors for multi-layer encryption, the security and reliability issues of existing data encryption methods are resolved, enabling reliable data transmission in dynamic environments.

CN122069030APending Publication Date: 2026-05-19GUANGZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU UNIVERSITY
Filing Date
2026-03-13
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing wireless communication and Internet of Things systems, data encryption methods suffer from a lack of security structure, high computational complexity, limited security in quantum computing environments, and insufficient controllability and security design in sparse permutation structures, resulting in inadequate decryption reliability.

Method used

A key-driven compressed sensing-based data encryption method is adopted. By sharing the master key and a synchronization counter to generate a dynamic seed, a measurement matrix, a permutation vector, and an artificial noise vector are dynamically generated to achieve sparse data representation and linear projection. Combined with hash functions and constraint interleaving algorithms, multi-layer encryption is performed to ensure that the receiver can accurately reconstruct the processing environment of the sender.

Benefits of technology

Ensuring the synchronous reliability and connection stability of data transmission in a dynamic environment enhances the system's ability to resist eavesdropping, analysis, and tampering attacks, thereby improving the security and reliability of the data transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122069030A_ABST
    Figure CN122069030A_ABST
Patent Text Reader

Abstract

The invention discloses a data encryption method and system based on key-driven compressed sensing and a medium, and the method comprises the steps: reconstructing a measurement matrix, a replacement vector and an artificial noise vector which are completely consistent with a transmitting end in a deterministic manner based on a synchronous key and a counter, thereby laying a synchronization foundation for subsequent decryption. Through correct analysis of an encryption result, accurate sparse signal recovery is carried out by using a reconstruction matrix, and finally original data is recovered through inverse mapping. The set of complete and self-consistent processing flow ensures that the receiver can decrypt and reconstruct the original information losslessly and reliably on the premise that the synchronization is correct, so that the core reliability problem of data integrity and restorability is solved at the receiving end, and therefore, through the implementation of the method and the device, the data integrity and the restorability can be improved. The method can ensure that both communication parties can reliably complete data transmission in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data encryption, and in particular to a data encryption method, system and device based on key-driven compression sensing. Background Technology

[0002] In modern wireless communication and Internet of Things (IoT) systems, massive amounts of data are frequently transmitted through open channels, facing multiple security threats such as eavesdropping, tampering, and malicious interference. Therefore, while ensuring communication efficiency, it is essential to effectively encrypt transmitted data to ensure the confidentiality, integrity, and reliability of information, meeting the ever-growing demand for secure communication.

[0003] In existing technologies, mainstream data encryption methods are mainly divided into two categories: one relies on upper-layer cryptographic algorithms (such as AES, RSA, etc.) to encrypt data at the bit level. Although this type of method is mature and widely used, it suffers from problems such as a simple security structure, high computational complexity, and limited security in quantum computing environments. The other is a transmission scheme based on compressed sensing. This type of method achieves data compression and efficient transmission through the sparse characteristics of signals, but its measurement matrix is ​​usually fixed or randomly generated, lacking dynamic update and synchronization mechanisms, making it vulnerable to reconstruction analysis attacks. Furthermore, the sparse permutation structure lacks controllability and security design. In addition, in distributed or time-varying channels, the transmitting and receiving ends are prone to state mismatch due to clock drift, affecting decryption reliability. The overall system has significant deficiencies in terms of security and synchronization. Summary of the Invention

[0004] This invention provides a key-driven compressed sensing-based data encryption method, system, and device that can ensure reliable data transmission between communicating parties in complex environments.

[0005] This invention provides a key-driven compression-aware data encryption method, comprising: Retrieve the raw data to be sent; Based on the master key shared with the receiver and the synchronized counter value, several levels of dynamic seeds are derived through a hash function. According to the dynamic seeds at each level, a measurement matrix extracted from the mother matrix, a permutation vector constructed based on the constraint interleaving algorithm, and an artificial noise vector are generated respectively. The original data is sparsely represented under a pre-constructed dictionary to obtain an initial sparse vector. The positions of the non-zero elements in the initial sparse vector are mapped to the corresponding positions in the permutation vector to obtain a target sparse vector. The target sparse vector is then linearly projected using the measurement matrix to obtain a measurement vector. The measurement vector is then masked using the artificial noise vector to obtain a noisy measurement vector. The data encryption result is obtained based on the noisy measurement vector.

[0006] In this embodiment of the invention, the sending and receiving ends, based on the same shared master key and synchronized counters, can independently and in real-time generate completely identical measurement matrices, permutation vectors, and artificial noise vectors through deterministic hash operations. This ensures that the receiving end can accurately reconstruct the processing environment of the sending end without the need for additional transmission of these key parameters, fundamentally avoiding decryption failures caused by matrix mismatches and guaranteeing the synchronization reliability and connection stability of the communication link in dynamic environments. Utilizing the principle of compressed sensing, the original high-dimensional data is represented as a low-dimensional sparse vector, achieving effective data compression. This efficient compressed transmission method directly enhances the reachability and robustness of the data transmission process. Furthermore, by using permutation vectors to represent sparse data… The structure of the vector is perturbed, hiding the feature information of the original data. A dynamically generated measurement matrix is ​​used for linear projection, further mixing and compressing the permuted data into observations. Simultaneously generated artificial noise vectors are used to mask the observations, making the ciphertext statistically random and uniform. These steps form a multi-layered encryption mechanism of "structural perturbation," "linear mixing," and "noise masking." Even if an attacker intercepts the encryption result, the dynamic matrix, permutation vector, and artificial noise prevent effective recovery of the original data. Furthermore, it effectively resists statistical analysis attacks targeting the ciphertext, greatly enhancing the system's ability to resist eavesdropping, analysis, and tampering attacks, ensuring the security and reliability of data during transmission. In addition, the generation and masking of artificial noise involve only simple linear operations, and the superposition and stripping processes introduce almost no additional computational overhead, making this enhanced security feature particularly suitable for resource-constrained scenarios such as the Internet of Things. Compared with existing technologies, this invention ensures reliable data transmission between communicating parties in complex environments.

[0007] Further, the step of generating the measurement matrix extracted from the mother matrix, the permutation vector constructed based on the constraint interleaving algorithm, and the artificial noise vector according to the dynamic seeds at each level includes: The first random number generator is initialized using a first-level seed and driven to generate a mother matrix of a preset dimension. The dynamic seed includes a first-level seed, a second-level seed, a third-level seed, and a fourth-level seed derived in sequence. The second random number generator is initialized using the second-level seed, and the second random number generator is driven to randomly select a specified number of non-repeating row and column indices from the row and column index ranges of the parent matrix, respectively, and extract elements at corresponding positions from the parent matrix according to the order of the row and column indices to form the measurement matrix. The third random number generator is initialized using the third-level seed, and the third random number generator is driven to execute the constraint interleaving algorithm to generate the permutation vector; The fourth random number generator is initialized using the fourth-level seed, and the fourth random number generator is driven to generate an artificial noise vector with the same dimension as the measurement vector.

[0008] In this way, the sending and receiving ends, based on the same shared master key and synchronized counters, can independently and in real time generate completely consistent measurement matrices, permutation vectors, and artificial noise vectors through deterministic hash operations. This ensures that the receiving end can accurately reconstruct the processing environment of the sending end without the need for additional transmission of these key parameters, fundamentally avoiding decryption failures caused by matrix mismatches and guaranteeing the synchronization reliability and connection stability of the communication link in dynamic environments.

[0009] Further, the step of initializing the third random number generator using the third-level seed and driving the third random number generator to execute the constraint interleaving algorithm to generate the permutation vector includes: The third random number generator is initialized based on the third-level seed; Set the length of the permutation vector and the minimum distance constraint value; Initialize the candidate element set and the initial permutation vector based on the length of the permutation vector; For each current position, candidate elements are selected from the candidate element set whose distances from all elements at determined positions in the permutation vector are not less than the minimum distance constraint value, thus forming a candidate set; The third random number generator is used to randomly select a target element from the candidate set to fill the current position, and the target element is removed from the candidate element set until all positions are filled, and the final generated permutation vector is output.

[0010] This ensures that the receiving end can accurately reconstruct the sending end's processing environment without the need for additional transmission of these critical parameters, fundamentally avoiding decryption failures caused by matrix mismatch and guaranteeing the synchronization reliability and connection stability of the communication link in dynamic environments.

[0011] Further, the step of initializing the fourth random number generator using the fourth-level seed and driving the fourth random number generator to generate an artificial noise vector with the same dimension as the measurement vector includes: The fourth random number generator is initialized based on the fourth-level seed; Set the noise intensity factor; Based on the noise intensity factor, the fourth random number generator is driven to generate a pseudo-random sequence with the same dimension as the measurement vector as an artificial noise vector. The elements of the artificial noise vector are sampled independently and identically distributed, and the sampling distribution includes uniform distribution, Gaussian distribution, or pseudo-random sequence generated based on chaotic mapping.

[0012] In this way, the observed values ​​are masked by the synchronously generated artificial noise vector, making the ciphertext more random and uniform in statistical properties.

[0013] Furthermore, based on the master key shared with the receiving end and the synchronized counter value, several levels of dynamic seeds are derived through a hash function, including: Obtain the shared master key and counter value pre-negotiated with the receiving end, wherein the counter value is determined based on a time step or frame sequence number; The counter value is combined with several preset offsets to obtain a combination result. The combination result and the shared master key are then sequentially input into the hash message authentication code function for calculation to obtain several levels of dynamic seeds.

[0014] By employing deterministic hashing, it is ensured that both the sender and receiver independently and synchronously generate completely consistent dynamic parameters in each round of communication. This fundamentally eliminates decryption failures caused by parameter mismatch, guarantees stable connection and reliable synchronization of the communication link in time-varying environments, and thus significantly improves the overall reliability of data transmission.

[0015] Further, the step of sparsely representing the original data under a pre-constructed dictionary to obtain an initial sparse vector includes: The raw data is converted into a signal vector consistent with the atomic dimensions in the pre-constructed overcomplete dictionary; Calculate the correlation value between the signal vector and each column of atoms in the overcomplete dictionary; Based on the relevance value, select at least one column index with the largest absolute value of the corresponding relevance value from all column indexes of the overcomplete dictionary to form the target column index set; Based on the target column index set, construct a sparse vector with a length equal to the number of atoms in the overcomplete dictionary.

[0016] This perturbation of the sparse vector structure by spoofing the vector hides the feature information of the original data.

[0017] Further, the step of mapping the positions of non-zero elements in the initial sparse vector to the corresponding positions in the permutation vector to obtain the target sparse vector includes: Obtain the set of non-zero element positions of the initial sparse vector; For each position in the set of non-zero element positions, the target position corresponding to each position in the target sparse vector is determined according to the permutation vector; The value of each non-zero element in the initial sparse vector is assigned to the corresponding target position in the target sparse vector, and the values ​​of all other positions in the target sparse vector except the target position are set to zero to obtain the target sparse vector.

[0018] This perturbation of the sparse vector structure by spoofing the vector hides the feature information of the original data.

[0019] Furthermore, the step of using the artificial noise vector to perform a masking operation on the measurement vector to obtain a noisy measurement vector includes: performing element-wise superposition perturbation on the artificial noise vector and the measurement vector to obtain the noisy measurement vector, wherein the superposition perturbation includes modulo addition or bit-level XOR operation.

[0020] Furthermore, after obtaining the data encryption result, the process also includes: Based on the same master key and counter value as the sender, the measurement matrix, the permutation vector, and the artificial noise vector are reconstructed using a hash function. The noisy measurement vector is parsed and recovered from the encrypted data result; Using the artificial noise vector, perform an inverse masking operation on the noisy measurement vector to recover the measurement vector; Based on the measurement matrix, the target sparse vector is recovered from the measurement vector using a sparse reconstruction algorithm; Based on the inverse mapping relationship of the permutation vector, the positions of non-zero elements in the target sparse vector are mapped back to their original positions to recover the initial sparse vector, and the original data is reconstructed based on the initial sparse vector and the overcomplete dictionary.

[0021] In this way, the receiving end, based on a synchronized key and counter, deterministically reconstructs a measurement matrix and permutation vector that are completely identical to those of the sending end. This lays a synchronous foundation for subsequent decryption. By correctly parsing the encryption result and using the reconstructed matrix for accurate sparse signal recovery, the original data is finally restored through inverse mapping. This complete and self-consistent processing flow ensures that, provided the synchronization is correct, the receiver can decrypt and reconstruct the original information losslessly and reliably, thus solving the core reliability issues of data integrity and recoverability at the receiving end.

[0022] Another embodiment of the present invention provides a data encryption system based on key-driven compression sensing, comprising: The acquisition module is used to acquire the raw data to be sent; The generation module is used to derive several levels of dynamic seeds through a hash function based on the master key shared with the receiver and the synchronized counter value. Based on the dynamic seeds at each level, it generates a measurement matrix extracted from the mother matrix, a permutation vector constructed based on the constraint interleaving algorithm, and an artificial noise vector. The encryption module is used to perform sparse representation of the original data under a pre-constructed dictionary to obtain an initial sparse vector, map the non-zero element positions in the initial sparse vector to the corresponding positions in the permutation vector to obtain a target sparse vector, perform linear projection calculation on the target sparse vector using the measurement matrix to obtain a measurement vector, perform masking operation on the measurement vector using the artificial noise vector to obtain a noisy measurement vector, and obtain the data encryption result based on the noisy measurement vector. Attached Figure Description

[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating an embodiment of the key-driven compression-aware data encryption method provided in this application; Figure 2 This is a flowchart illustrating one embodiment of steps S201 to S204 provided in this application; Figure 3 This is a flowchart illustrating the multi-level dynamic seed derivation method provided in this application; Figure 4 This is a flowchart illustrating the sparse representation provided in this application; Figure 5 This is a flowchart illustrating one embodiment of steps S501 to S505 provided in this application; Figure 6 This is a flowchart illustrating the sending and receiving ends provided in this application; Figure 7 This is a schematic diagram of an embodiment of the key-driven compression-aware data encryption system provided in this application. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0029] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0030] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0031] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0032] In modern wireless communication and Internet of Things (IoT) systems, massive amounts of data are frequently transmitted in open channels, facing multiple security threats such as eavesdropping, tampering, and malicious interference. Existing technologies rely on upper-layer cryptographic algorithms (such as AES and RSA) to encrypt data at the bit level. Although these methods are mature and widely used, they suffer from problems such as a simple security structure, high computational complexity, and limited security in quantum computing environments, making it difficult to guarantee the reliability of data encryption.

[0033] See Figure 1 To ensure reliable data transmission between communicating parties in complex environments, an embodiment of the present invention provides a key-driven compression-aware data encryption method, comprising steps S101 to S103: Step S101: Obtain the raw data to be sent; In some embodiments, the raw data is a signal to be transmitted, specifically divided into two types: digital signal or image signal. For digital signals, the raw data is an integer sequence of length d, where the value of each integer is within a preset base n, for example, within the interval [0, n]. For image signals, the raw data is a pixel block of size d×d, which can be converted into a vector of length L (e.g., L=d²) by expanding it in row-major or column-major order.

[0034] Step S102: Based on the master key shared with the receiver and the synchronized counter value, several levels of dynamic seeds are derived through a hash function. According to the dynamic seeds at each level, a measurement matrix extracted from the mother matrix, a permutation vector constructed based on the constraint interleaving algorithm, and an artificial noise vector are generated respectively. In some embodiments, deriving several levels of dynamic seeds based on a shared master key and a synchronized counter value using a hash function includes: obtaining a shared master key and a counter value pre-negotiated with the receiver, wherein the counter value is determined based on a time step or frame sequence number; combining the counter value with several preset offsets to obtain a combination result; and sequentially inputting the combination result and the shared master key into a hash message authentication code function for calculation to obtain several levels of dynamic seeds. Specifically, firstly, during the system initialization phase, the sending and receiving ends of the communication communicate through a standard key negotiation protocol (e.g., based on...). Or elliptic curve Diffie–Hellman ( (Key exchange) Negotiate and establish a consistent shared master key The counter value The counter value is determined by both communicating parties based on a synchronized timestamp, an incrementing frame number, or a session identifier, ensuring that both parties hold the same counter value in each communication session or time slot. Subsequently, several distinct offset constants are preset. , ( When a dynamic seed needs to be generated, the counter value is added sequentially to each offset constant to obtain different combination values; then, the shared master key is used as the key, and each combination value is used as a message, which are respectively input to the hash message authentication code function. Calculations are performed in the process; the The function outputs the corresponding first-level seeds in sequence. Second-level seeds Third-level seeds and fourth-level seeds .

[0035] In some embodiments, the first-level seed calculation formula is: ; The formula for calculating the second-level seed is: ; The formula for calculating the third-level seed is: ; The formula for calculating the fourth-level seed is: .

[0036] It should be noted that the shared master key The key length is 128 bits or 256 bits, and a secure key exchange protocol (such as...) is used. Distribution is completed during the system initialization phase.

[0037] It should be noted that the key negotiation process can be completed with the assistance of the authentication server, and this process is only executed once during the communication initialization phase. After completion, both parties hold the same master key, which is used for subsequent seed derivation and matrix generation.

[0038] It should be noted that the first-level seed Second-level seeds Third-level seeds and fourth-level seeds The outputs of each component are independent of each other and are used to initialize the pseudo-random number generator to generate the parent matrix, measurement matrix, permutation vector, and artificial noise vector, respectively.

[0039] It should be noted that, The output 256-bit hash value (i.e., several levels of dynamic seeds) is transformed and used as a high-entropy seed to input the pseudo-random number generator. Each level of seed is independent of the others and does not depend on each other's output. They are used to initialize the pseudo-random number generator to generate the parent matrix, measurement matrix, permutation vector, and artificial noise vector, respectively.

[0040] By employing deterministic hashing, it is ensured that both the sender and receiver independently and synchronously generate completely consistent dynamic parameters in each round of communication. This fundamentally eliminates decryption failures caused by parameter mismatch, guarantees stable connection and reliable synchronization of the communication link in time-varying environments, and thus significantly improves the overall reliability of data transmission.

[0041] Please refer to Figure 2 In some embodiments, the step of generating the measurement matrix extracted from the mother matrix, the permutation vector constructed based on the constraint interleaving algorithm, and the artificial noise vector according to the dynamic seeds at each level includes steps S201 to S204: Step S201: Initialize the first random number generator using the first-level seed, and drive the first random number generator to generate a mother matrix of a preset dimension, wherein the dynamic seed includes a first-level seed, a second-level seed, a third-level seed and a fourth-level seed derived in sequence. In some embodiments, the first-level seed As the initialization parameter of the first pseudo-random number generator, it drives the generator to operate according to a preset dimension parameter (the number of rows in the parent matrix). With column number Generate a dimensional parent matrix Each element of the parent matrix is ​​a pseudo-random number generated by the first pseudo-random number generator. The specific form of the element value depends on the application scenario: for digital signal transmission applications, the elements are usually integers uniformly sampled within a preset integer range (e.g., [-8, 8]); for image data transmission applications, the elements are usually real numbers independently sampled from a standard normal distribution or a uniform distribution (e.g., [-1, 1]). The parent matrix serves as the base source matrix for the subsequent generation of the measurement matrix.

[0042] Step S202: Initialize the second random number generator using the second-level seed, and drive the second random number generator to randomly select a specified number of non-repeating row indices and column indices from the row index range and column index range of the mother matrix, respectively, and extract elements at corresponding positions from the mother matrix according to the order of the row indexes and column indices to combine and form the measurement matrix. In some embodiments, the second-level seed As initialization parameters for the second pseudo-random number generator, it drives the generator to perform two independent random sampling processes. First, from Within the range of integers, randomly select m unique integers to form a row index set. Secondly, from Within the range of integers, randomly select N unique integers to form a column index set. Subsequently, following the order of the column index set C, the columns are sequentially processed from the parent matrix. Extracting submatrices: For each column index Extract the mother matrix The central bank index belongs to the set Column index is All elements constitute an m-dimensional column vector. Arrange all extracted column vectors in column index order, and finally combine them to form a... dimensional measurement matrix This process can be formally represented as: ,in, Indicates extraction of the mother matrix row index set and column indexes corresponding A column vector of real numbers.

[0043] Step S203: Initialize the third random number generator using the third-level seed, and drive the third random number generator to execute the constraint interleaving algorithm to generate the permutation vector; In some embodiments, step S203 includes: initializing the third random number generator based on the third-level seed; setting the permutation vector length and the minimum distance constraint value; initializing the candidate element set and the initial permutation vector based on the permutation vector length; for each current position, selecting candidate elements from the candidate element set whose distances to all elements at determined positions in the permutation vector are not less than the minimum distance constraint value, forming a candidate set; randomly selecting a target element from the candidate set using the third random number generator to fill the current position, and removing the target element from the candidate element set, until all positions are filled, and outputting the finally generated permutation vector. Specifically, firstly, using the third-level seed... The third random number generator is initialized as initial parameters, and the length of the permutation vector is set to N, along with a positive integer as the minimum distance constraint value. Then, initialize a set of candidate elements available containing all integers from 1 to N, i.e. And create a permutation vector of length N with all elements initialized to 0. Then, starting from the first position (i.e. Starting with 1), each position of the permutation vector P is sequentially represented by 1. ( (Iterate from 1 to N) to determine the filling element, for the current processing position Calculate the determined range of positions for which constraints need to be checked: the starting position is... The end position is Iterate through the current set of candidate elements. Each candidate element in Check the candidate element With each filled element in the permutation vector P within the aforementioned determined position range (in exist Whether the absolute distance constraint is satisfied, i.e., to determine the inequality. Does this condition hold true for all j? Then, select all candidate elements that satisfy this constraint. The elements are collected to form a candidate set. Simultaneously, using the third random number generator, an element is randomly and uniformly selected from this candidate set as the target element, and assigned to the current position of the permutation vector P, i.e., let... At the same time, the target element From the candidate element set The permutation vector P is permanently removed from the permutation vector P to proceed to the next position. The algorithm continues until all N positions of the permutation vector P are successfully filled. The algorithm then outputs the final permutation vector P.

[0044] It should be noted that if it is in a certain position When generating the candidate set, if it is found to be empty (i.e., no candidate element satisfies the minimum distance constraint), a restart mechanism is initiated: a new seed is generated based on the current third-level seed (e.g., a preset restart offset is added to the original seed), the third random number generator is reinitialized using this new seed, and the permutation vector P is cleared, and the candidate element set available is reset to {1, 2, ...}. Then, starting from position pos=1, the entire filling process described above is re-executed; this restart process can be repeated until the permutation vector construction is successfully completed or the preset maximum number of restarts is reached.

[0045] It should be noted that the multi-level dynamic seed derivation method, such as Figure 3 As shown, the specific details have been elaborated in the above content, so they will not be repeated here.

[0046] Step S204: Initialize the fourth random number generator using the fourth-level seed, and drive the fourth random number generator to generate an artificial noise vector with the same dimension as the measurement vector.

[0047] In some embodiments, step S204 includes: initializing the fourth random number generator based on the fourth-level seed; setting a noise intensity factor; and, based on the noise intensity factor, driving the fourth random number generator to generate a pseudo-random sequence with the same dimension as the measurement vector as an artificial noise vector, wherein the elements of the artificial noise vector are sampled independently and identically distributed, and the sampling distribution includes a uniform distribution, a Gaussian distribution, or a pseudo-random sequence generated based on a chaotic mapping. Specifically, firstly, based on the fourth-level seed... A pseudo-random number generator is initialized, and then a configurable noise intensity factor α is set; based on the noise intensity factor α, the initialized pseudo-random number generator is driven to generate a vector and a measurement vector. Dimensional consistency 3D artificial noise vector .

[0048] It should be noted that the pseudo-random number generator is configured to produce sequences with good statistical randomness. The noise intensity factor α is a positive real number used to globally control the amplitude or energy level of the generated artificial noise; its value can be preset or dynamically adjusted according to the security level and robustness requirements of the communication scenario.

[0049] It should be noted that the artificial noise vector elements Independent and identically distributed sampling is used, and the sampling distribution includes, but is not limited to, uniform distribution, Gaussian distribution, or pseudo-random sequence generated based on chaotic mapping.

[0050] It should be noted that uniform distribution sampling can be achieved by generating uniformly random numbers in the interval [0, 1). and calculate To achieve, to enable The Gaussian distribution is uniformly distributed in the range [-α, α). This Gaussian distribution sampling can be achieved by generating standard normal distribution random numbers. and calculate To achieve, to enable It follows an N(0, α²) distribution. The pseudo-random sequence based on the chaotic mapping can be generated iteratively by initializing a chaotic system (such as a Logistic mapping) using the fourth-level seed, and then generating chaotic values. and calculate accomplish.

[0051] In this way, the sending and receiving ends, based on the same shared master key and synchronized counters, can independently and in real time generate completely consistent measurement matrices and permutation vectors through deterministic hash operations. This ensures that the receiving end can accurately reconstruct the processing environment of the sending end without the need for additional transmission of these key parameters, fundamentally avoiding decryption failures caused by matrix mismatches and guaranteeing the synchronization reliability and connection stability of the communication link in dynamic environments.

[0052] Step S103: The original data is sparsely represented under a pre-constructed dictionary to obtain an initial sparse vector. The positions of the non-zero elements in the initial sparse vector are mapped to the corresponding positions in the permutation vector to obtain a target sparse vector. The target sparse vector is linearly projected using the measurement matrix to obtain a measurement vector. The measurement vector is then masked using the artificial noise vector to obtain a noisy measurement vector. The data encryption result is obtained based on the noisy measurement vector.

[0053] In some embodiments, the step of sparsely representing the original data under a pre-constructed dictionary to obtain an initial sparse vector includes: converting the original data into a signal vector consistent with the atomic dimension in the pre-constructed overcomplete dictionary; calculating the correlation value between the signal vector and each column of atoms in the overcomplete dictionary; selecting at least one column index with the largest absolute value of the corresponding correlation value from all column indices of the overcomplete dictionary according to the correlation value to form a target column index set; and constructing a sparse vector with a length equal to the number of atoms in the overcomplete dictionary based on the target column index set. Specifically, firstly, the original data to be processed is converted into a signal vector x consistent with the atomic dimension L in the pre-constructed overcomplete dictionary D. Then, the correlation value between the signal vector x and each column of atoms in dictionary D is calculated. The correlation value, which is usually obtained by calculating the inner product of the two, is: correlation(j) = xᵀ · , where j = 1, 2, N. Then, sort the N relevance values ​​according to their absolute values, and select the k column indices with the largest absolute values ​​to form the target column index set. Finally, based on this target column index set, construct a vector of length N (i.e., the number of dictionary atoms). For each index in the set... Let s( Let s(j) = 1 (or more generally, its corresponding non-zero coefficient value); for all indices j not in this set, let s(j) = 0. The resulting vector s is the initial sparse vector, satisfying that the number of its non-zero elements (L0 norm) equals its sparsity K, i.e., satisfying... , and That is, sparse vectors in Different locations ( The value is 1, and the rest are 0.

[0054] It should be noted that the measurement dimensions are... sparse vector dimension and sparsity Satisfies the lower-order relation of compressed sensing theory: When the measurement matrix When the random matrix follows an independent and identically distributed Gaussian or sub-Gaussian distribution and satisfies the restricted isometric property (RIP), the condition guarantees that it can be obtained with high probability from... Accurate recovery from 3D measurement vectors Sparse signal.

[0055] It should be noted that if the original data is a digital signal, it is a sequence of d integers taking values ​​within a specific base (e.g., base n) (e.g., [0, n]), which is directly used as a signal vector x of length d (i.e., L=d); if the original data is an image signal, it is a pixel block of size d×d, which is flattened in row (or column) order to obtain a signal vector x of length d×d. signal vector The overcomplete dictionary D is an L-row, N-column matrix (N>L), where each column is called an atom.

[0056] It should be noted that for digital signals, at the transmitting end, the signal to be transmitted is... Convert to 2D sparse vector .by Taking a base-based signal as an example, if we assume the signal dimension... ,but for The range of values ​​is within The integer sequence, sent by the end according to a predefined or learned dictionary. , for signal Perform sparse representation and construct initial sparse vectors , making The remaining positions are 0. For image signals, for Pixel blocks, encoded using dictionary encoding (such as discrete cosine transform) A dictionary (or wavelet dictionary) represents image patches as a linear combination of dictionary atoms, constructing the corresponding initial sparse vector. The flowchart of sparse representation is shown below. Figure 4 As shown.

[0057] It should be noted that this only applies to the location. The value at position k is 1, and the values ​​at other positions are 0. However, a value of 1 at position k does not mean that there is only one 1. If k can be 100, 200, or 300 in a single mapping, it means that the sparsity is 3. Positions 100, 200, and 300 are 1, and the rest are 0.

[0058] This perturbation of the sparse vector structure by spoofing the vector hides the feature information of the original data.

[0059] In some embodiments, mapping the non-zero element positions in the initial sparse vector to the corresponding positions in the permutation vector to obtain the target sparse vector includes: obtaining a set of non-zero element positions in the initial sparse vector; for each position in the set of non-zero element positions, determining the target position corresponding to each position in the target sparse vector according to the permutation vector; assigning the value of the initial sparse vector at each non-zero element position to the corresponding target position in the target sparse vector, and setting the values ​​of other positions in the target sparse vector except for the target position to zero, to obtain the target sparse vector. Specifically, firstly, the non-zero element positions of the initial sparse vector s are identified and obtained, and these positions constitute a set of non-zero element positions. Then, the position mapping is performed using a generated permutation vector P of length N (which is a one-to-one mapping from index 1 to N). For each position in the above-mentioned set of non-zero element positions... Based on the permutation vector P, its position in the target sparse vector is uniquely determined by looking up a table or by calculation. The corresponding new position, that is, the target position P ( Specifically, the initial sparse vector s is located at... The value (denoted as) Typically, 1) will be assigned to the target sparse vector. Target position P( ), that is to say Meanwhile, for the target sparse vector All other positions j (i.e., j is not in the set) In the middle), its value is set to zero. This process can be formally expressed as: for j = 1,2,...,N, if there exists some i such that j = P( ),but (j) = = 1; otherwise (j) = 0. The final vector s' is the target sparse vector after the position permutation.

[0060] This perturbation of the sparse vector structure by spoofing the vector hides the feature information of the original data.

[0061] In some embodiments, the step of using the measurement matrix to perform linear projection calculation on the target sparse vector to obtain the measurement vector includes: calculating the product of the measurement matrix and the target sparse vector to obtain the measurement vector, converting the measurement vector into a binary bit stream, and obtaining the data encryption result. Specifically, the measurement matrix is ​​calculated. (of dimension m×N) and the target sparse vector The measurement vector is obtained by multiplying a matrix of dimension N×1. (dimension is) ×1), its mathematical representation is: Because the target sparse vector Having sparsity (containing only K non-zero elements), the calculation can be simplified to calculating the corresponding elements in the measurement matrix A. The weighted sum of the K column vectors at non-zero element positions. Then, the measurement vector y is converted into a binary bit stream. The specific conversion method depends on the data type of the measurement vector elements: if the elements of the measurement vector y are integers (e.g., in a digital signal transmission scenario, the elements of the measurement matrix A are integers), then each integer element is directly encoded into a fixed-length binary string according to its numerical range and sign bit, and the binary strings of all elements are concatenated in order to form the bit stream; if the elements of the measurement vector y are real numbers (e.g., in an image signal transmission scenario), then the measurement vector y is first subjected to dynamic range normalization, and then a preset number of quantization bits is used ( Uniform quantization (e.g., 8 bits) maps each real number element to 0 to 1. An integer between -1 and 1 is used to encode all quantized integer values ​​into binary strings, which are then concatenated sequentially to form the binary bit stream. Ultimately, this binary bit stream is the data encryption result, used for channel transmission.

[0062] In some embodiments, masking the measurement vector using the artificial noise vector to obtain a noisy measurement vector includes: performing element-wise superposition perturbation on the artificial noise vector and the measurement vector to obtain the noisy measurement vector, wherein the superposition perturbation includes modulo addition or bit-level XOR operation. Specifically, the generated artificial noise vector is used... For measurement vector Perform a superposition perturbation (such as modulo addition or XOR operation) to obtain a noisy measurement vector. The formula is: ,in The masking function includes element-wise modular addition or bit-wise XOR operations, and then the noise-added measurement vector is... It is converted into a binary bit stream and sent into the channel for transmission.

[0063] It should be noted that the modulo addition operation: for each pair of corresponding elements in the measurement vector y and the artificial noise vector n and Perform modular addition. This operation can be represented as: mod M, where M is a preset modulus. In practical applications, if the measured value This is a b-bit quantized integer, where M is typically 2^b. This operation ensures the result... It remains within the integer range of [0, M). The corresponding inverse operation (performed at the receiving end) is a modulo-subtraction operation: mod M.

[0064] It should be noted that bit-level XOR operation: first, the elements of the measurement vector are... and artificial noise vector elements Each bit string is converted to a fixed-length binary bit string. Then, a bitwise XOR operation is performed on these two bit strings to obtain the noisy bit string. This operation can be represented as: ,in, This represents the bitwise XOR operator, which performs obfuscation at the bit level. The corresponding inverse operation is also an XOR operation: = Accurate restoration is achieved by utilizing the reflexivity of the XOR operation.

[0065] In some embodiments, the data encryption result is obtained based on the noise-added measurement vector. Specifically, different methods are selected depending on the signal type, which may be integers or real numbers. Each element is efficiently and reliably encoded into binary format, which is particularly useful for applications involving digital signals (measured values ​​as integers): noisy measurement vectors. Each element It is itself an integer value (e.g., a measurement matrix derived from integer elements). In this case, directly for each... The data is encoded into a fixed-length binary string based on its numerical range and sign bit (if it's a signed integer). Then, the binary strings of all elements are concatenated according to their order in the vector to form the final encrypted binary bitstream data. Alternatively, depending on the channel conditions, the encoding can be adjusted accordingly. Use a small number of bits (e.g., 2 to 4 bits) for uniform quantization before encoding to further reduce the amount of data.

[0066] It should be noted that for application scenarios involving image signals (measured values ​​are real numbers): noisy measurement vectors The elements are real numbers (floating-point numbers). First, for the vector... Perform dynamic range normalization, for example, based on The maximum and minimum values ​​of the elements are linearly scaled to the interval [0, 1] or [-1, 1]. Then, the following steps are taken... Bit uniform quantization maps each normalized real value to 2^{ One of the discrete integer levels (e.g., (The value is usually 8 or 10 bits). Then, these quantized integer values ​​are encoded one by one into a sequence of length, just like integer signals. The binary strings are then concatenated sequentially to form the encrypted binary bitstream data for transmission.

[0067] In some embodiments, after converting the measurement vector into a binary bitstream and before obtaining the data encryption result, the method further includes: deriving a stream encryption key using the hash function based on the master key, the counter value, and a preset fourth offset; using the stream encryption key to perform symmetric encryption on the binary bitstream, and using the encrypted bitstream as the final data encryption result. Specifically, firstly, using the same cryptographic hash message authentication code function (such as HMAC-SHA256) as that used to generate the dynamic seed, the shared master key is... The key for this function is the currently synchronized counter value. With a preset fourth offset, distinct from the first three seed offsets. Add the two components together, use the result as the message input, and calculate the derived encryption key. Then, at the sending end, a derived encryption key is used. The binary bitstream is encrypted using an efficient symmetric stream encryption algorithm (or a stream encryption mode of a block cipher algorithm, such as AES-CTR), resulting in an encrypted bitstream. This encryption operation occurs after signal compression and permutation processing, directly protecting the bitstream that is about to be transmitted through the channel. Finally, the encrypted bitstream is sent out as the final data encryption result, which combines physical layer structural security and transport layer bit security.

[0068] In some embodiments, the derived encryption key is calculated. The mathematical expression is: ; Among them, derived encryption key The bit stream is encrypted to obtain And send; the receiving end uses the same key and synchronous Derivatives For the received Decrypt and recover the original bitstream ;in To and and Different preset offset constants.

[0069] This method utilizes a dynamically generated measurement matrix for linear projection, further mixing and compressing the permuted data into an encrypted result.

[0070] Please refer to Figure 5In some embodiments, after obtaining the data encryption result based on the noise-added measurement vector, steps S501 to S505 are further included: Step S501: Based on the same master key and counter value as the sender, the measurement matrix, the permutation vector, and the artificial noise vector are reconstructed using a hash function; In some embodiments, the receiver obtains a counter value synchronized with the sender during the communication session and a pre-shared master key (MasterKey). The same hash message authentication code function (HMAC-SHA256) and the exact same offset constant are used. , , Following the same multi-level seed derivation rules as the sender, the first-level seed, second-level seed, third-level seed, and fourth-level seed are recalculated and generated. Subsequently, these seeds are used to initialize the corresponding pseudo-random number generators, strictly adhering to the same matrix generation algorithm as the sender: using... Generate a parent matrix Q with the same dimensions and elements; use Extract the same set of row indices R and column indices C from the parent matrix Q, and then reconstruct a completely identical measurement matrix A; use And using the same constraint interleaving algorithm and parameters, a completely consistent permutation vector P is reconstructed. And by using the same noise generation algorithm (including the same noise intensity factor α and distribution type), a completely consistent artificial noise vector n is reconstructed.

[0071] Step S502: Parse and recover the noisy measurement vector from the data encryption result; In some embodiments, the receiving end receives the data encryption result from the channel. If the data encryption result is a bit stream that has undergone symmetric encryption (i.e., a symmetric encryption layer has been superimposed), the receiving end needs to first derive the same stream encryption key based on the same master key, the synchronized counter value, and a preset fifth offset (Offset5). The received encrypted bitstream is decrypted to recover the original binary bitstream. Next, this binary bitstream is parsed. If the measured value is an integer (corresponding to a digital signal scenario), the binary string is directly parsed into integers according to a preset integer encoding format (such as sign-amplitude representation) and bit length, and these integers are sequentially assembled into an m-dimensional noisy measurement vector. If the measured value is a real number (corresponding to an image signal scene), then the binary string is first quantized according to the number of bits. The data is grouped, parsed into quantized integer values, and then denormalized according to the normalization parameters used by the transmitter (such as dynamic range) to map the quantized integers back to real numbers, ultimately recovering the m-dimensional real-valued measurement vector with added noise. .

[0072] Step S503: Using the artificial noise vector, perform an inverse masking operation on the noisy measurement vector to recover the measurement vector; In some embodiments, after recovering the noisy measurement vector After reconstructing the artificial noise vector n, the receiver performs an inverse masking operation to eliminate the disturbances superimposed at the transmitter and recover the pure measurement vector y. This inverse operation corresponds to the masking operation at the transmitter: if the transmitter uses modulo addition, the receiver performs modulo subtraction; if the transmitter uses bit-level XOR, the receiver performs the same XOR operation.

[0073] This step completely removes the randomness introduced by artificial noise, yielding the original measurement vector y that can be used for subsequent sparse reconstruction.

[0074] Step S504: Based on the measurement matrix, the target sparse vector is recovered from the measurement vector using a sparse reconstruction algorithm; In some embodiments, after recovering the measurement vector y and the measurement matrix A, the receiving end uses a sparse reconstruction algorithm to recover the target sparse vector from y. Different algorithms are used for different signal types and measurement value types: First, for digital signals (measurement values ​​are integers): a column matching algorithm based on minimum Euclidean distance is used, where the algorithm traverses the measurement matrix. of column vectors Calculate the Euclidean distance between each column vector and the measurement vector y. The column index that minimizes this distance is selected as the target sparse vector. The position of the non-zero element, i.e., let The remaining positions are 0. Recover the target sparse vector. The calculation formula is: Among them, the Euclidean distance matching algorithm is suitable for integer measurement scenarios, with a computational complexity of O(n log n). ,in For measuring dimensions, It has a sparse vector dimension, which has the characteristics of high computational efficiency and high matching accuracy.

[0075] It should be noted that if no exact match exists, the column index with the smallest distance is selected. As a matching result.

[0076] In some embodiments, for image signals (measured values ​​are real numbers), due to the measurement vector The elements are real numbers (floating-point numbers). Due to the precision limitations of floating-point numbers, Euclidean distance cannot be used directly for accurate matching. Therefore, a sparse reconstruction algorithm based on correlation is adopted, including but not limited to orthogonal matching pursuit. )algorithm, The algorithm recovers sparse vectors through an iterative process: in each iteration, the measurement matrix is ​​calculated. The correlation projection value of each column with the current residual vector Select the column index with the largest projected value. Add the support set, then update the sparse coefficients and residuals using least squares solution. Repeat the iteration until the preset sparsity is reached. or residual threshold (e.g.) ,in The preset error threshold is usually 1. (on the order of magnitude), ultimately yielding the permuted sparse vector. Correlation-based matching algorithms are suitable for real-valued measurement scenarios, can handle floating-point precision issues and noise interference, and ensure the quality of image reconstruction.

[0077] Step S504: Based on the inverse mapping relationship of the permutation vector, the positions of non-zero elements in the target sparse vector are mapped back to their original positions to recover the initial sparse vector, and the original data is reconstructed based on the initial sparse vector and the overcomplete dictionary.

[0078] In some embodiments, the target sparse vector is obtained. Then, the initial sparse vector s needs to be recovered using the inverse mapping of the permutation vector P. Since the permutation vector P defines a one-to-one mapping (bijective) from the original position to the permuted position, there exists a unique inverse mapping. The specific operation is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] The non-zero element positions are mapped back to their original positions to obtain the recovered sparse vector. ,in Then, in the recovered initial sparse vector s, let (For binary sparsity, the value is assigned to 1). After processing all non-zero positions, the recovered initial sparse vector s is obtained. Finally, the original data is reconstructed based on the initial sparse vector s and the dictionary D: the original data x can be approximately reconstructed through a linear combination of the dictionary D and the sparse vector s, i.e., x ≈ D × s. Since s is sparse, the reconstruction process simplifies to combining the atoms in the dictionary D corresponding to the non-zero positions of s, i.e., the index set. For digital signals, this index directly corresponds to a specific symbol or sequence; for image signals, the result of this combination is the reconstructed image patch vector, which is then restored to a d×d pixel patch through a reshape operation.

[0079] It should be noted that when sparsity Time (i.e.) With multiple non-zero positions, orthogonal matching pursuit can be used ( The algorithm, or greedy matching pursuit algorithm, iteratively selects the column most relevant to the residual until it finds... A non-zero position or a reconstruction error threshold is met. Based on the permutation vector... Find the inverse mapping relationship that satisfies Original location index Due to the permutation vector It is a one-to-one mapping, and there must exist a unique one. Make In location By restoring the non-zero elements at each position, we obtain the original sparse vector. ,Right now The remaining positions are 0. Through dictionary decoding, the non-zero elements of the sparse vector are positioned... Converting it to the corresponding number base sequence will recover the original signal. .

[0080] It should be noted that when sparsity In this case, a sparse vector contains only one non-zero position, and dictionary encoding can directly determine the index of that position. The generated sparse vector The one-to-one correspondence is maintained before and after the permutation, so at the decoding end, only the permutation vector is needed. The inverse mapping can uniquely determine the original index, and the recovery process is simple and unambiguous. However, when the sparsity is low... In a sparse vector, there are multiple non-zero positions whose combined structure is determined by multiple dictionary atoms. Permutation mappings cause these positions to rearrange and mix in the sparse domain. To ensure that all non-zero positions can be accurately identified, the decoding end must employ orthogonal matching pursuit. Alternatively, a greedy matching pursuit algorithm can be used to progressively select the vectors by calculating the correlation between the permuted measurement vector and the dictionary columns. The most matching atom positions are found until all non-zero indices are recovered. Permutation vector This process provides a defined bijective relationship, based on The inverse mapping can recover the permuted index. Convert to original position Thus, the original sparse vector is obtained. ,Right now The remaining positions are 0. Through dictionary decoding, the non-zero elements of the sparse vector are positioned... Converting it to the corresponding number base sequence will recover the original signal. .

[0081] It should be noted that the flowcharts of the sending and receiving ends of this invention are as follows: Figure 6 As shown.

[0082] It should be noted that the permutation vector provides positional randomness when mapping sparse vectors. When the sparsity... When permutation operations randomly map the unique non-zero element positions, they increase the unpredictability of the positions. Even if an attacker obtains partial information about the original signal through some means, they cannot deduce its position in the permuted sparse vector; when the sparsity... At the same time, the constraint interleaving property ensures that multiple sparse elements in adjacent positions are far apart after permutation, which enhances the system's ability to resist sudden interference. Even if some data is damaged during transmission, it will not affect adjacent sparse elements in a concentrated manner, thus improving the reliability of communication.

[0083] In this way, the receiving end, based on a synchronized key and counter, deterministically reconstructs a measurement matrix and permutation vector that are completely identical to those of the sending end. This lays a synchronous foundation for subsequent decryption. By correctly parsing the encryption result and using the reconstructed matrix for accurate sparse signal recovery, the original data is finally restored through inverse mapping. This complete and self-consistent processing flow ensures that, provided the synchronization is correct, the receiver can decrypt and reconstruct the original information losslessly and reliably, thus solving the core reliability issues of data integrity and recoverability at the receiving end.

[0084] It should be noted that, since both the measurement matrix and the permutation vector are generated by a pseudo-random process driven by a dynamic seed, and It possesses unidirectional and collision-resistant properties, preventing attackers from deriving the seed value and thus reconstructing the measurement matrix and permutation vector without knowing the master key. This invention employs a two-layer security protection structure in its system design: in the sparse domain, the original sparse representation is perturbed by the permutation matrix to hide sparse features; in the sampling domain, signal compression and mixing are achieved through a dynamic measurement matrix, making the measurement vector exhibit high randomness. Even if an attacker intercepts the transmitted measurement vector... Since the matrix parameters are unknown, it is also impossible to recover the original signal by solving the inverse problem. Furthermore, the system can be easily integrated with a symmetric encryption module as needed, superimposing a bitstream symmetric encryption module at the transport layer to perform secondary encryption on the bitstream of the measurement vector conversion, thereby further enhancing the overall protection strength. This extended solution does not require changes to the original sampling and reconstruction process, adds almost no computational or communication overhead, and can easily achieve superimposed security enhancement.

[0085] It should be noted that during the signal transmission process of the method of the present invention, when the original signal... After sparse coding and permutation processing, the data is input into the compressed sensing measurement module to measure the dimension. Dimensions below the original signal Achieve dimensional compression (compression ratio) For digital signals, taking a signal composed of 10 binary symbols as an example, the original signal dimension... This invention represents the signal in a sparse manner using a complete or custom dictionary, and then reduces the dimensionality to the measurement dimension using a measurement matrix. It can achieve a dimensionality compression ratio of approximately 5:2; for image signals, it can achieve a dimensionality compression ratio of approximately 5:2. Taking pixel blocks as an example, the original signal dimension Measurement dimensions This achieves a higher compression ratio. In this process, the signal is projected into a low-dimensional measurement space to form a measurement vector. While maintaining high reconstruction accuracy, for digital signals, the measurement results are represented in integer form (e.g., the measurement matrix elements range from [-8, 8]), which can be directly encoded into a binary bit stream for transmission, or uniformly quantized using a small number of bits (e.g., 2-4 bits). For image signals, the measurement results are represented in real number form, requiring dynamic range normalization before encoding. Bit-wise (e.g., 8-bit) uniform quantization transmission. This process achieves effective dimensionality reduction in the signal dimension, thereby reducing the transmission load and improving the overall system efficiency.

[0086] It should be noted that the permutation vector provides positional randomness when mapping sparse vectors. When the sparsity... When permutation operations randomly map the unique non-zero element positions, they increase the unpredictability of the positions. Even if an attacker obtains partial information about the original signal through some means, they cannot deduce its position in the permuted sparse vector; when the sparsity... At the same time, the constraint interleaving property ensures that multiple sparse elements in adjacent positions are far apart after permutation, which enhances the system's ability to resist sudden interference. Even if some data is damaged during transmission, it will not affect adjacent sparse elements in a concentrated manner, thus improving the reliability of communication.

[0087] It should be noted that the computational complexity of the method in this invention mainly includes dynamic seed derivation, dictionary sparse representation generation, measurement matrix and sparse vector multiplication, and column matching or sparse reconstruction operations at the receiving end. Specifically, dynamic seed derivation is achieved through... The hash function generates multi-level seeds to drive the generation of the parent matrix, measurement matrix, and permutation vector. Each time slot requires only constant-level calls, with a computational complexity of O(log n). The time is on the order of constant, typically taking about 1-5 seconds. Pseudo-random numbers are used to generate the parent matrix, measurement matrix, and permutation vector, also with constant time complexity. If the generation time is approximately... Generating an element matrix of orders of magnitude takes approximately 0.26 ms; dictionary sparse representation generation: the input signal dimension is... The number of columns in the dictionary is Each column is [length] To obtain a sparse vector, the inner product or correlation of each atom needs to be calculated, resulting in a time complexity of O(n log n). .For example At that time, the order of magnitude was approximately The multiplication and addition operation takes approximately 10 ms; the computational complexity of multiplying the measurement matrix and the sparse vector is approximately O(n). ,by For example, the computational load is approximately 2.6 × 10⁻⁶. 5 The first multiplication and addition takes approximately 0.26 ms; the complexity of column matching or sparse reconstruction at the receiving end is approximately... The computational complexity is comparable to multiplication; image signals can be processed using... Alternatively, a correlation matching algorithm can be used, with a controllable number of iterations and a total processing time of 0.3~1ms. Aside from the main operations such as dynamic seed derivation calculation, pseudo-random number generation, dictionary sparse representation calculation, and matrix-vector multiplication, the remaining operations (such as extracting the measurement matrix from the parent matrix, index permutation, array copying, vector mapping, bitstream conversion, etc.) require very little computation. Taking a typical parameter as an example (digital signal dimension...),... sparse dimensionality of the dictionary Measure vector dimension Mother matrix screening measurement matrix: approximately 10^2 to 10^3 memory copy operations; sparse vector permutation / mapping: approximately 10^2 to 10^3 element assignment operations; bitstream conversion / packing: approximately 10^2 to 10^3 simple operations; compared to matrix and vector multiplication (≈10^3), ... 5 ~10 6 (multiplication and addition) and dictionary matching (≈10) 5 ~10 6 The above operations (comparison operations) account for less than 1% of the total computation time and can be considered negligible. Similarly, taking typical parameters as an example (digital signal dimension)... sparse dimensionality of the dictionary Measure vector dimension When an attacker brute-forces the measurement matrix (assuming the elements of the measurement matrix are integers in the range [-8, 8]), the exhaustive complexity is as high as... The hierarchy is much larger, and for real-valued measurement matrices, the order of magnitude is even higher; the exhaustive complexity of permutation vectors also reaches [a certain level]. The order of magnitude; and the brute-force search space of seeds even reaches... The order of magnitude. Therefore, the method of this invention, while ensuring high security, possesses low computational complexity and is suitable for resource-constrained devices such as IoT nodes and wireless sensor networks.

[0088] In this embodiment of the invention, the sending and receiving ends, based on the same shared master key and synchronized counter, can independently and in real-time generate completely consistent measurement matrices and permutation vectors through deterministic hash operations. This ensures that the receiving end can accurately reconstruct the processing environment of the sending end without the need for additional transmission of these key parameters, fundamentally avoiding decryption failures caused by matrix mismatch and guaranteeing the synchronization reliability and connection stability of the communication link in dynamic environments. Utilizing the principle of compressed sensing, the original high-dimensional data is represented as a low-dimensional sparse vector, achieving effective data compression. This efficient compression transmission method directly enhances the reachability and robustness of data transmission. By perturbing the structure of the sparse vector through permutation vectors, the characteristic information of the original data is hidden. Linear projection using dynamically generated measurement matrices further mixes and compresses the permuted data into observations. These two steps form a two-layer encryption mechanism of "structural perturbation" and "linear mixing." Even if an attacker intercepts the encryption result, they cannot effectively recover the original data without knowing the dynamic matrix and permutation vectors, thus greatly enhancing the system's ability to resist eavesdropping, analysis, and tampering attacks and ensuring the security and reliability of data during transmission. Compared with existing technologies, the present invention can ensure that both parties in communication can reliably complete data transmission in complex environments.

[0089] like Figure 7 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided; An embodiment of the present invention provides a data encryption system based on key-driven compression sensing, comprising: The acquisition module 100 is used to acquire the raw data to be sent; The generation module 200 is used to derive several levels of dynamic seeds through a hash function based on the master key shared with the receiving end and the synchronized counter value, and generate a measurement matrix extracted from the mother matrix, a permutation vector constructed based on the constraint interleaving algorithm, and an artificial noise vector according to the dynamic seeds at each level. The encryption module 300 is used to perform sparse representation of the original data under a pre-constructed dictionary to obtain an initial sparse vector, map the non-zero element positions in the initial sparse vector to the corresponding positions in the permutation vector to obtain a target sparse vector, perform linear projection calculation on the target sparse vector using the measurement matrix to obtain a measurement vector, perform masking operation on the measurement vector using the artificial noise vector to obtain a noisy measurement vector, and obtain a data encryption result based on the noisy measurement vector.

[0090] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the key-driven compressed sensing-based data encryption method provided by any of the above-described method embodiments of the present invention.

[0091] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0092] Based on the above embodiments of the key-driven compression sensing-based data encryption method, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the key-driven compression sensing-based data encryption method of any embodiment of the present invention.

[0093] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0094] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0095] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0096] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the key-driven compression sensing-based data encryption method described in any of the above-described method embodiments of the present invention.

[0097] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0098] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data encryption method based on key-driven compressed sensing, characterized in that, include: Retrieve the raw data to be sent; Based on the master key shared with the receiver and the synchronized counter value, several levels of dynamic seeds are derived through a hash function. According to the dynamic seeds at each level, a measurement matrix extracted from the mother matrix, a permutation vector constructed based on the constraint interleaving algorithm, and an artificial noise vector are generated respectively. The original data is sparsely represented under a pre-constructed dictionary to obtain an initial sparse vector. The positions of the non-zero elements in the initial sparse vector are mapped to the corresponding positions in the permutation vector to obtain a target sparse vector. The target sparse vector is then linearly projected using the measurement matrix to obtain a measurement vector. The measurement vector is then masked using the artificial noise vector to obtain a noisy measurement vector. The data encryption result is obtained based on the noisy measurement vector.

2. The data encryption method based on key-driven compression sensing according to claim 1, characterized in that, The generation of the measurement matrix extracted from the mother matrix, the permutation vector constructed based on the constraint interleaving algorithm, and the artificial noise vector according to the dynamic seeds at each level includes: The first random number generator is initialized using a first-level seed and driven to generate a mother matrix of a preset dimension. The dynamic seed includes a first-level seed, a second-level seed, a third-level seed, and a fourth-level seed derived in sequence. The second random number generator is initialized using the second-level seed, and the second random number generator is driven to randomly select a specified number of non-repeating row and column indices from the row and column index ranges of the parent matrix, respectively, and extract elements at corresponding positions from the parent matrix according to the order of the row and column indices to form the measurement matrix. The third random number generator is initialized using the third-level seed, and the third random number generator is driven to execute the constraint interleaving algorithm to generate the permutation vector; The fourth random number generator is initialized using the fourth-level seed, and the fourth random number generator is driven to generate an artificial noise vector with the same dimension as the measurement vector.

3. The data encryption method based on key-driven compressed sensing according to claim 2, characterized in that, The step of initializing the third random number generator using the third-level seed and driving the third random number generator to execute the constraint interleaving algorithm to generate the permutation vector includes: The third random number generator is initialized based on the third-level seed; Set the length of the permutation vector and the minimum distance constraint value; Initialize the candidate element set and the initial permutation vector based on the length of the permutation vector; For each current position, candidate elements are selected from the candidate element set whose distances from all elements at determined positions in the permutation vector are not less than the minimum distance constraint value, thus forming a candidate set; The third random number generator is used to randomly select a target element from the candidate set to fill the current position, and the target element is removed from the candidate element set until all positions are filled, and the final generated permutation vector is output.

4. The data encryption method based on key-driven compression sensing according to claim 2, characterized in that, The step of initializing the fourth random number generator using the fourth-level seed and driving the fourth random number generator to generate an artificial noise vector with the same dimension as the measurement vector includes: The fourth random number generator is initialized based on the fourth-level seed; Set the noise intensity factor; Based on the noise intensity factor, the fourth random number generator is driven to generate a pseudo-random sequence with the same dimension as the measurement vector as an artificial noise vector. The elements of the artificial noise vector are sampled independently and identically distributed, and the sampling distribution includes uniform distribution, Gaussian distribution, or pseudo-random sequence generated based on chaotic mapping.

5. The data encryption method based on key-driven compression sensing according to claim 1, characterized in that, Based on the master key shared with the receiving end and the synchronized counter value, several levels of dynamic seeds are derived through a hash function, including: Obtain a shared master key and a counter value that have been pre-negotiated with the receiving end, wherein the counter value is determined based on a time step or frame sequence number; The counter value is combined with several preset offsets to obtain a combination result. The combination result and the shared master key are then sequentially input into the hash message authentication code function for calculation to obtain several levels of dynamic seeds.

6. The data encryption method based on key-driven compression sensing according to claim 1, characterized in that, The step of sparsely representing the original data under a pre-constructed dictionary to obtain an initial sparse vector includes: The raw data is converted into a signal vector consistent with the atomic dimensions in the pre-constructed overcomplete dictionary; Calculate the correlation value between the signal vector and each column of atoms in the overcomplete dictionary; Based on the relevance value, select at least one column index with the largest absolute value of the corresponding relevance value from all column indexes of the overcomplete dictionary to form the target column index set; Based on the target column index set, construct a sparse vector with a length equal to the number of atoms in the overcomplete dictionary.

7. The data encryption method based on key-driven compression sensing according to claim 1, characterized in that, The step of mapping the positions of non-zero elements in the initial sparse vector to the corresponding positions in the permutation vector to obtain the target sparse vector includes: Obtain the set of non-zero element positions of the initial sparse vector; For each position in the set of non-zero element positions, the target position corresponding to each position in the target sparse vector is determined according to the permutation vector; The value of each non-zero element in the initial sparse vector is assigned to the corresponding target position in the target sparse vector, and the values ​​of all other positions in the target sparse vector except the target position are set to zero to obtain the target sparse vector.

8. The data encryption method based on key-driven compression sensing according to claim 1, characterized in that, The step of using the artificial noise vector to perform a masking operation on the measurement vector to obtain a noisy measurement vector includes: performing element-wise superposition perturbation on the artificial noise vector and the measurement vector to obtain the noisy measurement vector, wherein the superposition perturbation includes modulo addition or bit-level XOR operation.

9. The data encryption method based on key-driven compression sensing according to any one of claims 1-7, characterized in that, After obtaining the data encryption result based on the noise-added measurement vector, the method further includes: Based on the same master key and counter value as the sender, the measurement matrix, the permutation vector, and the artificial noise vector are reconstructed using a hash function. The noisy measurement vector is parsed and recovered from the encrypted data result; Using the artificial noise vector, perform an inverse masking operation on the noisy measurement vector to recover the measurement vector; Based on the measurement matrix, the target sparse vector is recovered from the measurement vector using a sparse reconstruction algorithm; Based on the inverse mapping relationship of the permutation vector, the positions of non-zero elements in the target sparse vector are mapped back to their original positions to recover the initial sparse vector, and the original data is reconstructed based on the initial sparse vector and the overcomplete dictionary.

10. A data encryption system based on key-driven compressed sensing, characterized in that, include; The acquisition module is used to acquire the raw data to be sent; The generation module is used to derive several levels of dynamic seeds through a hash function based on the master key shared with the receiver and the synchronized counter value. Based on the dynamic seeds at each level, it generates a measurement matrix extracted from the mother matrix, a permutation vector constructed based on the constraint interleaving algorithm, and an artificial noise vector. The encryption module is used to perform sparse representation of the original data under a pre-constructed dictionary to obtain an initial sparse vector, map the non-zero element positions in the initial sparse vector to the corresponding positions in the permutation vector to obtain a target sparse vector, perform linear projection calculation on the target sparse vector using the measurement matrix to obtain a measurement vector, perform masking operation on the measurement vector using the artificial noise vector to obtain a noisy measurement vector, and obtain the data encryption result based on the noisy measurement vector.