Epilepsy monitoring system and method based on WiFi, storage medium and equipment

Through a two-stage monitoring strategy based on WiFi channel status information, combined with LOF algorithm and signal processing technology, the problem of difficulty in accurately monitoring epilepsy in the existing technology is solved, and efficient and accurate monitoring of epilepsy is achieved, which is suitable for long-term home monitoring.

CN120052823APending Publication Date: 2025-05-30AIR FORCE HOSPITAL OF THE SOUTHERN THEATER COMMAND OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510255763.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art is difficult to accurately monitor epilepsy, traditional wet electrodes have problems of skin allergies, movement restrictions and high costs, video monitoring systems are susceptible to light conditions and have high risk of privacy leakage, fall detection algorithms based on threshold judgments are difficult to capture subtle motion patterns, and deep learning models lack specific sensitivity under environmental noise interference.

Method used

Using a two-stage monitoring strategy based on WiFi channel state information, the first stage uses a shorter sampling time to quickly identify potential abnormal activities, and the second stage uses a longer sampling time to perform in-depth analysis, especially detecting the periodicity of signal subcarriers, extracting abnormal point data through LOF algorithm, and improving signal quality through phase dewinding and phase linear transformation processing.

Benefits of technology

Accurate monitoring of epilepsy seizures is achieved, which not only captures the possibility of seizures in a timely manner, but also improves the accuracy of detection through in-depth analysis, balances the response speed and detection accuracy, and is suitable for long-term home monitoring and significantly improves the quality of life and safety of patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120052823A_ABST
    Figure CN120052823A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical instruments, and particularly discloses an epilepsy monitoring system and method based on WiFi, a storage medium and equipment. The receiver is used for receiving the WiFi signal to obtain WiFi channel state information; the analysis component is used for periodically collecting WiFi channel state information according to a first preset sampling duration and analyzing whether the WiFi channel state information within the first preset sampling duration has abnormal fluctuation or not; the analysis component is also used for collecting the WiFi channel state information received by the receiver according to a second preset sampling duration after abnormal fluctuation of the WiFi channel state information occurs, and analyzing whether subcarriers of the WiFi channel state information within the second preset sampling duration have periodicity or not; according to the system, the possibility of epileptic seizure can be captured in time, the detection accuracy can be improved through more detailed analysis, and the response speed and the detection accuracy are effectively balanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical device technology, and more specifically, to a WiFi-based epilepsy monitoring system, method, storage medium and device. Background Art

[0002] Epilepsy is a neurological disease caused by abnormal synchronous discharges of brain neurons, and its clinical manifestations are sudden muscle rigidity and repetitive convulsions. Existing clinical diagnosis mainly relies on electroencephalogram (EEG) monitoring, among which long-term EEG provides objective evidence for epileptic seizures by capturing abnormal discharge signals. However, traditional wet electrodes have obvious limitations: electrode adhesives are prone to cause skin allergies, multi-lead harnesses cause movement restrictions, equipment noise interferes with patients' nighttime rest, and the cost of a single monitoring is as high as thousands of yuan, resulting in reduced patient compliance. Although video monitoring systems can assist in observing motor symptoms, they are easily restricted by nighttime light conditions and there is a risk of privacy leakage, making it difficult to meet the long-term monitoring needs of home scenarios.

[0003] In recent years, non-contact sensing technology based on WiFi channel state information (CSI) has shown unique advantages. This technology can effectively identify large-scale movements such as falls and gestures by analyzing the changes in the multipath effect caused by human activities during the propagation of 2.4 / 5GHz frequency band wireless signals, with a detection accuracy of more than 90%. Compared with traditional monitoring methods, it has core advantages such as convenient equipment deployment (using existing routers), no wearable burden, and strong privacy protection. However, epileptic convulsion behavior has significant specificity: the limb tremor amplitude is small during the attack (usually less than 30cm), the movement frequency shows a rhythmic characteristic of 4-8Hz, and the duration varies from person to person. The existing fall detection algorithm based on threshold judgment is difficult to capture such subtle movement patterns, and the behavior recognition model using deep learning is easily interfered by environmental noise when dealing with periodic tremors, resulting in insufficient specificity and sensitivity, and cannot be directly applied in epilepsy monitoring.

[0004] There is currently no effective technical solution to the above problems. Summary of the invention

[0005] The purpose of this application is to provide a WiFi-based epilepsy monitoring system, method, storage medium and device to accurately monitor epilepsy symptoms without the patient relying on EEG.

[0006] In a first aspect, the present application provides a WiFi-based epilepsy monitoring system, wherein the WiFi-based epilepsy monitoring system is arranged indoors and comprises:

[0007] A transmitter is set on one side of the room and is used to transmit WiFi signals;

[0008] A receiver, which is set on the other side of the indoor relative to the transmitter, is used to receive the WiFi signal to obtain the WiFi channel state information;

[0009] An analysis component is used to periodically collect the WiFi channel state information according to a first preset sampling duration, and analyze whether there is abnormal fluctuation in the WiFi channel state information within the first preset sampling duration;

[0010] The analysis component is further used to, after the abnormal fluctuation occurs in the WiFi channel state information, collect the WiFi channel state information received by the receiver according to a second preset sampling duration, and analyze whether the subcarriers of the WiFi channel state information within the second preset sampling duration are periodic. If so, an alarm information is generated, and the second preset sampling duration is greater than the first preset sampling duration.

