Low-delay bio-electricity signal encryption method and device, equipment and storage medium
By dynamically adjusting the key length and encryption mode, combined with lightweight stream encryption algorithm, the bioelectric signal data collected in real time is encrypted, which solves the shortcomings of traditional encryption solutions in real time and low latency, and realizes the safe and efficient processing of bioelectric signal data.
Patent Information
- Application Number
- CN202411465267.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-03-14
AI Technical Summary
The existing traditional encryption schemes have high computational complexity when processing real-time bioelectric signals, resulting in delay problems, which are difficult to meet especially when responding to requirements at millisecond levels.
By collecting bioelectric signal data streams in real time, dividing them into time windows, and monitoring the amount of characteristic changes in each time window. If the amount of change exceeds the preset threshold, the key length or encryption mode is dynamically adjusted and encrypted based on a lightweight streaming encryption algorithm.
Low-latency bioelectric signal encryption is realized, ensuring that security and low-latency are provided in real-time data transmission and processing, adapting to the sensitivity of bioelectric signal changes, and optimizing encryption strength.
Smart Images

Figure CN119628825A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bioelectric signal processing technology, and in particular to a low-latency bioelectric signal encryption method, device, equipment and storage medium. Background Art
[0002] In applications such as telemedicine and brain-computer interfaces, bioelectric signals (such as EEG and ECG) need to be collected, transmitted, and analyzed in real time. These data not only have a high degree of personal privacy attributes, but are also often used as biometric information for identity authentication and medical decision-making. Once leaked or tampered with, it will bring huge risks to users. However, existing traditional encryption schemes have high computational complexity and have high latency problems when dealing with real-time requirements, especially millisecond-level response requirements. Summary of the invention
[0003] The embodiments of the present application provide a low-latency bioelectric signal encryption method, device, equipment and storage medium, aiming to achieve.
[0004] In a first aspect, an embodiment of the present application provides a low-latency bioelectric signal encryption method, comprising:
[0005] Collect bioelectric signal data stream in real time and divide the bioelectric signal data stream into a preset number of time windows;
[0006] In each time window, determining the amount of change in the bioelectric signal characteristics;
[0007] If it is detected that the change in the bioelectric signal characteristics within a time window exceeds a preset threshold, the key length or the encryption mode is adjusted;
[0008] According to the adjusted key length, the bioelectric signal data stream within the time window is encrypted based on a lightweight streaming encryption algorithm, or according to the adjusted encryption mode, the bioelectric signal data stream within the time window is encrypted.
[0009] In one embodiment, after determining the change amount of the bioelectric signal feature in each time window, the method further includes:
[0010] If it is detected that the signal feature changes in all time windows are less than the preset threshold, the bioelectric signal data streams in all time windows are encrypted based on a lightweight streaming encryption algorithm.
[0011] In one embodiment, determining the change amount of the bioelectric signal feature in each time window includes:
[0012] In each time window, the time domain features and frequency domain features of the bioelectric signal are extracted;
[0013] Determine the changes in time domain features and frequency domain features respectively.
[0014] In one embodiment, if it is detected that the change amount of the bioelectric signal feature within the time window exceeds a preset threshold, the key length is adjusted, including:
[0015] If it is detected that the change of the time domain feature within the time window exceeds the first threshold, the number of key bits is dynamically increased according to the error size corresponding to the time domain feature;
[0016] If it is detected that the change amount of the frequency domain feature within the time window exceeds the second threshold, the encryption mode is adjusted according to the error size corresponding to the frequency domain feature.
[0017] In one embodiment, dynamically increasing the number of key bits according to the error size corresponding to the time domain feature includes:
[0018] Substitute the error size corresponding to the time domain feature into the preset key calculation formula to calculate the increased key length;
[0019] Dynamically increase the original key length based on the calculated key length.
[0020] In one embodiment, the preset key calculation formula includes:
[0021] L new =L base +α·(EE threshold )
[0022] Among them, L new is the increased key length, L base is the original key length, α is the adjustment coefficient, E is the error, E threshold is the first threshold.
[0023] In one embodiment, according to the adjusted key length, the bioelectric signal data stream within the time window is encrypted based on a lightweight stream encryption algorithm, including:
[0024] Generate a key stream according to the adjusted key length and the randomly generated initial vector;
[0025] The bioelectric signal data stream within the time window is encrypted by performing an XOR operation with the key stream bit by bit or byte by byte.
[0026] In a second aspect, an embodiment of the present application provides a low-latency bioelectric signal encryption device, comprising:
[0027] A division module, used for collecting bioelectric signal data stream in real time and dividing the bioelectric signal data stream into a preset number of time windows;
[0028] A determination module, used to determine the amount of change of the bioelectric signal characteristics within each time window;
[0029] An adjustment module, used to adjust the key length or the encryption mode if it is detected that the change amount of the bioelectric signal characteristics within a time window exceeds a preset threshold;
[0030] The first encryption module is used to encrypt the bioelectric signal data stream within the time window based on the lightweight streaming encryption algorithm according to the adjusted key length, or to encrypt the bioelectric signal data stream within the time window according to the adjusted encryption mode.
[0031] In one embodiment, the device further comprises:
[0032] The second encryption module is used to encrypt the bioelectric signal data stream in all time windows based on a lightweight streaming encryption algorithm if it is detected that the signal feature changes in all time windows are less than a preset threshold.
[0033] In one embodiment, the determination module includes:
[0034] An extraction unit, used for extracting time domain features and frequency domain features of the bioelectric signal in each time window;
[0035] The judging unit is used to judge the changes of the time domain characteristics and the frequency domain characteristics respectively.
[0036] In one embodiment, the adjustment module includes:
[0037] An increasing unit, configured to dynamically increase the number of key bits according to the error size corresponding to the time domain feature if it is detected that the change amount of the time domain feature within the time window exceeds a first threshold;
[0038] The adjustment unit is used to adjust the encryption mode according to the error size corresponding to the frequency domain feature if it is detected that the change amount of the frequency domain feature in the time window exceeds the second threshold.
[0039] In one embodiment, the adding unit is specifically configured to:
[0040] The error size corresponding to the time domain feature is substituted into the preset key calculation formula to calculate the increased key length; based on the calculated key length, the original key length is dynamically increased.
[0041] In one embodiment, the preset key calculation formula includes:
[0042] L new =L base +α·(EE threshold )
[0043] Among them, L newis the increased key length, L base is the original key length, α is the adjustment coefficient, E is the error, E threshold is the first threshold.
[0044] In one embodiment, the first encryption module includes:
[0045] A generating unit, used for generating a key stream according to the adjusted key length and the randomly generated initial vector;
[0046] The encryption unit is used to encrypt the bioelectric signal data stream within the time window by performing an XOR operation on the data stream with the key stream bit by bit or byte by byte.
[0047] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0048] Memory and processing modules;
[0049] The memory is used to store computer programs;
[0050] The processing module is used to execute the computer program and implement the steps of the low-latency bioelectric signal encryption method as described in the first aspect above when executing the computer program.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program;
[0052] When the computer program is executed by one or more processing modules, the one or more processing modules execute the steps of the low-latency bioelectric signal encryption method as described in the first aspect above.
[0053] The embodiments of the present application provide a low-latency bioelectric signal encryption method, device, equipment and storage medium, wherein the low-latency bioelectric signal encryption method includes: real-time acquisition of bioelectric signal data stream, dividing the bioelectric signal data stream into a preset number of time windows; in each time window, determining the amount of change in the bioelectric signal characteristics; if it is detected that the amount of change in the bioelectric signal characteristics in a time window exceeds a preset threshold, adjusting the key length or adjusting the encryption mode; according to the adjusted key length, encrypting the bioelectric signal data stream in the time window based on a lightweight streaming encryption algorithm, or encrypting the bioelectric signal data stream in the time window according to the adjusted encryption mode. By real-time monitoring of the characteristic changes of bioelectric signals and dynamically adjusting the key length, the encryption strength can be flexibly optimized according to the sensitivity of the signal changes, and further combined with the lightweight streaming encryption algorithm, the delay problem of the traditional encryption algorithm in high-frequency data transmission is avoided, thereby ensuring the security and low latency of bioelectric signal data in millisecond-level transmission and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0055] Figure 1 A schematic diagram of a process for low-latency bioelectric signal encryption provided in one embodiment of the present application;
[0056] Figure 2 A schematic diagram of a process flow of a low-latency bioelectric signal encryption method provided by another embodiment of the present application;
[0057] Figure 3 A schematic diagram of the structure of a low-latency bioelectric signal encryption device provided in one embodiment of the present application;
[0058] Figure 4 A schematic block diagram of a low-latency bioelectric signal encryption device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0061] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0062] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0063] The technical solution provided by this application will be described in detail below with reference to the accompanying drawings.
[0064] See also Figure 1 , Figure 1 The flowchart of the low-latency bioelectric signal encryption method provided by one embodiment of the present application is shown in FIG. The execution subject of the low-latency bioelectric signal encryption method is an electronic device with a data encryption function, including but not limited to a computer, a notebook, a handheld device, etc. Figure 1 It can be seen that the low-latency bioelectric signal encryption method includes steps S101 to S104, which are described in detail as follows:
[0065] S101: Collect bioelectric signal data stream in real time, and divide the bioelectric signal data stream into a preset number of time windows.
[0066] Real-time acquisition refers to the continuous acquisition of bioelectric signal data from sensors or acquisition devices (such as EEG headsets, ECG electrocardiographs, etc.). Since the signal exists in the form of continuous changes in time, the collected bioelectric signal data usually forms a data stream, that is, a series of signal data points arranged in chronological order, called a bioelectric signal data stream. Specifically, the bioelectric signal data stream includes but is not limited to signal data points formed by EEG (electroencephalogram) of brain activity, ECG (electrocardiogram) of heart activity, EMG (electromyography) of muscle activity, etc. These signal data points reflect the electrophysiological activities in the organism.
[0067] Since the bioelectric signal data stream is continuous, directly processing the entire data stream is not only complex but also requires a lot of resources in calculation. Therefore, the bioelectric signal data stream is divided into segments of multiple lengths to improve processing efficiency. A time window refers to the division of a continuous data stream into several fixed time periods, and the data segment in each time period is called a time window. Specifically, the length of the time window can be flexibly set according to actual application requirements. For example, the length of the time window can be 100ms.
[0068] S102: Determine the change amount of the bioelectric signal characteristics in each time window.
[0069] In the processing of bioelectric signal data streams, in order to capture and respond to signal changes in a timely manner, it is necessary to extract and analyze the features of the signal in each time window, which includes the extraction of time domain features and frequency domain features. Exemplarily, in each time window, the change amount of the bioelectric signal features is determined, including: in each time window, extracting the time domain features and frequency domain features of the bioelectric signal; and judging the changes of the time domain features and frequency domain features respectively.
[0070] Time domain features are indicators directly extracted from the original time series of the signal, which are used to describe the changes of the signal in time. These features reflect the amplitude, trend and periodicity of the signal. Common time domain features include: mean, variance, standard deviation, peak-to-peak value, zero crossing rate and R peak value. Frequency domain features are extracted by converting the signal from the time domain to the frequency domain. Common frequency domain features include power spectral density, main frequency, frequency center, spectrum entropy and bandwidth. In one embodiment, the changes of time domain features and frequency domain features are judged separately, including: in each time window, calculating the difference between the time domain features and the preset reference time domain features, and calculating the difference between the frequency domain features and the preset reference frequency domain features. The calculated difference is used as the change amount of the bioelectric signal feature.
[0071] S103: If it is detected that the change in the bioelectric signal characteristics within the time window exceeds a preset threshold, the key length is adjusted.
[0072] If it is detected that the change in the bioelectric signal characteristics within a time window exceeds a preset threshold, the key length is adjusted, including: if it is detected that the change in the time domain characteristics within the time window exceeds a first threshold, the number of key bits is dynamically increased according to the error size corresponding to the time domain characteristics; if it is detected that the change in the frequency domain characteristics within the time window exceeds a second threshold, the encryption mode is adjusted according to the error size corresponding to the frequency domain characteristics.
[0073] Specifically, according to the error size corresponding to the time domain characteristics, the number of key bits is dynamically increased, including:
[0074] L new =L base +α·(EE threshold )
[0075] Among them, L new is the increased key length, L base is the original key length, α is the adjustment coefficient, E is the error, E threshold is the first threshold.
[0076] When the change of the time domain characteristics within the time window is detected to exceed the first threshold, it means that the fluctuation of the bioelectric signal in time exceeds the normal range, such as the sudden increase of the heart rate of the ECG signal, or the obvious peak fluctuation of the EEG signal. At this time, in order to improve the strength of data encryption, it is necessary to dynamically increase the number of key bits. By dynamically increasing the key length according to the time domain characteristic error, it can adapt to the band of the bioelectric signal and improve the flexibility and security of encryption.
[0077] The frequency domain feature reflects the energy distribution of the bioelectric signal at different frequencies. When the change in the frequency domain feature exceeds the second threshold, it indicates that the characteristics of the bioelectric signal spectrum are significantly abnormal. At this time, the encryption strength of the data needs to be enhanced to deal with potential data security risks. The encryption mode includes but is not limited to the counter mode or the output feedback mode.
[0078] S104: Encrypt the bioelectric signal data stream within the time window based on the lightweight streaming encryption algorithm according to the adjusted key length, or encrypt the bioelectric signal data stream within the time window according to the adjusted encryption mode.
[0079] According to the adjusted key length, the bioelectric signal data stream in the time window is encrypted based on a lightweight stream encryption algorithm, including: generating a key stream according to the adjusted key length and a randomly generated initial vector; and encrypting the bioelectric signal data stream in the time window by performing an XOR operation with the key stream bit by bit or byte by byte.
[0080] The key length refers to the number of bits or bytes used to generate the key. The initialization vector is a randomly generated non-repeating value used to ensure that the key stream generated will be different each time encryption is performed, even if the same key is used, thereby increasing security.
[0081] According to the adjusted encryption mode, the bioelectric signal data stream within the time window is encrypted, which means that within the time window, when the change in the frequency domain feature is greater than the second threshold, the encryption mode is adjusted to balance between real-time performance and security. For the encryption mode of the continuous bioelectric signal data stream, the calculator mode or the output feedback mode is usually selected for switching.
[0082] Through the above analysis, it can be known that the low-latency bioelectric signal encryption method provided by the embodiment of the present application includes: real-time collection of bioelectric signal data streams, dividing the bioelectric signal data streams into a preset number of time windows; in each time window, determining the amount of change in the bioelectric signal characteristics; if it is detected that the amount of change in the bioelectric signal characteristics in a time window exceeds a preset threshold, then adjusting the key length or adjusting the encryption mode; according to the adjusted key length, encrypting the bioelectric signal data stream in the time window based on a lightweight streaming encryption algorithm, or encrypting the bioelectric signal data stream in the time window according to the adjusted encryption mode. By real-time monitoring of the characteristic changes of bioelectric signals and dynamically adjusting the key length, the encryption strength can be flexibly optimized according to the sensitivity of signal changes, and further combined with a lightweight streaming encryption algorithm, the delay problem of traditional encryption algorithms in high-frequency data transmission is avoided, thereby ensuring the security and low latency of bioelectric signal data in millisecond-level transmission and processing.
[0083] See also Figure 2As shown, Figure 2 A schematic diagram of a low-latency bioelectric signal encryption method provided by another embodiment of the present application. Figure 2 It can be seen that this embodiment and Figure 1 Compared with the embodiment shown, the specific implementation process of S201 to S204 is the same as that of S101 to S104, except that S205 is included after S204. The details are as follows:
[0084] S201: Collect bioelectric signal data stream in real time, and divide the bioelectric signal data stream into a preset number of time windows.
[0085] S202: Determine the change amount of the bioelectric signal characteristics in each time window.
[0086] S203: If it is detected that the change in the bioelectric signal characteristics within the time window exceeds a preset threshold, the key length is adjusted, or the encryption mode is adjusted.
[0087] S204: Encrypt the bioelectric signal data stream within the time window based on the lightweight streaming encryption algorithm according to the adjusted key length, or encrypt the bioelectric signal data stream within the time window according to the adjusted encryption mode.
[0088] S205: If it is detected that the signal feature changes in all time windows are less than a preset threshold, the bioelectric signal data streams in all time windows are encrypted based on a lightweight streaming encryption algorithm.
[0089] When it is detected that the signal feature changes in all time windows are less than the preset threshold, a lightweight streaming encryption algorithm is directly used to encrypt the data, which can ensure data security without increasing the burden due to encryption.
[0090] See also Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a low-latency bioelectric signal encryption device provided by an embodiment of the present application. Figure 3 It can be seen that the low-latency bioelectric signal encryption device 30 provided in the embodiment of the present application includes:
[0091] A division module 301 is used to collect a bioelectric signal data stream in real time and divide the bioelectric signal data stream into a preset number of time windows;
[0092] A determination module 302, used to determine the amount of change of the bioelectric signal feature within each time window;
[0093] An adjustment module 303 is used to adjust the key length or the encryption mode if it is detected that the change amount of the bioelectric signal feature within the time window exceeds a preset threshold;
[0094] The first encryption module 304 is used to encrypt the bioelectric signal data stream within the time window based on the lightweight streaming encryption algorithm according to the adjusted key length, or to encrypt the bioelectric signal data stream within the time window according to the adjusted encryption mode.
[0095] In one embodiment, the device 30 further includes:
[0096] The second encryption module is used to encrypt the bioelectric signal data stream in all time windows based on a lightweight streaming encryption algorithm if it is detected that the signal feature changes in all time windows are less than a preset threshold.
[0097] In one embodiment, the determination module 302 includes:
[0098] An extraction unit, used for extracting time domain features and frequency domain features of the bioelectric signal in each time window;
[0099] The judging unit is used to judge the changes of the time domain characteristics and the frequency domain characteristics respectively.
[0100] In one embodiment, the adjustment module 303 includes:
[0101] An increasing unit, configured to dynamically increase the number of key bits according to the error size corresponding to the time domain feature if it is detected that the change amount of the time domain feature within the time window exceeds a first threshold;
[0102] The adjustment unit is used to adjust the encryption mode according to the error size corresponding to the frequency domain feature if it is detected that the change amount of the frequency domain feature in the time window exceeds the second threshold.
[0103] In one embodiment, the adding unit is specifically configured to:
[0104] The error size corresponding to the time domain feature is substituted into the preset key calculation formula to calculate the increased key length; based on the calculated key length, the original key length is dynamically increased.
[0105] In one embodiment, the preset key calculation formula includes:
[0106] L new =L base +α·(EE threshold )
[0107] Among them, L new is the increased key length, L base is the original key length, α is the adjustment coefficient, E is the error, E threshold is the first threshold.
[0108] In one embodiment, the first encryption module includes:
[0109] A generating unit, used for generating a key stream according to the adjusted key length and the randomly generated initial vector;
[0110] The encryption unit is used to encrypt the bioelectric signal data stream within the time window by performing an XOR operation on the data stream with the key stream bit by bit or byte by byte.
[0111] It should be noted that the specific implementation process of the above modules or units can refer to the implementation process of each step in the previous method embodiment, which will not be repeated here.
[0112] See also Figure 4 As shown, Figure 4 A schematic block diagram of a low-latency bioelectric signal encryption device provided in an embodiment of the present application.
[0113] Exemplarily, the low-latency bioelectric signal encryption device 40 includes a processing module 401 and a memory 402 .
[0114] Exemplarily, the processing module 401 and the memory 402 are connected via a bus 403 , and the bus 403 is, for example, an I2C (Inter-integrated Circuit) bus.
[0115] Specifically, the processing module 401 may be a micro-controller unit (MCU), a central processing unit (CPU) or a digital signal processing module (DSP).
[0116] Specifically, the memory 402 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0117] The processing module 401 is used to run the computer program stored in the memory 402 and implement the steps of the above-mentioned low-latency bioelectric signal encryption method when executing the computer program.
[0118] Exemplarily, the processing module 401 is used to run the computer program stored in the memory 402, and implement the following steps when executing the computer program:
[0119] Collect bioelectric signal data stream in real time and divide the bioelectric signal data stream into a preset number of time windows;
[0120] In each time window, determining the amount of change in the bioelectric signal characteristics;
[0121] If it is detected that the change in the bioelectric signal characteristics within a time window exceeds a preset threshold, the key length or the encryption mode is adjusted;
[0122] According to the adjusted key length, the bioelectric signal data stream within the time window is encrypted based on a lightweight streaming encryption algorithm, or according to the adjusted encryption mode, the bioelectric signal data stream within the time window is encrypted.
[0123] In one embodiment, after determining the change amount of the bioelectric signal feature in each time window, the method further includes:
[0124] If it is detected that the signal feature changes in all time windows are less than the preset threshold, the bioelectric signal data streams in all time windows are encrypted based on a lightweight streaming encryption algorithm.
[0125] In one embodiment, determining the change amount of the bioelectric signal feature in each time window includes:
[0126] In each time window, the time domain features and frequency domain features of the bioelectric signal are extracted;
[0127] Determine the changes in time domain features and frequency domain features respectively.
[0128] In one embodiment, if it is detected that the change amount of the bioelectric signal feature within the time window exceeds a preset threshold, the key length is adjusted, including:
[0129] If it is detected that the change of the time domain feature within the time window exceeds the first threshold, the number of key bits is dynamically increased according to the error size corresponding to the time domain feature;
[0130] If it is detected that the change amount of the frequency domain feature within the time window exceeds the second threshold, the encryption mode is adjusted according to the error size corresponding to the frequency domain feature.
[0131] In one embodiment, dynamically increasing the number of key bits according to the error size corresponding to the time domain feature includes:
[0132] Substitute the error size corresponding to the time domain feature into the preset key calculation formula to calculate the increased key length;
[0133] Dynamically increase the original key length based on the calculated key length.
[0134] In one embodiment, the preset key calculation formula includes:
[0135] L new =L base +α·(EE threshold )
[0136] Among them, Lnew is the increased key length, L base is the original key length, α is the adjustment coefficient, E is the error, E threshold is the first threshold.
[0137] In one embodiment, according to the adjusted key length, the bioelectric signal data stream within the time window is encrypted based on a lightweight stream encryption algorithm, including:
[0138] Generate a key stream according to the adjusted key length and the randomly generated initial vector;
[0139] The bioelectric signal data stream within the time window is encrypted by performing an XOR operation with the key stream bit by bit or byte by byte.
[0140] The computer-readable storage medium may be an internal storage unit of the low-latency bioelectric signal encryption device in the aforementioned embodiment, such as a hard disk or memory of the low-latency bioelectric signal encryption device. The computer-readable storage medium may also be an external storage device of the low-latency bioelectric signal encryption device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the low-latency bioelectric signal encryption device.
[0141] It should be understood that the terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0142] It will also be understood that the term "and / or" used in this application and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0143] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A low-latency bioelectric signal encryption method, characterized in that: include: Collecting bioelectric signal data stream in real time, and dividing the bioelectric signal data stream into a preset number of time windows; Determining the amount of change in the bioelectric signal characteristic within each of the time windows; If it is detected that the change in the bioelectric signal characteristics within a time window exceeds a preset threshold, the key length or the encryption mode is adjusted; According to the adjusted key length, the bioelectric signal data stream within the time window is encrypted based on a lightweight streaming encryption algorithm, or according to the adjusted encryption mode, the bioelectric signal data stream within the time window is encrypted.
2. The low-latency bioelectric signal encryption method according to claim 1, characterized in that: After determining the change amount of the bioelectric signal feature in each time window, the method further includes: If it is detected that the signal feature changes in all time windows are less than the preset threshold, the bioelectric signal data streams in all time windows are encrypted based on a lightweight streaming encryption algorithm.
3. The low-latency bioelectric signal encryption method according to claim 1, characterized in that: Determining the change amount of the bioelectric signal characteristic within each time window includes: In each of the time windows, extracting the time domain features and frequency domain features of the bioelectric signal; The changes of the time domain features and the frequency domain features are determined respectively.
4. The low-latency bioelectric signal encryption method according to claim 3, characterized in that: If it is detected that the change amount of the bioelectric signal feature within the time window exceeds a preset threshold, the key length is adjusted, including: If it is detected that the change amount of the time domain feature within the time window exceeds the first threshold, the number of key bits is dynamically increased according to the error size corresponding to the time domain feature; If it is detected that the change amount of the frequency domain feature within the time window exceeds the second threshold, the encryption mode is adjusted according to the error size corresponding to the frequency domain feature.
5. The low-latency bioelectric signal encryption method according to claim 4, characterized in that: The dynamically increasing the number of key bits according to the error size corresponding to the time domain feature includes: Substituting the error size corresponding to the time domain feature into a preset key calculation formula to calculate the increased key length; Dynamically increase the original key length based on the calculated key length.
6. The low-latency bioelectric signal encryption method according to claim 5, characterized in that: The preset key calculation formula includes: L new =L base +α·(EE threshold ) Among them, L new is the increased key length, L base is the original key length, α is the adjustment coefficient, E is the error, E threshold is the first threshold.
7. The low-latency bioelectric signal encryption method according to claim 1, characterized in that: The step of encrypting the bioelectric signal data stream within the time window based on a lightweight stream encryption algorithm according to the adjusted key length includes: Generate a key stream according to the adjusted key length and the randomly generated initial vector; The bioelectric signal data stream within the time window is encrypted by performing an XOR operation on the key stream bit by bit or byte by byte.
8. A low-latency bioelectric signal encryption device, characterized in that: include: A division module, used for collecting bioelectric signal data stream in real time and dividing the bioelectric signal data stream into a preset number of time windows; A detection module, used to determine the amount of change of the bioelectric signal characteristics within each of the time windows; An adjustment module, used to adjust the key length or the encryption mode if it is detected that the change amount of the bioelectric signal characteristics within a time window exceeds a preset threshold; An encryption module is used to encrypt the bioelectric signal data stream within the time window based on a lightweight streaming encryption algorithm according to an adjusted key length, or to encrypt the bioelectric signal data stream within the time window according to an adjusted encryption mode.
9. An electronic device, characterized in that: include: Memory and processing modules; The memory is used to store computer programs; The processing module is used to execute the computer program and implement the steps of the low-latency bioelectric signal encryption method as described in claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program; When the computer program is executed by one or more processing modules, the one or more processing modules execute the steps of the low-latency bioelectric signal encryption method as described in claims 1 to 7.