Electroencephalogram data compression method and system, storage medium, and processor
By performing analog-to-digital conversion and compression on EEG data, using fewer data bits to represent action potential information, the problem of low power consumption and high-speed transmission in wireless transmission is solved, the transmission efficiency is improved and the life of the device is extended.
Patent Information
- Application Number
- PCT/CN2023/083104
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-10
- Filing Date
- 2023-03-22
- Publication Date
- 2024-09-19
AI Technical Summary
In the existing technology, wireless transmission of EEG data is difficult to achieve low power consumption and high-speed transmission at the same time, especially in open environments, which imposes great restrictions on animal research.
By performing analog-to-digital conversion, relative average calculation and compression threshold difference judgment on the original EEG data, the data is compressed into one bit, reducing the amount of data transmission, using fewer data bits to represent the time and position of the action potential, and reducing Bluetooth load. rate and current consumption.
It effectively reduces the pressure of wireless data transmission, improves transmission efficiency, extends the service life of the Bluetooth chip, and avoids data loss.
Smart Images

Figure CN2023083104_19092024_PF_FP_ABST
Abstract
Description
A method for compressing electroencephalogram data, a system thereof, a storage medium and a processor Technical Field
[0001] The present application belongs to the technical field of EEG data transmission, and in particular relates to a method for compressing EEG data and its system, storage medium and processor. Background Art
[0002] At present, in brain-computer interface imagination-motor decoding, action potential (AP) signals or field potential signals can usually be used to represent EEG information. Spike potential is the main component of action potential (AP), and the duration of spike potential is about 1ms. If the spike potential is detected, the current mainstream sampling frequency is above 10,000 Hz per second. At present, the more mature brain-computer interface electrode arrays have reached 128 channels, or even more than 1,000 channels. If these collected signals are to be transmitted to the host computer, it will constitute a considerable amount of data transmission. The use of wired transmission is not conducive to the study of freely moving animals in an open environment, and the use of Bluetooth transmission system to transmit signals is difficult to solve the problems of low power consumption and high-speed transmission at the same time. There are shortcomings in the existing technology.
[0003] Summary of the Invention
[0004] The purpose of this application is to provide a method for compressing EEG data and its system, storage medium and processor, aiming to solve the technical problem that it is difficult to achieve low power consumption and high-speed transmission at the same time due to the wireless transmission of EEG data in the existing technology.
[0005] In one aspect, the present application provides a method for compressing EEG data, the method comprising the following steps:
[0006] s1. In each sampling cycle, the EEG raw data is collected sequentially according to the acquisition channel sorting of the EEG acquisition device; a corresponding timestamp is set for each cycle;
[0007] s2. Perform analog-to-digital conversion on the raw EEG data of each channel in turn to obtain the data code value of the channel;
[0008] s3 calculates the relative average value of the data code value, the difference between the data code value and the relative average value is the new value corresponding to the data code value;
[0009] s4. Calculate the difference between the new value and the compression threshold to determine the compression value corresponding to the data code value. When the difference is greater than or equal to 0, the compression value is 1; when the difference is less than 0, the compression value is 0;
[0010] s5. All compressed values are combined into compressed data of the sampling period in the order of corresponding channels, and the compressed data is added with the timestamp, the new value and the compression threshold, and then sent to the host computer.
[0011] On the other hand, the present application also provides a system for compressing EEG data, using any of the above methods, the system comprising:
[0012] The data acquisition module collects raw EEG data through the EEG acquisition chip; a corresponding timestamp is set for each acquisition cycle;
[0013] An analog-to-digital conversion module performs analog-to-digital conversion on the collected raw EEG data to obtain corresponding data code values;
[0014] A data preprocessing module calculates a relative average value of the data code value, wherein the difference between the data code value and the relative average value is a new value corresponding to the data code value;
[0015] A data compression module calculates the difference between the new value and a compression threshold to determine a compression value corresponding to the data code value, where if the difference is greater than or equal to 0, the compression value is 1; and if the difference is less than 0, the compression value is 0;
[0016] The data packaging module combines all the compressed values into the compressed data of the sampling period in the order of the corresponding channels, adds the timestamp, the new value and the compression threshold, and then sends it to the host computer.
[0017] On the other hand, the present application also provides a storage medium storing a program file capable of implementing the above-mentioned EEG data compression method.
[0018] On the other hand, the present application further provides a processor, which is used to run a program, wherein the program executes the above-mentioned EEG data compression method when running.
[0019] This application is mainly used to detect the peak potential of EEG signals, using fewer data bits to indicate the time of action potential occurrence and the channel position of action potential release.
[0020] Specifically, this application is based on analog-to-digital conversion of raw EEG data, and preprocesses the data code value into a new value through a relative average value, and then performs normalized compression on the new value based on a compression threshold. Compared with the prior art method of storing 2-3 bytes of data for one channel, this application only requires one bit to store the data of one channel. It can effectively reduce the pressure of wireless data transmission when collecting 128 channels of data or even more channels each time, reduce the Bluetooth load rate, reduce the current consumption during Bluetooth transmission, avoid data loss caused by Bluetooth at full transmission rate, and effectively improve the efficiency of wireless data transmission.
[0021] At the same time, the compressed data volume also enables the Bluetooth chip to upload EEG data to the host computer with minimal load current, achieving the technical effect of delaying the service life of the EEG acquisition chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1 is a flow chart of a method for compressing EEG data provided in Example 1 of the present application;
[0023] FIG2 is a schematic diagram of the structure of the EEG data compression system provided in Example 2 of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0025] The following describes the specific implementation of this application in detail with reference to specific embodiments:
[0026] Example 1:
[0027] FIG1 shows the implementation process of the EEG data compression method provided in Example 1 of the present application. For ease of illustration, only the part related to the embodiment of the present application is shown, which is described in detail as follows:
[0028] In one aspect, the present application provides a method for compressing EEG data, the method comprising the following steps:
[0029] s1. In each sampling cycle, the EEG raw data is collected sequentially according to the acquisition channel sorting of the EEG acquisition device; a corresponding timestamp is set for each cycle;
[0030] s2. Perform analog-to-digital conversion on the raw EEG data of each channel in turn to obtain the data code value of the channel;
[0031] s3 calculates the relative average value of the data code value, the difference between the data code value and the relative average value is the new value corresponding to the data code value;
[0032] s4. Calculate the difference between the new value and the compression threshold to determine the compression value corresponding to the data code value. When the difference is greater than or equal to 0, the compression value is 1; when the difference is less than 0, the compression value is 0;
[0033] s5. All compressed values are combined into compressed data of the sampling period in the order of corresponding channels, and the compressed data is added with the timestamp, the new value and the compression threshold, and then sent to the host computer.
[0034] Furthermore, the relative average value is a value obtained by summing the data code values corresponding to all channels within a period and then dividing the sum by the number of channels.
[0035] Furthermore, the relative average value is a value obtained by summing the data code values corresponding to a channel in multiple cycles and dividing the sum by the number of cycles.
[0036] Furthermore, the compression threshold is greater than or equal to an average value of all new values in a cycle, and less than a maximum value of new values in a cycle.
[0037] Furthermore, the compression threshold is preset by the host computer according to the field potential of the raw EEG data.
[0038] Furthermore, the compressed data is in bits, and each bit stores a compressed value.
[0039] This application is mainly used to detect the peak potential of EEG signals, using fewer data bits to indicate the time of action potential occurrence and the channel location of action potential release.
[0040] Specifically, EEG signals generally exist in the form of waves, among which a series of connected waveforms with relatively even amplitudes are called field potential waveforms, while the ones with higher peak amplitudes that can be clearly distinguished from the field potential waveforms are called action potential waveforms. The peak potential, as the most prominent feature of the action potential, is the main component of the action potential (AP).
[0041] This application is based on converting the EEG waveform into a specific numerical value, namely the data code value, after analog-to-digital conversion of the raw EEG data. The data code value is then preprocessed into a new value through relative average value. This can highlight the difference between the action potential waveform and the field potential waveform in the analog signal. The new value is then compressed similarly to normalization based on the compression threshold. The peak potential in the action potential can be extracted more effectively without taking up too much storage space.
[0042] Compared to the existing technology that requires 2-3 bytes to store data for one channel, the present invention only requires one bit to store data for one channel. This can effectively reduce the pressure on wireless data transmission when collecting 128 channels of data or even more channels at a time, reduce the Bluetooth load rate, reduce the current consumption during Bluetooth transmission, avoid data loss caused by Bluetooth at full transmission rate, and effectively improve wireless data transmission efficiency.
[0043] At the same time, the compressed data volume also enables the Bluetooth chip to upload EEG data to the host computer with minimal load current, achieving the technical effect of delaying the service life of the EEG acquisition chip.
[0044] Example 2:
[0045] The present application also provides a system for compressing EEG data, using any of the above methods, the system comprising:
[0046] The data acquisition module collects raw EEG data through the EEG acquisition chip; a corresponding timestamp is set for each acquisition cycle;
[0047] An analog-to-digital conversion module performs analog-to-digital conversion on the collected raw EEG data to obtain corresponding data code values;
[0048] A data preprocessing module calculates a relative average value of the data code value, wherein the difference between the data code value and the relative average value is a new value corresponding to the data code value;
[0049] A data compression module calculates the difference between the new value and a compression threshold to determine a compression value corresponding to the data code value, where if the difference is greater than or equal to 0, the compression value is 1; and if the difference is less than 0, the compression value is 0;
[0050] The data packaging module combines all the compressed values into the compressed data of the sampling period in the order of the corresponding channels, adds the timestamp, the new value and the compression threshold, and then sends it to the host computer.
[0051] Furthermore, the number of acquisition channels of the EEG acquisition chip is greater than or equal to 128; the data packaging module is wirelessly transmitted with the host computer based on Bluetooth. A compression system using this compression method also has the same technical effects as the compression method.
[0052] Example 3:
[0053] On the other hand, the present application also provides a storage medium storing a program file capable of implementing the above-mentioned EEG data compression method.
[0054] Those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc.
[0055] Example 4:
[0056] On the other hand, the present application also provides a processor, which is used to run a program, wherein the program executes the above-mentioned EEG data compression method when running.
[0057] In the embodiments of the present application, the EEG data compression method can be implemented by corresponding hardware or software units. Each unit can be an independent hardware or software unit, or can be integrated into a hardware or software unit. This is not intended to limit the present application. The specific implementation of each unit can be referred to the description of Example 1 and will not be repeated here.
[0058] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for compressing electroencephalogram data, characterized in that: The method comprises the following steps: s1. In each sampling cycle, the EEG raw data is sequentially collected according to the collection channel sorting of the EEG collection device; a corresponding timestamp is set for each cycle; s2. Perform analog-to-digital conversion on the raw EEG data of each channel in turn to obtain the data code value of the channel; s3. Calculate the relative average value of the data code value, the difference between the data code value and the relative average value is the new value corresponding to the data code value; s4. Calculate the difference between the new value and the compression threshold to determine the compression value corresponding to the data code value. When the difference is greater than or equal to 0, the compression value is 1; when the difference is less than 0, the compression value is 0; s5. All the compressed values are combined into the compressed data of the sampling period in the order of the corresponding channels, and then the timestamp, the new value and the compression threshold are added and sent to the host computer.
2. The compression method according to claim 1, characterized in that The relative average value is a value obtained by summing the data code values corresponding to all channels within a period and then dividing the sum by the number of channels.
3. The compression method according to claim 1, characterized in that: The relative average value is a value obtained by summing the data code values corresponding to a channel in multiple cycles and then dividing the sum by the number of cycles.
4. The compression method according to claim 1, characterized in that: The compression threshold is greater than or equal to an average value of all new values in a cycle, and less than a maximum value of new values in a cycle.
5. The compression method according to claim 1, characterized in that: The compression threshold is preset by the host computer according to the field potential of the raw EEG data.
6. The compression method according to claim 1, characterized in that: The compressed data is in bits, and each bit stores a compressed value.
7. A system for compressing electroencephalogram data, characterized in that: The method according to any one of claims 1 to 6 is characterized in that the system comprises: The data acquisition module collects raw EEG data through the EEG acquisition chip; a corresponding timestamp is set for each acquisition cycle; An analog-to-digital conversion module performs analog-to-digital conversion on the collected raw EEG data to obtain corresponding data code values; A data preprocessing module calculates a relative average value of the data code value, wherein the difference between the data code value and the relative average value is a new value corresponding to the data code value; A data compression module calculates the difference between the new value and the compression threshold to determine the compression value corresponding to the data code value, when the difference is greater than or equal to 0, the compression value is 1, and when the difference is less than 0, the compression value is 0; The data packaging module combines all the compressed values into compressed data of the sampling period in the order of corresponding channels, adds the timestamp, the new value and the compression threshold, and then sends it to the host computer.
8. The compression system according to claim 1, characterized in that The number of acquisition channels of the EEG acquisition chip is greater than or equal to 128; the data packaging module is wirelessly transmitted with the host computer based on Bluetooth.
9. A storage medium, characterized in that: The storage medium stores a program file capable of implementing the method for compressing electroencephalogram data as described in any one of claims 1 to 6.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the method for compressing EEG data as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Information processing method and device based on video stream, and storage medium
CN112905843A
EEG data Bluetooth transmission system based on data cutting
CN114974497A
Compression method and system of electroencephalogram data, storage medium and processor
CN116321091A
Brain signal acquisition and process equipment based on structured sparse compressed sensing
CN203776899U
System and method for neonatal electrophysiological signal acquisition and interpretation
WO2022122772A2