[0011] The WiFi-based epilepsy monitoring system of the present application combines fast detection and in-depth analysis to propose a two-stage epilepsy monitoring strategy. In the first stage, a shorter sampling duration is used to quickly identify potential abnormal activities, and in the second stage, a longer sampling duration is used for more in-depth analysis, especially to detect the periodicity of the signal subcarriers. This monitoring method can not only capture the possibility of epileptic seizures in a timely manner, but also improve the detection accuracy through more detailed analysis, effectively balancing the response speed and detection accuracy.

[0012] In the described WiFi-based epilepsy monitoring system, the analysis component is further used to perform phase unwrapping and phase linear transformation processing on the original WiFi signal received by the receiver.

[0013] Through these two processing steps, the WiFi-based epilepsy monitoring system of the present application can effectively improve the quality and reliability of the WiFi channel state information, which is crucial for subsequent analysis of whether there is abnormal fluctuation in the WiFi channel state information and determination of whether the subcarriers are periodic. High-quality signal processing provides a basis for accurately detecting epileptic seizures, thereby improving the performance and reliability of the entire monitoring system.

[0014] In the described WiFi-based epilepsy monitoring system, the process of analyzing whether there is abnormal fluctuation in the WiFi channel state information within the first preset sampling duration includes:

[0015] Based on the LOF algorithm, extract the number of all abnormal point data of the WiFi channel state information within the first preset sampling duration, and judge whether there is abnormal fluctuation according to the number of the abnormal point data.

[0016] The WiFi-based epilepsy monitoring system of the present application uses the LOF algorithm to extract outlier data. This algorithm can effectively identify local outliers and is suitable for complex multi-dimensional data analysis. By counting the number of outlier data extracted by the LOF algorithm, the system can quantify the degree of abnormality, providing an objective basis for judging whether abnormal fluctuations occur.

[0017] The described WiFi-based epilepsy monitoring system, wherein the process of judging whether abnormal fluctuations occur based on the number of outlier data includes:

[0018] Calculating the proportion of the outlier data in the WiFi channel state information within the first preset sampling duration based on the number of outlier data;

[0019] Comparing the size relationship between the proportion and the first preset proportion, and when the proportion is greater than the first preset proportion, it is determined that abnormal fluctuations occur.

[0020] The described WiFi-based epilepsy monitoring system, wherein the alarm information includes first alarm information and second alarm information, and the process of generating the alarm information includes:

[0021] Generating first alarm information that the patient can execute to turn off;

[0022] If the patient does not turn off the first alarm information within the preset duration, generating second alarm information and sending it to the monitoring terminal.

[0023] The described WiFi-based epilepsy monitoring system, wherein the process of analyzing whether the subcarriers of the WiFi channel state information within the second preset sampling duration have periodicity includes:

[0024] Intercepting the WiFi channel state information within the second preset sampling duration based on a preset quantity to obtain a preset quantity of segmented information;

[0025] Analyzing whether the subcarriers corresponding to all segmented information are similar;

[0026] When the proportion of the number of subcarriers corresponding to all segmented information that are similar is greater than the second preset proportion, it is determined that the subcarriers of the WiFi channel state information within the second preset sampling duration have periodicity.

[0027] The described WiFi-based epilepsy monitoring system, wherein the process of analyzing whether the subcarriers corresponding to all segmented information are similar includes:

[0028] Calculating the cosine distance of the waveforms of the subcarriers corresponding to different segmented information, and when the cosine distance is less than the preset distance, it is determined that the subcarriers corresponding to the different segmented information are similar.

[0029] Second aspect, the present application also provides a WiFi-based epilepsy monitoring method, which is applied to a WiFi-based epilepsy monitoring system arranged indoors. The WiFi-based epilepsy monitoring system includes:

[0030] A transmitter, arranged on one side of the room, for transmitting WiFi signals;

[0031] A receiver, arranged on the other side of the room opposite to the transmitter, for receiving the WiFi signals to obtain WiFi channel state information;

[0032] The WiFi-based epilepsy monitoring method includes the following steps:

[0033] S1. Periodically collect the WiFi channel state information according to a first preset sampling duration, and analyze whether there is abnormal fluctuation in the WiFi channel state information within the first preset sampling duration;

[0034] S2. After the WiFi channel state information shows abnormal fluctuation, collect the WiFi channel state information received by the receiver according to a second preset sampling duration, and analyze whether the subcarriers of the WiFi channel state information within the second preset sampling duration are periodic. If so, generate an alarm message; otherwise, return to step S1. The second preset sampling duration is greater than the first preset sampling duration.

[0035] The WiFi-based epilepsy monitoring method of the present application combines fast detection and in-depth analysis to propose a two-stage epilepsy monitoring strategy. In the first stage, a shorter sampling duration is used to quickly identify potential abnormal activities. In the second stage, a longer sampling duration is used for more in-depth analysis, especially to detect the periodicity of signal subcarriers. This monitoring method can not only capture the possibility of epileptic seizures in a timely manner, but also improve the detection accuracy through more detailed analysis, effectively balancing the response speed and detection accuracy.

