A high compression rate EEG signal processing method that is easy to implement in hardware

By adopting the combined design of Hadamard matrix and expanded measurement matrix in EEG signal processing, the balance problem between high compression rate and low power consumption in hardware implementation is solved, achieving higher compression rate and lower hardware resource consumption, which is suitable for scenarios with low power consumption requirements.

CN119377564BActive Publication Date: 2025-09-30RESEARCH INSTITUTE OF TSINGHUA UNIVERSITY IN SHENZHEN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411407850.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-09-30
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

Existing EEG signal processing methods have high computational complexity when implemented in low-power hardware, making it difficult to achieve a balance between high compression rate and low power consumption, resulting in high energy consumption of monitoring equipment and low storage and transmission efficiency.

Method used

An extended measurement matrix is ​​designed based on the Hadamard matrix combination. The coherence is reduced through sparse transformation and measurement matrix generation. The extended matrix is ​​constructed for compressed sensing, and the measurement matrix is ​​stored in advance to reduce hardware resource consumption.

Benefits of technology

It improves the compression rate of EEG signals, reduces power consumption in hardware implementation scenarios, optimizes computing efficiency, and is suitable for scenarios with low power consumption requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377564B_ABST
    Figure CN119377564B_ABST
Patent Text Reader

Abstract

The present invention provides a method for processing EEG signals with a high compression rate, comprising the following steps: first, obtaining the original EEG signal, then converting it into a sparse domain through a sparse transform such as a discrete cosine transform and extracting sparse coefficients. Next, constructing an initial correlation matrix, and generating an extended matrix through vertical and horizontal expansion and nesting operations to meet the requirements of compressed sensing. Finally, the sparse coefficients are compressed using the extended matrix to obtain a compressed signal representation. The method of the present invention improves the compression rate and reduces the hardware power consumption by designing an extended measurement matrix based on a combination of Hadamard matrices, solving the problem of resource consumption in the online generation of random sparse matrices in the prior art, and is particularly suitable for low-power demand scenarios, thereby improving the hardware performance of the EEG signal processing solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an electroencephalogram (EEG) signal processing technology, and in particular to an EEG signal processing method with a high compression rate that is easy to implement with hardware. Background Art

[0002] Remote health monitoring systems are becoming increasingly important for physicians performing long-term patient monitoring. They can help diagnose a variety of health issues that patients may suffer from. One of the signals frequently measured in remote health monitoring systems is the electroencephalogram (EEG). The entire system typically consists of a set of lightweight, low-power sensors that transmit the acquired data to a master node or remote healthcare provider. Due to the long-term monitoring nature of these systems, the sensors used generate a large amount of data, which poses challenges for efficient storage and transmission. Therefore, EEG signal compression plays a crucial role in modern remote health monitoring systems to reduce the amount of stored data and transmission time, thereby improving efficiency and lowering the cost of these systems. Utilizing compression techniques not only enables efficient data storage and transmission but also simplifies the allocation of communication time slots, particularly when multiple systems are operating in the same frequency band or simultaneously acquiring different physiological signals. Furthermore, it is necessary to preserve the diagnostic information embedded in the measured ECG signals.

[0003] Standard compression is performed by sampling the signal according to Shannon's theory. This signal is then transformed using an appropriate orthogonal basis (e.g., discrete Fourier transform, wavelet transform, multiwavelet transform, etc.). Only a few coefficients of the transformed signal need to be transmitted. This method exhibits good compression efficiency and low error after reconstruction. However, the main drawback of standard compression methods is their computational complexity, making them unsuitable for hardware implementation in low-power scenarios.

[0004] Compressed Sensing (CS) is a novel compression method that avoids the high computational complexity associated with standard methods. It is a technique that allows acquiring signals at sampling rates lower than the Nyquist rate, provided that the signal is sparse or can be approximated as sparse in a certain transform domain. The core of CS is that if a signal has a certain structure (e.g., sparsity), then the signal can be accurately reconstructed with far fewer measurements than required by traditional sampling theory.

[0005] The signal compression process involves two important matrices:

[0006] Sparse representation matrix Ψ and measurement matrix Φ

[0007] In CS, the original signal x can be expressed as x = Ψs, where Ψ is the basis matrix that maps the signal from the time domain to another domain (usually a sparse domain), that is, the sparse basis selected in the CS method, and s is the obtained sparse representation vector.

[0008] The role of the measurement matrix Φ is to sample the signal at random positions. Φ is a matrix with a dimension of M*N, where M< <N。

