A system and method for elderly sleep care based on electroencephalogram signals
By using a system based on EEG signals in the sleep monitoring of the elderly, the problems of complex polysomnography equipment and data transmission delays are solved, real-time monitoring and long-term trend analysis of the elderly's sleep are realized, and the monitoring of sleep quality and health status is improved. efficiency.
Patent Information
- Application Number
- CN202410032575.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-01-08
AI Technical Summary
Existing polysomnography devices have problems such as complex equipment, difficult operation, data transmission delays and diagnostic delays in sleep monitoring of the elderly, which affect the accuracy and timeliness of sleep analysis.
An elderly sleep care system based on EEG signals is used to collect EEG signals from the left and right frontal poles for preprocessing and feature extraction. Edge devices and the cloud are used for abnormality detection and real-time monitoring, and 5G core network and Bluetooth are used. Communication enables data transmission and analysis.
It realizes real-time monitoring and long-term trend analysis of the elderly's sleep, detects abnormalities in time, improves the monitoring efficiency of sleep quality and health status, and reduces diagnostic delays and equipment burden.
Smart Images

Figure CN117752344B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer system engineering, and in particular relates to a system and method for realizing sleep care for the elderly based on electroencephalogram signals. Background Art
[0002] Brain waves are formed by the spontaneous, rhythmic, and comprehensive electrical activities of a large number of neurons under the cerebral cortex. Since 1924, when German neurologists first recorded and described human brain activity, brain waves have become of great significance in the era of science. Since brain waves play an important role in the diagnosis of epilepsy, tumors, and other suspected mental symptoms, the detection, analysis, and feature extraction of brain waves have great research value.
[0003] A polysomnogram can accurately measure and record a person's brain electrical activity by placing electrodes at multiple points in the brain. However, a polysomnogram is a multi-channel medical device with a complex lead method. It cannot be operated by non-experienced doctors. In addition, reading and analyzing the sleep EEG of a whole night is a very time-consuming task. The working state of the doctor greatly affects the accuracy of the analysis results. The price of each polysomnogram is very expensive, but the market demand for polysomnograms has remained high. China's authorized invention patent 201010180030.7 collects forehead brain wave signals and acceleration information of human body movements, and then uses multiple judgment rules to perform sleep detection. This technical solution requires the deployment of more electrodes, and the heavy equipment causes a bad psychological burden on the user, which is likely to affect the user's normal rest.
[0004] In addition, even if the elderly's sleep abnormalities are detected, the diagnosis of the disease will be delayed due to factors such as the time and process required for medical treatment. How to effectively and timely transmit the monitoring results is also an important issue that needs to be considered. Therefore, a technical solution that can solve the above problems is needed. Summary of the invention
[0005] In view of the defects in the above-mentioned prior art, the present invention provides a method for elderly sleep care based on EEG signals, comprising the following steps:
[0006] Step S101, collecting EEG signals at the left frontal pole and the right frontal pole of the elderly;
[0007] Step S103: transmitting the EEG signal to an edge device via Bluetooth communication;
[0008] Step S105, preprocessing the EEG signal and extracting features, and performing abnormality detection on the EEG features after feature extraction based on an abnormality detection model;
[0009] Step S107: When the edge device detects an abnormal sleep event, all data of the elderly person is transmitted to the cloud via the 5G core network;
[0010] Step S109: The cloud performs long-term trend analysis on the received abnormal data and performs real-time sleep monitoring on the elderly person's EEG signals.
[0011] Wherein, the step S105 includes:
[0012] Filtering the received EEG signal;
[0013] Perform Fourier transform on the filtered signal and extract the spectrum energy characteristics;
[0014] The abnormality of the electroencephalogram signal is judged based on the spectrum energy characteristics.
[0015] Wherein, filtering the received EEG signal comprises:
[0016] Assuming the filter transfer function H(t), the filtered signal is expressed as x filtered,left (t) and x filtered,right (t), the filtering process is expressed by the following formula:
[0017] x filtered,left (t) = x left (t)*h(t);
[0018] x filtered,right (t) = x right (t)*h(t)
[0019] Wherein, * represents a convolution operation, h(t) represents an impulse response of a filter, t represents time, and x(t) represents a received signal of the edge device.
[0020] The performing Fourier transform on the filtered signal specifically includes:
[0021] The spectrum after Fourier transformation is represented as X filtered,left (f) and X filtered,right (f), then the Fourier transform is calculated using the following formula:
[0022]
[0023]
[0024] in, represents Fourier transform, and j represents an imaginary number.
[0025] The extracting of the spectrum energy features specifically includes calculating the spectrum energy features of the left and right frontal signals using the following formula:
[0026] E left =|X left (f)| 2 ;
[0027] E right =|X right (f)| 2 .
[0028] If the spectrum energy feature of the left frontal pole or the right frontal pole exceeds a preset threshold T, it is determined to be abnormal.
[0029] The edge device simultaneously communicates with multiple EEG signal acquisition devices via Bluetooth.
[0030] Wherein, the step S107 includes:
[0031] Evenly allocating memory capacity on the edge device to each elderly person's EEG acquisition device;
[0032] When the allocated memory capacity is full, the latest data is used to overwrite the earliest data for storage;
[0033] After confirming that the cloud has received all the data of the elderly person with abnormal sleep events, all the data of the elderly person are deleted, and the EEG signal data of the elderly person is uploaded to the cloud at predetermined time intervals.
[0034] Wherein, the step S109 specifically includes:
[0035] The matching pursuit algorithm is used to analyze the acquired abnormal data, and the formula is as follows:
[0036] Score = w1*Similarity1+w2*Similarity2+...+wn*Similarityn+b, where Similarity1 to Similarityn represent similarity features extracted from EEG signals related to the target suspected symptoms. Similarity features are calculated based on cross-correlation algorithms and methods. Each similarity feature has a corresponding weight w1 to wn, which is used to indicate the importance of the feature for judging the suspected symptoms. b is a bias term.
[0037] The analysis results are sent to the elderly person's 5G terminal and related edge devices via the edge gateway and the 5G core network;
[0038] The edge device forwards the analysis result to other display devices in the area where the elderly person is located via Bluetooth or WIFI.
[0039] In one embodiment, assuming there is a known template signal Template and a signal Signal to be judged, a cross-correlation algorithm can be used to calculate the similarity score using the following formula:
[0040] Similarity=Correlation(Template,Signal)
[0041] Among them, Correlation represents the cross-correlation operation, which measures the similarity between the template signal and the signal to be judged.
[0042] Following is the general formula for the cross-correlation function:
[0043] C(t)=∑[x(i)*y(i+t)]
[0044] In this formula, x(i) and y(i) represent the values of the two signals at time i, and t represents the time offset. The cross-correlation function C(t) represents the correlation between signal x and signal y at time offset t.
[0045] In actual calculations, a discrete cross-correlation function is usually used. The specific formula is as follows:
[0046] C[t]=∑[x[i]*y[i+t]]
[0047] Among them, x[i] and y[i] represent the values of two discrete signals at index i, and t represents the time offset.
[0048] The calculation process of the cross-correlation function is to multiply the two signals point by point and sum the product results. By changing the time offset t, the correlation scores at different time points can be obtained.
[0049] The matching pursuit algorithm determines whether the signal to be determined matches the template signal by comparing similarity scores.
[0050] In the matching pursuit algorithm, a threshold can be set. If the similarity score exceeds the threshold, it is determined to be a match; otherwise, it is determined to be a mismatch.
[0051] The present invention also proposes a sleep care system for the elderly based on EEG signals, including an EEG signal acquisition device, an edge device, a cloud device and a display device, characterized in that:
[0052] The EEG signal acquisition device comprises an acquisition module and a first Bluetooth communication module, wherein:
[0053] The acquisition module is used to collect the EEG signals at the left frontal pole and the right frontal pole of the elderly;
[0054] A first Bluetooth communication module, used to transmit the EEG signal to an edge device via Bluetooth communication;
[0055] The edge device includes a feature extraction module, an anomaly detection module, a second Bluetooth communication module, a first 5G communication module and a first wireless communication module, wherein:
[0056] A feature extraction module, used for preprocessing and feature extraction of the EEG signal;
[0057] An anomaly detection module, used to perform anomaly detection on the EEG features after feature extraction based on the anomaly detection model;
[0058] A second Bluetooth communication module, which is used to communicate with the EEG signal acquisition device;
[0059] The first 5G communication module is used to transmit all the data of the elderly to the cloud via the edge gateway through the 5G core network when an abnormal sleep event is detected;
[0060] A first wireless communication module, which is used to perform wireless communication with the display device;
[0061] The cloud includes an analysis module, a real-time monitoring module and a second 5G communication module, wherein:
[0062] An analysis module, which is used to perform long-term trend analysis on the received abnormal data;
[0063] A real-time monitoring module is used to perform real-time sleep monitoring on the EEG signals of elderly people with abnormal sleep;
[0064] An edge gateway, which is used to transmit the data transmitted by the edge device to the core network for forwarding to the elderly person's 5G terminal and related edge devices;
[0065] The display device comprises a display screen and a wireless communication module, wherein:
[0066] A display screen, used to display analysis results;
[0067] The second wireless communication module is used to communicate with the edge device.
[0068] Compared with the prior art, the present invention has the following advantages:
[0069] Real-time monitoring: Through 5G communication technology, the abnormal sleep data of the elderly can be transmitted to the cloud for real-time monitoring. In this way, guardians or medical staff can obtain the sleep status of the elderly at any time, detect abnormal situations in time and take corresponding measures.
[0070] Long-term trend analysis: The cloud can perform long-term trend analysis on the received abnormal data. By accumulating and analyzing a large amount of data, the sleep patterns, periodic changes, and potential abnormal trends of the elderly can be identified. This helps to better understand the sleep health status of the elderly and take timely intervention measures.
[0071] Data storage and processing capabilities: The cloud has powerful storage and computing capabilities, which can store a large amount of sleep abnormality data and perform efficient data processing and analysis. This can avoid the storage space limitations of edge devices and better handle complex algorithms and models.
[0072] Data sharing and collaboration: By transmitting data to the cloud, not only can remote monitoring by guardians or medical staff be achieved, but data sharing and collaboration can also be achieved. Medical experts or researchers can access and analyze data through the cloud platform to provide more accurate diagnosis and treatment recommendations.
[0073] Timely warning and intervention: Through real-time monitoring and analysis in the cloud, abnormal sleep conditions can be detected in time, and early warning and intervention can be carried out. This helps improve the sleep quality and health of the elderly and reduce potential risks and complications. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0075] Figure 1 The present invention is a flowchart showing a method for realizing sleep care for the elderly based on electroencephalogram signals according to an embodiment of the present invention. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all 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.
[0077] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0078] It should be understood that although the terms first, second, third, etc. may be used to describe ... in the embodiments of the present invention, these ... should not be limited to these terms. These terms are only used to distinguish .... For example, without departing from the scope of the embodiments of the present invention, the first ... may also be referred to as the second ..., and similarly, the second ... may also be referred to as the first ....
[0079] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0080] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0081] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0082] The optional embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0083] Embodiment 1
[0084] like Figure 1 As shown, the present invention discloses a method for evaluating sleep care for the elderly based on EEG signals, comprising the following steps:
[0085] Step S101, collecting EEG signals at the left frontal pole and the right frontal pole of the elderly;
[0086] Step S103: transmitting the EEG signal to an edge device via Bluetooth communication;
[0087] Step S105, preprocessing the EEG signal and extracting features, and performing abnormality detection on the EEG features after feature extraction based on an abnormality detection model;
[0088] Step S107: When the edge device detects an abnormal sleep event, all data of the elderly person is transmitted to the cloud via the edge gateway through the 5G core network;
[0089] Step S109: The cloud performs long-term trend analysis on the received abnormal data and performs real-time sleep monitoring on the elderly person's EEG signals.
[0090] Embodiment 2
[0091] The present invention proposes a method for elderly sleep care based on EEG signals, comprising the following steps:
[0092] Step S101, collecting EEG signals at the left frontal pole and the right frontal pole of the elderly;
[0093] Step S103: transmitting the EEG signal to an edge device via Bluetooth communication;
[0094] Step S105, preprocessing the EEG signal and extracting features, and performing abnormality detection on the EEG features after feature extraction based on an abnormality detection model;
[0095] Step S107: When the edge device detects an abnormal sleep event, all data of the elderly person is transmitted to the cloud via the edge gateway through the 5G core network;
[0096] Step S109: The cloud performs long-term trend analysis on the received abnormal data and performs real-time sleep monitoring on the elderly person's EEG signals.
[0097] Wherein, the step S105 includes:
[0098] Filtering the received EEG signal;
[0099] Perform Fourier transform on the filtered signal and extract the spectrum energy characteristics;
[0100] The abnormality of the electroencephalogram signal is judged based on the spectrum energy characteristics.
[0101] Wherein, filtering the received EEG signal comprises:
[0102] Assuming the filter transfer function H(t), the filtered signal is expressed as x filtered,left (t) and x filtered,right (t), the filtering process is expressed by the following formula:
[0103] x filtered,left (t) = x left (t)*h(t);
[0104] x filtered,right (t) = xright (t)*h(t)
[0105] Wherein, * represents a convolution operation, h(t) represents an impulse response of a filter, t represents time, and x(t) represents a received signal of the edge device.
[0106] The performing Fourier transform on the filtered signal specifically includes:
[0107] The spectrum after Fourier transformation is represented as X filtered,left (f) and X filtered,right (f), then the Fourier transform is calculated using the following formula:
[0108]
[0109]
[0110] in, represents Fourier transform, and j represents an imaginary number.
[0111] The extracting of the spectrum energy features specifically includes calculating the spectrum energy features of the left and right frontal signals using the following formula:
[0112] E left =|X left (f)| 2 ;
[0113] E right =|X right (f)| 2 .
[0114] If the spectrum energy feature of the left frontal pole or the right frontal pole exceeds a preset threshold T, it is determined to be abnormal.
[0115] The edge device simultaneously communicates with multiple EEG signal acquisition devices via Bluetooth.
[0116] Among them, when no abnormal sleep event is detected, a first scheduling mode is used to communicate with all EEG signal acquisition devices. The first scheduling mode includes the edge device dividing time into different time slots, each time slot is used to communicate with an EEG signal acquisition device. By switching between different time slots, the edge device can communicate alternately with multiple acquisition devices.
[0117] In one embodiment, if an abnormal sleep event is detected, a second scheduling mode is used to communicate with all EEG signal acquisition devices. The second scheduling mode includes the edge device using a dynamic scheduling algorithm to allocate resources according to real-time demand and communication load conditions. Scheduling is performed by giving priority to transmitting the EEG signal data of the elderly involved in the abnormal event. It performs priority scheduling by increasing the EEG signal data acquisition frequency and transmission frequency of the elderly involved in the abnormal event to ensure the effective use of resources and the reliability of communication.
[0118] Wherein, the step S107 includes:
[0119] Evenly allocating memory capacity on the edge device to each elderly person's EEG acquisition device;
[0120] When the allocated memory capacity is full, the latest data is used to overwrite the earliest data for storage;
[0121] After confirming that the cloud has received all the data of the elderly person with abnormal sleep events, all the data of the elderly person are deleted, and the EEG signal data of the elderly person is uploaded to the cloud at predetermined time intervals.
[0122] Wherein, the step S109 specifically includes:
[0123] The matching pursuit algorithm is used to analyze the acquired abnormal data, and the formula is as follows:
[0124] Score = w1*Similarity1+w2*Similarity2+...+wn*Similarityn+b, where Similarity1 to Similarityn represent similarity features extracted from EEG signals related to the target suspected symptoms. Similarity features are calculated based on cross-correlation algorithms and methods. Each similarity feature has a corresponding weight w1 to wn, which is used to indicate the importance of the feature for judging the suspected symptoms. b is a bias term.
[0125] The analysis results are sent to the elderly person's 5G terminal and related edge devices via the edge gateway and the 5G core network;
[0126] The edge device forwards the analysis result to other display devices in the area where the elderly person is located via Bluetooth or WIFI.
[0127] The edge device can use local communication methods such as Bluetooth or Wi-Fi to forward the analysis results to other display-capable devices in the area where the elderly are located. This can be done by sending the results as data packets to other devices and establishing appropriate communication connections between the devices so that other devices can receive and display the analysis results.
[0128] In one embodiment, the cloud transmits the analysis results to the edge gateway: the cloud sends the analysis results to the edge gateway connected to the 5G network. The edge gateway sends the analysis results to the core network through 5G technology. This involves using the user plane and control plane protocols in the 5G protocol stack, such as using an IP-based transmission protocol (such as IPv6) to encapsulate the data and send it to the corresponding node of the core network. The core network receives the data from the edge gateway and routes it according to the identification information of the terminal device (such as IMSI, International Mobile Subscriber Identity) to ensure that the data can be correctly transmitted to the elderly’s 5G terminal. The core network forwards the analysis results to the 5G terminal of the target elderly. This includes transmitting the data packet to the appropriate base station and transmitting the data to the terminal device through a 5G air interface (such as 5G NR).
[0129] In one embodiment, in order to ensure that the elderly can receive the analysis results, if some elderly people do not have 5G mobile phones, the analysis results can be transmitted to display devices such as TVs in the elderly’s room through the Internet of Things. It can also be sent to a voice recognition device to directly remind the elderly to pay attention through voice playback.
[0130] Embodiment 3
[0131] The present invention also proposes a sleep care system for the elderly based on EEG signals, including an EEG signal acquisition device, an edge device, a cloud device and a display device, characterized in that:
[0132] The EEG signal acquisition device comprises an acquisition module and a first Bluetooth communication module, wherein:
[0133] The acquisition module is used to collect the EEG signals at the left frontal pole and the right frontal pole of the elderly;
[0134] A first Bluetooth communication module, used to transmit the EEG signal to an edge device via Bluetooth communication;
[0135] The edge device includes a feature extraction module, an anomaly detection module, a second Bluetooth communication module, a first 5G communication module and a first wireless communication module, wherein:
[0136] A feature extraction module, used for preprocessing and feature extraction of the EEG signal;
[0137] An anomaly detection module, used to perform anomaly detection on the EEG features after feature extraction based on the anomaly detection model;
[0138] A second Bluetooth communication module, which is used to communicate with the EEG signal acquisition device;
[0139] The first 5G communication module is used to transmit all the data of the elderly to the cloud via the 5G core network via the edge gateway when an abnormal sleep event is detected;
[0140] A first wireless communication module, which is used to perform wireless communication with the display device;
[0141] The cloud includes an analysis module, a real-time monitoring module and a second 5G communication module, wherein:
[0142] An analysis module, which is used to perform long-term trend analysis on the received abnormal data;
[0143] A real-time monitoring module is used to perform real-time sleep monitoring on the EEG signals of elderly people with abnormal sleep;
[0144] An edge gateway, which is used to transmit the data transmitted by the edge device to the core network for forwarding to the elderly person's 5G terminal and related edge devices;
[0145] The display device comprises a display screen and a wireless communication module, wherein:
[0146] A display screen, used to display analysis results;
[0147] The second wireless communication module is used to communicate with the edge device.
[0148] Embodiment 4:
[0149] An embodiment of the present disclosure provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the method steps described in the above embodiment.
[0150] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0151] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0152] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (AN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0153] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0155] The above introduces the preferred embodiments of the present invention, which is intended to make the spirit of the present invention clearer and easier to understand, but is not intended to limit the present invention. All modifications, substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection outlined by the claims attached to the present invention.
Claims
1. A method for elderly sleep care based on EEG signals, characterized in that: The following steps are involved: Step S101, collecting EEG signals at the left frontal pole and the right frontal pole of the elderly; Step S103: transmitting the EEG signal to an edge device via Bluetooth communication; Step S105, preprocessing the EEG signal and extracting features, and performing abnormality detection on the EEG features after feature extraction based on an abnormality detection model; Step S107: When the edge device detects an abnormal sleep event, all data of the elderly person is transmitted to the cloud via the edge gateway through the 5G core network; Step S109, the cloud performs long-term trend analysis on the received abnormal data, and performs real-time sleep monitoring on the elderly person's EEG signals; When no abnormal sleep event is detected, a first scheduling mode is used to communicate with all EEG signal acquisition devices, wherein the first scheduling mode includes the edge device dividing time into different time slots, each time slot is used to communicate with one EEG signal acquisition device, and the edge device communicates alternately with multiple acquisition devices by switching between different time slots; If an abnormal sleep event is detected, the second scheduling mode is used to communicate with all EEG signal acquisition devices, wherein the second scheduling mode includes the edge device using a dynamic scheduling algorithm to allocate resources according to real-time demand and communication load conditions, so as to prioritize the transmission of EEG signal data of the elderly involved in the abnormal event, and to prioritize the scheduling mode by increasing the EEG signal data acquisition frequency and transmission frequency of the elderly involved in the abnormal event; The step S105 comprises: Filtering the received EEG signal; Perform Fourier transform on the filtered signal and extract the spectrum energy characteristics; Performing abnormal EEG signal judgment based on the spectrum energy characteristics; The step of filtering the received EEG signal comprises: assuming that the filter transfer function H(t) is such that the filtered signal is represented by x filtered,left (t) and x filtered,right (t), the filtering process is expressed by the following formula: filtered,left (t) = x left (t)*h(t); x filtered,right (t)=x right (t)*h(t) Wherein, * represents a convolution operation, h(t) represents an impulse response of a filter, t represents time, and x(t) represents a received signal of the edge device; The Fourier transform of the filtered signal specifically includes: the spectrum after the Fourier transform is represented as X filtered,left (f) and X filtered,right (f), then the Fourier transform is calculated using the following formula: in, represents Fourier transform, j represents imaginary number; The extracting of the spectrum energy feature specifically includes calculating the spectrum energy features of the left and right frontal signals using the following formula: E left =|X left (f)| 2 ; E right =|X right (f)| 2 If the spectrum energy characteristics of the left or right frontal pole exceed the preset threshold T, it is judged as abnormal; The edge device simultaneously communicates with multiple EEG signal acquisition devices via Bluetooth; The step S107 includes: Evenly allocating memory capacity on the edge device to each elderly person's EEG acquisition device; When the allocated memory capacity is full, the latest data is used to overwrite the earliest data for storage; when it is confirmed that the cloud has received all the data of the elderly with abnormal sleep events, all the data of the elderly are deleted, and the EEG signal data of the elderly is uploaded to the cloud at predetermined time intervals; The step S109 specifically includes: The matching pursuit algorithm is used to analyze the acquired abnormal data, and the formula is as follows: Score = w1*Similarity1+w2*Similarity2+...+wn*Similarityn+b, where Similarity1 to Similarityn represent similarity features extracted from EEG signals related to the target suspected symptoms. Similarity features are calculated based on cross-correlation algorithms and methods. Each similarity feature has a corresponding weight w1 to wn, which is used to indicate the importance of the feature for judging the suspected symptoms. b is a bias term. The analysis results are sent to the elderly person’s 5G terminal and related edge devices through the edge gateway via the 5G core network. The step of sending the analysis result to the elderly person's 5G terminal and related edge devices through the edge gateway via the 5G core network includes: The edge gateway uses an IPv6-based transport protocol to encapsulate and send data to the corresponding node in the core network; The core network receives the data from the edge gateway and routes it according to the identification information of the terminal device to ensure that the data can be correctly transmitted to the elderly person’s 5G terminal; If some elderly people do not have 5G mobile phones, the analysis results will be transmitted to the display device in the elderly’s room or sent to the voice recognition device via Bluetooth or WIFI, and the elderly will be reminded to pay attention directly through voice playback.
2. A sleep care system for the elderly based on EEG signals, comprising an EEG signal acquisition device, an edge device, a cloud device and a display device, characterized in that: The EEG signal acquisition device comprises an acquisition module and a first Bluetooth communication module, wherein: The acquisition module is used to collect the EEG signals at the left frontal pole and the right frontal pole of the elderly; A first Bluetooth communication module, used to transmit the EEG signal to an edge device via Bluetooth communication; The edge device includes a feature extraction module, an anomaly detection module, a second Bluetooth communication module, a first 5G communication module and a first wireless communication module, wherein: A feature extraction module, used for preprocessing and feature extraction of the EEG signal; An anomaly detection module, used to perform anomaly detection on the EEG features after feature extraction based on the anomaly detection model; A second Bluetooth communication module, which is used to communicate with the EEG signal acquisition device; The first 5G communication module is used to transmit all the data of the elderly to the cloud via the edge gateway through the 5G core network when an abnormal sleep event is detected; A first wireless communication module, which is used to perform wireless communication with the display device; The cloud includes an analysis module, a real-time monitoring module and a second 5G communication module, wherein: An analysis module, which is used to perform long-term trend analysis on the received abnormal data; A real-time monitoring module, which is used to perform real-time sleep monitoring on the EEG signals of the elderly who are detected to have abnormal sleep; an edge gateway, which is used to transmit the data transmitted by the edge device to the core network to forward to the elderly's 5G terminal and related edge devices; The display device comprises a display screen and a wireless communication module, wherein: A display screen for displaying analysis results; A second wireless communication module, which is used to communicate with the edge device; Wherein, when no abnormal sleep event is detected, a first scheduling mode is adopted to communicate with all EEG signal acquisition devices, wherein the first scheduling mode includes the edge device dividing time into different time slots, each time slot is used to communicate with an EEG signal acquisition device, and the edge device communicates alternately with multiple acquisition devices by switching between different time slots; if an abnormal sleep event is detected, a second scheduling mode is adopted to communicate with all EEG signal acquisition devices, wherein the second scheduling mode includes the edge device using a dynamic scheduling algorithm to allocate resources according to real-time demand and communication load conditions, so as to give priority to the transmission of EEG signal data of the elderly involved in the abnormal event for scheduling, and the priority scheduling mode is to increase the EEG signal data acquisition frequency and transmission frequency of the elderly involved in the abnormal event; Filtering the received EEG signal; Perform Fourier transform on the filtered signal and extract the spectrum energy characteristics; Performing abnormal EEG signal judgment based on the spectrum energy characteristics; The step of filtering the received EEG signal comprises: assuming that the filter transfer function H(t) is such that the filtered signal is represented by x filtered,left (t) and x filtered,right (t), the filtering process is expressed by the following formula: filtered,left (t) = x left (t)*h(t); x filtered,right (t)=x right (t)*h(t) Wherein, * represents a convolution operation, h(t) represents an impulse response of a filter, t represents time, and x(t) represents a received signal of the edge device; The Fourier transform of the filtered signal specifically includes: the spectrum after the Fourier transform is represented as X filtered,left (f) and X filtered,right (f), then the Fourier transform is calculated using the following formula: in, represents Fourier transform, j represents imaginary number; The extracting of the spectrum energy feature specifically includes calculating the spectrum energy features of the left and right frontal signals using the following formula: E left =|X left (f)| 2 ; E right =|X right (f)| 2 If the spectrum energy characteristics of the left or right frontal pole exceed the preset threshold T, it is judged as abnormal; The edge device simultaneously communicates with multiple EEG signal acquisition devices via Bluetooth; Evenly allocating memory capacity on the edge device to each elderly person's EEG acquisition device; When the allocated memory capacity is full, the latest data is used to overwrite the earliest data for storage; when it is confirmed that the cloud has received all the data of the elderly with abnormal sleep events, all the data of the elderly are deleted, and the EEG signal data of the elderly is uploaded to the cloud at predetermined time intervals; The matching pursuit algorithm is used to analyze the acquired abnormal data, and the formula is as follows: Score = w1*Similarity1+w2*Similarity2+...+wn*Similarityn+b, where Similarity1 to Similarityn represent similarity features extracted from EEG signals related to the target suspected symptoms. Similarity features are calculated based on cross-correlation algorithms and methods. Each similarity feature has a corresponding weight w1 to wn, which is used to indicate the importance of the feature for judging the suspected symptoms. b is a bias term. The analysis results are sent to the elderly person’s 5G terminal and related edge devices through the edge gateway via the 5G core network. The step of sending the analysis result to the elderly person's 5G terminal and related edge devices through the edge gateway via the 5G core network includes: The edge gateway uses an IPv6-based transport protocol to encapsulate and send data to the corresponding node in the core network; The core network receives the data from the edge gateway and routes it according to the identification information of the terminal device to ensure that the data can be correctly transmitted to the elderly person’s 5G terminal; If some elderly people do not have 5G mobile phones, the analysis results will be transmitted to the display device in the elderly’s room or sent to the voice recognition device via Bluetooth or WIFI, and the elderly will be reminded to pay attention directly through voice playback.