[0036] Third aspect, the present application also provides an electronic device, including a processor and a memory. The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the second aspect above are run.

[0037] Fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the second aspect above are run.

[0038] As can be seen from the above, the present application provides a WiFi-based epilepsy monitoring system, method, storage medium and device. Among them, the system combines rapid detection and in-depth analysis to propose a two-stage epilepsy monitoring strategy. In the first stage, a shorter sampling duration is used to quickly identify potential abnormal activities. In the second stage, a longer sampling duration is used for more in-depth analysis, especially to detect the periodicity of the signal subcarriers. This monitoring method can not only capture the possibility of epileptic seizures in a timely manner, but also improve the detection accuracy through more detailed analysis, effectively balancing the response speed and detection accuracy. It makes full use of existing home WiFi devices, minimizes additional hardware investment, and at the same time, through a carefully designed two-stage analysis algorithm, realizes accurate monitoring of epileptic seizures. The non-contact feature and automation degree of the system make it particularly suitable for long-term home monitoring use, which can significantly improve the quality of life and safety of patients. Description of the Drawings

[0039] Figure 1 It is a schematic structural diagram of the WiFi-based epilepsy monitoring system provided by an embodiment of the present application.

[0040] Figure 2 It is a flowchart of the WiFi-based epilepsy monitoring method provided by an embodiment of the present application.

[0041] Figure 3 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application.

[0042] Reference Signs: 101, transmitter; 102, receiver; 103, analysis component; 104, monitoring terminal; 301, processor; 302, memory; 303, communication bus. Detailed Embodiments

[0043] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Usually, the components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0044] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, terms such as "first" and "second" are only used for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0045] In a first aspect, please refer to Figure 1 , some embodiments of the present application provide a WiFi-based epilepsy monitoring system. The WiFi-based epilepsy monitoring system is set indoors and includes:

[0046] A transmitter 101, arranged on one side of the room, for transmitting WiFi signals;

[0047] A receiver 102, arranged on the other side of the room opposite to the transmitter 101, for receiving WiFi signals to obtain WiFi channel state information;

[0048] An analysis component 103, for periodically collecting WiFi channel state information according to a first preset sampling duration, and analyzing whether there is an abnormal fluctuation in the WiFi channel state information within the first preset sampling duration;

[0049] The analysis component 103 is further configured to, after the WiFi channel state information shows an abnormal fluctuation, collect the WiFi channel state information received by the receiver 102 according to a second preset sampling duration, and analyze whether the subcarriers of the WiFi channel state information within the second preset sampling duration are periodic. If so, an alarm message is generated, and the second preset sampling duration is greater than the first preset sampling duration.

[0050] Specifically, the WiFi-based epilepsy monitoring system of the embodiments of the present application not only effectively solves the problems of inconvenience in carrying EEG, causing discomfort to patients and affecting patients' rest, but also avoids the problems that computer vision recognition technology is vulnerable to light and perspective effects and involves privacy, and can conveniently monitor patients with epilepsy for a long time, especially suitable for nocturnal activity monitoring; in the embodiments of the present application, the transmitter 101 and the receiver 102 are preferably arranged on both sides of the bed in the patient's rest room to ensure that the signal covers the entire monitoring area and ensure that the WiFi-based epilepsy monitoring system of the embodiments of the present application can monitor patients at rest at night.

[0051] More specifically, in an indoor environment, the calculation formula of the received power of the receiver 102 is as follows:

[0052]

[0053] where P t is the transmission power of the transmitter 101, P r(d) is the received power when the receiver 102 is at a distance d from the transmitter 101, G t is the gain of the transmitter 101, G r is the gain of the receiver 102, λ is the radio propagation wavelength, d is the straight-line distance between the transmitter 101 and the receiver 102, and the straight line where this straight-line distance is located is denoted as the LOS path. h is the distance from the reflection point of the static object to the LOS path, and △ is the path impact caused by the movement of the human body indoors on the radio propagation path, which represents the power impact factor caused by the power dispersion path generated when the human body moves in the indoor environment.

[0054] Based on the composition of Equation (1), it can be seen that when d and h remain unchanged, only △ generated by the movement of the human body will affect the received power of the receiver 102, and the change of △ is directly related to the movement of the human body. Since the power of WiFi can be represented by the amplitude of the WiFi signal, the WiFi-based epilepsy monitoring system in the embodiments of the present application can infer whether the patient has made a movement based on the WiFi channel state information obtained from the WiFi signal received by the receiver 102, and can classify the movement; the WiFi-based epilepsy monitoring system in the embodiments of the present application uses the transmitter 101 and the receiver 102 to establish a WiFi signal transmission link indoors. This setting can maximize the capture of the impact of human activities on the WiFi signal while reducing the interference of environmental factors.