[0009] The entire compressed sensing process can be expressed as y = ΦΨs = As, where y is the result of signal compression and A is the reconstruction matrix. It can be observed that the reconstruction matrix A = ΦΨ. The compression ratio achieved by this method is M / N, which is closely related to the choice and dimension of the measurement matrix.

[0010] The calculation diagram of compressed sensing is as follows Figure 1 .

[0011] However, in practical applications, the measurement matrix must meet certain conditions so that the compressed results can be correctly restored. Therefore, some limitations in the selection of the measurement matrix will be discussed below, including the relationship with the sparse basis and the minimum limit on the number of measurements M.

[0012] To ensure that the signal can be recovered from a small number of measurements, the measurement matrix Φ must be sufficiently uncorrelated with the basis matrix Ψ. In other words, the rows of the measurement matrix cannot sparsely represent the columns of the basis matrix. Uncorrelation can be measured by calculating the maximum correlation μ(Φ,Ψ) between the two matrices, which is defined as the maximum modulus of the inner product between all basis vectors and the measurement vector. The coherence calculation formula is:

[0013]

[0014] Coherence μ(Φ,Ψ)∈(0,1). Using coherence, we can determine whether a unique solution exists. If equation (2) holds, then according to (3), there is a high probability that a unique solution exists for the M samples obtained from the signal.

[0015]

[0016] where k represents the sparsity of s after the sparsifying transformation x = Ψs. Equation (3) shows a clear relationship: as the coherence decreases, the number of samples M required for sparse reconstruction also decreases.

[0017]

[0018] In addition to incoherence, more general conditions for a unique solution are based on the restricted isometry property (RIP) and the null space property (NSP). Based on the NSP, it can be said that if a matrix A is suitable for CS, then it is necessary to obtain at least twice as many samples as its sparsity, i.e.

[0019] M≥2k (4)

[0020] The RIP condition determines whether the matrix A is suitable for CS. The RIP condition is as follows

[0021]

[0022] Where δk∈R is the RIP constant. When δK<1, the matrix A satisfies the RIP condition.

[0023] The comparison results of the compression effects of the four commonly used measurement matrices: random Gaussian matrix, random Bernoulli matrix, partial Hadamard matrix, and sparse binary matrix are shown in Table 1 below.

[0024] Table 1: Comparison of compression effects of four measurement matrices

[0025]

[0026] As can be seen from the table, the performance of the four measurement matrices is at the same level. In the actual acquisition and compression process, generating the four matrices online requires a large amount of computing resources. A more preferred solution is to consider generating a specific measurement matrix offline and storing it in the acquisition and compression device.

[0027] Table 2: Measurement matrix hardware implementation characteristics

[0028]

[0029] Further comparison of common measurement matrix selection schemes reveals that random Gaussian matrices require large storage resources, and the resulting matrix multiplication is a floating-point operation, consuming a large amount of computing resources. Although the random Bernoulli matrix has only two possible values ​​for its elements, like the random Gaussian matrix, the resulting matrix multiplication is a floating-point operation. The elements of the partial Hadamard matrix are all -1 or 1, and the calculation type in the matrix multiplication is addition or subtraction. Sparse random binary matrices, on the other hand, have a limited number of matrix elements that are 1. During matrix multiplication, calculations do not need to be performed every time. Data addition operations are only required when the matrix element is 1, and no data operations are performed when the matrix element is 0. Compared with random Bernoulli matrices and partial Hadamard matrices, the amount of calculations and computational complexity are lower. However, in hardware implementation scenarios, random matrix generation still needs to be performed during each signal compression, which is not conducive to reducing hardware power consumption.

[0030] It should be noted that the information disclosed in the above background technology section is only used to understand the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0031] The main purpose of the present invention is to solve the problems existing in the above-mentioned background technology and provide a high-compression EEG signal processing method that is easy to implement in hardware.

[0032] To achieve the above object, the present invention adopts the following technical solutions:

[0033] In a first aspect of the present invention, a high-compression EEG signal processing method that is easily implemented by hardware comprises the following steps:

[0034] S1. Data acquisition: obtaining raw EEG signals;

[0035] S2, sparse transformation: convert the EEG signal into a sparse domain through sparse transformation and extract sparse coefficients;

[0036] S3. Measurement matrix generation: constructing an initial correlation matrix, vertically and horizontally expanding the initial correlation matrix to reduce coherence and meet compressed sensing requirements, and generating an expanded matrix for compressed sensing through nested operations;

[0037] S4. Compressed sensing: Use the generated expansion matrix to compress the sparse coefficients to obtain a compressed signal representation.

