A real-time seizure behavior detection and analysis method and system
By identifying typical behaviors and dynamically adjusting the warning level based on time differences in the epilepsy prediction model, the problem of low accuracy and efficiency in existing epilepsy behavior detection technologies is solved, achieving personalized, timely, and efficient epilepsy seizure warning.
Patent Information
- Application Number
- CN202511566728.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-10-30
AI Technical Summary
Existing technologies suffer from low accuracy and efficiency in epilepsy behavior detection, especially in their inability to cover all rare symptom patterns, resulting in insufficient model generalization ability.
An epilepsy prediction model is used to identify typical behaviors of type I and type II. The warning level and time window are dynamically adjusted by calculating the time difference of behavior occurrence. Combined with attention mechanism optimization, resource allocation is optimized to achieve accurate early warning of epileptic seizure risk.
It improves the accuracy and efficiency of epilepsy behavior detection, reduces false alarms, ensures timely warnings, lowers the demand for computing resources, adapts to individual differences, and enhances the reliability of epilepsy seizure warnings.
Smart Images

Figure CN121015145B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of epilepsy detection technology, specifically to a real-time epileptic behavior detection and analysis method and system. Background Technology
[0002] Traditionally, the diagnosis and monitoring of epilepsy have relied on the observation of clinicians and the monitoring of physiological signals such as electroencephalograms (EEG). For example, the epilepsy detection device mentioned in the patent with publication number CN119257557A requires patients to wear devices to obtain physiological signals such as EEG, and these signals are used to detect epileptic behavior.
[0003] In traditional techniques, epilepsy behavioral analysis largely relies on visual observation of the patient's behavior. Clinicians or nurses need to constantly monitor the patient's actions, especially during seizures, for timely intervention. While this method provides direct feedback, manual observation has limitations due to the sudden and irregular nature of epileptic seizures. Prolonged observation can lead to observer fatigue, affecting the accuracy of judgment, especially when monitoring multiple patients simultaneously, which can easily result in misdiagnosis or missed diagnosis.
[0004] The second approach relies on clinical observation and monitoring of physiological signals such as electroencephalography (EEG). While these methods can help determine the nature of an epileptic seizure to some extent, they still have some limitations. For example, EEG requires patients to wear complex equipment, and real-time monitoring and intervention for sudden epileptic seizures is difficult. Furthermore, the use of EEG equipment requires professional operation, and the maintenance and calibration of the equipment are highly demanding; improper operation can lead to inaccurate data, affecting diagnostic results, thus limiting its widespread adoption and application scenarios.
[0005] In response, existing technologies have attempted to address this by proposing several video-based techniques for analyzing epileptic behavior (such as using video to identify patients' emotions and behaviors for early warning of seizures). For example, patent CN117224080A discloses a big data-based human data monitoring method and device, relating to the field of image processing technology. This includes: acquiring diagnostic information and real-time physiological information; acquiring multiple first-frame images of the target epileptic patient using a camera device; processing the multiple first-frame images to obtain multiple second-frame images; processing the physiological information to determine the corresponding physiological characteristics of the target epileptic patient; and, based on a pre-trained epilepsy recognition model, physiological characteristics, second images, and diagnostic information, determining whether the target epileptic patient is in a seizure state and controlling a wearable device to issue an early warning. This allows for highly accurate and timely monitoring of the patient's seizure status based on their emotions and actions, enabling early warning. Furthermore, by incorporating the different pathological characteristics of different patients, it allows for targeted detection of actions and emotions, resulting in greater accuracy and reliability, improved patient monitoring, and a more personalized approach.
[0006] However, the applicant noted that different patients exhibit different symptoms during epileptic seizures, resulting in a massive amount of epileptic seizure data. Traditional technical approaches struggle to collect enough data to cover all rare symptom patterns for training, leading to a significant decrease in the model's accuracy in identifying atypical seizure symptoms not fully covered by the training set, and insufficient generalization ability.
[0007] Therefore, there is an urgent need for a more accurate and efficient method for detecting and analyzing epileptic behaviors. Summary of the Invention
[0008] The purpose of this invention is to provide a real-time epileptic behavior detection and analysis method and system, which partially solves or alleviates the above-mentioned shortcomings in the prior art and greatly improves the accuracy and efficiency of epilepsy identification.
[0009] To solve the aforementioned technical problems, the present invention specifically adopts the following technical solution:
[0010] A first aspect of the present invention is to provide a real-time method for detecting and analyzing epileptic behavior, comprising the steps of:
[0011] S101, acquire the first view data in the first time period;
[0012] S102, a typical behavior in the first view data is identified using a preset epilepsy prediction model;
[0013] S103, update the warning level of the epilepsy prediction model based on the aforementioned typical behaviors; wherein, the aforementioned typical behaviors are pre-recorded behavioral actions that the subject to be analyzed may take during the initial stage of a seizure, and the aforementioned typical behaviors include: a first type of behavior, and / or a second type of behavior; the typical seizure time of the first type of behavior is before the typical seizure time of the second type of behavior; wherein, S103 includes the following steps:
[0014] (1) When the existence of a first type of behavior and a second type of behavior is identified, calculate the time difference between the occurrence of the first type of behavior and the second type of behavior;
[0015] (2) Update the warning level according to the time difference between the occurrence time difference and the preset reference time difference, wherein the warning level is used to update the time window, and the time window is used to define the length of the view data segment extracted from the continuous view sequence data, so that the epilepsy prediction model can identify the action trend according to the context of the view data segment.
[0016] S104, acquire second view data in the second time period, and select at least one segment of the view data from the second view data using the time window;
[0017] S105, the epilepsy prediction model is used to identify whether two types of typical behaviors appear in the view data segment, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epilepsy seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
[0018] In some embodiments, the larger the time difference, the lower the warning level.
[0019] In some embodiments, the higher the warning level, the shorter the time window.
[0020] In some embodiments, it also includes:
[0021] S106, Provide an early warning plan for the object to be analyzed based on the early warning level.
[0022] In some embodiments, S103 includes the step of:
[0023] When only the first or second type of behavior is identified, the warning level is updated according to the category of the corresponding first type of behavior.
[0024] In some embodiments, it also includes:
[0025] S107, Obtain schedule data for the third time period, wherein the third time period is the time period before the first time period, or the third time period refers to a time period that includes at least a portion of the first time period and includes the time period before the first time period;
[0026] S108, identify whether there are preset influencing factors in the schedule data; if so, then step (2) includes:
[0027] The warning level is determined based on the influencing factors and the time difference.
[0028] In some embodiments, it also includes:
[0029] The first warning level is determined based on the influencing factors, wherein the first warning level is divided into at least level one and level two according to the weight of the influencing factors from smallest to largest;
[0030] A second warning level is determined based on the time difference, wherein the second warning level is divided into at least level one and level two according to the magnitude of the time difference from largest to smallest.
[0031] The warning level is generated based on the first warning level and the second warning level.
[0032] In some embodiments, the epilepsy prediction model is equipped with an attention mechanism, and correspondingly, the method further includes the step of:
[0033] The attentional resources of the epilepsy prediction model are allocated according to the warning level.
[0034] In some embodiments, allocating attention resources of the epilepsy prediction model according to the warning level includes the steps of:
[0035] When the warning level is greater than the preset warning threshold, the attention mechanism maintains first attention on the second view data.
[0036] When the warning level is less than or equal to the warning threshold, the attention mechanism maintains a second attention on the second view data.
[0037] Among them, primary attention is less than secondary attention.
[0038] A second aspect of the present invention is to provide a real-time epileptic behavior detection and analysis system, comprising:
[0039] The first acquisition module is used to acquire first view data during the first time period;
[0040] The identification module is used to identify a typical behavior in the first view data using a preset epilepsy prediction model;
[0041] An early warning update module is used to update the early warning level of the epilepsy prediction model based on the aforementioned typical behaviors; wherein, the typical behaviors are pre-recorded actions that the subject to be analyzed may take during the initial stage of a seizure, and the typical behaviors include: a first type of behavior and / or a second type of behavior; the typical seizure time of the first type of behavior precedes the typical seizure time of the second type of behavior; wherein, the early warning update module further includes:
[0042] The time difference calculation unit is used to calculate the time difference between the occurrence of the first type of behavior and the second type of behavior when the existence of the first type of behavior and the second type of behavior is identified.
[0043] An update unit is used to update the warning level based on the time difference between the occurrence time difference and a preset reference time difference. The warning level is used to update the time window, which defines the length of the view data segment extracted from the continuous view sequence data, so that the epilepsy prediction model can identify the action trend based on the context of the view data segment.
[0044] The second acquisition module is used to acquire second view data during the second time period and select at least one segment of the view data from the second view data using the time window;
[0045] The prediction module is used to identify whether two types of typical behaviors appear in the view data segment using the epilepsy prediction model, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epileptic seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
[0046] Beneficial technical effects:
[0047] Firstly, the method of dynamically adjusting the time window based on the preliminary identification results of a typical behavior in this invention can dynamically adjust the sensitivity of the model alarm in combination with the actual situation. This can provide a more comprehensive early warning of risk situations while avoiding excessive false alarms caused by excessively high warning sensitivity, which would interfere with users' daily life activities.
[0048] Secondly, this invention provides a scheme for selectively allocating recognition resources to the model under limited computing resources, thereby enabling relatively reliable and timely early warnings. Furthermore, this scheme for rationally optimizing computing resources can also reduce the application cost of the model, such as reducing the performance requirements of video surveillance equipment, making the scheme easier to promote and implement.
[0049] Thirdly, this invention categorizes and classifies epileptic seizure behaviors and updates the warning levels accordingly. On the one hand, this improves the accuracy and reliability of the warnings, avoiding issuing the same warning level for minor abnormalities like lip pursing and severe abnormalities like whole-body tremors, which could lead users to believe the warnings are unreliable. On the other hand, it facilitates early intervention, shifting from reactive remediation to proactive prevention, avoiding the situation where an alarm is only triggered when a seizure actually occurs, at which point intervention may be too late. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. In the drawings, the elements or parts are not necessarily drawn to scale. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0051] Figure 1 A flowchart illustrating a real-time epileptic behavior detection and analysis method provided in an embodiment of the present invention;
[0052] Figure 2 This is an example diagram of typical user behavior on a timeline provided in an embodiment of the present invention;
[0053] Figure 3 Example diagrams illustrating various time periods and typical behaviors provided in embodiments of the present invention;
[0054] Figure 4 This is a schematic diagram of the entire process of epilepsy perception, recognition, judgment, and response provided in an embodiment of the present invention;
[0055] Figure 5 Example diagram of setting predicted probability and historical score provided in embodiments of the present invention;
[0056] Figure 6 Example diagrams illustrating symptom types and coping suggestions provided in embodiments of the present invention;
[0057] Figure 7 Example diagrams of specific symptoms and corresponding voice prompts provided in embodiments of the present invention;
[0058] Figure 8 A flowchart of an epilepsy behavior detection system provided in an embodiment of the present invention;
[0059] Figure 9 A schematic diagram of the structure of a real-time epileptic behavior detection and analysis system provided in an embodiment of the present invention;
[0060] Figure 10A schematic diagram of one type and two types of typical behaviors on a time axis provided for embodiments of the present invention;
[0061] Figure 11 This is an example diagram illustrating the determination of an early warning scheme based on predicted probability and historical scores, provided in an embodiment of the present invention.
[0062] Figure 12 This is a schematic diagram illustrating the working principle of the epilepsy prediction model provided in an embodiment of the present invention;
[0063] Figure 13 An example diagram provided for determining the warning level based on a first warning level and a second warning level, as provided in an embodiment of the present invention;
[0064] Figure 14 An example diagram illustrating the composition of an epilepsy prediction model provided in an embodiment of the present invention. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0066] In this document, suffixes such as "module" and "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module" and "unit" can be used interchangeably.
[0067] In this article, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0068] In this document, unless otherwise explicitly specified and limited, the terms "equipped with" and the like should be interpreted broadly. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0069] In this document, "and / or" includes any and all combinations of one or more of the listed related items.
[0070] In this article, "multiple" means two or more, that is, it includes two, three, four, five, etc.
[0071] In this specification, certain embodiments may be disclosed in a range-bound format. It should be understood that this "range-bound" description is merely for convenience and brevity and should not be construed as a rigid limitation on the disclosed range. Therefore, the description of a range should be considered as having specifically disclosed all possible subranges and the individual numerical values within those ranges. For example, a description of the range 1-6 should be considered as having specifically disclosed subranges such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., and the individual numbers within those ranges, such as 1, 2, 3, 4, 5, and 6. This rule applies regardless of the breadth of the range.
[0072] Definition of the noun:
[0073] Epilepsy is a common neurological disorder characterized by sudden, repetitive, and involuntary abnormal physical activity. Epileptic seizures are often accompanied by vigorous physical activity, and may even involve falls or convulsions. Recognizing these behavioral manifestations can provide a direct indication of whether a patient is experiencing an epileptic seizure.
[0074] Example 1:
[0075] Please see Figure 1 This invention provides a real-time method for detecting and analyzing epileptic behavior, comprising the following steps:
[0076] S101, acquire the first view data in the first time period;
[0077] The first view data can be the raw video captured by the camera device.
[0078] S102, a typical behavior in the first view data is identified using a preset epilepsy prediction model;
[0079] S103, update the warning level of the epilepsy prediction model based on the aforementioned typical behaviors; wherein, the aforementioned typical behaviors are pre-recorded behavioral actions that the subject to be analyzed may take during the initial stage of a seizure, and the aforementioned typical behaviors include: a first type of behavior, and / or a second type of behavior; the typical seizure time of the first type of behavior is before the typical seizure time of the second type of behavior; wherein, S103 includes the following steps:
[0080] (1) When the existence of a first type of behavior and a second type of behavior is identified, calculate the time difference between the occurrence of the first type of behavior and the second type of behavior;
[0081] (2) Update the warning level according to the time difference between the occurrence time difference and the preset reference time difference, wherein the warning level is used to update the time window, and the time window is used to define the length of the view data segment extracted from the continuous view sequence data, so that the epilepsy prediction model can identify the action trend according to the context of the view data segment.
[0082] The reference time difference can be defined by the user based on their actual individual situation regarding epileptic seizures.
[0083] S104, acquire second view data in the second time period, and select at least one segment of the view data from the second view data using the time window;
[0084] In some embodiments, the second time period occurs after the first time period.
[0085] In some embodiments, the method further includes step S105, using the epilepsy prediction model to identify whether two types of typical behaviors appear in the view data segment, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epileptic seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
[0086] For example, the risk of epileptic seizures can be categorized according to its severity as high risk (e.g., an imminent seizure) or low risk (e.g., a seizure may occur if not managed in time).
[0087] For example, if the severity of both type I and type II typical behaviors is low, they can be identified as low risk; if the severity of both type I and type II typical behaviors is high, they can be identified as high risk.
[0088] In some embodiments, the first view data acquired during the first time period may be acquired by a camera device with night vision capability.
[0089] In some embodiments, both Type I and Type II typical behaviors are behaviors that can characterize a user's seizures and can be determined based on the type of historical seizure behavior. For example, a user may stare blankly for a long time before a seizure. The difference between Type I and Type II typical behaviors lies in the timing of the seizure; for example, Type I typical behaviors usually occur earlier than Type II typical behaviors.
[0090] In some embodiments, the order of occurrence of type I and type II typical behaviors on the timeline can be seen from their different temporal dependencies on the formal epileptic seizure. Figure 2 .
[0091] It should be understood that Figure 2The timeline in this document is only for the purpose of better understanding the invention, and its length (i.e., the length of the corresponding time period in which the behavior occurs) is not limited here.
[0092] In some embodiments, the epilepsy prediction model can employ human skeleton detection and posture estimation algorithms (such as YOLOv11, OpenPose, AlphaPose and other computer vision algorithms) to identify and analyze abnormal changes in human posture in real time and accurately, so as to automatically detect abnormal behaviors of patients during epileptic seizures, i.e., a type of typical behavior.
[0093] For example, computer vision algorithms such as YOLOv11, OpenPose, and AlphaPose can be used to extract key point information of the human body (including the head, shoulders, elbows, knees, and ankles), and the posture of the human body can be determined by analyzing the relative positions and movement trajectories of these joints or parts. By acquiring the human skeletal structure in real time and capturing changes in the patient's body movements, machine learning algorithms can be used to analyze the degree of matching between these movements and the characteristics of movements during an epileptic seizure, to determine whether the human body's movements conform to the characteristics of abnormal behavior (such as a sharp drop in the height of key points such as the hips and knees).
[0094] In some embodiments, the difference between the first type of behavior and the second type of behavior is that the occurrence of the first type of behavior usually occurs earlier for the user than the second type of behavior.
[0095] In other words, the temporal dependence of the first type of behavior on the actual onset of epilepsy is weaker than that of the second type of behavior on the actual onset of epilepsy.
[0096] In the context of epileptic seizure prediction, temporal dependence refers to the dynamic change pattern of user behavior data (such as typical behavior type 1 and typical behavior type 2) over time. The state at the current moment or in the future (such as whether a seizure occurs) depends not only on the current data, but also on a series of data points (characteristics, patterns, and evolution trends) over a past period.
[0097] For example, the shorter the time interval between the preceding and following behaviors, the higher the confidence level of the prediction and the stronger the temporal dependency; or, the longer the time interval, the greater the uncertainty of the prediction (other behaviors may occur that interrupt the causal relationship between the seizure behavior and the seizure outcome), and therefore the weaker the temporal dependency.
[0098] In some embodiments, a Long Short-Term Memory (LSTM) network can be used to learn temporal dependencies.
[0099] The first type of behavior can be non-specific manifestations in the pre-ictal phase, such as irritability and restlessness; the second type of behavior can be specific manifestations at the onset of an ictal phase, such as focal tics, stereotyped automatisms, and other abnormal behaviors.
[0100] Alternatively, the first type of behavior can be a vague, subtle behavior at the onset of an attack that easily overlaps with everyday behaviors (such as hand-rubbing). The second type of behavior can be a more defined behavior with a more pronounced range of motion that occurs during an attack, i.e., an attack-like action that differs significantly from everyday behaviors.
[0101] Preferably, the typical onset time of the first type of behavior is before the typical onset time of the second type of behavior.
[0102] In some embodiments, typical attack time refers to the usual time of onset of the behavior, such as that calculated based on the patient’s historical attack times.
[0103] In some embodiments, when a first type of behavior and a second type of behavior are identified, the time difference between the occurrence of the first type of behavior and the second type of behavior is calculated; the warning level is updated based on the time difference between the occurrence time difference and a preset reference time difference.
[0104] In some embodiments, the larger the time difference, the lower the warning level.
[0105] It should be noted that if the time difference between the first type of behavior and the second type of behavior is large, it indicates that the temporal dependency between the two types of behavior is weak, or that the two types of behavior may just be routine or random behaviors performed by the user during their daily activities. In this case, the warning level when the corresponding behavior occurs can be reduced. On the other hand, if the time difference between the first type of behavior and the second type of behavior is small, it indicates that the temporal dependency between the two types of behavior is strong, and the warning level when the corresponding behavior occurs can be increased.
[0106] In other words, this invention judges the correlation strength by the time difference between the first type of behavior and the second type of behavior. It can quantify the correlation strength between different levels of a typical type of behavior (i.e., the first type of behavior and the second type of behavior) based on the individual behavioral differences of each user in a more personalized way. This further realizes the active learning and dynamic early warning of user behavior patterns and greatly improves the reliability of the early warning.
[0107] In some embodiments, the epilepsy prediction model extracts view data segments (such as a few seconds in a video) from continuous view sequence data (such as video) and analyzes the behaviors (key points, pose changes) in the view data segments. In this regard, the present invention actually provides a method for dynamically adjusting the length of the time window in the second time period based on the time difference between the occurrence of a first type of behavior and a second type of behavior.
[0108] This dynamic adjustment method of time window based on the time difference between behaviors in the previous period can effectively alleviate the computational pressure of epileptic behavior analysis while improving detection accuracy.
[0109] It should be noted that although existing technologies have proposed methods for predicting epileptic seizures based on video data, the complexity of epileptic behavior—including its potential for various manifestations such as emotional and behavioral abnormalities, and the high degree of repetition between these manifestations in the early stages and in daily life—means that epilepsy prediction models often need to identify a series of actions and their temporal relationships (or, in other words, identify relatively long action sequences) to provide a reliable prediction. This longer action sequence also means that the epilepsy prediction model needs a considerable amount of time for autonomous analysis before issuing an alert, which may lead to a delay in warning.
[0110] To address this issue, the present invention provides a method for dynamically adjusting the time window based on preliminary identification results of a typical behavior (such as behavior category and time difference of behavior occurrence), aiming to balance the contradiction between warning delay and false alarms. On the one hand, when a high risk of epileptic seizures is initially predicted, the length of the time window can be promptly reduced to avoid excessively long time windows causing a certain degree of delay in warning. While longer window identification can improve accuracy, it also increases the required identification time. On the other hand, this embodiment can appropriately extend the length of the time window when a low risk of epileptic seizures is initially predicted, to provide a more complete warning result, thus reducing the sensitivity of the alarm to some extent.
[0111] In other words, the method of dynamically adjusting the time window based on the preliminary identification results of a typical behavior in this invention can dynamically adjust the sensitivity of the model alarm in combination with the actual situation. This can provide a more comprehensive warning of risk situations while avoiding excessive false alarms caused by excessively high warning sensitivity, which would interfere with users' daily life activities.
[0112] It is worth noting that, considering that some behaviors during epileptic seizures often have a high degree of repetition or similarity to daily behaviors, an overly sensitive alarm mechanism may interfere with the patient's normal life. However, if the sensitivity is too low, leading to delayed alarm recognition or even missed alarms, the patient will be in a dangerous situation. To address this, the present invention employs a method for dynamically adjusting the time window based on the preliminary identification results of a typical behavior (such as behavior category and the time difference of the behavior's occurrence). This allows for appropriate dynamic adjustment of sensitivity, minimizing missed alarms while reducing the probability of false alarms.
[0113] It should be understood that, based on the high individual variability in epileptic seizure patterns, this invention proposes a dynamic time window update mechanism for view data segments, that is, updating the warning level according to the time difference, and then updating the length of the time window according to the warning level.
[0114] In some embodiments, the time window is used to define the length of a view data segment extracted from a continuous view sequence data, so that the epilepsy prediction model can identify action trends based on the context of the view data segment.
[0115] For example, a time window is used to define the video duration of each view data segment in the input model.
[0116] The view data segments are timestamped. The view data segments input into the epilepsy prediction model should be timestamped so that the model can perform in-depth analysis of the correlations between behaviors based on time sequence.
[0117] In some embodiments, the context of a video data segment refers to the preceding and subsequent sub-segments included within a view data segment itself.
[0118] In some embodiments, the context of a view data fragment may also include other view data fragments that occur before or after that view data fragment.
[0119] In some embodiments, the epilepsy prediction model can identify a user's movement trends based on the context of a view data segment. These movement trends are continuous changes in key body points with a specific direction. For example, before hand tremors occur, the hand starts from a stationary state, moves to a certain position, and then begins to tremble, with the amplitude of the tremor gradually increasing.
[0120] In some embodiments, the length of the time window can be constant, such as 10 seconds; or it can vary according to a specific pattern, such as increasing or decreasing. The specific length of the time window can be determined based on the user's seizure patterns, and is not limited here.
[0121] In some embodiments, the higher the alert level, the shorter the time window, allowing for more frequent and focused observation of user behavior and a faster response. In other words, a shorter time window enables more frequent and focused observation, leading to faster behavior detection results. This means that conclusions can be drawn by analyzing shorter video clips, significantly reducing the burden on model data processing.
[0122] From another perspective, when the warning level is high (e.g., a second type of behavior occurs within 3 seconds of the first type of behavior), the key is to capture when it will escalate into a more severe episode. Processing an 8-second video clip is much faster than processing a 15-second one; the short time window ensures that the model can output analysis results frequently (e.g., update the analysis results every 8 seconds), achieving extremely low response latency. A shorter time window provides more real-time data, allowing the model to keenly detect instantaneous changes in behavior.
[0123] In some embodiments, if the warning level is low, a longer time window can be used to observe the user's action trends over a longer period of time, thereby avoiding misjudgment.
[0124] From another perspective, many epileptic seizure initiation behaviors are subtle and gradual; for example, a slow head turn or a slight finger tremor may not be distinguishable from an unconscious habitual movement within a short time window. A longer time window allows the model to observe the complete process of the seizure behavior's onset, intensification, duration, or resolution, thus accurately determining whether it is a risky seizure trend rather than an accidental daily action. For example, frequent blinking might be misjudged as an initiation behavior within a short time window; however, within a longer time window, the model will recognize that the blinking is not an initiation behavior, and since the patient subsequently resumes normal activity, it is classified as low-risk, significantly reducing the false alarm rate.
[0125] It should be understood that the present invention preferably achieves different detection objectives under different warning levels. When the warning level is high, a rapid response is prioritized; when the warning level is low, false alarms are avoided. That is to say, updating the detection time window for the next period based on the warning level predicted in the previous period is essentially a risk-based dynamic resource allocation mechanism. The purpose is to ensure that the subsequent observation rhythm of the model (i.e., the length of the time window) matches the currently represented risk (i.e., the warning level) in real time, which helps to improve the timeliness of warnings and the learning ability of the model, and achieves the optimal balance between detection efficiency and accuracy.
[0126] In some embodiments, the epilepsy prediction model used in this invention is a medical model based on computer vision and machine learning technologies that can continuously analyze patient behavior data captured by video devices and automatically identify typical behaviors associated with the early stages of epileptic seizures. This model can dynamically assess the risk level of epileptic seizures based on the type of these early behavioral characteristics, their temporal dependence, and external influencing factors, and generate early warning information accordingly, thus buying valuable time for clinical intervention or safety protection.
[0127] Please see Figure 12 , Figure 12 This is a schematic diagram illustrating the working principle of the epilepsy prediction model provided in this embodiment of the invention. The data input to the epilepsy prediction model can be a view data fragment; the data output by the model can include the corresponding epileptic seizure risk.
[0128] In some embodiments, the components of an epilepsy prediction model may refer to... Figure 14 YOLOv8 (or YOLOv11) can quickly locate human body regions in videos, remove background noise, and focus patient behavior on cropped video clips, improving temporal recognition accuracy. The TSM module can capture short-term action changes through temporal feature transfer (ShiftDiv=8). The ResNet-50 backbone provides general visual features. AvgConsensus can average the predicted probabilities of each frame in a video clip, reducing the impact of single-frame misjudgments and improving overall prediction stability (especially suitable for short video clips).
[0129] In some embodiments, second view data can be acquired during a second time period, and at least one segment of the view data can be selected from the second view data using the time window.
[0130] In some embodiments, the second view data can be divided into view data segments of a length that conforms to the time window.
[0131] In some embodiments, the epilepsy prediction model is used to identify whether two types of typical behaviors appear in the view data segment, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epileptic seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
[0132] In some embodiments, type II typical behavior may refer to more severe symptoms such as automatic head and eye turning or loss of consciousness that are more pronounced than type I typical behavior.
[0133] In some embodiments, the second type of typical behavior may also include one or more types of behavior during the formal seizure phase of an epileptic seizure.
[0134] In some embodiments, the appearance of type II typical behaviors signifies that the identification of epileptic seizure behaviors is about to move from a relatively vague predictive stage to a more clearly defined confirmation stage. For a timeline representation of type I and type II typical behaviors, please refer to [link to relevant documentation]. Figure 10 .
[0135] It should be understood that different patients have different types of epileptic seizures and different seizure processes.
[0136] For a patient with a generalized tonic-clonic seizure, the type 2 behavior may be mild tonic manifestations at the beginning of the seizure (such as body stiffness and upward rolling of the eyes), while the subsequent generalized clonic seizures are more severe manifestations of the seizure.
[0137] For a patient with focal seizures, type II behaviors may be sensory auras at the onset of the seizure (such as a feeling of stomach rising) or focal myoclonus (such as finger twitching), while the subsequent altered consciousness or automatisms (such as hand rubbing or chewing) indicate the progression of the seizure.
[0138] In some embodiments, the fundamental difference between Type I and Type II typical behaviors does not lie in the intensity or severity of the seizure. For example, while focal myoclonus may be the final seizure behavior for some patients, its severity is less than that of generalized clonic behaviors experienced by others during the middle of a seizure. The fundamental difference between Type I and Type II typical behaviors lies in the stage of the seizure. Furthermore, Type I and Type II typical behaviors can be determined based on the patient's historical seizure history data. That is, Type I and Type II typical behaviors can be set based on the patient's individual seizure data.
[0139] It is worth noting that this invention transforms the progressive seizure process of epilepsy into a staged early warning and decision-making mechanism. By identifying a type of typical behavior as an early, low-temporal-correlation signal of epilepsy, and a type of typical behavior as a high-temporal-correlation, critical signal of the middle or late stages of seizure, clear triggering criteria can be provided for different levels of early warning and intervention measures.
[0140] Preferably, the analysis of epileptic seizure risk in this invention is a multi-factor fusion judgment process, rather than simply triggering an alarm based on the detection of a single behavior. Typical behaviors (such as rapid blinking or mouth twitching) may be relatively mild and sometimes overlap with normal physiological activities (such as fatigue or unconscious small movements). Determining epileptic seizure risk based on both typical behaviors can avoid frequent false alarms caused by judging high risk solely based on a single typical behavior.
[0141] It should be understood that identifying one type and two types of typical behaviors, and predicting the risk of epileptic seizures based on these behaviors, can provide a highly reliable early warning of epileptic seizures, thereby giving patients sufficient time for rescue.
[0142] In other words, if the first and second types of behaviors occur sequentially before the second type of typical behavior, the reliability of the epileptic seizure risk assessment based on this complete behavioral sequence that conforms to the epileptic seizure pattern can be significantly improved.
[0143] In some embodiments, if a type I typical behavior and a type II typical behavior occur successively, the epilepsy prediction model can output a comprehensive epileptic seizure risk based on the input type I typical behavior, type II typical behavior, and the time difference between the occurrence of the two types of behaviors.
[0144] It should be understood that different patients exhibit different seizure behaviors. Please see [link / reference]. Figure 6 It can preset the types of epileptic seizure symptoms and coping suggestions based on the user's historical seizure data.
[0145] In some embodiments, a typical behavior may be Figure 6 The symptoms include milder ones such as mood changes, perceptual changes, and gastrointestinal disturbances (or the earliest and most non-specific signals that may appear in the pre-ictal stage). The second type of typical behavior may include... Figure 6 The epilepsy prediction model is characterized by more severe symptoms such as physical aura, impaired consciousness, and abnormal behavior (or symptoms occurring at a later stage of the seizure). Typical behaviors manifested through external limbs can be obtained through video analysis, while other sensory changes (such as gastrointestinal discomfort) can be manually input by the user (such as the patient or their family) to prompt the epilepsy prediction model.
[0146] In some embodiments, determining the epileptic seizure risk of the subject under analysis based on a type I typical behavior and a type II typical behavior may include:
[0147] Identify the symptom types of Category 1 and Category 2 typical behaviors;
[0148] Based on the symptom type and the type-risk mapping table, the risk of the first attack corresponding to a type of typical behavior and the risk of the second attack corresponding to a type of typical behavior are determined comprehensively.
[0149] The risk of seizures is determined by combining the risk of the first seizure and the risk of the second seizure.
[0150] For example, when the risk of both the first and second seizures is high, the risk of epileptic seizures is correspondingly high.
[0151] In some embodiments, the risk of epileptic seizures can be determined based on a type I and type II typical behaviors, or it can be determined based on existing epilepsy identification models, which are not limited here.
[0152] In some embodiments, the risk of epileptic seizures can be preliminarily analyzed when no two types of typical behaviors are observed, i.e., only one type of typical behavior is observed.
[0153] In some embodiments, the object to be analyzed refers to a patient with epilepsy.
[0154] It should be noted that this invention identifies behavioral characteristics related to epileptic seizures through visual data, and can capture subtle changes in human movement in real time and accurately, thereby determining whether there are abnormal movements that indicate an impending epileptic seizure. This provides a reliable early warning before an actual seizure occurs, improving the speed of intervention.
[0155] Specifically, this invention categorizes the behaviors associated with epileptic seizures and updates the warning levels accordingly. This improves the accuracy and reliability of warnings, preventing the issuance of the same warning level for minor abnormalities like lip pursing and severe abnormalities like whole-body tremors, which could lead users to believe the warnings are unreliable. Furthermore, it facilitates early intervention, shifting from reactive remediation to proactive prevention, avoiding the situation where warnings are only issued when a seizure actually occurs, at which point intervention may be too late.
[0156] In some embodiments, this invention proposes a differentiated hierarchical early warning mechanism. Correspondingly, based on different early warning levels, different degrees of early warning response are applied to the user. For example, when the first type of behavior occurs, the device (such as a mobile phone, tablet, or other portable device) begins to vibrate and issues a corresponding reminder on the screen; or when the second type of behavior occurs, an audio broadcast is issued and an SMS notification is sent to emergency contacts. This can avoid resource waste or over-response while providing effective early warning.
[0157] It is worth noting that continuous monitoring and analysis of a user's epileptic seizure behavior can build an individual medical management file through long-term seizure behavior records. For example, what commonalities exist in the daily data that triggers each seizure for the user? What commonalities exist between the first and second typical behaviors before each seizure? On the one hand, treatment plans can be optimized in a targeted manner through long-term data. On the other hand, the user's unique, earlier seizure patterns can be summarized through long-term data (for example, the first typical behavior is more likely to occur after drinking alcohol).
[0158] In some embodiments, it also includes:
[0159] S106, Provide an early warning plan for the object to be analyzed based on the early warning level.
[0160] Please see Figure 5 In some embodiments, the type of early warning scheme can be determined based on the predicted probability (i.e., the probability of an attack within the next 30 minutes output by the model) and historical scores (such as NHS3 (composed of attack frequency, severity, compliance, etc.)).
[0161] For example, different score ranges and levels can be set for predicted probabilities and historical scores respectively.
[0162] In some embodiments, it can be in accordance with Figure 11 The system uses a predictive probability and historical score table to determine early warning plans based on a comprehensive analysis of the predicted probability and historical score. Here, P can refer to the predicted probability, i.e., the probability of a seizure within the next 30 minutes; H can refer to the historical score, which can be used to assess the severity of seizures and the effectiveness of antiepileptic drugs based on the NHS3 (National Hospital Seizure Severity Scale).
[0163] For example, when the seizure probability is greater than 0.8 and the historical score is 6, then it can be determined according to... Figure 11 The predicted probability and historical scoring table determined the early warning plan to be "protection + notification of family members".
[0164] In some embodiments, the reminder is a low-level warning and may include: a slight vibration notification on the patient's mobile phone and / or a voice prompt such as: "Take a break, stay safe, the risk of a current seizure is slightly high." Low-level warnings can establish pre-seizure behavioral preparation (such as avoiding going out alone, not taking a bath, etc.), reducing user anxiety based on the principles of low intervention and low disturbance.
[0165] In some embodiments, the push notification is a medium-level alert, including suggestions for wearing protective gear (such as helmets or soft wristbands). If applicable, safety monitoring on the worn device (such as fall detection and location tracking) is activated, and someone is advised to accompany the user. If the user is in an unsafe situation (such as taking a bath or cooking), they are prompted to stop and safely avoid the situation. For more serious cases, a silent notification can be added to the family member's device: "The probability of seizures is relatively high recently; please stay informed." Medium-level alerts can help users enter a protective and prepared state, ensuring that the adverse consequences of epileptic seizures are minimized.
[0166] In some embodiments, intervention constitutes an advanced alert. Building upon intermediate alert measures, it can include a phone notification to the family member, prompting the patient to call for family / caregivers if the patient is alone. If there is a history of injury during an attack, family / caregivers should be instructed in advance on temporary medication management methods, and wearable devices should be worn at all times to ensure the advanced alert is feasible. Advanced alerts require high vigilance but should avoid multiple emergency responses as much as possible; an emergency alarm should only be triggered when multiple pieces of evidence are presented.
[0167] Please see Figure 7 In some embodiments, different warning levels (such as primary, intermediate, advanced, status epilepticus, etc.) can be preset for different types of symptoms, and different voice prompts can be set for different symptoms to help patients adjust quickly.
[0168] In some embodiments, S103 includes the step of:
[0169] When only the first or second type of behavior is identified, the warning level is updated according to the category of the corresponding first type of behavior.
[0170] In some embodiments, the first type of behavior typically precedes the second type of behavior, and consists of nonspecific physiological or behavioral changes not directly caused by epileptiform discharges, such as restlessness, anxiety, inattention, and frequent yawning without a clear cause. These behaviors may overlap or intersect with daily physiological activities and have low specificity. Therefore, when only the first type of behavior is identified, the model treats it as a potential risk signal, but given its uncertainty, the warning level is low to avoid false alarms.
[0171] The second type of behavior is more specific, often manifesting as more pronounced epilepsy-related specific symptoms, such as focal, involuntary muscle twitches (e.g., fingers, corners of the mouth), stereotyped automatisms (e.g., hand rubbing, lip pursing, groping), and brief interruptions of consciousness (staring). These behaviors are more strongly associated with epileptic seizures and have a lower false alarm rate. Therefore, once the second type of behavior is identified, the model will directly issue a higher warning level to reflect its high correlation with epileptic seizures.
[0172] In other words, if only the first type of behavior is identified, the warning level can be updated to a lower level; if only the second type of behavior is identified, the warning level can be updated to a higher level.
[0173] In some embodiments, a first warning level or a second warning level may be further determined based on the actual category of the identified behavior within a first category of behavior or a second category of behavior.
[0174] In some embodiments, the warning level corresponding to the second type of behavior can be further divided according to the coverage of the tics. For example, when the tics cover a large area (such as generalized convulsions), the warning level is higher; when the tics cover a small area (such as hand convulsions), the warning level is lower.
[0175] In some embodiments, it also includes:
[0176] S107, Obtain schedule data for the third time period, wherein the third time period is the time period before the first time period, or the third time period refers to a time period that includes at least a portion of the first time period and includes the time period before the first time period;
[0177] S108, identify whether there are preset influencing factors in the schedule data; if so, then step (2) includes:
[0178] The warning level is determined based on the influencing factors and the time difference.
[0179] In some embodiments, the third time period may refer to either the time period preceding the first time period or the time period that includes part of the first time period and precedes the first time period.
[0180] Please see Figure 3 The third time period can overlap with the first time period. For example, a user may exhibit the first type of behavior while playing mahjong.
[0181] In some embodiments, schedule data may be obtained from to-do items recorded by other devices, such as a user’s electronic devices, such as smartphones, smart bracelets, etc.
[0182] In some embodiments, influencing factors may also include changes in ambient light intensity calculated based on real-time weather data.
[0183] For example, direct sunlight or the glare of suddenly turned-on lights during the summer midday can sometimes trigger epileptic seizures. Incorporating changes in ambient light intensity as an influencing factor can enhance the model's perception capabilities. By including this explicit triggering factor in the early warning system, the model can interpret behavior within a specific context.
[0184] In some embodiments, if a bright light environment that may trigger a seizure is detected, the model can proactively advise the patient to avoid prolonged exposure to bright light environments, even if typical behaviors have not yet occurred, thereby effectively preventing epileptic seizures.
[0185] In some embodiments, preset influencing factors are medically labeled and structured activities that reflect specific types of activity of the subject in the period preceding a seizure. These preset influencing factors do not simply indicate what the user did, but include medical information such as the potential impact on epileptic seizures. By combining schedule data with real-time behavioral analysis, the model can not only identify behaviors but also comprehensively assess the context of those behaviors, improving the accuracy and foresight of early warnings.
[0186] In some embodiments, influencing factors may include activities such as "drinking alcohol," "staying up late," "arguing," "insufficient sleep," "pregnancy," "high summer temperatures," "playing mahjong," and "high-intensity exercise." These influencing factors are considered high-risk factors for inducing or aggravating epileptic seizures in recent clinical studies. Incorporating daily data with pre-defined influencing factors can provide a reliable data foundation for epilepsy prediction models.
[0187] In some embodiments, determining the warning level based on influencing factors and time difference may include:
[0188] The first warning level is determined based on the influencing factors, wherein the first warning level is divided into at least level one and level two according to the weight of the influencing factors from smallest to largest;
[0189] A second warning level is determined based on the time difference, wherein the second warning level is divided into at least level one and level two according to the magnitude of the time difference from largest to smallest.
[0190] The warning level is generated based on the first warning level and the second warning level.
[0191] For example, a first and second warning level can be preset for different influencing factors and time differences. For instance, the first warning level for high temperatures in summer is level one, while the first warning level for alcohol consumption is a higher level two. Similarly, a smaller time difference corresponds to a level one second warning, while a larger time difference corresponds to a higher level two second warning. The warning level can be determined by combining the first and second warning levels.
[0192] For example, the method for determining the warning level based on the first warning level and the second warning level can be found in [reference needed]. Figure 13 Example.
[0193] It should be understood that the setting of the first and second warning levels can be determined according to the actual situation. For example, the first warning level can be higher than the second warning level. This invention does not impose any restrictions on this.
[0194] In some embodiments, the corresponding warning level can be further determined based on the amplitude of the patient's movements during an attack; for example, the greater the amplitude of the movements, the higher the warning level.
[0195] In some embodiments, the epilepsy prediction model is equipped with an attention mechanism, and correspondingly, the method further includes the step of:
[0196] The attentional resources of the epilepsy prediction model are allocated according to the warning level.
[0197] It is worth noting that this invention proposes an attention resource allocation mechanism for epilepsy prediction models, which can further achieve adaptive optimization of model computational resources. This improves the model's prediction efficiency while ensuring accurate early warning.
[0198] Specifically, if the warning level obtained from updating based on a typical type of behavior is high, attention to the second view data can be reduced while attention to the first view data can be increased; if the warning level is low, attention to the second type of view data can be increased while attention to the first type of view data can be reduced.
[0199] In some embodiments, allocating attention resources of the epilepsy prediction model according to the warning level includes the steps of:
[0200] When the warning level is greater than the preset warning threshold, the attention mechanism maintains first attention on the second view data.
[0201] When the warning level is less than or equal to the warning threshold, the attention mechanism maintains a second attention on the second view data.
[0202] Among them, primary attention is less than secondary attention.
[0203] The applicant found that the model had difficulty identifying all view data with high accuracy. To address this, the present invention proposes a strategy for dynamically adjusting attention allocation based on risk scenarios.
[0204] In some embodiments, when the warning level is high, a typical behavior (such as hand-rubbing or other early-stage behaviors) is identified based on the first-view data of the first time period, indicating a significantly increased risk of attack. At this point, the warning level corresponding to high risk has been confirmed.
[0205] Therefore, if an epilepsy prediction model is to be used to perform real-time video analysis of user behavior to provide reliable epilepsy warnings, the model will face extremely high computational pressure.
[0206] In particular, because a relatively long sequence of actions must be identified, the model not only needs to divide the action sequence into multiple action sequence segments (e.g., dividing it into action sequence segments by a time window length), but also needs to accurately identify multiple action sequence segments, and then generate a total warning result based on the sum of the results of multiple action sequence segments. The identification of multiple action sequence segments places a significant burden on the model.
[0207] In response, this invention provides a scheme that allows for selective allocation of recognition resources for a model under limited computing resources, thereby enabling relatively reliable and timely early warning under limited computing resources.
[0208] Furthermore, this scheme of rationally optimizing computing resources can also reduce the application cost of the model, such as reducing the performance requirements of video surveillance equipment, making the scheme easier to promote and implement.
[0209] Specifically, in this embodiment, when the warning level is high, the attention applied to the second view data by the model can be appropriately reduced, while the attention applied to the first view data can be appropriately increased. That is to say, this embodiment focuses on introducing an attention mechanism to perform relatively balanced learning and recognition of relatively complete video sequences (i.e., first view data and second view data). This attention allocation mechanism essentially dynamically and evenly distributes attention over time (unlike indiscriminate average distribution, the dynamic attention allocation mechanism of this invention is an on-demand balanced distribution), enabling limited computing resources to achieve a better balance between accuracy and efficiency at different time points and for different recognition behaviors.
[0210] From another perspective, the dynamic attention allocation mechanism proposed in this invention can improve the accuracy of detecting and analyzing the most difficult-to-identify early-stage behaviors of epileptic seizures, based on reasonable energy consumption control.
[0211] In some embodiments, if the warning level is high, the model does not need to perform extensive and energy-intensive identification of the second-view data (because the warning level determined by a typical behavior is sufficient to confirm the risk). Instead, it should reduce its attention to the second-view data (i.e., maintain primary attention) and concentrate computational resources on the key areas most likely to have problems (such as hands and face) when analyzing the second-view data. At the same time, the model can use more attentional resources to deepen the analysis of the identified typical behavior (e.g., reassess its time-series characteristics and its matching degree with historical behavior) to improve the credibility of the warning.
[0212] In some embodiments, when the warning level is low, even if a type of typical behavior that has already occurred does not show a high risk, the model needs to remain highly vigilant to capture any newly emerging types of typical behavior. Therefore, the model will appropriately increase its attention to the second-view data (i.e., maintain secondary attention) to perform more detailed identification and analysis, ensuring that no important potential signals are missed. At the same time, the model can appropriately reduce its attention to historical data (first-view data) to avoid consuming too much computational power on view data that has already been determined to be of low risk.
[0213] In some embodiments, when the alert level is low, attention can be moderately reduced, while higher attention can be paid to the subsequent time (second period).
[0214] It should be understood that this dynamic attention allocation mechanism ensures that, given limited attention resources, the model always focuses its attention on the most pressing analytical tasks, thereby further improving the model's predictive efficiency and accuracy.
[0215] In summary, the dynamic attention allocation mechanism and dynamic time window adjustment mechanism proposed in this invention can synergistically learn and recognize video sequence data in a relatively balanced and comprehensive manner, avoiding the use of the same attention to process all behaviors in all video frames, thereby improving the efficiency of epilepsy behavior detection and analysis while ensuring the accuracy of early warning.
[0216] In some embodiments, the fact that the first attention is less than the second attention can be reflected in spatial attention (e.g., focusing attention on key points highly related to the two types of typical behaviors, such as the face and limbs, rather than full-screen recognition when analyzing behavior), feature behavior type (e.g., increasing the weight of feature behaviors related to high-risk behaviors such as spasms, while suppressing the weight of other low-risk feature behaviors such as blinking), etc.
[0217] In some embodiments, the present invention can identify patients' body movements and posture changes in real time and accurately using computer vision technology, automatically detect abnormal behaviors during epileptic seizures, and provide timely warnings to patients. Specifically, the present invention aims to solve the following problems: 1) Eliminating subjectivity and fatigue effects: By using computer vision technology to replace manual observation, automated, fatigue-free, and objective behavior recognition is achieved, reducing human error and improving the accuracy and reliability of monitoring. 2) Real-time monitoring and immediate feedback: With the help of the YOLOv11 model and posture estimation technology, target detection is performed through convolutional neural networks (CNNs), which can capture and analyze patients' behavioral patterns in real time, and provide timely identification and warnings in the early stages of epileptic seizures, providing the possibility of rapid response and intervention. 3) Providing quantifiable data: The present invention can generate detailed behavioral data, including patients' movement trajectories, joint angle changes, etc., providing doctors with quantifiable behavioral analysis data to help subsequent medical research and diagnosis. 4) Overcoming the limitations of traditional EEG: Through visual monitoring, the limitations of EEG devices in monitoring limb movements and posture changes in real time are overcome, providing a more flexible and easily accessible method for monitoring epileptic seizures that does not rely on physiological signals.
[0218] In some embodiments, posture estimation algorithms can be used to further analyze the dynamic trajectory and posture changes of key points on the human body, extracting core features of patient behavior. Obtaining motion parameters such as joint angles, joint displacements and velocities, and relative distances between joints—for example, calculating the angles between the left shoulder, left elbow, and left wrist, or between the knee and ankle—can effectively identify severe convulsions or postural changes. By monitoring the movement trajectory of the patient's limbs and the relative positions of joints in real time, the posture estimation module can accurately identify typical movement characteristics of epileptic seizures, such as: severe body shaking; abnormal bending or stiffening postures; and sudden falls.
[0219] In some embodiments, by comparing real-time posture data with typical patterns of epileptic seizure behavior, and with the help of abnormal behavior detection algorithms, the detected abnormal behavior can be sent to doctors or caregivers via a notification system when it is detected, ensuring that patients can receive timely medical intervention, and automatically recording the data and time of the patient's abnormal behavior for subsequent analysis.
[0220] In some embodiments, a server equipped with eight NVIDIA A100 processors and a camera with night vision can be used to capture real-time video streams of the patient's behavior via a high-definition camera and transmit the video data to a back-end processing system.
[0221] In some embodiments, physiological signal monitoring (such as electroencephalography, EEG) can be combined to provide more comprehensive diagnostic support. That is, EEG devices and video monitoring systems can work in parallel, fusing their data to improve the accuracy and reliability of epileptic seizure monitoring. For example, EEG signals can be used as auxiliary input, combined with behavioral pattern analysis results, to form a comprehensive early warning and diagnostic plan.
[0222] In some embodiments, this invention is not only applicable to the monitoring of epileptic seizures, but can also be extended to the monitoring of other neurological diseases, such as Parkinson's disease and Alzheimer's disease. Because the abnormal behaviors of individuals will differ depending on the application scenario, the models in the posture estimation and behavior analysis modules need to be retrained or fine-tuned to facilitate the identification of abnormal behaviors. This invention can also be applied to fall detection systems for the elderly. By detecting and analyzing the movement postures of the elderly in real time through cameras, fall events can be identified promptly, triggering alarm notifications to help caregivers intervene in a timely manner and reduce the risk of injury after a fall.
[0223] In some embodiments, the system further includes an abnormal behavior early warning module. When the system identifies a patient's behavior that matches an abnormal pattern of epileptic seizures, it immediately triggers an early warning mechanism and sends the warning information to the monitoring personnel's device. This invention utilizes SMS API services, such as Alibaba Cloud SMS service and Tencent Cloud SMS. The SMS content is a text message, including the time of the abnormal behavior and the type of abnormal behavior (e.g., "rapid convulsions," "irregular collapse," etc.).
[0224] In some embodiments, the system further includes a data storage module. To effectively manage and store large amounts of behavioral data, this invention uses relational databases (such as MySQL) and NoSQL databases (such as MongoDB) for data storage. The design includes patient information tables, skeleton data tables, behavioral analysis tables, and alarm record tables, ensuring clear relationships between data and facilitating easy querying and updating. For storing unstructured data, such as time-series behavioral data and real-time monitoring data, using NoSQL databases such as MongoDB can provide more flexible storage and query methods.
[0225] In some embodiments, the system further includes a data processing and storage module for long-term tracking of patient behavior changes. All detected skeletal data (including head, shoulders, elbows, knees, ankles, etc.), posture data, and abnormal behavior analysis results are stored in a database. Doctors can access patients' historical behavior records at any time, supporting big data analysis to uncover the frequency and patterns of epileptic seizures and providing support for developing personalized treatment plans.
[0226] Please see Figure 9 The present invention also proposes a real-time epileptic behavior detection and analysis system, which may include:
[0227] The first acquisition module is used to acquire first view data during the first time period;
[0228] The identification module is used to identify a typical behavior in the first view data using a preset epilepsy prediction model;
[0229] An early warning update module is used to update the early warning level of the epilepsy prediction model based on the aforementioned typical behaviors; wherein, the typical behaviors are pre-recorded actions that the subject to be analyzed may take during the initial stage of a seizure, and the typical behaviors include: a first type of behavior and / or a second type of behavior; the typical seizure time of the first type of behavior precedes the typical seizure time of the second type of behavior; wherein, the early warning update module further includes:
[0230] The time difference calculation unit is used to calculate the time difference between the occurrence of the first type of behavior and the second type of behavior when the existence of the first type of behavior and the second type of behavior is identified.
[0231] An update unit is used to update the warning level based on the time difference between the occurrence time difference and a preset reference time difference. The warning level is used to update the time window, which defines the length of the view data segment extracted from the continuous view sequence data, so that the epilepsy prediction model can identify the action trend based on the context of the view data segment.
[0232] The second acquisition module is used to acquire second view data during the second time period and select at least one segment of the view data from the second view data using the time window;
[0233] The prediction module is used to identify whether two types of typical behaviors appear in the view data segment using the epilepsy prediction model, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epileptic seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
[0234] It should be understood that the real-time epileptic behavior detection and analysis system proposed in this invention can be used to perform any of the steps described in the embodiments of this invention.
[0235] In some embodiments, see Figure 8 The real-time epilepsy behavior detection and analysis system proposed in this invention may further include: a video acquisition module 101, used to acquire video data to be analyzed, providing raw materials for subsequent identification; a human skeleton detection module 102, used to detect the skeletal structure of the human body in the video and extract key joint information of the human body; a posture estimation module 103, used to estimate the posture state of the human body based on the human skeleton detection results; a behavior analysis module 104, used to analyze information such as human posture and identify specific behavior patterns; an abnormal behavior early warning module 105, used to provide early warning prompts for abnormal behaviors based on the behavior analysis results; and a data storage module 106, used to store various types of data generated throughout the process for subsequent querying or analysis.
[0236] In some embodiments, see Figure 4 The real-time epilepsy behavior detection and analysis system proposed in this invention may further include the following modules: a front-end perception module that captures front-end information through sub-modules such as emotion and abnormal behavior recognition, motor symptom recognition, and consciousness state recognition; a seizure recognition and judgment module that performs seizure clustering recognition, motor symptom duration calculation, and consciousness loss duration calculation based on front-end information, thereby identifying seizure types and generating seizure logs; a data analysis and trend modeling module that manages historical data, conducts trend prediction and modeling, personalized threshold adjustment, and frequency and seizure rhythm analysis to construct historical individual models; and a warning and graded response module that combines risk warning (providing different levels of reminders and formulating response strategies based on predicted probability, historical severity, etc.) and seizure alerts (grading and recording and issuing alerts based on specific symptoms, historical severity, etc., and formulating response strategies), while a continuous learning and manual review module that achieves model retraining and personalized adjustment through no-warning event collection, manual review, and feedback mechanisms, with data interconnection between modules, forming a complete closed loop from front-end perception, seizure recognition and judgment, data analysis and modeling to warning response and continuous learning optimization, for the identification, warning, and response to symptoms such as epilepsy.
[0237] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0238] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a computer terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0239] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A real-time method for detecting and analyzing epileptic behavior, characterized in that, Including the following steps: S101, Obtain first view data in the first time period; S102, a typical behavior in the first view data is identified using a preset epilepsy prediction model; S103, update the warning level of the epilepsy prediction model based on the aforementioned typical behaviors; wherein, the aforementioned typical behaviors are pre-recorded behavioral actions that the subject to be analyzed may take during the initial stage of a seizure, and the aforementioned typical behaviors include: a first type of behavior, and / or a second type of behavior; the typical seizure time of the first type of behavior is before the typical seizure time of the second type of behavior; wherein, S103 includes the following steps: (1) When the existence of a first type of behavior and a second type of behavior is identified, calculate the time difference between the occurrence of the first type of behavior and the second type of behavior; (2) Update the warning level according to the time difference between the occurrence time difference and the preset reference time difference, wherein the warning level is used to update the time window, and the time window is used to define the length of the view data segment extracted from the continuous view sequence data, so that the epilepsy prediction model can identify the action trend according to the context of the view data segment. S104, acquire second view data in the second time period, and select at least one segment of the view data from the second view data using the time window; S105, the epilepsy prediction model is used to identify whether two types of typical behaviors appear in the view data segment, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epilepsy seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
2. The method according to claim 1, characterized in that, The larger the time difference, the lower the warning level.
3. The method according to claim 1, characterized in that, The higher the warning level, the shorter the time window.
4. The method according to claim 1, characterized in that, Also includes: S106, Provide an early warning plan for the object to be analyzed based on the early warning level.
5. The method according to claim 1, characterized in that, S103 includes the following steps: When only the first or second type of behavior is identified, the warning level is updated according to the category of the corresponding first type of behavior.
6. The method according to claim 1, characterized in that, Also includes: S107, Obtain schedule data for the third time period, wherein the third time period refers to the time period before the first time period, or the third time period refers to the time period that includes at least a portion of the first time period and includes the time period before the first time period; S108, Identify whether there are preset influencing factors in the schedule data; If so, then step (2) includes: The warning level is determined based on the influencing factors and the time difference.
7. The method according to claim 6, characterized in that, Also includes: The first warning level is determined based on the influencing factors, wherein the first warning level is divided into at least level one and level two according to the weight of the influencing factors from smallest to largest; A second warning level is determined based on the time difference, wherein the second warning level is divided into at least level one and level two according to the magnitude of the time difference from largest to smallest. The warning level is generated based on the first warning level and the second warning level.
8. The method according to claim 6, characterized in that, The epilepsy prediction model is equipped with an attention mechanism; correspondingly, the method further includes the following steps: The attentional resources of the epilepsy prediction model are allocated according to the warning level.
9. The method according to claim 8, characterized in that, Allocating attention resources to the epilepsy prediction model based on the warning level includes the following steps: When the warning level is greater than the preset warning threshold, the attention mechanism maintains first attention on the second view data. When the warning level is less than or equal to the warning threshold, the attention mechanism maintains a second attention on the second view data. Among them, primary attention is less than secondary attention.
10. A real-time epileptic behavior detection and analysis system, characterized in that, include: The first acquisition module is used to acquire first view data during the first time period; The identification module is used to identify a typical behavior in the first view data using a preset epilepsy prediction model; An early warning update module is used to update the early warning level of the epilepsy prediction model based on the aforementioned typical behaviors; wherein, the typical behaviors are pre-recorded actions that the subject to be analyzed may take during the initial stage of a seizure, and the typical behaviors include: a first type of behavior and / or a second type of behavior; the typical seizure time of the first type of behavior precedes the typical seizure time of the second type of behavior; wherein, the early warning update module further includes: The time difference calculation unit is used to calculate the time difference between the occurrence of the first type of behavior and the second type of behavior when the existence of the first type of behavior and the second type of behavior is identified. An update unit is used to update the warning level based on the time difference between the occurrence time difference and a preset reference time difference. The warning level is used to update the time window, which defines the length of the view data segment extracted from the continuous view sequence data, so that the epilepsy prediction model can identify the action trend based on the context of the view data segment. The second acquisition module is used to acquire second view data during the second time period and select at least one segment of the view data from the second view data using the time window; The prediction module is used to identify whether two types of typical behaviors appear in the view data segment using the epilepsy prediction model, and when two types of typical behaviors are identified, the epilepsy prediction model determines the epileptic seizure risk of the subject to be analyzed based on the first type of typical behavior and the second type of typical behavior.
Citation Information
Patent Citations
Human body data monitoring method and device based on big data
CN117224080A
Epilepsy detection device
CN119257557A
Epilepsy pathology data classification method and device and storage medium
CN117877747A
Epileptic seizure early warning method and system
CN119548106A