[0055] More specifically, the WiFi-based epilepsy monitoring system in the embodiments of the present application performs electro-epilepsy detection based on two stages. The first stage aims to quickly identify potential abnormal activities, and the second stage conducts a more in-depth analysis to confirm whether it is an epileptic seizure. Among them, the analysis component 103 periodically collects WiFi channel state information with a shorter sampling duration in the first stage and analyzes whether there are abnormal fluctuations to quickly screen out possible epileptic events while reducing the computational burden of the system; since relying on the detection of abnormal fluctuations may lead to a high false alarm rate because daily activities may also cause signal fluctuations, if an abnormality is determined in the first stage, the second stage will be triggered to run. The analysis component 103 introduces a longer sampling duration and more complex analysis methods in the second stage. It will collect WiFi channel state information with a longer sampling duration and analyze whether its subcarriers are periodic to effectively distinguish epileptic seizures from other daily activities based on the rhythmic characteristics of limb tremors during epileptic seizures. The method of analyzing the periodicity of subcarriers in the second stage to judge whether the patient has epilepsy can not only capture the rhythmic characteristics of epileptic seizures but also has the advantages of simple and rapid analysis and is suitable for real-time processing.

[0056] More specifically, WiFi channel state information refers to information that describes the impacts and changes suffered by WiFi signals during transmission, including parameters such as signal strength, phase, frequency, etc. Specifically, it can be obtained by using the subcarrier information in the orthogonal frequency division multiplexing (OFDM) technology; a subcarrier refers to each component that divides a broadband signal into multiple narrowband signals in the OFDM technology. Specifically, the fast Fourier transform (FFT) can be used to extract and analyze it.

[0057] More specifically, an abnormal fluctuation refers to a change in the WiFi channel state information that significantly deviates from the normal range. The process of analyzing whether there is an abnormal fluctuation in the WiFi channel state information within the first preset sampling duration can specifically use statistical analysis methods or machine learning algorithms for detection. In the embodiments of the present application, preferably, an outlier analysis algorithm is used to obtain the number of outliers for analysis, or a pre-trained classification model is used for analysis.

[0058] More specifically, the process of periodically collecting WiFi channel state information according to the first preset sampling duration can be a continuous collection process or an intermittent collection process triggered based on a preset interval.

[0059] More specifically, different preset sampling durations are used for data collection in the analysis processes of the first stage and the second stage, ensuring a balance between the fast response and accurate analysis of the system. The shorter first preset sampling duration ensures that the system can promptly capture potential epileptic events, while the longer second preset sampling duration allows the system to conduct a more in-depth analysis, effectively improving the practicability and reliability of the system.

[0060] More specifically, periodicity means that the signal presents a regular repetitive pattern in time. Specifically, time domain analysis or frequency domain analysis methods can be used to judge.

[0061] More specifically, the analysis component 103 collects the WiFi channel state information based on a preset sampling frequency. In the embodiments of the present application, the sampling frequency is preferably 500 Hz.

[0062] It should be noted that if the analysis component 103 analyzes that the subcarriers of the WiFi channel state information within the second preset sampling duration in the second stage do not have periodicity, it indicates that the patient does not have epileptic symptoms, and then the first stage is continued to be executed again.

[0063] More specifically, the alarm information can be a sound alarm, a visual prompt, or data information sent to a preset monitoring device, used to inform relevant people of the message that the patient is suspected of having epileptic symptoms.

[0064] The WiFi-based epilepsy monitoring system according to the embodiments of the present application combines rapid detection and in-depth analysis to propose a two-stage epilepsy monitoring strategy. In the first stage, a shorter sampling duration is used to quickly identify potential abnormal activities. In the second stage, a longer sampling duration is used for more in-depth analysis, especially to detect the periodicity of signal subcarriers. This monitoring method can not only capture the possibility of epileptic seizures in a timely manner but also improve the detection accuracy through more detailed analysis, effectively balancing the response speed and detection accuracy. It makes full use of existing home WiFi devices, minimizes additional hardware investment, and at the same time, through a carefully designed two-stage analysis algorithm, achieves accurate monitoring of epileptic seizures. The non-contact feature and automation level of the system make it particularly suitable for long-term home monitoring use, which can significantly improve the quality of life and safety of patients.

[0065] In some preferred embodiments, the analysis component 103 is further configured to perform phase unwrapping and phase linear transformation processing on the WiFi signal originally received by the receiver 102.

[0066] Specifically, due to hardware and software errors, the measured values of the original WiFi channel state information contain phase offsets and noise. For example, the sampling clocks and frequencies of the receiver 102 and the transmitter 101 are inconsistent, which will cause sampling time offset and sampling frequency offset, and also cause phase wrapping. The phase unwrapping processing can eliminate the jumps caused by the phase periodicity in the WiFi signal, make the phase information continuous, and help accurately reflect the signal changes caused by human movement. The phase linear transformation processing can eliminate the non-linear phase offset caused by factors such as hardware inconsistency, making the signal more stable and reliable. Through these two processing steps, the WiFi-based epilepsy monitoring system according to the embodiments of the present application can effectively improve the quality and reliability of the WiFi channel state information, which is crucial for subsequent analysis of whether there are abnormal fluctuations in the WiFi channel state information and for judging whether the subcarriers are periodic. High-quality signal processing provides a basis for accurately detecting epileptic seizures, thereby improving the performance and reliability of the entire monitoring system.

[0067] More specifically, in the present application, the phase unwrapping processing can be implemented in various ways. A commonly used method is to use the cumulative phase difference method, which eliminates the 2π jumps by calculating and accumulating the phase differences between adjacent sampling points. Another method is to use the least squares method to fit the phase curve and then perform phase correction. For the phase linear transformation processing, methods such as linear regression or polynomial fitting can be used to eliminate the non-linear phase offset.