[0038] Furthermore, in step S2, the sparse transform includes discrete Fourier transform DFT, discrete cosine transform DCT and discrete wavelet transform, preferably discrete cosine transform DCT.

[0039] Furthermore, in step S2, a sparse domain for performing sparse transformation on the EEG signal is selected, satisfying the condition M≥2k, where M is the number of rows of the measurement matrix and k is the sparsity.

[0040] Furthermore, step S2 also includes: after discrete cosine transform, determining the maximum value among the sparse coefficients corresponding to the original EEG signal; setting the sparse coefficients of a given proportion a that is less than the maximum sparse coefficient to 0, where a is selected so that it has no effect on the recovery performance of the compressed signal or the effect is negligible.

[0041] Furthermore, in step S3, the initial correlation matrix is ​​expanded vertically and horizontally, which specifically includes the following sub-steps:

[0042] S3.1. Construct an initial incidence matrix: Define a finite set X with v elements. From X, form a family of subsets P by selecting v - 1 elements in all possible ways. Construct an incidence matrix H with dimensions v × v. The elements of H are binary values, representing the relationships between the elements.

[0043] S3.2. Vertical expansion: Vertically expand the correlation matrix H to reduce coherence. The specific operation is as follows: calculate the maximum inner product value of each column in the matrix H, determine the number of rows to be expanded based on the maximum value, and add "1" to the corresponding positions in the matrix to generate a new matrix U;

[0044] S3.3. Horizontal expansion: Expand the matrix U horizontally to further reduce the coherence while keeping the coherence value unchanged. The specific operation is: symmetrically apply the operation on the columns in the vertical expansion to the rows, calculate the maximum inner product value of each row in the matrix U, and adjust the rows according to the maximum value to generate a new matrix V. The dimension of the matrix V is m×r, where the number of columns r of the matrix has an upper bound, and the upper bound is related to the initial parameter v defined in S3.1.

[0045] Furthermore, in step S3, an extended matrix for compressed sensing is generated through nested operations, specifically including: using a binary matrix V, which is composed of multiple column vectors, each column vector represents a subset; for each column vector, its element 1 is replaced by a different row of another matrix B, and the element 0 is replaced by an all-zero row vector, thereby generating an extended matrix; the matrix B is a partial Hadamard matrix, which is used to ensure that the extended matrix meets the requirements of compressed sensing.

[0046] Furthermore, in step S3, the partial Hadamard matrix is ​​generated by the following method, specifically including:

[0047] Determine the order: Choose an order n that is no less than the required number of rows d and is a multiple of 1, 2, or 4 to determine the size of the Hadamard matrix.

[0048] Construct the basic matrix: create a Hadamard matrix of order 1, and then recursively construct Hadamard matrices of higher orders according to the rules;

[0049] Extended matrix: Recursively construct a Hadamard matrix of order n by copying and modifying the existing Hadamard matrix;

[0050] Extract Partial Matrix: Extract the first d rows from an order-n Hadamard matrix to generate the desired partial Hadamard matrix.

[0051] Furthermore, by selecting the dimension parameter v of the correlation matrix H, the generated extended matrix is ​​controlled to have different matrix dimension sizes and coherence values.

[0052] In a second aspect of the present invention, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements the high-compression EEG signal processing method that is easy to implement in hardware.

[0053] In a third aspect of the present invention, a computer program product includes a computer program, which, when executed by a processor, implements the high-compression EEG signal processing method that is easy to implement in hardware.

[0054] The present invention has the following beneficial effects:

[0055] The present invention proposes an EEG signal processing solution suitable for scenarios with actual hardware requirements. By adopting an extended measurement matrix based on a combination design of the Hadamard matrix in the EEG compression process, it can be applied to EEG signal compression scenarios while meeting the basic restrictions of compressed sensing, thereby improving the compression rate of EEG signals and reducing power consumption in hardware implementation scenarios.

[0056] This invention applies a new compressed sensing measurement matrix theory to EEG signal compression in real-world scenarios. While meeting the basic constraints of compressed sensing, it can achieve a higher compression rate than existing technical solutions. Furthermore, the random sparse matrices involved in existing mainstream technical solutions need to be generated online during each signal processing step. This process consumes a large amount of hardware resources, making it difficult to apply to hardware and bring practical benefits in low-power scenarios. The EEG signal processing solution proposed in this invention helps to strike a balance between high compression rate and hardware friendliness, improving the performance level of existing EEG signal processing solutions on hardware.

[0057] Compared with existing technical solutions, the high-compression EEG signal processing solution suitable for hardware implementation proposed in the present invention can improve the compression rate of EEG signals and reduce the consumption of hardware resources in hardware implementation scenarios.

