Iot data compression and recovery method based on efficient orthogonal matching pursuit algorithm
Patent Information
- Application Number
- CN202411939354.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2026-10-27
AI Technical Summary
该方法显著提高了数据处理的效率和精度,解决了传统方法中稀疏性不稳定、测量矩阵设计复杂、重构精度不足等问题
[0041]本申请提供的基于高效正交匹配追踪算法的物联网数据压缩与恢复方法,本发明通过动态计算原始物联网数据的最优稀疏度,提高了信号在特定变换域中的表示效率。在传统方法中,稀疏度通常是预先设定的固定值,这在面对多样化的物联网数据时难以适应不同信号的分布特性。本发明引入了一种基于误差反馈的稀疏度计算公式,通过迭代截断信号的次要成分,当截断后的相对误差小于阈值时,动态确定最优稀疏度。这种自适应稀疏度优化方法能够根据数据特性调整稀疏性要求,显著减少冗余信息,提高了压缩效率。此外,稀疏度的动态确定为后续压缩和恢复过程提供了准确的先验信息,避免了因稀疏度设定不合理而导致的重构精度下降问题。其次,本发明在测量矩阵的设计中结合了沃尔什-哈达玛正交基矩阵的稀疏性和正交性特性,以及互相干度最小化优化策略,显著提高了压缩感知的性能。传统的随机测量矩阵虽然在理论上适用于压缩感知框架,但其计算复杂度高,且在特定信号中可能表现出较低的采样效率。本发明利用沃尔什-哈达玛正交基矩阵作为变换域基础,不仅简化了矩阵的存储和计算,还增强了对信号主要特征的捕获能力。此外,通过优化测量矩阵的互相干度,降低了信号投影过程中的信息冗余,进一步提高了信号的采样效率和重构的鲁棒性。这种测量矩阵的优化设计使得本发明能够在低功耗、低计算资源的物联网设备中高效运行,特别适用于无线传感器网络等资源受限的场景。本发明的另一显著优势在于其提出的高效重构算法。通过引入支撑集合的动态更新机制,本发明在重构过程中实现了信号特征的逐步逼近。传统的信号重构方法中,支撑集合通常是静态设定的,难以应对信号分布的动态变化。而本发明通过结合初始残差和投影值的动态调整,构建了一种迭代优化的支撑集合更新方法,确保每次迭代都能够准确捕获信号的非零分量。这种机制尤其适合于物联网场景中存在突变或噪声的信号数据,例如工业物联网中设备状态监测的故障检测信号。支撑集合的动态更新不仅提升了重构的精度,还减少了不必要的计算开销,使得重构算法能够在低延迟和高效性之间取得平衡。此外,本发明通过伪逆运算和残差反馈优化进一步提高了稀疏表示系数的估计精度。伪逆运算在支撑集合的限制下,对稀疏系数进行最小误差优化,确保每次迭代都能够显著减少残差。结合残差反馈,本发明实现了信号重构的自适应调整,使得算法能够在多样化的物联网场景中保持稳定的恢复精度。特别是在高噪声环境下,残差驱动的反馈机制能够动态调整重构过程的参数,减少噪声对恢复信号的干扰,提升了重构结果的鲁棒性。
Smart Images