[0068] More specifically, compared with directly using the original WiFi signal, the WiFi-based epilepsy monitoring system according to the embodiments of the present application significantly improves the quality and reliability of the signal through phase unwrapping and phase linear transformation processing. This not only enhances the system's ability to capture subtle movement changes, but also improves the sensitivity and specificity of the entire monitoring system, thereby detecting epileptic seizures more accurately.

[0069] In some preferred embodiments, the process of analyzing whether there is abnormal fluctuation in the WiFi channel state information within the first preset sampling duration includes:

[0070] Based on the LOF algorithm, extract the number of all outlier data of the WiFi channel state information within the first preset sampling duration, and determine whether there is abnormal fluctuation according to the number of outlier data.

[0071] Specifically, the WiFi-based epilepsy monitoring system according to the embodiments of the present application uses the LOF (Local Outlier Factor) algorithm to extract outlier data. This algorithm can effectively identify local outliers and is suitable for complex multi-dimensional data analysis. By counting the number of outlier data extracted by the LOF algorithm, the system can quantify the degree of abnormality and provide an objective basis for determining whether there is abnormal fluctuation.

[0072] More specifically, the implementation of the LOF algorithm can be carried out through the following steps: First, preprocess the WiFi channel state information within the first preset sampling duration, including data standardization and dimensionality reduction. Then, calculate the distance between each data point and its k nearest neighbors, and calculate the local reachability density based on these distances. Finally, by comparing the local reachability density of a point with the local reachability density of its neighbors, obtain the local outlier factor of this point; for the extraction of outlier data, a threshold can be set. For example, points with an LOF value greater than 2 are considered outlier data. The WiFi-based epilepsy monitoring system according to the embodiments of the present application can adjust this threshold according to actual usage requirements and monitoring accuracy to adapt to the signal change characteristics in different environments.

[0073] More specifically, the WiFi-based epilepsy monitoring system according to the embodiments of the present application adaptively identifies outlier data in the WiFi channel state information by using the LOF algorithm, which is more accurate than simple threshold judgment. It can adapt to signal changes in different environments and is more suitable for complex and changeable indoor environments. By counting the number of outlier data, the system can flexibly set the judgment criteria, improving the accuracy and reliability of detection. This algorithm-based anomaly detection method lays a foundation for subsequent epileptic seizure judgment and helps improve the performance of the entire monitoring system.

[0074] More specifically, in the embodiments of the present application, the first preset sampling duration is preferably 1 second. Combining with the aforementioned sampling duration of 500 Hz can ensure that 500 groups of data are provided in the first stage for abnormal point monitoring and analysis.

[0075] In some preferred embodiments, the process of determining whether there is an abnormal fluctuation according to the number of abnormal point data includes:

[0076] Calculating the proportion of the abnormal point data in the WiFi channel state information within the first preset sampling duration according to the number of abnormal point data;

[0077] Comparing the size relationship between the proportion and the first preset proportion. When the proportion is greater than the first preset proportion, it is determined that an abnormal fluctuation has occurred.

[0078] Specifically, the WiFi-based epilepsy monitoring system in the embodiments of the present application adopts a proportion-based judgment method to determine whether there is an abnormal fluctuation in the WiFi channel state information, rather than a simple threshold judgment, which has stronger flexibility and adaptability. By calculating the proportion of abnormal point data and comparing it with the preset proportion, it can effectively filter out short-term and occasional signal fluctuations. Only when the abnormal points reach a certain proportion is it determined as a real abnormal fluctuation, thereby improving the accuracy and reliability of the judgment.

[0079] In the embodiments of the present application, the first preset proportion is set to 1 / 4 - 1 / 2, preferably 1 / 3. That is, when the number of abnormal point data is greater than 1 / 3 of the number of all sampled data points corresponding to the WiFi channel state information within the first preset sampling duration, the analysis component 103 determines that an abnormal fluctuation has occurred, and its judgment benchmark corresponds to the data volume and is adaptively adjusted according to the first sampling duration and sampling frequency.

[0080] In some preferred embodiments, the alarm information includes the first alarm information and the second alarm information. The process of generating the alarm information includes:

[0081] Generating the first alarm information that the patient can execute to close;

[0082] If the patient does not close the first alarm information within the preset duration, generating the second alarm information and sending it to the monitoring terminal 104.

[0083] Specifically, the technical solution proposed in this application solves the reliability and timeliness problems of the WiFi-based epilepsy monitoring system when generating alarm information through a hierarchical alarm mechanism. Firstly, by allowing the patient to turn off the first alarm information, the impact of false alarms is reduced, and the reliability of the system is improved. Secondly, by setting a preset duration and a mechanism for generating the second alarm information, it is ensured that help can be obtained in a timely manner when the patient is unable to handle the situation independently, improving the timeliness of the system. This hierarchical alarm mechanism takes into account the autonomy of the patient and ensures that the guardian can be notified in a timely manner in case of an emergency, thus improving the overall effectiveness of the epilepsy monitoring system.

[0084] More specifically, the first alarm information is the alarm information that the patient can execute to turn off. This design allows the patient to judge whether it is a false alarm according to their own situation after receiving the first alarm information. If the patient believes it is a false alarm, they can directly turn off the first alarm information, avoiding unnecessary interference and effectively reducing the negative impact brought by false alarms, improving the reliability of the system.