[0058] First, by applying a new, proven measurement matrix from mathematical theory to the practical application of EEG signal compression, this paper addresses the limitation that, during the transition from theory to practice, the number of measurements M in the original measurement matrix is ​​too small compared to the sparsity K of the EEG signal itself, resulting in the inability to meet the theoretical requirements for compressed sensing applications. This improves the compression rate during EEG signal compression processing.

[0059] Further comparison of common measurement matrix selection schemes reveals that random Gaussian matrices require large storage resources, and the resulting matrix multiplication is a floating-point operation, consuming a large amount of computing resources. Although the random Bernoulli matrix has only two possible values ​​for its elements, like the random Gaussian matrix, the resulting matrix multiplication is a floating-point operation. The elements of the partial Hadamard matrix are all -1 or 1, and the calculation type in the matrix multiplication is addition or subtraction. Sparse random binary matrices, on the other hand, have a limited number of matrix elements that are 1. During matrix multiplication, calculations do not need to be performed every time. Data addition operations are only required when the matrix element is 1, and no data operations are performed when the matrix element is 0. Compared with random Bernoulli matrices and partial Hadamard matrices, the amount of calculations and computational complexity are lower. However, in hardware implementation scenarios, random matrix generation still needs to be performed during each signal compression, which is not conducive to reducing hardware power consumption. The EEG signal compression processing flow designed by the present invention can store the determined measurement matrix in the hardware processing module in advance, thereby eliminating the need to consume hardware resources for matrix generation during actual operation, and facilitating the implementation of the EEG signal compression algorithm in the low-power hardware scenario required by actual requirements.

[0060] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 Schematic diagram of compressed sensing calculation.

[0062] Figure 2 This is a flow chart of the EEG signal processing method according to an embodiment of the present invention.

[0063] Figure 3 The variation of sparsity k with respect to X is shown. DETAILED DESCRIPTION

[0064] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope of the present invention and its application.

[0065] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0066] In the existing methods of processing EEG signals using compressed sensing, the measurement matrix used is difficult to simultaneously meet the requirements of high compression rate and low power consumption hardware implementation. As a result, in actual EEG monitoring scenarios, the monitoring equipment has high energy consumption and heat generation, which is not conducive to the monitored person carrying it with them, and the signal transmission efficiency is poor due to storage space limitations. In response to the above shortcomings, the present invention proposes an EEG signal processing solution suitable for scenarios with actual hardware requirements. By adopting a measurement matrix designed and expanded based on a combination of Hadamard matrices in the EEG compression process, while meeting the basic restrictions of compressed sensing, it can be applied to EEG signal compression scenarios, improve the compression rate of EEG signals, and reduce power consumption in hardware implementation scenarios.

[0067] See Figure 2 The embodiment of the present invention provides a high-compression EEG signal processing method that is easy to implement by hardware, including the following steps:

[0068] Step S1, data acquisition: obtaining original EEG signals.

[0069] Step S2, sparse transformation: convert the EEG signal into a sparse domain through sparse transformation and extract sparse coefficients.

[0070] In some embodiments, in step S2, the sparse transform includes discrete Fourier transform DFT, discrete cosine transform DCT and discrete wavelet transform. A preferred embodiment uses discrete cosine transform DCT.

[0071] In some embodiments, in step S2, a sparse domain for performing sparse transformation on the EEG signal is selected, satisfying the condition M≥2k, where M is the number of rows of the measurement matrix and k is the sparsity.

[0072] In a preferred embodiment, step S2 further includes: after discrete cosine transform, determining the maximum value among the sparse coefficients corresponding to the original EEG signal; setting the sparse coefficients of a given proportion a that is less than the maximum sparse coefficient to 0, where a is selected so that it has no effect on the recovery performance of the compressed signal or the effect is negligible.

[0073] Step S3, measurement matrix generation: constructing an initial correlation matrix, vertically and horizontally expanding the initial correlation matrix to reduce coherence and meet compressed sensing requirements, and generating an expanded matrix for compressed sensing through nested operations.

[0074] In some embodiments, in step S3, the initial incidence matrix is ​​vertically and horizontally expanded, specifically comprising the following sub-steps:

[0075] S3.1. Construct an initial incidence matrix: Define a finite set X with v elements. From X, form a family of subsets P by selecting v - 1 elements in all possible ways. Construct an incidence matrix H with dimensions v × v. The elements of H are binary values, representing the relationships between the elements.