Figure CN122993723A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method for compressing and recovering IoT data based on an efficient orthogonal matching pursuit algorithm. Background Technology
[0002] With the rapid development of Internet of Things (IoT) technology, the demand for the collection, transmission, storage, and processing of massive amounts of data is increasing daily. IoT systems typically consist of multiple distributed sensor nodes responsible for collecting environmental information or device status data and uploading it to a central server or cloud platform for analysis. This data is widely used in environmental monitoring, intelligent transportation, smart homes, and industrial control. However, IoT data exhibits the following characteristics: high dimensionality, high redundancy, and dynamic nature. These data characteristics pose significant challenges to existing communication network bandwidth, node storage capacity, and computing resources. Therefore, how to efficiently compress data to reduce transmission and storage costs while ensuring the accuracy of data during reconstruction has become an urgent problem to be solved in IoT data processing.
[0003] Traditional compression algorithms such as ZIP, LZW, and JPEG are widely used for image, text, and audio compression. These algorithms compress data to a smaller storage size by utilizing data redundancy and structural characteristics. However, these methods typically require global scanning and analysis of the data, relying on complete access to the original data. This global compression approach is not efficient enough for real-time data stream processing in the Internet of Things (IoT). Furthermore, traditional compression methods have limited effectiveness for high-dimensional time-series data and cannot fully utilize the sparsity of IoT data in specific transform domains. Wavelet transform is a commonly used data compression technique that captures the sparsity of data by projecting it onto a wavelet basis. Wavelet transform has achieved good results in image processing and signal compression. However, wavelet transform has high computational complexity, making it difficult to apply directly to resource-constrained IoT nodes. Moreover, the choice of wavelet basis needs to be optimized based on signal characteristics; a fixed basis selection is difficult to adapt to the diverse data distributions in IoT scenarios, resulting in insufficient compression efficiency. Summary of the Invention
[0004] This application provides a method for IoT data compression and recovery based on an efficient orthogonal matching pursuit algorithm, achieving efficient compression and accurate recovery of IoT data. This method significantly improves the efficiency and accuracy of data processing, and solves problems such as sparsity instability, complex measurement matrix design, and insufficient reconstruction accuracy in traditional methods.
[0005] This application provides a method for IoT data compression and recovery based on an efficient orthogonal matching pursuit algorithm, the method comprising:
[0006] Step 1: Calculate the optimal sparsity of the original IoT data in a certain transform domain or dictionary. Specifically, this includes: gradually increasing the number of truncated coefficients from the minimum. When the difference between the truncated data and the original IoT data no longer exceeds the set threshold in terms of relative error, the number of coefficients at this point is taken as the optimal sparsity.
[0007] Step 2: Construct a Walsh-Hadamard orthogonal basis matrix based on optimal sparsity; calculate the sparse representation coefficients of the original IoT data based on the Walsh-Hadamard orthogonal basis matrix; define a measurement matrix, and find the optimal measurement matrix by minimizing the mutual coherence of the composite matrix formed by the measurement matrix and the Walsh-Hadamard orthogonal basis matrix;
[0008] Step 3: Use the optimal measurement matrix to perform compressed sampling, complete the data compression, and obtain the compressed result;
[0009] Step 4: Based on the compression results, initialize the support set required for data reconstruction, and reconstruct the data through iterative projection updates and coefficient estimation.
[0010] Furthermore, the temporal correlation of the raw IoT data ranges from 0.7 to 0.99; the sparsity of the raw IoT data ranges from 1 to 20.
[0011] Furthermore, the optimal sparsity of the original IoT data under a certain transform domain or dictionary is calculated using the following formula:
[0012]
[0013] in, Represents the set of natural numbers; arg min k This represents the search for k that minimizes the objective function; k is a candidate value for sparsity; x is the original IoT data with dimension N×1; Ψ k Represents the k-th order truncation operator; Ψ k x represents a k-th order truncation operation on the original IoT data x, retaining the k largest components; ||·||2 represents the Euclidean norm; ∈0 is the set threshold, ∈0∈[0.01, 0.05]; N is the vector length of the original IoT data x.
[0014] Furthermore, in step 2, the Walsh-Hadamard orthogonal basis matrix is represented by the following formula:
[0015]
[0016] Where, φ K h is a Walsh-Hadamard orthogonal basis matrix, which is a K·K dimensional orthogonal basis matrix; ijLet i be the base element, where i and j are integer subscript indices, both ranging from 1 to K; The sparse representation coefficients of the original IoT data are calculated using the following formula based on the Walsh-Hadamard orthogonal basis matrix:
[0017]
[0018] Where T represents the transpose operation of a matrix or vector; diag(·) is the operation to extract diagonal elements.
[0019] Furthermore, the optimal measurement matrix A is found using the following formula. opt :
[0020]
[0021] Where A is the measurement matrix; μ(Aφ) K The mutual coherence of the composite matrix formed by the measurement matrix A and the Walsh-Hadamard orthogonal basis matrix is calculated using the following formula:
[0022]
[0023] Among them, (Aφ K [:,i] represents matrix AΦ K The i-th column; (AΦ K [:,j] represents matrix AΦ K The j-th column; <·, ·> represent inner product operations; I K Let K be the identity matrix; ||·|| F Let F be the norm; γ be the preset regularization coefficient; λ be the preset weight coefficient; A[i,j] represent the element in the i-th row and j-th column of the measurement matrix A; |·| is the absolute value operation; α i Let be the value of the i-th element in the sparse representation coefficient α.
[0024] Furthermore, the expression for the element in the i-th row and j-th column of measurement matrix A is as follows:
[0025]
[0026] Where t represents the temporal correlation of the original IoT data, ranging from 0.7 to 0.99; η is a Gaussian distribution with a mean of 0 and a variance equal to the sparsity of the original IoT data; and M ranges from...
[0027] Here, {·} is the floor operator.
[0028] Furthermore, in step 3, compressed sampling is performed using the optimal measurement matrix according to the following formula to complete data compression and obtain the compressed result:
[0029] y = A opt φ K αx;
[0030] Where y represents the compression result.
[0031] Furthermore, in step 4, the support set required for data reconstruction is initialized based on the compression results using the following formula:
[0032] r0 = y, Λ0 = {α s :| <y,A opt α s >|>0.1||α|| ∞};
[0033] Where r0 is the initial residual, which is set to be equal to the compression result; Λ0 is the support set;
[0034] α s :| <y,A opt α s >|>0.1||α|| ∞ Indicates when <y,A opt α s >|>0.1||α|| ∞ When satisfied, α at this time s Retain the elements as support sets; α s Let be the value of the s-th element in the sparse representation coefficient α; iterative projection update and coefficient estimation are performed using the following formula:
[0035] Λ m =r m-1 Λ m-1 ∪y;
[0036]
[0037] Among them, Λ m Let Λ be the support set for the m-th iteration; m-1 Let be the support set for the (m-1)th iteration; This is the coefficient estimate for the (m-1)th iteration; r m-1 Let be the residual of the (m-1)th iteration; This indicates a pseudo-inverse operation.
[0038] Furthermore, in step 4, the data is reconstructed using the following formula:
[0039]
[0040] Where final represents the total number of iterations; x rec This is the reconstructed data.
[0041] This application provides an IoT data compression and recovery method based on an efficient orthogonal matching pursuit algorithm. This invention improves the signal representation efficiency in a specific transform domain by dynamically calculating the optimal sparsity of the original IoT data. In traditional methods, sparsity is usually a pre-set fixed value, which is difficult to adapt to the diverse signal distribution characteristics of IoT data. This invention introduces a sparsity calculation formula based on error feedback. By iteratively truncating the minor components of the signal, the optimal sparsity is dynamically determined when the relative error after truncation is less than a threshold. This adaptive sparsity optimization method can adjust the sparsity requirements according to data characteristics, significantly reducing redundant information and improving compression efficiency. Furthermore, the dynamic determination of sparsity provides accurate prior information for subsequent compression and recovery processes, avoiding the problem of decreased reconstruction accuracy caused by unreasonable sparsity settings. Secondly, this invention combines the sparsity and orthogonality characteristics of Walsh-Hadamard orthogonal basis matrices with a mutual coherence minimization optimization strategy in the design of the measurement matrix, significantly improving the performance of compressed sensing. While traditional random measurement matrices are theoretically applicable to compressed sensing frameworks, they suffer from high computational complexity and may exhibit low sampling efficiency for specific signals. This invention utilizes Walsh-Hadamard orthogonal basis matrices as the transform domain foundation, simplifying matrix storage and computation while enhancing the ability to capture key signal features. Furthermore, by optimizing the cross-coherence of the measurement matrices, information redundancy during signal projection is reduced, further improving signal sampling efficiency and reconstruction robustness. This optimized measurement matrix design enables efficient operation in low-power, low-computational-resource IoT devices, making it particularly suitable for resource-constrained scenarios such as wireless sensor networks. Another significant advantage of this invention lies in its proposed efficient reconstruction algorithm. By introducing a dynamic update mechanism for the support set, this invention achieves progressive approximation of signal features during reconstruction. In traditional signal reconstruction methods, the support set is typically statically set, making it difficult to handle dynamic changes in signal distribution. This invention, however, constructs an iteratively optimized support set update method by combining the initial residual and dynamic adjustment of the projected values, ensuring accurate capture of the non-zero components of the signal in each iteration. This mechanism is particularly suitable for signal data with abrupt changes or noise in IoT scenarios, such as fault detection signals for equipment status monitoring in Industrial IoT. Dynamic updates to the support set not only improve reconstruction accuracy but also reduce unnecessary computational overhead, enabling the reconstruction algorithm to achieve a balance between low latency and high efficiency. Furthermore, this invention further improves the estimation accuracy of sparse representation coefficients through pseudo-inverse operations and residual feedback optimization. Under the constraint of the support set, the pseudo-inverse operation performs minimum error optimization on the sparse coefficients, ensuring a significant reduction in residuals in each iteration. Combined with residual feedback, this invention achieves adaptive adjustment of signal reconstruction, enabling the algorithm to maintain stable recovery accuracy in diverse IoT scenarios.Especially in high-noise environments, the residual-driven feedback mechanism can dynamically adjust the parameters of the reconstruction process, reduce the interference of noise on the recovered signal, and improve the robustness of the reconstruction results. Attached Figure Description
[0042] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0043] Figure 1 This is a schematic diagram of the method flow for the IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm provided in an embodiment of the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and 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.
[0045] Example 1: Reference Figure 1 A method for IoT data compression and recovery based on an efficient orthogonal matching pursuit algorithm, the method comprising:
[0046] Step 1: Calculate the optimal sparsity of the original IoT data in a certain transform domain or dictionary. Specifically, this includes: gradually increasing the number of truncated coefficients from the minimum. When the difference between the truncated data and the original IoT data no longer exceeds the set threshold in terms of relative error, the number of coefficients at this point is taken as the optimal sparsity.
[0047] The core task of Step 1 is to determine the optimal sparsity of the original IoT data in a certain transform domain or dictionary, providing a fundamental guarantee for subsequent data compression and reconstruction. Sparsity is the core of compressed sensing theory, directly affecting the efficiency and accuracy of signal processing. In the IoT environment, data often exhibits high redundancy and sparsity. For example, environmental data from sensors often only requires a small number of non-zero components in the time or frequency domain to represent its main characteristics. This step estimates the optimal sparsity of the signal in an adaptive manner, thereby ensuring the compactness of the data representation and the effectiveness of the compression process. Specifically, when calculating the optimal sparsity of the original IoT data, it is first necessary to project the original data into an appropriate transform domain or dictionary to better characterize its sparsity characteristics. The choice of transform domain is usually closely related to the application scenario. For example, the Fourier transform domain is suitable for periodic signals, and the wavelet transform domain is suitable for signals with abrupt changes. This invention preferably adopts a dictionary design method that can adapt to the IoT scenario. This dictionary optimizes the sparse representation capability of its basis vectors, enabling the projection of IoT data into it to achieve maximum sparsity. Based on this transform domain or dictionary, the original data is decomposed into a set of sparse coefficients. In theory, most of these coefficients should be close to zero, with only a few non-zero components retaining the main information of the data.
[0048] To adaptively determine the optimal sparsity, this step employs a dynamic truncation strategy based on error feedback. By sequentially increasing the number of truncated sparse coefficients, starting from a minimum, the system calculates the reconstruction error of the truncated data in real time. When the relative error between the truncated sparse representation and the original data falls below a set threshold, the currently retained number of sparse coefficients is determined as the optimal sparsity. This error threshold is a key parameter, directly determining the performance trade-off between compression and reconstruction. A smaller threshold ensures the accuracy of the reconstructed data but increases sparsity, thereby increasing the cost of compression sampling and storage; while a larger threshold can further reduce sparsity and improve compression efficiency, but may lead to a decrease in reconstruction accuracy. This invention comprehensively considers the application requirements of IoT data and the limitations of computing resources in this process, employing an efficient threshold setting strategy to achieve a balance between reconstruction accuracy and compression efficiency. This dynamic truncation process also possesses high flexibility, adapting to the diverse data characteristics in the IoT environment. For example, for data with high stationarity, sparse representation can achieve a small error with low-dimensional truncation, while for data with drastic changes, more non-zero coefficients need to be retained to meet error requirements. This invention achieves adaptive adjustment of data characteristics by calculating the relative error after truncation in real time, avoiding the problems of excessive truncation or redundant representation caused by fixed sparsity in traditional methods. Furthermore, considering the dynamic nature of data distribution in IoT scenarios, the sparsity determination method of this invention can also be updated in real time according to the statistical characteristics of the current data to cope with sparsity fluctuations caused by signal changes. This design makes the sparse representation more intelligent and better suited to the actual needs of IoT data. Further, determining the optimal sparsity also involves the distribution characteristics of non-zero components in the transform domain. This invention combines the orthogonal matching pursuit algorithm with the optimized set of basis vectors, making the sparse representation not only highly sparsity but also possessing strong stability and robustness. The application of the orthogonal matching pursuit algorithm in sparse signal processing ensures that each selected basis vector minimizes reconstruction error, thereby ensuring the efficiency and accuracy of sparsity determination. This dynamic adjustment method combining sparsity optimization and error control not only improves the accuracy of sparsity determination but also lays a solid foundation for subsequent Walsh-Hadamardi construction and measurement matrix design.
[0049] Step 2: Construct a Walsh-Hadamard orthogonal basis matrix based on optimal sparsity; calculate the sparse representation coefficients of the original IoT data based on the Walsh-Hadamard orthogonal basis matrix; define a measurement matrix, and find the optimal measurement matrix by minimizing the mutual coherence of the composite matrix formed by the measurement matrix and the Walsh-Hadamard orthogonal basis matrix;
[0050] Walsh-Hadamard orthogonal basis matrices are characterized by strong sparsity, computational simplicity, and hardware-friendly implementation, making them ideal for resource-constrained computational needs in IoT environments. Unlike Fourier or wavelet bases, the construction of the Walsh-Hadamard base is based on the orthogonality of binary functions, with its basis vectors consisting only of ±1. This significantly reduces the complexity of matrix operations while ensuring orthogonality, allowing signals to be accurately represented through simple linear combinations. In this invention, based on the optimal sparsity determined in step 1, a suitable Walsh-Hadamard base matrix is dynamically generated, ensuring that the sparse representation of the original IoT data under this basis reaches its optimal state. This process, combined with sparsity optimization techniques, further improves the compactness and accuracy of the sparse representation, ensuring that the signal can be effectively captured by a small number of basis vectors. After constructing the Walsh-Hadamard base, another key task in step 2 is to complete the core construction of the compressed sensing framework through the optimized design of the measurement matrix. The role of the measurement matrix is to perform linear sampling of the data, ensuring that the signal retains its main information after compression. However, designing a measurement matrix that maximizes sampling efficiency while minimizing reconstruction error is a significant challenge for compressed sensing technology. This invention introduces the concept of mutual coherence, modeling the relationship between the Walsh-Hadamard matrix and the measurement matrix as an optimization problem. Specifically, by minimizing the mutual coherence of the composite matrix, it significantly reduces information redundancy that may be introduced during data sampling. Reduced mutual coherence means minimizing the correlation between the column vectors of the measurement matrix and the basis vectors of the Walsh-Hadamard matrix. This not only improves the measurement matrix's ability to capture signal features but also significantly reduces the complexity of sparse reconstruction algorithms in subsequent steps.
[0051] In the optimization process of the measurement matrix, this invention also specifically considers the diverse data characteristics required in IoT scenarios. While traditional random measurement matrices theoretically possess good universality, they often require high computational resources in practical applications and are difficult to adaptively adjust for specific signal types. This invention, however, dynamically adjusts the design of the measurement matrix by combining the stepwise optimization characteristics of the orthogonal matching pursuit algorithm, making it more closely aligned with the specific distribution characteristics of IoT data. For example, for environmental monitoring data with periodic signals or predominantly low-frequency components, the column vector design of the measurement matrix prioritizes capturing the main features of these signals; while for industrial IoT data with sparse mutations, the matrix design tends to enhance sensitivity to mutation features. This dynamic adaptability makes the optimized design of the measurement matrix not only theoretically superior but also more applicable in practice. Furthermore, this invention fully utilizes the advantages of the orthogonal matching pursuit algorithm in the co-design of the Walsh-Hadamardi algorithm and the measurement matrix. The orthogonal matching pursuit algorithm can progressively select the basis vector that minimizes the error of the current signal, thereby ensuring that compression efficiency is maximized with each sampling. This characteristic is fully utilized in the optimization of the measurement matrix, enabling it to be dynamically generated through iterative steps, thereby further improving the accuracy of signal acquisition. Simultaneously, due to the inherent sparsity of the Walsh-Hadamard model, the design of the measurement matrix effectively reduces the resource consumption of matrix storage and computation, making it highly suitable for resource-constrained scenarios in IoT devices.
[0052] Step 3: Use the optimal measurement matrix to perform compressed sampling, complete the data compression, and obtain the compressed result;
[0053] The core idea of compressed sampling is based on compressed sensing theory. It achieves linear sampling of data through an optimized measurement matrix, projecting high-dimensional signals into a low-dimensional space. Specifically, the optimal measurement matrix constructed in step 2 not only incorporates the sparsity properties of the Walsh-Hadamardi model but also ensures optimal capture of signal features by minimizing mutual coherence. In actual compression, the measurement matrix is used to perform a linear transformation on the original data. Its role can be understood as extracting the main information of the data through a carefully designed linear combination. The result of this transformation is a low-dimensional compression result, which not only significantly reduces the data dimensionality but also retains sufficient information for subsequent reconstruction. The core challenge of compressed sampling lies in controlling information loss. In traditional data compression methods, the compression process usually relies on a fixed transformation, such as the Fourier transform or discrete cosine transform. However, these methods typically assume that the signal has specific characteristics (such as periodicity or smoothness), making them inadequate when facing the diverse signal types in IoT scenarios. This invention overcomes the limitations of traditional methods by combining optimized measurement matrix design with the flexibility of the Walsh-Hadamardi approach, enabling the compressed sampling process to adaptively adapt to different types of IoT data. For example, for periodic signals, the measurement matrix can capture their main frequency components; for sparse, abrupt signals, it can focus on high-intensity local features. This adaptive characteristic makes the compression process not only more efficient but also significantly reduces information loss.
[0054] In IoT environments, devices are typically limited by computing resources and storage space, so the computational complexity of the compression process needs to be as low as possible. This invention uses the Walsh-Hadamardi algorithm, whose operations involve only simple addition and subtraction, avoiding the complex calculations of traditional transformation bases. Simultaneously, the design of the measurement matrix incorporates an orthogonal matching pursuit algorithm, iteratively optimizing sampling efficiency to maximize the extraction of core signal information with each sample. This design significantly reduces the computational burden of the compression process, making it ideal for low-power, low-computing-capacity IoT devices. In practice, compression sampling not only needs to consider the overall dimensionality reduction effect of the data but also the real-time requirements of IoT scenarios. For example, in environmental monitoring applications, sensors need to sample and transmit data in real time, and the delay in the compression process directly affects the system's response speed. This invention optimizes the sampling process, enabling the compression process to be completed in a very short time and ensuring that the compressed results can be transmitted efficiently at a low cost. Especially in wireless IoT networks, compressed data transmission not only saves bandwidth resources but also significantly reduces energy consumption, thereby extending the device's lifespan.
[0055] Step 4: Based on the compression results, initialize the support set required for data reconstruction, and reconstruct the data through iterative projection updates and coefficient estimation.
[0056] Data reconstruction, a key component of compressed sensing technology, aims to recover the high-dimensional original signal from low-dimensional compressed sampled data as accurately as possible. Data recovery in IoT scenarios typically faces two main challenges: first, the diversity and complexity of signals necessitate a highly adaptive recovery process; second, resource constraints on devices require efficient and low-power recovery. This invention introduces an optimized Orthogonal Matching Pursuit (OMP) algorithm, combined with a dynamic adjustment strategy for the support set, to achieve high-precision and high-efficiency data reconstruction, providing a reliable solution for IoT applications. In the data reconstruction process, the compressed result, i.e., the low-dimensional sampled data, is considered as a projection of the high-dimensional signal onto the measurement matrix. Using this projection information, the reconstruction algorithm attempts to restore the complete representation of the signal in the original domain. Since IoT data exhibits sparsity under specific transform domains or dictionaries, the core problem of recovery can be transformed into finding the sparsest signal representation given the measurement results. This invention chooses the Orthogonal Matching Pursuit algorithm as the foundational algorithm for reconstruction precisely because of its efficiency and robustness in sparse signal recovery. The basic idea of the OMP algorithm is to iteratively select the column vectors most relevant to the current residual from the measurement matrix, gradually updating the sparse representation of the signal to continuously approximate the original signal. In each iteration, the support set, i.e., the set of positions corresponding to non-zero components in the sparse representation, is updated. Through this stepwise optimization process, OMP can effectively reduce computational complexity while ensuring recovery accuracy.
[0057] To further improve the performance of data reconstruction, this invention introduces several optimization strategies based on the traditional OMP algorithm. First, the selection of the initial support set is the starting point of the entire recovery process, and its accuracy significantly impacts subsequent iterations. This invention dynamically estimates the initial support set by combining statistical characteristics from the compression results, thus more closely approximating the true sparse locations. This intelligent initialization method not only reduces the number of iterations in the recovery process but also significantly improves the convergence speed. Second, during the iteration process, this invention utilizes the orthogonality of the Walsh-Hadamard formula to accurately estimate the projection error, ensuring that each selected basis vector minimizes the residual. The sparsity and efficiency of the Walsh-Hadamard formula are fully utilized in this process, significantly reducing computational complexity and enabling the algorithm to run efficiently on resource-constrained IoT devices. On the other hand, considering the potential for noise interference or lost sampling data in IoT scenarios, this invention also introduces robust design in data reconstruction. For example, during the support set update process, this invention uses an adaptive threshold mechanism to dynamically adjust the selection strategy for non-zero components to address noise-induced interference. This robustness mechanism enables the recovery process to maintain high accuracy even in the face of uncertainty. Simultaneously, to prevent overfitting, this invention applies regularization constraints to the results of each iteration, achieving a good balance between sparsity and signal reconstruction accuracy. Regarding the termination conditions of the reconstruction algorithm, this invention employs multiple criteria, including the magnitude of the residual, the stability of the support set, and a limit on the number of iterations. The comprehensive determination of these conditions ensures that the recovery process can be completed with minimal computational overhead, while avoiding unnecessary iterative operations, thereby improving overall efficiency. This efficient termination mechanism is particularly important in IoT scenarios with high real-time requirements, enabling the recovery method of this invention to respond quickly and provide high-quality reconstruction results.
[0058] Example 2: The temporal correlation of the original IoT data ranges from 0.7 to 0.99; the sparsity of the original IoT data ranges from 1 to 20.
[0059] Specifically, firstly, the temporal correlation range is set to 0.7 to 0.99, reflecting the consistency of IoT data in a time series. Temporal correlation is typically used to describe the similarity of a signal between adjacent time points. High temporal correlation means that the signal changes relatively smoothly, and its features have a certain degree of redundancy in the time dimension. For example, temperature and humidity data and light intensity data from environmental sensors often show a continuous changing trend in a short period of time, rather than abrupt changes. In compressed sensing technology, data with high temporal correlation is more likely to exhibit sparsity in a specific transform domain, thus significantly reducing the required storage and transmission resources during data compression. Setting the temporal correlation range to 0.7 to 0.99 indicates that this invention specifically designs a method for such signals, ensuring accurate extraction of data features within a high correlation range while allowing a certain degree of dynamic change, enabling the system to adapt to diverse IoT scenarios. On the other hand, the sparsity range is set to 1 to 20, directly related to the core assumptions of compressed sensing theory. Sparsity refers to the number of non-zero components of a signal in a specific transform domain or dictionary, and is an important measure of the sparse representation of a signal. The sparsity range is from 1 to 20, indicating that the IoT data processed by this invention has good sparsity in the target transform domain, and most information can be effectively represented by a small number of non-zero components. This sparsity range covers the typical characteristics of most IoT data; for example, the sparsity of static environmental monitoring data may be close to the lower limit, while the sparsity of dynamic behavioral data or short-period signals may be close to the upper limit. By optimizing the dictionary design and measurement matrix construction, this invention can efficiently compress and recover data within different sparsity ranges, ensuring optimal performance based on sparse representation.
[0060] Example 3: Calculate the optimal sparsity of the original IoT data in a certain transform domain or dictionary using the following formula:
[0061]
[0062] in, Represents the set of natural numbers; arg min k This represents the search for k that minimizes the objective function; k is a candidate value for sparsity; x is the original IoT data with dimension N×1; Ψ k Represents the k-th order truncation operator; ψ k x represents a k-th order truncation operation on the original IoT data x, retaining the k largest components; ||·||2 represents the Euclidean norm; ∈0 is the set threshold, ∈0∈[0.01, 0.05]; N is the vector length of the original IoT data x.
[0063] Specifically, the core idea of this formula is to dynamically evaluate the relative error between the truncated signal and the original signal by gradually increasing the candidate sparsity value k. When the error meets a preset threshold ∈ , the current k value is determined to be the optimal sparsity K. This process combines the dual requirements of sparse signal representation and error control, ensuring that key information is preserved while minimizing the amount of data. In its implementation, the formula introduces Ψ k The truncation operator transforms and truncates the original data x, retaining only the k largest components from the transformed domain representation. This operation achieves sparse representation by removing smaller, less important components from the signal through dimensionality reduction. The determination of sparsity directly affects the efficiency of compressed sampling and the difficulty of reconstruction. When the sparsity k is small, the signal compression ratio is higher, but the retained information may be insufficient, leading to a larger reconstruction error; while when k is large, the main information of the signal can be completely preserved, but the compression ratio will decrease accordingly. This invention finds a balance point by gradually optimizing the choice of k, that is, minimizing the sparsity K while ensuring that the error is below the threshold ∈0. The error threshold range set in the formula is [0.01, 0.05], which reflects the actual needs of IoT data processing for recovery accuracy and compression efficiency. For example, temperature and humidity data in environmental monitoring usually allow a certain range of error, while data scenarios with stricter error requirements, such as medical data, will choose a lower ∈0 value.
[0064] For signals with high time correlation, such as continuous readings from temperature or pressure sensors, the redundancy in the time series is strong, and the non-zero components of the sparse representation are relatively few. In this case, the K value determined by the formula is usually small, thus achieving the dual goals of high compression ratio and high recovery accuracy. Secondly, for data with bursty characteristics, such as abnormal state signals of industrial equipment, the upper limit design of the sparsity K ensures that the abnormal information of the signal can be completely preserved, providing strong support for anomaly detection and analysis. In addition, the adaptive capability of the formula demonstrates its strong adaptability in dynamic IoT environments. Since the distribution of IoT data may change with time and space, this invention adopts a method of gradually adjusting the k value and calculating the truncation error ||x-Ψ in real time. kx||2 / ||x||2, dynamically optimizing the parameters of the sparse representation. This adaptive mechanism effectively avoids the overfitting or information loss problems that may occur in traditional methods with fixed sparsity, enabling compressed sensing methods to better meet the complex and diverse data needs of the Internet of Things (IoT). From a practical perspective, the implementation of this formula does not rely on complex calculations. The introduction of the Walsh-Hadamardi method enables data transformation and truncation operations to be completed efficiently, while the stepwise search process of the formula achieves sparsity optimization through simple iteration. This efficiency allows the invention to run on resource-constrained IoT devices, providing possibilities for low-power, high-performance data processing. For example, in wireless sensor networks, nodes typically have limited computing and storage capabilities, and the optimal sparsity K calculated by the formula can greatly reduce the amount of data transmitted, thereby extending the battery life of the device.
[0065] Example 4: In step 2, the Walsh-Hadamard orthogonal basis matrix is represented by the following formula:
[0066]
[0067] Where, Φ K h is a Walsh-Hadamard orthogonal basis matrix, which is a K·K dimensional orthogonal basis matrix; ij Let i be the base element, where i and j are integer subscript indices, both ranging from 1 to K; The sparse representation coefficients of the original IoT data are calculated using the following formula based on the Walsh-Hadamard orthogonal basis matrix:
[0068]
[0069] Where T represents the transpose operation of a matrix or vector; diag(·) is the operation to extract diagonal elements.
[0070] Specifically, the Walsh-Hadamard matrix Φ K It is a K×K orthogonal basis matrix, where each element h ij It only takes values of ±1. This special structure makes the computation and storage costs of the matrix extremely low, making it ideal for low-power applications in IoT devices. To ensure the normalization properties of the matrix in orthogonal projection, the entire matrix is multiplied by... This step ensures that each column vector of the matrix has a unit norm, thus avoiding potential overflow issues in numerical computation. When the original data x is projected onto Φ K When the orthogonal basis is applied, the key information of the data is preserved with high fidelity, while less important components are effectively suppressed, thus achieving sparse representation of the data. The formula further refines the calculation of the sparsity coefficient by adding correction and adjustment terms to the projection result. This optimization design is mainly reflected in three levels. First, the initial projection operation… This completes the basic transformation of data from high-dimensional space to orthogonal basis space. This step maps the original data to the orthogonal basis matrix Φ. K The initial sparse coefficients are obtained by mapping the row space. However, due to the complexity of the data and the potential influence of noise, a simple initial projection is insufficient to fully capture the essential characteristics of the signal. Therefore, a correction term is introduced into the formula. This step further optimizes the distribution of sparse coefficients through matrix multiplication, enabling the calculation results to more accurately reflect the characteristics of the original data. This correction process is equivalent to a global adjustment of the signal based on the initial projection results, thereby improving the accuracy of the sparse representation.
[0071] In addition, to further eliminate potential numerical deviations, a diagonal adjustment operation was specifically designed into the formula. This adjustment item is achieved by extracting... By normalizing the diagonal elements, systematic errors that may occur during signal projection are effectively eliminated. This diagonal adjustment not only has lower computational complexity but also significantly improves the stability of the sparse representation coefficients, making the formula more robust and applicable to data distributions with different characteristics. This design fully considers the diversity of IoT data and the limitations of device resources, ensuring the reliability and efficiency of sparse coefficient calculation. From an application perspective, the formula in Example 4 has wide applicability in IoT data processing scenarios. For environmental monitoring data with high temporal correlation, such as temperature, humidity, and light intensity, the signals typically exhibit strong sparsity in the Walsh-Hadamardi space. The sparse coefficients calculated by the formula can highly condense the main features of these signals, thus laying the foundation for subsequent compression and recovery. For complex signals in industrial IoT, such as transient changes in anomaly detection or sudden characteristics of equipment failure, the introduction of correction and adjustment terms in the formula further ensures the complete preservation of data features, providing reliable data support for anomaly analysis and model training. At the same time, the design of this formula also demonstrates significant optimization in computational efficiency. The sparsity of the Walsh-Hadamardi matrix allows matrix operations to be performed using simple addition and subtraction, significantly reducing computational complexity. Combined with correction and adjustment operations in the formula, this efficient computational flow is particularly suitable for the real-time data processing needs of low-power devices. For example, in wireless sensor networks, node devices typically require low-power data compression and transmission, and the formula in Example 4 can perform sparse representation computation with extremely low resource consumption, thereby extending device battery life and improving the overall network operating efficiency.
[0072] Example 5: Find the optimal measurement matrix A using the following formula. opt :
[0073]
[0074] Where A is the measurement matrix; μ(AΦ) K The mutual coherence of the composite matrix formed by the measurement matrix A and the Walsh-Hadamard orthogonal basis matrix is calculated using the following formula:
[0075]
[0076] Among them, (AΦ K [:,i] represents matrix AΦ K The i-th column; (AΦ K [:,j] represents matrix AΦ K The j-th column; <·, ·> represent inner product operations; I K Let K be the identity matrix; ||·|| F Let F be the norm; γ be the preset regularization coefficient; λ be the preset weight coefficient; A[i,j] represent the element in the i-th row and j-th column of the measurement matrix A; |·| is the absolute value operation; α i Let be the value of the i-th element in the sparse representation coefficient α.
[0077] Specifically, the objective function of the formula includes the measurement matrix and the Walsh-Hadamard orthogonal basis matrix Φ. K The mutual coherence μ(AΦ) of the composite matrix K The optimization of cross-coherence is crucial. Cross-coherence is a metric that measures the correlation between column vectors in a matrix. A smaller value indicates stronger independence between column vectors, resulting in better performance of the compressed sensing system. This is achieved by minimizing μ(AΦ). K The optimization process reduces information redundancy in the measurement matrix when capturing sparse representations of signals, which is significant for improving data compression efficiency and recovery accuracy. The formula for calculating cross-coherence normalizes the inner product of the matrix column vectors to ensure the index accurately reflects the matrix's correlation level. Furthermore, a sparsity weighting term is introduced in the formula by summing the absolute values of the sparse representation coefficients α. This design aims to encourage simplicity in sparse representation, i.e., by optimizing the measurement matrix to concentrate the non-zero components of the signal in the transform domain as much as possible. This sparsity constraint not only reduces the complexity of data representation but also improves the efficiency of subsequent orthogonal matching pursuit algorithms during signal reconstruction. The magnitude of the weighting coefficient λ directly affects the degree of attention paid to sparsity during the optimization process. For signals with high sparsity, such as environmental data with high temporal correlation, a larger λ value can be chosen to further compress redundant information.
[0078] At the same time, the formula introduces a term related to the identity matrix I. K Related orthogonality constraints. Through the... Minimizing the Frobenius norm ensures that the measurement matrix retains as much of its original characteristics as possible when applied to the signal, without introducing unnecessary distortion. The physical meaning of this orthogonality constraint is that it enables the measurement matrix to have better feature separation capabilities during projection, thereby improving the signal representation accuracy in the transform domain. This design is particularly suitable for the compression requirements of IoT data, as the acquisition of this data in sensor networks is often accompanied by noise and distortion, and the introduction of the orthogonality constraint can offset these effects to some extent. The final part of the formula involves a regularization constraint on the measurement matrix A, which restricts the sum of squares of the matrix elements to prevent over-reliance on certain specific matrix structures during optimization. This regularization constraint has multiple benefits: firstly, it limits the numerical range of the measurement matrix, avoiding numerical instability caused by excessively large or small elements; secondly, it constrains the complexity of the measurement matrix, ensuring that the optimization results are suitable for practical deployment in resource-constrained IoT devices. The weight coefficient γ of the regularization term can be adjusted according to specific application scenarios to achieve a balance between compression ratio and computational complexity. Combining the above multiple objectives and constraints, the process of optimizing the measurement matrix is actually a solution process for a multi-objective optimization problem. By adjusting the weight coefficients λ and γ, the data processing requirements of IoT in different scenarios can be flexibly mapped into the optimization model. For example, for low-noise, high-sparse environmental data, more attention can be paid to sparsity and orthogonality, while for high-noise, low-sparse industrial signals, the weight of regularization can be appropriately increased to improve the robustness of the matrix. This flexibility makes the present invention widely applicable in diverse IoT scenarios. The formula in Example 5 fully incorporates the characteristics of the Walsh-Hadamard matrix during the optimization process. As a basis matrix that combines sparsity and orthogonality, the Walsh-Hadamard matrix not only simplifies matrix operations but also provides a good structural foundation for optimizing the measurement matrix. By combining with the measurement matrix A, the formula can efficiently achieve low-dimensional projection of the signal while ensuring good recoverability of the projected data. This design is crucial for low-power, high-efficiency IoT applications, especially in wireless sensor networks and edge computing scenarios, where the optimized measurement matrix can significantly reduce the resource consumption of data transmission and computation.
[0079] Example 6: The expression for the element in the i-th row and j-th column of measurement matrix A is as follows:
[0080]
[0081] Where t represents the temporal correlation of the original IoT data, ranging from 0.7 to 0.99; η is a Gaussian distribution with a mean of 0 and a variance equal to the sparsity of the original IoT data; and M ranges from...
[0082] Here, {·} is the floor operator.
[0083] Specifically, A[i,j] in the formula is defined as a combination of multiple factors, its core being based on the sparsity and orthogonality of the Walsh-Hadamard matrix. Through... Normalization is performed to ensure the stability of the matrix's numerical range during computation, while maintaining the unit norm property of the column vectors. This approach is suitable for the limited computing resources of IoT devices, especially in high-dimensional data compression tasks, significantly reducing the numerical complexity of matrix operations. The time correlation *t* in the formula reflects the consistency of the signal in the time dimension. This characteristic is widely present in sensor data in IoT environments; for example, physical quantities such as temperature, humidity, and light intensity typically exhibit stable changes over short periods. The value of *t* ranges from 0.7 to 0.99, indicating that the formula is optimized for data with high time correlation. When *t* is large, the signal's time dimension redundancy is strong; the measurement matrix, by multiplying by the factor of *t*, strengthens this characteristic, helping to further compress redundant information. When *t* is small, other terms in the formula (such as the sine and cosine parts) play a more important role in capturing data variation characteristics, thus adapting to data with low time correlation.
[0084] Sine and cosine terms in the formula and The introduction of provides the measurement matrix with symmetry and periodicity based on geometric distribution. This design enhances the matrix's adaptability to sparse signal representations. For example, the cosine term provides reinforcement for periodic or low-frequency components in the signal, while the sine term, through i... 2 +j 2 The quadratic power relationship captures the nonlinear variation characteristics in the signal. These characteristics are widely present in actual IoT data; for example, monitoring data of complex equipment operation status often has multi-frequency, multi-scale feature distributions. Through this design, the measurement matrix can effectively capture the sparse representation of data at different feature levels. The introduction of the sparsity characteristic η adds randomness and robustness to the formula. η, as a Gaussian distribution with a mean of 0 and a variance determined by the data sparsity, reflects the distribution characteristics of different components in the signal. By adjusting this random term, the measurement matrix becomes more adaptable and stable in the face of signal uncertainty and noise. For example, when the signal sparsity is high, the distribution range of η is relatively small, and the design of the measurement matrix is more focused on capturing the main features of the signal; while when the signal sparsity is low, the distribution range of η increases, which can enhance the matrix's ability to capture multi-dimensional features. This randomness provides a good strategy for dealing with complex data distributions that may be encountered in practical applications. Finally, the definition range of the number of rows M in the formula reflects the dimensionality reduction characteristics of the measurement matrix. The value of M is within... arrive By dynamically adjusting the value of K, flexible dimensionality reduction capabilities are achieved. Lower M values are suitable for signals with high sparsity, significantly improving compression efficiency; while higher M values are suitable for capturing more detailed information in the signal, applicable to scenarios requiring high recovery accuracy. This design provides flexible configuration options for diverse application needs in IoT devices. From a practical application perspective, this formula fully considers the characteristics of IoT data and the limitations of the processing environment when designing the measurement matrix. Through comprehensive optimization of time correlation t, sparsity η, geometric symmetry, and dimensionality reduction capabilities, the measurement matrix generated by the formula can efficiently capture the main features of the data and can be quickly calculated and stored in resource-constrained devices. Taking environmental monitoring as an example, the high time correlation signals collected by temperature and humidity sensors can be highly compressed through this matrix while maintaining good fidelity during the data recovery stage. In industrial equipment fault monitoring, the sinusoidal term and randomness characteristics in the formula can enhance the ability to capture sudden changes and multi-frequency components, providing support for anomaly detection.
[0085] Example 7: In step 3, compressed sampling is performed using the optimal measurement matrix according to the following formula to complete data compression and obtain the compression result:
[0086] y = A opt Φ K αx;
[0087] Where y represents the compression result.
[0088] Specifically, A in the formula opt This is the measurement matrix obtained through the aforementioned optimization process. Its design goal is to reduce mutual coherence and optimize the matching degree between the matrix and signal features. As a core component in the compressed sensing framework, A opt By using Φ K The combination of these methods not only effectively captures the main features of the signal but also reduces information redundancy during compression. The optimized measurement matrix A opt This ensures that the compressed sampling results have high linear independence and reconstruction robustness, thereby improving the overall performance of the compressed sensing system. Secondly, the Walsh-Hadamard orthogonal basis matrix Φ... K The introduction of Φ provides an efficient transform domain for the sparse representation of signals. Walsh-Hadamard is widely used in data processing due to its sparsity, orthogonality, and computational efficiency. In this invention, Φ K It is used to project the original data x into an orthogonal basis space, thereby extracting the core features of the signal and achieving preliminary sparsity. The special structure of the Walsh-Hadamardi (composed of ±1 elements) allows matrix operations to be implemented through simple addition and subtraction, and this computational efficiency is particularly suitable for low-power scenarios in IoT devices.
[0089] In the formula, α is a sparse representation coefficient obtained through the aforementioned steps, representing the distribution of non-zero components of the signal in the transform domain. Sparsity is the foundation of compressed sensing theory, and the design of α directly affects the signal's performance during compressed sampling. In the formula y = A... opt Φ K In αx, α further optimizes the sparse representation of the data by weighting the features of the signal in the transform domain. This optimization design not only improves the efficiency of the compression result but also ensures that the signal representation in the low-dimensional space has strong recoverability. The core logic of the entire formula is to project the signal x sequentially through the transform domain (Φ... K ), sparse representation optimization (α), and linear sampling (A) opt The final low-dimensional compressed result y is obtained through a multi-level compression process that fully considers the characteristics of IoT data, such as high temporal correlation, sparsity, and diversity. Taking environmental monitoring as an example, time-series data of signals such as temperature and humidity typically exhibit strong sparsity in the Walsh-Hadamardi space. The compressed result y calculated by this formula can highly condense the main features of the signal, thereby significantly reducing the resource requirements for transmission and storage. It is worth noting that the design of this formula also reflects a high degree of optimization for computational efficiency. In resource-constrained IoT devices, the computational complexity of data compression is a key issue. By combining the sparsity of the Walsh-Hadamardi space with the optimization characteristics of the measurement matrix, the formula simplifies the matrix operations in the data compression process into a series of efficient linear operations. In addition, the use of sparse representation coefficients α further reduces the number of non-zero components in the matrix operations, enabling the entire compression sampling process to be completed quickly with limited computational resources. From a practical application perspective, the result y of this formula is a compressed representation of the signal in a low-dimensional space, with a dimension much smaller than that of the original signal x. This efficient dimensionality reduction characteristic is particularly suitable for IoT scenarios such as wireless sensor networks where data transmission bandwidth is limited. For example, in a remote monitoring system, sensor nodes calculate y using this formula and then transmit it to the central node for decompression and processing. This not only reduces the energy consumption of transmission but also improves the real-time performance and stability of the system.
[0090] Example 8: In step 4, the support set required for data reconstruction is initialized based on the compression result using the following formula:
[0091] r0 = y, Λ0 = {α s :| <y,A opt α s >|>0.1||α|| ∞};
[0092] Where r0 is the initial residual, which is set to be equal to the compression result; Λ0 is the support set;
[0093] α s :| <y,A opt α s >|>0.1||α|| ∞ Indicates when <y,A opt α s >|>0.1||α|| ∞ When satisfied, α at this time s Retain the elements as support sets; α s Let be the value of the s-th element in the sparse representation coefficient α; iterative projection update and coefficient estimation are performed using the following formula:
[0094] Λ m =r m-1 Λ m-1 ∪y;
[0095]
[0096] Among them, Λ m Let Λ be the support set for the m-th iteration; m-1 Let be the support set for the (m-1)th iteration; This is the coefficient estimate for the (m-1)th iteration; r m-1 Let be the residual of the (m-1)th iteration; This indicates a pseudo-inverse operation.
[0097] Specifically, the initialization of the support set is the starting point of the entire reconstruction process. The support set Λ0 contains the positions of non-zero components in the sparse representation of the signal, and the accuracy of the initial set directly affects the efficiency of iterative optimization. This is achieved through the inner product in the formula. <y,A opt α s > and threshold 0.1||α|| ∞ Comparison to screen α s , where α s It is an element of the sparse representation coefficients. This design combines the sparsity of the signal with the structural characteristics of the measurement matrix, enabling it to quickly identify the component that contributes most to signal reconstruction and avoiding the waste of computational resources caused by blind searching. For example, temperature and humidity data or light intensity data in the Internet of Things (IoT) often exhibit significant sparsity, meaning that only a small number of components have important values in a specific transform domain. Through this filtering mechanism, the system can efficiently extract the main features from the compression results, laying the foundation for reconstruction. After initialization, the reconstruction process enters the iterative optimization stage, continuously approximating the accurate representation of the original signal by dynamically adjusting the support set and sparse coefficients. In each iteration, the system first determines the element that contributes most to signal reconstruction based on the current residual r. m-1 Update support set Λ mThe residual reflects the difference between the current reconstructed signal and the compressed result; its change directly indicates the direction and magnitude of the iteration. In the formula, the support set is derived from the set Λ of the previous round. m-1 residual r m-1 The dynamic update mechanism, combining the compressed result y, ensures that the support set can gradually cover all important components of the signal. Especially in IoT data scenarios, signals may have abrupt changes or outliers; this dynamic update strategy can capture these features in a timely manner and avoid omissions.
[0098] Updating the sparse coefficients is another crucial step, where the estimated coefficients are optimized through pseudo-inverse operations. (Pseudo-inverse operation) The introduction of this feature allows the system to recalculate the sparse coefficients with minimal error within the current support set constraints. The sparse coefficients are updated each time. This is a process of gradually approximating the true sparse representation. As the support set dynamically expands in each iteration, the accuracy of this coefficient continuously improves with the number of iterations. This design fully utilizes the sparse priors in compressed sensing theory, achieving efficient signal representation through a small number of non-zero components. Especially in IoT environments, where sensor nodes have limited computing power, pseudo-inverse operations provide a low-computational-complexity and high-accuracy optimization method, suitable for deployment on resource-constrained devices. The update of the residual further provides a feedback mechanism for the reconstruction process. Each time the residual r is calculated... m-1 This is achieved by subtracting the projection value of the currently reconstructed signal from the compressed result y. This difference reflects the incomplete part of the reconstruction. The gradual decrease of the residual indicates that the system's reconstruction accuracy is continuously improving. When the residual approaches zero, it means that the main information of the signal has been fully restored, and the iteration process can be terminated. This residual-driven optimization process effectively avoids excessive iterative operations, significantly reduces the computational overhead of reconstruction, and ensures the accuracy of the final result. This formula demonstrates strong adaptability and robustness in practical IoT scenarios. For example, in wireless sensor networks, the compressed result y collected by the nodes is transmitted to the central node for decompression and reconstruction. Through dynamic adjustment of the support set and gradual optimization of the sparse coefficients, the central node can quickly recover the original signal within limited time and computational resources. This efficient reconstruction not only reduces bandwidth consumption in the network but also improves the system's real-time performance and data reliability. Furthermore, for anomaly detection in industrial IoT scenarios, the dynamic update of the support set in the formula can capture sudden changes in the signal, while the optimization of the sparse coefficients ensures high-precision recovery of anomalies, providing solid technical support for equipment status monitoring.
[0099] Example 9: In step 4, data reconstruction is performed using the following formula:
[0100]
[0101] Where final represents the total number of iterations; x rec This is the reconstructed data.
[0102] Specifically, φ K It is an orthogonal basis matrix constructed in the earlier steps, possessing the properties of sparsity and orthogonality, ensuring that the signal transformation under this basis has low redundancy and high expressive power. As an orthogonal basis, φ K The column vectors form a complete basis space that can accurately represent all features of the original signal. During the reconstruction process, φ K Its function is to represent sparse coefficients Projecting back into the original data space makes the reconstructed signal x rec It restores the same dimension and distribution characteristics as the original signal x. Sparse representation coefficients The final result, obtained through iterative optimization, has, through dynamic adjustment and optimization in the preceding steps, sufficiently approximated the true representation of the signal in the sparse basis space. These sparse coefficients record the main components and sparse characteristics of the signal under the Walsh-Hadamardi scheme, and their accuracy directly affects the quality of the reconstructed signal. In IoT data processing, because signals typically exhibit high sparsity in a specific transform domain, the non-zero components of these coefficients often highly condense the core information of the signal. For example, temperature and humidity data collected by environmental sensors usually exhibit stationarity in time series, and their sparse representation requires only a small number of non-zero coefficients to fully express them. Reconstruction Formula The mathematical principle is based on the inverse operation of orthogonal projection. Because φ KGiven an orthogonal matrix whose inverse is identical to its transpose, this reconstruction formula is equivalent to restoring the sparse representation coefficients from the orthogonal basis space to the original signal space. This restoration process has low computational complexity, primarily involving matrix-vector multiplication, making it well-suited for the resource constraints of IoT devices. In wireless sensor networks, data collected by nodes is transmitted to the central node via compressed sensing technology. The efficiency of the reconstruction formula ensures that the central node can quickly recover the signal within limited computing resources, thereby improving the system's real-time performance and stability. From an application perspective, the reconstruction formula is significant in IoT scenarios such as environmental monitoring, industrial automation, and smart homes. In environmental monitoring, the reconstruction quality of compressed sensor data directly affects the accuracy of monitoring results; for example, the recovery of temperature, humidity, and air pressure data requires high precision. In industrial automation, monitoring signals of equipment operating status often exhibit abrupt changes, and their sparse representation needs to accurately capture these abnormal changes. Restoring them to the original signal space through the reconstruction formula helps in real-time fault detection. In smart homes, high-dimensional data generated by multiple sensor nodes needs compression and restoration processing to reduce transmission bandwidth requirements and energy consumption. This formula ensures data integrity while restoring the signal. Furthermore, the reconstruction formula also exhibits strong robustness. Because Φ K The orthogonality of y is maintained even if the compressed result y has a certain degree of noise or sparsity coefficients. Even with small-range errors, the formula can still restore the main characteristics of the signal to a certain extent. This robustness is crucial for the complex environments in the Internet of Things (IoT). For example, in wireless communication, channel noise may cause partial distortion in data transmission, and the robust design of the reconstruction formula can effectively reduce the impact on the recovered signal.
[0103] The embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for IoT data compression and recovery based on an efficient orthogonal matching pursuit algorithm, characterized in that, The method includes: Step 1: Calculate the optimal sparsity of the original IoT data in a certain transform domain or dictionary. Specifically, this includes: gradually increasing the number of truncated coefficients from the minimum. When the difference between the truncated data and the original IoT data no longer exceeds the set threshold in terms of relative error, the number of coefficients at this point is taken as the optimal sparsity. Step 2: Construct a Walsh-Hadamard orthogonal basis matrix based on optimal sparsity; calculate the sparse representation coefficients of the original IoT data based on the Walsh-Hadamard orthogonal basis matrix; define a measurement matrix, and find the optimal measurement matrix by minimizing the mutual coherence of the composite matrix formed by the measurement matrix and the Walsh-Hadamard orthogonal basis matrix; Step 3: Use the optimal measurement matrix to perform compressed sampling, complete the data compression, and obtain the compressed result; Step 4: Based on the compression results, initialize the support set required for data reconstruction, and reconstruct the data through iterative projection updates and coefficient estimation.
2. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 1, characterized in that, The temporal correlation of the raw IoT data ranges from 0.7 to 0.99; the sparsity of the raw IoT data ranges from 1 to 20.
3. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 2, characterized in that, The optimal sparsity of raw IoT data in a certain transform domain or dictionary can be calculated using the following formula: in, Represents the set of natural numbers; arg min k This represents the search for k that minimizes the objective function; k is a candidate value for sparsity; x is the original IoT data with dimension N×1; Ψ k Represents the k-th order truncation operator; Ψ k x represents a k-th order truncation operation on the original IoT data x, retaining the k largest components; ||·||2 represents the Euclidean norm; ∈0 is the set threshold, ∈0∈[0.01, 0.05]; N is the vector length of the original IoT data x.
4. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 3, characterized in that, In step 2, the Walsh-Hadamard orthogonal basis matrix is represented by the following formula: Where, Φ K h is a Walsh-Hadamard orthogonal basis matrix, which is a K·K dimensional orthogonal basis matrix; ij Let i be the base element, where i and j are integer subscript indices, both ranging from 1 to K; The sparse representation coefficients of the original IoT data are calculated using the following formula based on the Walsh-Hadamard orthogonal basis matrix: Where T represents the transpose operation of a matrix or vector; diag(·) is the operation to extract diagonal elements.
5. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 4, characterized in that, The optimal measurement matrix A can be found using the following formula. opt : Where A is the measurement matrix; μ(AΦ) K The mutual coherence of the composite matrix formed by the measurement matrix A and the Walsh-Hadamard orthogonal basis matrix is calculated using the following formula: Among them, (AΦ K [:,i] represents matrix AΦ K The i-th column; (AΦ K [:,j] represents matrix AΦ K The j-th column; <·, ·> represent inner product operations; I K Let K be the identity matrix; ||·|| F Let F be the norm; γ be the preset regularization coefficient; λ be the preset weight coefficient; A[i,j] represent the element in the i-th row and j-th column of the measurement matrix A; |·| is the absolute value operation; α i Let be the value of the i-th element in the sparse representation coefficient α.
6. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 5, characterized in that, The expression for the element in the i-th row and j-th column of measurement matrix A is as follows: Where t represents the temporal correlation of the original IoT data, ranging from 0.7 to 0.99; η is a Gaussian distribution with a mean of 0 and a variance equal to the sparsity of the original IoT data; and M ranges from... Here, {·} is the floor operator.
7. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 6, characterized in that, In step 3, the optimal measurement matrix is used for compressed sampling using the following formula to complete data compression and obtain the compression result: y=A opt f K αx; Where y represents the compression result.
8. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 7, characterized in that, In step 4, the support set required for data reconstruction is initialized based on the compression results using the following formula: r0=y, Λ0={α s :| <y,A opt a s >|>0.1||a|| ∞ }; Where r0 is the initial residual, which is set to be equal to the compression result; Λ0 is the support set; α s :| <y,A opt α s >|>0.1||α|| ∞ Indicates when <y,A opt α s >|>0.1||α|| ∞ When satisfied, α at this time s Retain the elements as support sets; α s Let be the value of the s-th element in the sparse representation coefficient α; iterative projection update and coefficient estimation are performed using the following formula: L m =r m-1 L m-1 ∪y; Among them, Λ m Let Λ be the support set for the m-th iteration; m-1 Let be the support set for the (m-1)th iteration; This is the coefficient estimate for the (m-1)th iteration; r m-1 Let be the residual of the (m-1)th iteration; This indicates a pseudo-inverse operation.
9. The IoT data compression and recovery method based on the efficient orthogonal matching pursuit algorithm as described in claim 8, characterized in that, In step 4, the data is reconstructed using the following formula: Where final represents the total number of iterations; x rec This is the reconstructed data.