[0085] It should be noted that the first alarm information can be reminded on-site through a prompt component such as a speaker set beside the bed, and the patient can conveniently turn off the first alarm information through the control end of the corresponding prompt component.

[0086] More specifically, the preset duration is a key parameter used to judge whether the patient turns off the first alarm information in a timely manner. This duration can be set individually according to the situations of different patients. For example, for patients with slower reactions, the preset duration can be set slightly longer, such as 30 seconds or 1 minute; for patients with faster reactions, the preset duration can be set slightly shorter, such as 10 seconds or 15 seconds. By reasonably setting the preset duration, a balance can be achieved between giving the patient enough reaction time and ensuring timely help; in the embodiment of this application, the preset duration is preferably set according to the epilepsy seizure frequency of the patient in the recent period, and is preferably negatively correlated with the epilepsy seizure frequency to shorten the triggering time of the second alarm information and improve the processing timeliness.

[0087] More specifically, the preset duration is preferably 10 - 30 seconds, and preferably 20 seconds.

[0088] More specifically, when the patient does not turn off the first alarm information within the preset duration, the system will automatically generate the second alarm information and send it to the guardian terminal 104. This mechanism ensures that when the patient is unable to handle the situation independently, the guardian can be notified in a timely manner and take necessary measures. The guardian terminal 104 can be a smart phone, a tablet computer or a dedicated medical monitoring device used by the corresponding guardian or medical staff, and it receives the alarm information through a network connection.

[0089] In some preferred embodiments, the process of analyzing whether the subcarriers of the WiFi channel state information within the second preset sampling duration have periodicity includes:

[0090] Intercept the WiFi channel state information within the second preset sampling duration based on a preset quantity to obtain a preset quantity of segmented information;

[0091] Analyze whether the subcarriers corresponding to all the segmented information are similar;

[0092] When the proportion of the number of subcarriers corresponding to all the segmented information that are similar is greater than a second preset proportion, it is determined that the subcarriers of the WiFi channel state information within the second preset sampling duration have periodicity.

[0093] Specifically, the WiFi-based epilepsy monitoring system according to the embodiments of the present application effectively solves the technical problem of analyzing the periodicity of subcarriers of WiFi channel state information by decomposing complex WiFi channel state information into manageable segments and identifying periodic patterns by comparing the characteristics of these segments. In this processing process, the analysis component 103 intercepts information by a preset quantity and obtains segments, converts a long-time complex signal into multiple comparable short-time samples, then analyzes the similarity of the subcarriers corresponding to all the segmented information, and then sets the second preset proportion as a judgment criterion, which can objectively evaluate the periodicity of the signal. This processing method can not only capture the subtle changes of the signal, but also improve the accuracy and reliability of the judgment through statistical analysis.

[0094] More specifically, various similarity analysis methods can be adopted in the process of analyzing similarity, such as waveform matching, spectrum analysis or statistical feature comparison. Specifically, the amplitude and phase characteristics of subcarriers in different segments can be calculated, and the similarity can be judged by setting a threshold. For example, indexes such as Pearson correlation coefficient or cosine similarity can be used. When the similarity exceeds 0.8 or 0.9, it is determined to be similar.

[0095] More specifically, the above-mentioned processing method can adapt to the characteristics of different types of WiFi signals. By adjusting the preset quantity, similarity threshold and second preset proportion, various complex signal patterns can be flexibly dealt with. At the same time, due to the adoption of the segmented analysis method, the influence of noise and random fluctuations on the overall judgment can be effectively reduced, and the accuracy and stability of periodicity detection are improved. It also has the following advantages:

[0096] 1. Higher flexibility: By adjusting the preset quantity and preset proportion, different signal characteristics and application requirements can be adapted.

[0097] 2. Strong anti-interference ability: The segmented analysis method can effectively reduce the influence of local noise.

[0098] 3. High computational efficiency: Compared with complex spectrum analysis methods, the computational complexity of this solution is relatively low, making it suitable for real-time processing.

[0099] 4. Strong interpretability: Through intuitive similarity comparison, the analysis results are easier to understand and verify.

[0100] These advantages make the technical solution of this application have significant practical value in the field of WiFi signal analysis. Especially in application scenarios that require rapid and accurate determination of signal periodicity, such as epilepsy monitoring systems, it can provide more reliable analysis results.

[0101] In some preferred embodiments, the second preset ratio is 1 / 2 - 3 / 4, preferably 2 / 3.

[0102] Specifically, the WiFi channel state information includes multiple subcarriers. The process of analyzing whether the subcarriers corresponding to all segmented information are similar is actually to analyze whether the subcarriers corresponding to different segmented information are similar to determine whether these segmented information are similar. If the number of similar subcarriers exceeds the expectation, it indicates that the corresponding segmented information is similar, and it also indicates that the subcarriers of the WiFi channel state information have periodicity.