[0076] S3.2. Vertical expansion: Vertically expand the correlation matrix H to reduce coherence. The specific operation is as follows: calculate the maximum inner product value of each column in the matrix H, determine the number of rows to be expanded based on the maximum value, and add "1" to the corresponding positions in the matrix to generate a new matrix U;

[0077] S3.3. Horizontal expansion: Expand the matrix U horizontally to further reduce the coherence while keeping the coherence value unchanged. The specific operation is: symmetrically apply the operation on the columns in the vertical expansion to the rows, calculate the maximum inner product value of each row in the matrix U, and adjust the rows according to the maximum value to generate a new matrix V. The dimension of the matrix V is m×r, where the number of columns r of the matrix has an upper bound, and the upper bound is related to the initial parameter v defined in S3.1.

[0078] In some embodiments, further, in step S3, an extended matrix for compressed sensing is generated through nested operations, specifically including: using a binary matrix V, which is composed of multiple column vectors, each column vector represents a subset; for each column vector, its element 1 is replaced by a different row of another matrix B, and the element 0 is replaced by an all-zero row vector, thereby generating an extended matrix; the matrix B is a partial Hadamard matrix, which is used to ensure that the extended matrix meets the requirements of compressed sensing.

[0079] In some embodiments, further in step S3, the partial Hadamard matrix is ​​generated by the following method, specifically including:

[0080] Determine the order: Choose an order n that is no less than the required number of rows d and is a multiple of 1, 2, or 4 to determine the size of the Hadamard matrix.

[0081] Construct the basic matrix: create a Hadamard matrix of order 1, and then recursively construct Hadamard matrices of higher orders according to the rules;

[0082] Extended matrix: Recursively construct a Hadamard matrix of order n by copying and modifying the existing Hadamard matrix;

[0083] Extract Partial Matrix: Extract the first d rows from an order-n Hadamard matrix to generate the desired partial Hadamard matrix.

[0084] In some embodiments, by selecting the dimension parameter v of the correlation matrix H, the generated expanded matrix is ​​controlled to have different matrix dimension sizes and coherence values.

[0085] Step S4, compressed sensing: compressing the sparse coefficients using the generated expansion matrix to obtain a compressed signal representation.

[0086] The present invention provides an electroencephalogram (EEG) signal processing method with high compression rate and easy hardware implementation. By adopting a measurement matrix extended by a combination design based on the Hadamard matrix, it not only meets the basic restriction constraints of compressed sensing, but also significantly improves the compression rate of EEG signals and reduces the power consumption in hardware implementation scenarios. This method solves the limitation problem of the original measurement matrix in the process of migrating from theory to practice by applying a new compressed sensing measurement matrix theory to actual scenarios, and achieves a higher compression rate. Compared with the prior art, the present invention reduces the consumption of hardware resources. By storing the determined measurement matrix in the hardware processing module in advance, resource consumption in the signal processing process is avoided, thereby reducing power consumption. In addition, the measurement matrix design of the present invention reduces storage requirements and calculation amount, optimizes calculation efficiency, and reduces calculation complexity by using addition or subtraction instead of floating-point operations. This method is more friendly in hardware implementation, particularly suitable for low-power demand scenarios, and improves the performance level of the EEG signal processing solution in hardware.

[0087] Specific embodiments of the present invention are further described below.

[0088] This invention proposes a method for selecting a measurement matrix within an EEG signal compression processing scheme. This method also provides an effective solution for the extended matrix involved in EEG signal compression, in order to simultaneously meet the measurement matrix conditional constraints and measurement number constraints required by compressed sensing technology. Embodiments of the invention also propose an EEG signal evaluation and processing method using a discrete cosine transform (DCT).

[0089] The process of processing EEG signals according to the embodiment of the present invention is summarized as follows:

[0090] 1. Perform sparse transformation on EEG signals under discrete cosine transform (DCT).

[0091] 2. Set the coefficients that are less than a certain proportion of the maximum value of the sparse coefficient to 0. This operation does not affect the recovery performance of the compressed signal or the impact can be ignored.

[0092] 3. Perform operations on the sparse basis obtained in the process and the generated extended matrix. Due to the discussion and improvement of the limitations of the extended matrix in actual application scenarios in the present invention, it can be considered that the signal meets the recovery conditions after compression and can be restored normally.

[0093] 4. Obtain the compressed EEG signals. The involved operation process is convenient to implement in the scenario of low hardware power consumption, and the obtained compressed signals have a high compression ratio.

[0094] The present invention applies a measurement matrix (hereinafter referred to as an extended matrix for simplicity) expanded from the combination design based on the Hadamard matrix to the scenario of EEG signal compression for implementation.