[0103] More specifically, this application sets the second preset ratio to 2 / 3, such that the state where the subcarriers of the WiFi channel state information have periodicity corresponds to most of the subcarriers in different segmented information being similar, which can accurately capture the rhythmic characteristics of limb tremors during epileptic seizures. For example, in the case of WiFi acquisition with 52 subcarriers, if more than two-thirds (greater than 34) of the subcarriers in different segmented information are similar, it indicates that the subcarriers of the WiFi channel state information have periodicity, and it is considered that epilepsy has occurred; otherwise, it is considered other behaviors and no intervention is required.

[0104] In some preferred embodiments, the ratio of the second preset sampling duration to the first preset sampling duration is a preset number.

[0105] Specifically, the first preset sampling duration set in the first stage can identify potential abnormal activities, that is, it can effectively capture that the patient has made a movement. On this basis, based on the first preset sampling duration and the preset number, the second preset sampling duration is determined, such that the duration and the amount of data collected corresponding to each segmented information match the first preset sampling duration. If the patient continues to make a movement, these segmented information can also effectively capture the patient's movement. By performing similarity analysis on these segmented information, it is convenient to determine whether the subcarriers of the WiFi channel state information have periodicity, and further determine whether the patient has made a rhythmic movement to infer whether the patient has epileptic symptoms.

[0106] More specifically, the preset quantity is 3 - 5, preferably 4. That is, if the first preset sampling duration is set to 1 second, the second preset sampling duration is set to 4 seconds, so that 2000 groups of data can be collected in the second stage for motion analysis and classification to accurately identify whether the patient has epileptic symptoms.

[0107] In some preferred embodiments, the process of analyzing whether the subcarriers corresponding to all segmented information are similar includes:

[0108] Calculate the cosine distance of the waveforms of the subcarriers corresponding to different segmented information. When the cosine distance is less than the preset distance, it is determined that the subcarriers corresponding to the different segmented information are similar.

[0109] Specifically, traditional waveform matching or correlation analysis methods are less efficient when dealing with a large amount of data and are easily affected by signal amplitude changes. To solve this problem, this application introduces the mathematical tool of cosine distance to quantify the similarity of subcarrier waveforms.

[0110] More specifically, the cosine distance is an index to measure the similarity of two vectors, and the smaller its value, the more similar the two vectors are. In this application, the subcarrier waveforms corresponding to different segmented information are regarded as vectors, and the cosine distance between these vectors is calculated to determine whether the subcarriers are similar. The specific implementation process is as follows:

[0111] First, calculate the cosine distance of the subcarrier waveforms corresponding to different segmented information. This step can be achieved by normalizing the subcarrier waveform data and then calculating the dot product of the two waveform vectors divided by their respective norms. For example, the cosine distance can be calculated using the following formula:

[0112] cos_distance = 1 - (A · B) / (||A|| * ||B||) (2)

[0113] Where A and B respectively represent two subcarrier waveform vectors, "·" represents the dot product operation, and ||A|| and ||B|| respectively represent the norms of vectors A and B.

[0114] Next, compare the calculated cosine distance with the preset distance. The preset distance is a threshold for determining whether the subcarriers are similar. This threshold can be adjusted according to specific application scenarios and requirements; in the embodiments of this application, the preset distance is set to 0.1 - 0.5, preferably 0.3.

[0115] Finally, if the calculated cosine distance is less than the preset distance, it is determined that the subcarriers corresponding to these segmented information are similar. This judgment criterion can effectively identify subcarriers with similar waveform characteristics.

[0116] More specifically, by adopting the cosine distance calculation method, the WiFi-based epilepsy monitoring system according to the embodiments of the present application can accurately and efficiently determine whether the subcarriers corresponding to different segmented information are similar, providing a reliable basis for subsequently determining whether the subcarriers of the WiFi channel state information are periodic. This processing method not only solves the problem of determining subcarrier similarity but also provides more stable and reliable technical support for the entire WiFi-based epilepsy monitoring system.

[0117] In a second aspect, please refer to Figure 2 , some embodiments of the present application further provide a WiFi-based epilepsy monitoring method, which is applied in a WiFi-based epilepsy monitoring system. The WiFi-based epilepsy monitoring system is set indoors and includes:

[0118] A transmitter 101, which is set on one side of the indoor, is used for transmitting WiFi signals;

[0119] A receiver 102, which is set on the other side of the indoor opposite to the transmitter 101, is used for receiving WiFi signals to obtain WiFi channel state information;

[0120] The WiFi-based epilepsy monitoring method includes the following steps:

[0121] S1. Periodically collect WiFi channel state information according to a first preset sampling duration, and analyze whether there is abnormal fluctuation in the WiFi channel state information within the first preset sampling duration;

[0122] S2. After the WiFi channel state information has abnormal fluctuation, collect the WiFi channel state information received by the receiver 102 according to a second preset sampling duration, and analyze whether the subcarriers of the WiFi channel state information within the second preset sampling duration are periodic. If so, generate an alarm message; otherwise, return to step S1. The second preset sampling duration is greater than the first preset sampling duration.

[0123] The WiFi-based epilepsy monitoring method according to the embodiments of the present application combines fast detection and in-depth analysis to propose a two-stage epilepsy monitoring strategy. In the first stage, a shorter sampling duration is used to quickly identify potential abnormal activities, and in the second stage, a longer sampling duration is used for more in-depth analysis, especially to detect the periodicity of signal subcarriers. This monitoring method can not only capture the possibility of epileptic seizures in a timely manner but also improve the detection accuracy through more detailed analysis, effectively balancing the response speed and detection accuracy. It makes full use of existing home WiFi devices, minimizes additional hardware investment, and at the same time, through a carefully designed two-stage analysis algorithm, realizes accurate monitoring of epileptic seizures.

[0124] In a third aspect, please refer to Figure 3, some embodiments of the present application further provide a schematic structural diagram of an electronic device. The present application provides an electronic device, including: a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not marked). The memory 302 stores computer-readable instructions executable by the processor 301. When the electronic device runs, the processor 301 executes the computer-readable instructions to execute the method in any optional implementation manner of the above embodiments.

[0125] In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it executes the method in any optional implementation manner of the above embodiments. Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (abbreviated as SRAM), electrically erasable programmable read-only memory (abbreviated as EEPROM), erasable programmable read-only memory (abbreviated as EPROM), programmable read-only memory (abbreviated as PROM), read-only memory (abbreviated as ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0126] In the embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be electrical, mechanical or other forms.

[0127] In addition, the units described 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 to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0128] Furthermore, in each embodiment of the present application, each functional module may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

[0129] In this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0130] The above description is only for the embodiments of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A WiFi-based epilepsy monitoring system, characterized in that: The WiFi-based epilepsy monitoring system is set up indoors and includes: A transmitter is set on one side of the room and is used to transmit WiFi signals; A receiver, arranged at the other side of the room relative to the transmitter, for receiving the WiFi signal to obtain WiFi channel status information; An analysis component, configured to periodically collect the WiFi channel status information according to a first preset sampling duration, and analyze whether the WiFi channel status information within the first preset sampling duration has abnormal fluctuations; The analysis component is also used to collect the WiFi channel status information received by the receiver according to a second preset sampling duration after the WiFi channel status information fluctuates abnormally, and analyze whether the subcarriers of the WiFi channel status information within the second preset sampling duration are periodic, and if so, generate an alarm message, and the second preset sampling duration is greater than the first preset sampling duration.

2. The WiFi-based epilepsy monitoring system according to claim 1, characterized in that: The analysis component is also used to perform phase unwrapping and phase linear transformation processing on the WiFi signal originally received by the receiver.

3. The WiFi-based epilepsy monitoring system according to claim 1, characterized in that: The process of analyzing whether abnormal fluctuations occur in the WiFi channel status information within the first preset sampling time period includes: The number of all abnormal point data of the WiFi channel state information within the first preset sampling time is extracted based on the LOF algorithm, and whether abnormal fluctuation occurs is determined according to the number of the abnormal point data.

4. The WiFi-based epilepsy monitoring system according to claim 3, characterized in that: The process of judging whether abnormal fluctuation occurs according to the number of abnormal point data includes: Calculate and obtain the proportion of the abnormal point data in the WiFi channel state information within the first preset sampling time according to the number of the abnormal point data; The proportion is compared with a first preset proportion, and when the proportion is greater than the first preset proportion, it is determined that an abnormal fluctuation occurs.

5. The WiFi-based epilepsy monitoring system according to claim 1, characterized in that: The alarm information includes first alarm information and second alarm information, and the process of generating the alarm information includes: generating a first alarm message that the patient can execute shutdown; If the patient does not close the first alarm message within a preset time period, a second alarm message is generated and sent to the monitoring terminal.

6. The WiFi-based epilepsy monitoring system according to claim 1, characterized in that: The process of analyzing whether the subcarrier of the WiFi channel state information within the second preset sampling time period has periodicity includes: Based on a preset number, intercept the WiFi channel state information within the second preset sampling time to obtain a preset number of segmented information; Analyze whether the subcarriers corresponding to all segment information are similar; When the proportion of the number of subcarriers corresponding to similar information of all segment information is greater than a second preset ratio, it is determined that the subcarriers of the WiFi channel state information within the second preset sampling time have periodicity.

7. The WiFi-based epilepsy monitoring system according to claim 6, characterized in that: The process of analyzing whether the subcarriers corresponding to all segment information are similar includes: The cosine distance of the waveforms of the subcarriers corresponding to the different segment information is calculated, and when the cosine distance is less than a preset distance, it is determined that the subcarriers corresponding to the different segment information are similar.

8. A WiFi-based epilepsy monitoring method, characterized in that: The device is applied in a WiFi-based epilepsy monitoring system, which is set indoors and includes: A transmitter is set on one side of the room and is used to transmit WiFi signals; A receiver, arranged at the other side of the room relative to the transmitter, for receiving the WiFi signal to obtain WiFi channel status information; The WiFi-based epilepsy monitoring method comprises the following steps: S1. Periodically collecting the WiFi channel status information according to a first preset sampling duration, and analyzing whether the WiFi channel status information within the first preset sampling duration has abnormal fluctuations; S2. After the WiFi channel status information fluctuates abnormally, the WiFi channel status information received by the receiver is collected according to a second preset sampling duration, and the subcarrier of the WiFi channel status information within the second preset sampling duration is analyzed to determine whether it has periodicity. If so, an alarm message is generated; otherwise, the process returns to step S1, and the second preset sampling duration is greater than the first preset sampling duration.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method as claimed in claim 8 are executed.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 8 are executed.