[0095] The existing construction methods of measurement matrices and the matrices satisfy the above constraints, but the problem that still needs to be solved in the actual application scenario of EEG signals is the selection problem of the measurement number M. It has been introduced in the background technology that M needs to satisfy M≥2k, where k represents the sparsity of the EEG signal, that is, the number of non-zero elements of the signal, and M represents the measurement number M in the dimension M*N of the measurement matrix φ. The actual EEG signals are usually continuously collected and have poor sparsity, so the extended matrix cannot be directly used for compression implementation.

[0096] The high-compression-ratio EEG signal processing method proposed by the present invention that is easy to implement on hardware, its overall flowchart is as Figure 2 shown.

[0097] The generation process of the extended matrix is briefly described as follows: [[ID=I6]]

[0098] 1. Let X=(x1,x2,...,x v ) be a finite set containing v (v≥2), and all subsets formed by arbitrarily selecting v - 1 elements from the set X are P={P1,P2,...,P v )}, where P1,P2,...,P v represent v blocks. Define its incidence matrix as a v*v-dimensional binary matrix H=(h i,j ), and the specific construction rule is as follows: if x i ∈P j , then the corresponding h i,j = 1, otherwise the corresponding h i,j = 0. The obtained matrix is defined as the initial incidence matrix H, and its coherence is 1 - 1 / (v - 1). Since the coherence approaches 1 when v increases, the incidence matrix H cannot be used as a measurement matrix, and the matrix H needs to be extended.

[0099] 2. Vertical expansion: If v≥4, for 1≤j≤v, let λj = max 1≤j<j1≤n 〈h j ,h j1 〉, then H should be extended by λ j-1 rows. For 1≤i < i1≤v, if H i,j = H i,j1 = H i1,j = Hi1,j1 =1, then let H i1,j1 = 0. If <h j ,h j1 〉=λ j , then λ should be expanded j -1 hour j1 The last row is "1"; if <h j ,h j1 〉<λ j , then it should be in h j1 The end of the matrix is ​​expanded to 〈hj,hj1〉-1 rows with "1"; the remaining elements are "0". This process continues until j=v-1. The operator <>d mentioned in the process represents the inner product operation of the elements. The resulting new matrix is ​​represented by U. The dimension of the resulting matrix U is m*v (m=v 2 -3v+3)-dimensional binary matrix with a coherence value of 1 / (v-1).

[0100] 3. Horizontal expansion:

[0101] Following a similar approach to vertical expansion, horizontal transformations can be achieved by simply performing symmetric transformations on the row and column elements. During this transformation, the coherence value remains unchanged at 1 / (v-1). The transformed matrix is ​​denoted as V, and has dimensions m*r, where r has an upper bound, i.e., r ≤ mv / (v-1).

[0102] 4. Nested operations:

[0103] Let V = (v1, v2, ..., vr) be an m × r binary matrix with fixed column weights d = v - 1, where vj represents the jth column of V, with j = 1, 2, ..., r. Let B be a d × n1-dimensional matrix. For any column vj, element 1 in vj is replaced by a different row in B. Element 0 is replaced by a 1 × n1-dimensional all-zero row vector (0, 0, ..., 0). This nested matrix serves as the compressed sensing measurement matrix.

[0104] The selected matrix B is a partial Hadamard matrix of d*n-1, where d=v-1 and v is the initial input parameter. The generation process of the required partial Hadamard matrix is ​​as follows:

[0105] 5. Partial Hadamard Matrix Generation

[0106] 5.1 Determine the order:

[0107] First, find a suitable order n, which should be greater than or equal to the required number of rows d, and n must be 1, 2, or a multiple of 4 (i.e., 4k form). For example, if you need to generate a partial Hadamard matrix with 5 rows, then n should be 8, because 8 is the smallest 4k form number larger than 5.

[0108] 5.2 Construct the basic matrix:

[0109] Let's start with the simplest Hadamard matrix. A matrix of rank 1 is a matrix consisting of a single element, whose value is +1.

[0110] A rank 2 matrix is ​​a 2x2 matrix where the upper left and upper right elements are +1, the lower right element is -1, and the lower left element is also +1.

[0111] 5.3 Expand the matrix using recursive construction:

[0112] If you already have a Hadamard matrix of order n, you can construct a matrix of order 2n by copying it. Specifically, copy the original matrix once and place it to the upper left of the new matrix, then copy it again and place it to the upper right of the new matrix. Next, place the original matrix to the lower left of the new matrix and the original matrix to the lower right, but change all +1s to -1s and all -1s to +1s.

[0113] Construct progressively larger matrices:

[0114] For example, if you already have a matrix of order 2, you can use the above method to construct a matrix of order 4. Then, use this 4x4 matrix to construct an 8x8 matrix, and so on, until you reach the required order n.

[0115] Extract part of the matrix:

[0116] After obtaining the complete n×n Hadamard matrix, we only need to take out the first d rows to obtain the partial Hadamard matrix with dimension d*n.

[0117] Through the above matrix construction steps, a series of extended matrices are obtained. The dimensions of the extended matrices are different due to the different selections of the initial parameters v. Table 3 shows the dimensions and coherence values ​​of the matrices constructed under different parameter selection conditions.

[0118] Table 3: Relationship between the dimension and coherence of the expansion matrix and the initial parameter v

[0119]

[0120] Under the technical solution of the present invention, when v=18 is selected, that is, the measurement matrix dimension is 273x5460, and the coherence is 3 / 17, then M=273, N=5460, and the compression rate achieved is (NM) / N=95%, which is higher than the compression rate that can be achieved by the prior art. Moreover, since the constructed matrix is ​​a deterministic matrix, it can be directly stored in the storage module of the hardware system, reducing the re-consumption of hardware resources during actual operation.

[0121] Selection of sparse domain:

[0122] In order to meet the requirement of M≥2k for the number of measurements M, a suitable sparse domain should be selected to perform sparse transformation on the EEG signal, and the sparsity k after transformation should be evaluated to see whether it meets the requirement.

[0123] Commonly used sparse observation methods include DFT, DCT, discrete wavelet transform, etc., among which discrete wavelet transform may lead to different sparsities due to different sparse basis selections. The present invention evaluates the sparse domain in Table 4.

[0124] Table 4: Comparison of EEG signal sparsity evaluation under different sparse bases

[0125]

[0126] The results show that DCT has the best sparse transform effect in the selection of sparse domain of EEG signals, that is, EEG signals have the best sparsity after discrete cosine transform.

[0127] Therefore, the present invention selects the discrete cosine transform as the sparse domain used in the EEG signal compression process. In actual operation, the discrete cosine transform generates sparse coefficients corresponding to the original EEG signal. The resulting sparse coefficients have a maximum value. It can be considered that in actual scenarios, the sparse coefficients that are less than a certain proportion a of the maximum value (in the experimental image, a = X * 0.0001) are set to 0. This operation has no effect on the recovery performance of the compressed signal or can be ignored.

[0128] Figure 3 The variation of sparsity k with respect to X is shown.

[0129] Through calculation, we can know that the dimension of the selected measurement matrix is ​​273x5460, and the ratio of the measurement number M is 273 / 5460=0.05. Therefore, if M≥2k is to be satisfied, k≤0.025 is required. It can be seen from the experimental image that the selected sparse transformation can meet the above conditions under a certain ratio a.

[0130] This invention applies a new compressed sensing measurement matrix theory to EEG signal compression in real-world scenarios. While meeting the basic constraints of compressed sensing, it can achieve a higher compression rate than existing technical solutions. Furthermore, the random sparse matrices involved in existing mainstream technical solutions need to be generated online during each signal processing step. This process consumes a large amount of hardware resources, making it difficult to apply to hardware and bring practical benefits in low-power scenarios. The EEG signal processing solution proposed in this invention helps to strike a balance between high compression rate and hardware friendliness, improving the performance level of existing EEG signal processing solutions on hardware.

[0131] An embodiment of the present invention further provides a storage medium for storing a computer program, which at least performs the above method when executed.

[0132] An embodiment of the present invention further provides a control device, comprising a processor and a storage medium for storing a computer program; wherein the processor is configured to execute at least the method described above when executing the computer program.

[0133] An embodiment of the present invention further provides a processor, which executes a computer program and at least performs the method described above.

[0134] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a read-only optical disc (CD-ROM); the magnetic surface memory can be a magnetic disk memory or a magnetic tape memory. The storage medium described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0135] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0136] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0138] Those skilled in the art will understand that all or part of the steps of the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc. Various media that can store program codes.

[0139] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0140] The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0141] The features disclosed in several product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.

[0142] The features disclosed in several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0143] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. Those skilled in the art will recognize that, without departing from the scope of the present invention, several equivalent substitutions or obvious variations can be made, and the performance or use of the same should be considered to fall within the scope of protection of the present invention.

Claims

1. A high compression rate EEG signal processing method that is easy to implement in hardware, characterized in that: The following steps are involved: S1. Data acquisition: obtaining raw EEG signals; S2, sparse transformation: convert the EEG signal into a sparse domain through sparse transformation and extract sparse coefficients; S3. Measurement matrix generation: constructing an initial correlation matrix, vertically and horizontally expanding the initial correlation matrix to reduce coherence and meet compressed sensing requirements, and generating an expanded matrix for compressed sensing through nested operations; An extended matrix for compressed sensing is generated through nested operations, specifically comprising: using a binary matrix V, the matrix consisting of multiple column vectors, each column vector representing a subset; for each column vector, replacing element 1 with a different row of another matrix B, and replacing element 0 with an all-zero row vector, thereby generating an extended matrix; the matrix B is a partial Hadamard matrix used to ensure that the extended matrix meets the requirements of compressed sensing; S4. Compressed sensing: Use the generated expansion matrix to compress the sparse coefficients to obtain a compressed signal representation.

2. The high compression rate EEG signal processing method that is easy to implement by hardware according to claim 1, characterized in that: In step S2, the sparse transform includes discrete Fourier transform DFT, discrete cosine transform DCT and discrete wavelet transform.

3. The high compression rate EEG signal processing method that is easy to implement by hardware as claimed in claim 2, characterized in that: In step S2, the sparse transformation adopts discrete cosine transform DCT.

4. The high compression rate EEG signal processing method that is easy to implement by hardware according to any one of claims 1 to 3, characterized in that: In step S2, a sparse domain for performing sparse transformation on the EEG signal is selected, satisfying the condition M≥2k, where M is the number of rows of the measurement matrix and k is the sparsity.

5. The high compression rate EEG signal processing method that is easy to implement by hardware according to any one of claims 1 to 3, characterized in that: Step S2 also includes: after discrete cosine transform, determining the maximum value among the sparse coefficients corresponding to the original EEG signal; setting the sparse coefficients of a given proportion a that is less than the maximum sparse coefficient to 0, where a is selected so that it has no effect on the recovery performance of the compressed signal or the effect is negligible.

6. The high compression rate EEG signal processing method that is easy to implement by hardware according to any one of claims 1 to 3, characterized in that: In step S3, the initial correlation matrix is ​​expanded vertically and horizontally, which specifically includes the following sub-steps: S3.

1. Construct an initial incidence matrix: Define a finite set X with v elements. From X, form a family of subsets P by selecting v - 1 elements in all possible ways. Construct an incidence matrix H with dimensions v × v. The elements of H are binary values, representing the relationships between the elements. S3.

2. Vertical expansion: Vertically expand the correlation matrix H to reduce coherence. The specific operation is: calculate the maximum inner product value of each column in the matrix H, determine the number of rows to expand based on the maximum inner product value, and add "1" to the corresponding positions in the matrix to generate a new matrix U; S3.

3. Horizontal expansion: Expand the matrix U horizontally to further reduce the coherence while keeping the coherence value unchanged. The specific operation is: symmetrically apply the operation on the columns in the vertical expansion to the rows, calculate the maximum inner product value of each row in the matrix U, and adjust the rows according to the maximum inner product value to generate a new matrix V. The dimension of the matrix V is m×r, where the number of columns r of the matrix has an upper bound, and the upper bound is related to the initial parameter v defined in S3.

1.

7. The high compression rate EEG signal processing method that is easy to implement by hardware according to any one of claims 1 to 3, characterized in that: In step S3, the partial Hadamard matrix is ​​generated by the following method, specifically including: Determine the order: Choose an order n that is no less than the required number of rows d and is a multiple of 1, 2, or 4 to determine the size of the Hadamard matrix. Construct the basic matrix: create a Hadamard matrix of order 1, and then recursively construct Hadamard matrices of higher orders according to the rules; Extended matrix: Recursively construct a Hadamard matrix of order n by copying and modifying the existing Hadamard matrix; Extract Partial Matrix: Extract the first d rows from an order-n Hadamard matrix to generate the desired partial Hadamard matrix.

8. The high compression rate EEG signal processing method that is easy to implement by hardware according to claim 6, characterized in that: By selecting the dimension parameter v of the correlation matrix H, the generated expansion matrix is ​​controlled to have different matrix dimension sizes and coherence values.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the high-compression EEG signal processing method that is easy to implement by hardware is implemented as described in any one of claims 1 to 8.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the high-compression EEG signal processing method that is easy to implement by hardware is implemented as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Compression method and device of electroencephalogram signal

    CN109495113A

  • Compressed sensing signal processing method and device based on deterministic measurement matrix

    CN118646423A