CN118312883B - Model construction method, alertness assessment method, device, equipment and product - Google Patents
Model construction method, alertness assessment method, device, equipment and product Download PDFInfo
- Publication number
- CN118312883B CN118312883B CN202410726882.3A CN202410726882A CN118312883B CN 118312883 B CN118312883 B CN 118312883B CN 202410726882 A CN202410726882 A CN 202410726882A CN 118312883 B CN118312883 B CN 118312883B
- Authority
- CN
- China
- Prior art keywords
- alertness
- reaction time
- ecg
- sample
- segment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
- A61B5/162—Testing reaction times
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
- A61B5/168—Evaluating attention deficit, hyperactivity
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
- A61B5/349—Detecting specific parameters of the electrocardiograph cycle
- A61B5/352—Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7246—Details of waveform analysis using correlation, e.g. template matching or determination of similarity
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/211—Selection of the most significant subset of features
- G06F18/2115—Selection of the most significant subset of features by evaluating different subsets according to an optimisation criterion, e.g. class separability, forward selection or backward elimination
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/27—Regression, e.g. linear or logistic regression
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2123/00—Data types
- G06F2123/02—Data types in the time domain, e.g. time-series data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/08—Feature extraction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; Matching
Landscapes
- Health & Medical Sciences (AREA)
- Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Veterinary Medicine (AREA)
- Public Health (AREA)
- Animal Behavior & Ethology (AREA)
- Surgery (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Molecular Biology (AREA)
- Medical Informatics (AREA)
- Heart & Thoracic Surgery (AREA)
- Biomedical Technology (AREA)
- Pathology (AREA)
- Biophysics (AREA)
- Cardiology (AREA)
- Psychiatry (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Developmental Disabilities (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Hospice & Palliative Care (AREA)
- Child & Adolescent Psychology (AREA)
- Educational Technology (AREA)
- Psychology (AREA)
- Social Psychology (AREA)
- Physiology (AREA)
- Signal Processing (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Medical Treatment And Welfare Office Work (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
本申请提出一种模型的构建方法、警觉度评估方法、装置、设备及产品,该模型的构建方法包括:获取警觉性样本数据,警觉性样本数据包括基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取得到的心电样本片段和反应时样本片段;基于反应时样本片段对应的反应时长,确定反应时样本片段对应的真实警觉度类别;采用预设警觉度评估网络对心电样本片段进行警觉度评估,得到心电样本片段对应的预测警觉度类别;基于心电样本片段对应的预测警觉度类别与反应时样本片段对应的真实警觉度类别之间的差异,对预设警觉度评估网络进行收敛,得到警觉度评估模型。上述方案训练得到的警觉度评估模型能够提高警觉度评估的准确度和实时性。
The present application proposes a model construction method, alertness assessment method, device, equipment and product, the model construction method includes: obtaining alertness sample data, the alertness sample data includes ECG sample segments and reaction time sample segments obtained by extracting segment data from ECG sample data and reaction time sample data based on a preset sliding window; determining the real alertness category corresponding to the reaction time sample segment based on the reaction time corresponding to the reaction time sample segment; using a preset alertness assessment network to conduct alertness assessment on the ECG sample segment to obtain the predicted alertness category corresponding to the ECG sample segment; based on the difference between the predicted alertness category corresponding to the ECG sample segment and the real alertness category corresponding to the reaction time sample segment, converging the preset alertness assessment network to obtain an alertness assessment model. The alertness assessment model trained by the above scheme can improve the accuracy and real-time performance of alertness assessment.
Description
技术领域Technical Field
本申请涉及警觉度评估技术领域,尤其涉及一种模型的构建方法、警觉度评估方法、装置、设备及产品。The present application relates to the technical field of alertness assessment, and in particular to a model construction method, alertness assessment method, device, equipment and product.
背景技术Background Art
警觉度是指个体在特定目标上维持注意并及时响应的能力,是多种复杂认知活动的基础。当警觉度较低时,容易引发犯困、走神等问题,进而导致生产安全事故和交通意外。因此,对个体进行警觉度监测非常重要。Alertness refers to an individual's ability to maintain attention on a specific target and respond in a timely manner, and is the basis of a variety of complex cognitive activities. When alertness is low, it is easy to cause problems such as drowsiness and distraction, which in turn lead to production safety accidents and traffic accidents. Therefore, it is very important to monitor the alertness of individuals.
当今社会环境下,人们的工作和学习压力增大、娱乐方式多样化,导致个体普遍存在熬夜、睡眠不足等问题,这直接影响了个体的日间警觉度,引发了犯困、走神等问题,增加了生产安全事故和交通意外的风险。为了解决这一问题,人们开始关注基于机器学习的警觉度评估方法。In today's society, people's work and study pressures are increasing, and entertainment methods are diversified, leading to widespread problems such as staying up late and lack of sleep. This directly affects the individual's daytime alertness, causing drowsiness and distraction, and increasing the risk of production safety accidents and traffic accidents. In order to solve this problem, people have begun to pay attention to alertness assessment methods based on machine learning.
随着各个领域对警觉度监测的需求增加,基于机器学习的警觉度评估方法获得了广泛关注。这些方法通过训练警觉度预测模型来进行警觉度评估。但是目前的警觉度评估模型的训练标签通常来源于自评量表,主观性较高,导致训练得到的模型存在基准误差,进而影响警觉度评估的准确度,另外,其对于短期警觉度的变化不够敏感,导致对于警觉度评估的实时性较低。As the demand for alertness monitoring increases in various fields, alertness assessment methods based on machine learning have gained widespread attention. These methods assess alertness by training alertness prediction models. However, the training labels of current alertness assessment models are usually derived from self-assessment scales, which are highly subjective, resulting in baseline errors in the trained models, which in turn affects the accuracy of alertness assessment. In addition, they are not sensitive enough to short-term changes in alertness, resulting in low real-time performance of alertness assessment.
发明内容Summary of the invention
基于上述技术现状,本申请提出一种模型的构建方法、警觉度评估方法、装置、设备及产品。Based on the above technical status, this application proposes a model construction method, alertness assessment method, device, equipment and product.
为了达到上述技术目的,本申请具体提出如下技术方案:In order to achieve the above technical objectives, this application specifically proposes the following technical solutions:
本申请第一方面提出一种警觉度评估模型的构建方法,包括:获取警觉性样本数据,所述警觉性样本数据包括基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取得到的心电样本片段和反应时样本片段,所述反应时样本片段包括反映警觉度的反应时长;基于所述反应时样本片段对应的反应时长,确定所述反应时样本片段对应的真实警觉度类别;基于所述心电样本片段和所述反应时样本片段对应的真实警觉度类别,对预设警觉度评估网络进行训练,得到警觉度评估模型。In a first aspect, the present application proposes a method for constructing an alertness assessment model, comprising: obtaining alertness sample data, the alertness sample data comprising ECG sample segments and reaction time sample segments obtained by extracting segment data from ECG sample data and reaction time sample data based on a preset sliding window, the reaction time sample segments comprising reaction durations reflecting alertness; determining a real alertness category corresponding to the reaction time sample segments based on the reaction durations corresponding to the reaction time sample segments; and training a preset alertness assessment network based on the real alertness categories corresponding to the ECG sample segments and the reaction time sample segments to obtain an alertness assessment model.
本申请第二方面提出一种警觉度评估方法,包括:获取目标用户的目标心电数据;基于预设的滑动窗口对所述目标心电数据进行片段数据提取,得到所述目标心电数据对应的至少一个目标心电片段;采用警觉度评估模型基于至少一个所述目标心电片段进行警觉度评估,得到警觉度评估结果,警觉度评估结果包括每间隔预设时长输出的针对每个所述目标心电片段的片段警觉度评估结果,所述预设时长为所述滑动窗口的预设步长;其中,所述警觉度评估模型为采用第一方面所述的警觉度模型的构建方法得到的模型。The second aspect of the present application proposes an alertness assessment method, comprising: obtaining target ECG data of a target user; extracting segment data of the target ECG data based on a preset sliding window to obtain at least one target ECG segment corresponding to the target ECG data; using an alertness assessment model to perform alertness assessment based on at least one of the target ECG segments to obtain an alertness assessment result, the alertness assessment result including a segment alertness assessment result for each target ECG segment output at each interval of a preset duration, wherein the preset duration is a preset step length of the sliding window; wherein the alertness assessment model is a model obtained by using the method for constructing the alertness model described in the first aspect.
本申请第三方面提出一种警觉度评估模型的构建装置,包括:获取单元,用于获取警觉性样本数据,所述警觉性样本数据包括基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取得到的心电样本片段和反应时样本片段,所述反应时样本片段包括反映警觉度的反应时长;警觉度类别确定单元,用于基于所述反应时样本片段对应的反应时长,确定所述反应时样本片段对应的真实警觉度类别;采用预设警觉度评估网络对所述心电样本片段进行警觉度评估,得到所述心电样本片段对应的预测警觉度类别;警觉度训练单元,用于基于所述心电样本片段对应的预测警觉度类别与所述反应时样本片段对应的真实警觉度类别之间的差异,对所述预设警觉度评估网络进行收敛,得到警觉度评估模型。In a third aspect, the present application proposes a device for constructing an alertness assessment model, comprising: an acquisition unit, used to acquire alertness sample data, the alertness sample data comprising ECG sample segments and reaction time sample segments obtained by extracting segment data from ECG sample data and reaction time sample data based on a preset sliding window, the reaction time sample segments comprising a reaction time reflecting alertness; an alertness category determination unit, used to determine a real alertness category corresponding to the reaction time sample segment based on the reaction time corresponding to the reaction time sample segment; using a preset alertness assessment network to perform alertness assessment on the ECG sample segment to obtain a predicted alertness category corresponding to the ECG sample segment; an alertness training unit, used to converge the preset alertness assessment network based on the difference between the predicted alertness category corresponding to the ECG sample segment and the real alertness category corresponding to the reaction time sample segment to obtain an alertness assessment model.
本申请第四方面提出一种警觉度评估装置,包括:获取单元,用于获取目标用户的目标心电数据;片段数据提取单元,用于基于预设的滑动窗口对所述目标心电数据进行片段数据提取,得到所述目标心电数据对应的至少一个目标心电片段;警觉度评估单元,用于采用警觉度评估模型基于至少一个所述目标心电片段进行警觉度评估,得到警觉度评估结果,所述警觉度评估结果包括每间隔预设时长输出的针对每个所述目标心电片段的片段警觉度评估结果;其中,所述警觉度评估模型为采用第二方面所述的警觉度模型的构建方法得到的模型。The fourth aspect of the present application proposes an alertness assessment device, comprising: an acquisition unit, used to acquire target ECG data of a target user; a segment data extraction unit, used to extract segment data of the target ECG data based on a preset sliding window, and obtain at least one target ECG segment corresponding to the target ECG data; an alertness assessment unit, used to perform alertness assessment based on at least one of the target ECG segments using an alertness assessment model, and obtain an alertness assessment result, wherein the alertness assessment result includes a segment alertness assessment result for each of the target ECG segments output at each preset time interval; wherein the alertness assessment model is a model obtained by using the method for constructing the alertness model described in the second aspect.
本申请第五方面提出一种电子设备,包括存储器和处理器;所述存储器与所述处理器连接,用于存储程序;所述处理器用于通过运行所述存储器中的程序,实现第一方面以及第一方面的实现方式中的任意一项所述的警觉度评估模型的构建方法,或者实现第二方面提出的警觉度评估方法。In a fifth aspect, the present application proposes an electronic device, comprising a memory and a processor; the memory is connected to the processor and is used to store programs; the processor is used to implement the method for constructing an alertness assessment model described in the first aspect and any one of the implementation methods of the first aspect, or implement the alertness assessment method proposed in the second aspect, by running the program in the memory.
本申请第六方面提出一种存储介质,所述存储介质上存储有计算机程序,所述计算机程序被处理器运行时,实现第一方面以及第一方面的实现方式中的任意一项所述的警觉度评估模型的构建方法,或者实现第二方面提出的警觉度评估方法。In a sixth aspect, the present application proposes a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for constructing an alertness assessment model as described in the first aspect and any one of the implementation methods of the first aspect is implemented, or the alertness assessment method proposed in the second aspect is implemented.
本申请第七方面提出一种计算机程序产品,包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器实现第一方面以及第一方面的实现方式中的任意一项所述的警觉度评估模型的构建方法,或者实现第二方面提出的警觉度评估方法。The seventh aspect of the present application proposes a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to implement the method for constructing an alertness assessment model described in the first aspect and any one of the implementation methods of the first aspect, or implement the alertness assessment method proposed in the second aspect.
本申请提出的模型的构建方法、警觉度评估方法、装置、设备及产品的技术方案中,在模型的构建方法中,一方面由于警觉性样本数据包括通过预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取得到,并基于反应时样本数据对应的反应时样本片段的反应时长,确定反应时样本片段对应的警觉度类别,从而能够将警觉度类别的识别细分到每个片段数据中,捕捉警觉度的短期波动,进而提高反应时样本数据的警觉度类别的准确度,并且基于其训练得到的警觉度评估模型还能够提高警觉度评估模型在进行警觉度评估时的实时性;另一方面警觉性样本数据中所包括的反应时样本数据可以更加客观地表达用户的不同精神状态,基于该客观的反应时样本数据确定心电样本数据对应的客观警觉度,并用于警觉度评估模型的训练,能够使得训练得到的警觉度评估模型对于警觉度评估的准确度更高。In the technical solutions of the model construction method, alertness assessment method, device, equipment and product proposed in the present application, in the model construction method, on the one hand, since the alertness sample data includes extracting fragment data from the electrocardiogram sample data and the reaction time sample data through a preset sliding window, and determining the alertness category corresponding to the reaction time sample segment based on the reaction time of the reaction time sample segment corresponding to the reaction time sample data, the identification of the alertness category can be subdivided into each fragment data, and the short-term fluctuation of alertness can be captured, thereby improving the accuracy of the alertness category of the reaction time sample data, and the alertness assessment model obtained based on its training can also improve the real-time performance of the alertness assessment model when performing alertness assessment; on the other hand, the reaction time sample data included in the alertness sample data can more objectively express the different mental states of the user, and the objective alertness corresponding to the electrocardiogram sample data is determined based on the objective reaction time sample data, and used for the training of the alertness assessment model, which can make the trained alertness assessment model more accurate in alertness assessment.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
图1为本申请实施例提供的一种警觉度评估模型的构建方法的流程示意图。FIG1 is a flow chart of a method for constructing an alertness assessment model provided in an embodiment of the present application.
图2为本申请实施例提供的PVT测试任务的测试过程的示意图。FIG2 is a schematic diagram of the testing process of the PVT testing task provided in an embodiment of the present application.
图3为本申请实施例提供的聚类结果的示意图。FIG3 is a schematic diagram of the clustering results provided in an embodiment of the present application.
图4为本申请实施例提供的确定目标心率变异样本特征的流程示意图。FIG4 is a schematic diagram of a flow chart of determining target heart rate variability sample characteristics provided in an embodiment of the present application.
图5为本申请实施例提供的确定心率变异特征的流程示意图。FIG5 is a schematic diagram of a flow chart of determining heart rate variability characteristics provided in an embodiment of the present application.
图6为本申请实施例提供的回溯判断机制的原理示意图。FIG6 is a schematic diagram showing the principle of the backtracking judgment mechanism provided in an embodiment of the present application.
图7为本申请实施例提供的目标心率变异样本特征的模式图。FIG. 7 is a schematic diagram of target heart rate variability sample characteristics provided in an embodiment of the present application.
图8为本申请实施例提供的警觉度评估方法的流程示意图。FIG8 is a flow chart of the alertness assessment method provided in an embodiment of the present application.
图9为本申请实施例提供的基于滑动窗口的心电分析的实时警觉度评估方法的框架图。FIG9 is a framework diagram of a real-time alertness assessment method based on sliding window ECG analysis provided in an embodiment of the present application.
图10为本申请实施例提供的警觉度评估模型的构建装置的结构示意图。FIG10 is a schematic diagram of the structure of a device for constructing an alertness assessment model provided in an embodiment of the present application.
图11为本申请实施例提供的警觉度评估装置的结构示意图。FIG. 11 is a schematic diagram of the structure of the alertness assessment device provided in an embodiment of the present application.
图12为本申请实施例提供的电子设备的结构示意图。FIG. 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
本申请实施例提出的技术方案适用于警觉度评估应用场景,采用本申请实施例技术方案,能够提高构建警觉度评估模型的精度,从而能够提高警觉度评估的准确度。The technical solution proposed in the embodiment of the present application is suitable for alertness assessment application scenarios. By adopting the technical solution in the embodiment of the present application, the accuracy of constructing the alertness assessment model can be improved, thereby improving the accuracy of the alertness assessment.
目前,基于脑电和心电等生理信号或面部特征的警觉度评估方法备受关注。其中,基于心电的警觉度监测具有精确性和便捷性的优势。由于心电特征与警觉度关联密切,不同状态下自主神经系统的功能变化可直接在心率上反映出来。比如,当生理唤醒水平或警觉度较高时,交感神经起主导作用,使心率上升;而当人体处于困倦状态时,副交感神经激活使心跳活动减慢,心率变异性上升。由于中枢神经系统的前额叶和外周神经系统的迷走神经存在结构和功能关联,这种“脑-心”交互作用机制也导致心脏活动同时受到大脑皮层活动的影响,能间接反映中枢系统警觉度的变化。因此,心电监测技术能够准确地反应个体的警觉度变化。At present, alertness assessment methods based on physiological signals such as EEG and ECG or facial features have attracted much attention. Among them, ECG-based alertness monitoring has the advantages of accuracy and convenience. Since ECG characteristics are closely related to alertness, functional changes of the autonomic nervous system under different states can be directly reflected in the heart rate. For example, when the physiological arousal level or alertness is high, the sympathetic nerves play a leading role, causing the heart rate to rise; and when the human body is in a sleepy state, the parasympathetic nerves are activated to slow down the heartbeat activity and increase the heart rate variability. Since the prefrontal lobe of the central nervous system and the vagus nerve of the peripheral nervous system have structural and functional connections, this "brain-heart" interaction mechanism also causes the heart activity to be affected by the activity of the cerebral cortex at the same time, which can indirectly reflect the changes in the alertness of the central system. Therefore, ECG monitoring technology can accurately reflect the changes in individual alertness.
然而,目前基于心电的警觉度评估技术还存在一些问题。首先,现有方法中心率特征提取和计算需要较长时间,而个体注意力的波动可能发生在十几秒之间,因此,现有的方法对这种状态波动的敏感性和灵敏度不足,无法及时反馈警觉度下降问题。其次,现有的警觉度预测模型的训练标签通常依赖于主观自评量表,容易受个体差异和情绪等因素影响,造成训练模型的误差,影响泛化能力且漏报风险较高。However, there are still some problems with the current ECG-based alertness assessment technology. First, the existing methods take a long time to extract and calculate heart rate features, while fluctuations in individual attention may occur within a dozen seconds. Therefore, the existing methods are not sensitive enough to such state fluctuations and cannot provide timely feedback on the problem of decreased alertness. Secondly, the training labels of existing alertness prediction models usually rely on subjective self-assessment scales, which are easily affected by individual differences and emotions, resulting in errors in the training model, affecting the generalization ability and having a high risk of underreporting.
为了解决上述问题,需要进一步研究和改进基于心电的警觉度评估技术,提高其实时性和准确性,以更好地应用于生产安全和交通领域,保障任务绩效和人身安全。In order to solve the above problems, it is necessary to further study and improve the ECG-based alertness assessment technology to improve its real-time and accuracy, so as to better apply it to the fields of production safety and transportation to ensure task performance and personal safety.
具体的,本申请实施例提出一种新的警觉度评估模型的构建方法,旨在通过该方案对警觉度评估模型进行训练,从而提高警觉度评估模型的警觉度评估精度,以满足对高精度警觉度评估的需求。此外,本申请实施例还提出一种警觉度评估方法,能够提高警觉度评估的精度和效率。Specifically, the embodiment of the present application proposes a new method for constructing an alertness assessment model, which aims to train the alertness assessment model through the scheme, thereby improving the alertness assessment accuracy of the alertness assessment model to meet the demand for high-precision alertness assessment. In addition, the embodiment of the present application also proposes an alertness assessment method that can improve the accuracy and efficiency of alertness assessment.
下面将结合本申请实施例中附图,对本申请实施例中技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
本申请实施例首先提出一种警觉度评估模型的构建方法,参见图1所示,该方法包括步骤S101-步骤S103:The present application embodiment first proposes a method for constructing an alertness assessment model, as shown in FIG1 , the method includes steps S101 to S103:
S101、获取警觉性样本数据。S101. Obtain alertness sample data.
其中,警觉性样本数据包括基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取得到的心电样本片段和反应时样本片段,反应时样本片段包括反映警觉度的反应时长。警觉性样本数据的获取方式有多种,具体可以如下:The alertness sample data includes ECG sample segments and reaction time sample segments obtained by extracting segment data from ECG sample data and reaction time sample data based on a preset sliding window, and the reaction time sample segments include reaction time reflecting alertness. There are many ways to obtain alertness sample data, which can be as follows:
在一些实施例中,获取警觉性样本数据包括:获取反应时样本数据及其对应的心电样本数据;基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取,得到心电样本数据对应的心电样本片段和反应时样本数据对应的反应时样本片段。In some embodiments, obtaining alertness sample data includes: obtaining reaction time sample data and its corresponding ECG sample data; extracting fragment data from the ECG sample data and the reaction time sample data based on a preset sliding window to obtain ECG sample fragments corresponding to the ECG sample data and reaction time sample fragments corresponding to the reaction time sample data.
在一些实施例中,获取警觉性样本数据包括:在获取反应时样本数据及其对应的心电样本数据,并基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取,得到心电样本数据对应的心电样本片段和反应时样本数据对应的反应时样本片段之后,将心电样本片段和反应时样本片段进行存储,并在接收到携带有存储地址的警觉性样本数据的获取请求时,基于存储地址从存储区域直接获得警觉性样本数据。In some embodiments, obtaining alertness sample data includes: obtaining reaction sample data and its corresponding ECG sample data, and extracting fragment data from the ECG sample data and the reaction sample data based on a preset sliding window, after obtaining the ECG sample fragments corresponding to the ECG sample data and the reaction sample fragments corresponding to the reaction sample data, storing the ECG sample fragments and the reaction sample fragments, and upon receiving a request for obtaining alertness sample data carrying a storage address, directly obtaining the alertness sample data from the storage area based on the storage address.
其中,反应时样本数据和心电样本数据可以通过警觉度测试任务来获得。该警觉度测试任务可以包括精神警觉性运动测试(PVT)、持续表现任务(Continuous PerformanceTask)、持续注意反应任务(Sustained Attention to Response Task,SART)和渐进式连续执行任务(Gradual-Onset Continuous Performance Task,gradCPT)等能够评估持续注意力表现的测试任务。The reaction time sample data and the ECG sample data can be obtained through a vigilance test task, which can include a test task that can evaluate sustained attention performance, such as a mental vigilance motor test (PVT), a continuous performance task (Continuous Performance Task), a sustained attention to response task (Sustained Attention to Response Task, SART), and a gradual-onset continuous performance task (gradCPT).
具体的,上述警觉度测试任务要求受试者将注意力持续集中在特定区域,并基于受试者对随机出现的目标做出的反应时长来得到反应时样本数据,以及通过心电采集设备采集受试者在警觉度测试任务期间的心电信号来获得心电样本数据。可选的,心电采集设备可以是活动腕表、可穿戴式心电监测背心或腕带式心电传感器等能够无干扰地采集心电信号的设备。Specifically, the above-mentioned alertness test task requires the subject to continuously focus on a specific area, and obtains reaction time sample data based on the reaction time of the subject to a randomly appearing target, and obtains ECG sample data by collecting the subject's ECG signal during the alertness test task through an ECG acquisition device. Optionally, the ECG acquisition device can be an activity watch, a wearable ECG monitoring vest, or a wristband ECG sensor, etc., which can collect ECG signals without interference.
以SART任务为例,受试者需要对连续呈现的数字做出反应,通常是通过按键来响应除了一个特定数字以外的所有数字。这种测试可以评估注意力的持续性和抑制控制。以渐进式连续执行任务为例,其要求受试者对逐渐变化的图像序列中的目标和非目标刺激作出反应。图像缓慢地一个接一个地出现,并在视觉上逐渐融合,需要受试者保持高度的注意力来区分。For example, in the SART task, subjects are asked to respond to a series of numbers, usually by pressing a key to respond to all but one specific number. This test can assess attentional persistence and inhibitory control. For example, in the progressive serial performance task, subjects are asked to respond to target and non-target stimuli in a gradually changing sequence of images. The images appear slowly one after another and gradually merge visually, requiring the subject to maintain a high level of attention to distinguish them.
其中,受试者可以是通过专业问卷筛选得到的睡眠质量良好(匹兹堡睡眠质量指数≤7)的健康成人。这些受试者可以是基本信息在预设范围内的健康成人,基本信息可以包括年龄、身体质量指数和睡眠质量指数等。The subjects can be healthy adults with good sleep quality (Pittsburgh Sleep Quality Index ≤ 7) screened by a professional questionnaire. These subjects can be healthy adults whose basic information is within the preset range, and the basic information may include age, body mass index, and sleep quality index.
本实施例中,心电样本数据和反应时样本数据均是不同精神状态下采集得到的样本数据。具体的,心电样本数据为受试者在不同精神状态下采集得到的,表征其心率变化的样本数据。反应时样本数据为受试者在不同精神状态下采集得到的,表征其客观警觉度或者警觉性表现的样本数据。In this embodiment, both the ECG sample data and the reaction time sample data are sample data collected under different mental states. Specifically, the ECG sample data are sample data collected from the subject under different mental states, representing the changes in his heart rate. The reaction time sample data are sample data collected from the subject under different mental states, representing his objective alertness or alertness performance.
不同精神状态可以是受试者在不同睡眠状态之后表征其警觉性高低的精神状态。不同精神状态可以包括睡眠充足状态和睡眠不足状态。举例来说,相较于8小时正常睡眠,受试者经历24小时睡眠剥夺或者长时间工作后,犯困、警觉性下降的情况会加剧。24小时的睡眠剥夺可以放大个体在日常熬夜、倒班和睡眠限制等情况下的睡眠压力,诱发较强的心理疲劳和警觉性波动,有助于得到个体从精力充足和极端疲劳状态下的,具有警觉度状态跨度代表性的行为样本。Different mental states can be mental states that characterize the level of alertness of the subject after different sleep states. Different mental states can include a state of adequate sleep and a state of insufficient sleep. For example, compared with 8 hours of normal sleep, the subject will experience more drowsiness and decreased alertness after 24 hours of sleep deprivation or long hours of work. 24 hours of sleep deprivation can amplify the sleep pressure of individuals in daily situations such as staying up late, working shifts, and sleep restriction, induce strong psychological fatigue and alertness fluctuations, and help obtain behavioral samples that are representative of the span of alertness states for individuals from full energy to extreme fatigue.
该任务通过在不同精神状态下,对受试者进行警觉度测试并同步记录心电信号,便可以获得受试者在不同精神状态下的反应时样本数据和心电样本数据。其中,8小时正常睡眠可以是23:00至7:00这一时间段,也可以是22.30至6.30这一时间段,还可以是其他能够保证良好精神状态的睡眠时间段。下面结合付图和具体示例对警觉性测试任务进行说明:This task can obtain the reaction time sample data and ECG sample data of the subjects in different mental states by testing their alertness and recording ECG signals synchronously under different mental states. Among them, 8 hours of normal sleep can be the time period from 23:00 to 7:00, or the time period from 22.30 to 6:30, or other sleep time periods that can ensure a good mental state. The alertness test task is explained below with the attached figure and specific examples:
图2为本申请实施例提供的PVT测试任务的测试过程的示意图。如图2所示,该任务的测试时长为10分钟,其要求受试者将注意力持续集中在特定刺激(比如方框)上,当目标出现(比如方框颜色变化,计时器出现并开始跑秒)就立刻按键,其目标出现的时间间隔在2~10秒内随机,包含约100个试次。每个试次对应一个反应时长,每个受试者对应一个反应时样本数据。FIG2 is a schematic diagram of the test process of the PVT test task provided in the embodiment of the present application. As shown in FIG2, the test duration of the task is 10 minutes, which requires the subject to continuously focus on a specific stimulus (such as a box), and press the key immediately when the target appears (such as the box color changes, the timer appears and starts running seconds), and the time interval between the target appearances is random within 2 to 10 seconds, including about 100 trials. Each trial corresponds to a reaction time, and each subject corresponds to a reaction time sample data.
也就是说,本实施例中的警觉性样本数据包括多个受试者在不同精神状态下的多个反应时样本数据和多个心电样本数据。每个受试者在一种精神状态下可以分别对应一个反应时样本数据和一个心电样本数据。That is to say, the alertness sample data in this embodiment includes a plurality of reaction time sample data and a plurality of ECG sample data of a plurality of subjects in different mental states. Each subject in a mental state may correspond to a reaction time sample data and an ECG sample data.
本实施例中所采集的警觉性样本数据为受试者在不同精神状态下的样本数据,其能够更加客观地表达受试者在执行认知任务期间的警觉状态,其中的反应时样本数据能够更加真实和客观地反映受试者当前实时的警觉性高低,由此确定的警觉度类别也更为客观,准确度也更高。The alertness sample data collected in this embodiment are sample data of the subjects in different mental states, which can more objectively express the alertness state of the subjects during the performance of cognitive tasks. The reaction time sample data can more truly and objectively reflect the current real-time alertness level of the subjects. The alertness category determined thereby is also more objective and more accurate.
为了能够精准捕捉客观警觉度的短期波动,在获得反应时样本数据及其心电样本数据之后,本实施例还可以采用预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取,从而得到心电样本数据对应的心电样本片段,和反应时样本数据对应的反应时样本片段。In order to accurately capture short-term fluctuations in objective alertness, after obtaining the reaction time sample data and its ECG sample data, the present embodiment may further use a preset sliding window to extract fragment data from the ECG sample data and the reaction time sample data respectively, thereby obtaining the ECG sample fragments corresponding to the ECG sample data, and the reaction time sample fragments corresponding to the reaction time sample data.
应当注意的是,反应时样本数据和心电样本数据分别为不同精神状态下的样本数据。因此,预设的滑动窗口是分别对不同精神状态下的反应时样本数据进行片段数据提取,从而得到不同精神状态下的反应时样本片段。以及,对不同精神状态下的心电样本数据进行片段数据提取,从而得到不同精神状态下的心电样本片段。举例来说,不同精神状态包括睡眠充足状态和睡眠不足状态,则不同精神状态下的反应时样本片段包括睡眠充足状态下的反应时样本片段和睡眠不足状态下的反应时样本片段。It should be noted that the reaction time sample data and the ECG sample data are sample data under different mental states, respectively. Therefore, the preset sliding window is to extract fragment data from the reaction time sample data under different mental states, thereby obtaining reaction time sample fragments under different mental states. And, extract fragment data from the ECG sample data under different mental states, thereby obtaining ECG sample fragments under different mental states. For example, different mental states include a state of sufficient sleep and a state of insufficient sleep, and the reaction time sample fragments under different mental states include a reaction time sample fragment under a state of sufficient sleep and a reaction time sample fragment under a state of insufficient sleep.
其中,预设的滑动窗口可以为矩形窗口,其对应有窗口长度W和滑动步长S等属性。窗口长度W可以为15-120秒,例如20秒、30秒或者60秒等等。滑动步长S可以为5-20秒,例如5秒、10秒、12秒或者15秒等等。滑动窗口作用于心电样本数据和反应时样本数据时,以窗口长度为单位进行片段数据提取,并以滑动步长S为滑动单位在心电样本数据和反应时样本数据的序列上逐渐向后滑动,滑动窗口每向后滑动一次,可以获得长度为W的片段数据。The preset sliding window may be a rectangular window, which corresponds to properties such as a window length W and a sliding step length S. The window length W may be 15-120 seconds, such as 20 seconds, 30 seconds or 60 seconds, etc. The sliding step length S may be 5-20 seconds, such as 5 seconds, 10 seconds, 12 seconds or 15 seconds, etc. When the sliding window acts on the ECG sample data and the reaction time sample data, the segment data is extracted in units of the window length, and the sliding step length S is used as the sliding unit to gradually slide backward on the sequence of the ECG sample data and the reaction time sample data. Each time the sliding window slides backward, segment data of length W can be obtained.
可以理解的是,心电样本数据和反应时样本数据均为采样数据,其对应有采样频率。因此,基于窗口长度、滑动步长和采样频率可以确定每个窗口长度内和每个滑动步长内的采样点的数量。举例来说,针对采样率为fs的心电样本数据x,每个窗口长度内的采样点总数为W*fs;每个滑动步长S对应的采样点总数为S*fs。为了方便区分所提取的片段数据,可以通过索引的方式来记录这些片段数据。具体的,假设第i个滑动窗口的起始索引为Ii,则Ii=S*i。每个滑动窗口Wi对应的数据索引为x[Ii:Ii+W-1]。It can be understood that both ECG sample data and reaction time sample data are sampled data, which correspond to sampling frequencies. Therefore, the number of sampling points within each window length and each sliding step can be determined based on the window length, sliding step and sampling frequency. For example, for ECG sample data x with a sampling rate of fs, the total number of sampling points within each window length is W*fs; the total number of sampling points corresponding to each sliding step S is S*fs. In order to facilitate the distinction of the extracted fragment data, these fragment data can be recorded in the form of indexes. Specifically, assuming that the starting index of the i-th sliding window is Ii , then Ii =S*i. The data index corresponding to each sliding window Wi is x[ Ii : Ii +W-1].
以心电样本数据为例,其采样频率为250Hz,假设窗口长度为30秒,则每个窗口长度内包括7500个采样点。也就是说,预设的滑动窗口每次向前滑动自身长度的三分之一。针对每个受试者,在10分钟的测试任务中可以获得58个心电样本片段和58个反应时样本片段。Taking ECG sample data as an example, the sampling frequency is 250Hz. Assuming the window length is 30 seconds, each window length includes 7500 sampling points. In other words, the preset sliding window slides forward by one-third of its length each time. For each subject, 58 ECG sample segments and 58 reaction time sample segments can be obtained in a 10-minute test task.
其中,心电样本数据和反应时样本数据为相同任务时间段下采集得到的。因此,对心电样本数据和反应时样本数据分别提取片段数据,得到的心电样本片段和反应时样本片段之间也是一一对应的。也就是说,针对不同精神状态中的任意一种状态,心电样本数据和反应时样本数据为相同时间段内的序列数据。该两个序列数据分别被滑动窗口切割为相同数量的片段数据,每个窗口长度分别对应一个心电样本片段和反应时样本片段。Among them, the ECG sample data and the reaction time sample data are collected in the same task time period. Therefore, segment data are extracted from the ECG sample data and the reaction time sample data respectively, and the obtained ECG sample segments and reaction time sample segments are also one-to-one corresponding. In other words, for any of the different mental states, the ECG sample data and the reaction time sample data are sequence data in the same time period. The two sequence data are cut into the same number of segment data by sliding windows, and each window length corresponds to one ECG sample segment and one reaction time sample segment.
其中,每个反应时样本片段表征受试者对警觉性任务的反应时长或反应速度,其能够反映受试者的客观警觉度的行为反应时。Each reaction time sample segment represents the reaction time or reaction speed of the subject to the vigilance task, which can reflect the behavioral reaction time of the subject's objective vigilance.
由于单一精神状态下受试者可能存在不同的警觉状态。比如,在睡眠充足状态下,受试者可能存在警觉状态和困倦状态,而在睡眠不充足状态下,受试者也可能存在警觉状态和困倦状态,因此,在一些实施例中,心电样本数据和反应时样本数据还可以为受试者在单一精神状态下采集得到的样本数据。Since the subject may have different alertness states in a single mental state, for example, in a state of sufficient sleep, the subject may be in an alert state and a sleepy state, and in a state of insufficient sleep, the subject may also be in an alert state and a sleepy state, therefore, in some embodiments, the ECG sample data and reaction time sample data may also be sample data collected by the subject in a single mental state.
本实施例中,采用滑动窗口技术进行片段数据提取,在此技术方案中,预设的窗口长度W和滑动步长S的选取不仅保证了每次的片段数据提取能获得足够的数据长度,以便于分析心率变异性特征,还确保了数据处理的灵活性和覆盖性,避免了片段数据过短导致的信息不足问题。尤其是在处理依赖较长时间序列数据以获得稳健特征分析的心电信号时,选取15至120秒的窗口长度可以覆盖多个心跳周期,从而提高心率变异性特征的提取准确度。而采取5-20秒的滑动步长则可以允许系统更高效地提取及分析心电信号,捕捉到心电特征的细微变化,从而提高警觉度评估的准确度。同时,5-20秒的滑动步长也提高了建模阶段数据的利用率和采样的时间分辨率,使得警觉度评估模型能在实时的条件下对警觉度进行评估,从而提高了整个系统的预测效率和实用性。In this embodiment, the sliding window technology is used to extract the fragment data. In this technical solution, the selection of the preset window length W and the sliding step length S not only ensures that each fragment data extraction can obtain sufficient data length to facilitate the analysis of the heart rate variability characteristics, but also ensures the flexibility and coverage of data processing, avoiding the problem of insufficient information caused by too short fragment data. Especially when processing ECG signals that rely on longer time series data to obtain robust feature analysis, selecting a window length of 15 to 120 seconds can cover multiple heartbeat cycles, thereby improving the accuracy of extracting heart rate variability features. Taking a sliding step length of 5-20 seconds can allow the system to extract and analyze ECG signals more efficiently, capture subtle changes in ECG features, and thus improve the accuracy of alertness assessment. At the same time, the sliding step length of 5-20 seconds also improves the utilization rate of data in the modeling stage and the time resolution of sampling, so that the alertness assessment model can evaluate alertness under real-time conditions, thereby improving the prediction efficiency and practicality of the entire system.
采用滑动窗口技术,可以在不牺牲数据质量的前提下,高效地处理大量连续的心电信号,确保每个心电样本片段都能为后续的特征分析提供足够的信息量,支持复杂的算法运算,从而提升警觉度评估模型的整体性能和准确度。此外,动态的窗口滑动机制允许系统快速适应用户状态的变化,对不同生理和心理状态下的心电特征进行有效捕捉和分析,增强了系统在多变环境下的适用性和鲁棒性。The sliding window technology can efficiently process a large number of continuous ECG signals without sacrificing data quality, ensuring that each ECG sample segment can provide sufficient information for subsequent feature analysis and support complex algorithm operations, thereby improving the overall performance and accuracy of the alertness assessment model. In addition, the dynamic window sliding mechanism allows the system to quickly adapt to changes in user status, effectively capture and analyze ECG features under different physiological and psychological states, and enhance the applicability and robustness of the system in a changing environment.
继续参阅图1,在步骤S101之后,本实施例的警觉度模型的构建方法还可以包括如下步骤S102。Continuing to refer to FIG. 1 , after step S101 , the method for constructing an alertness model of this embodiment may further include the following step S102 .
S102、基于反应时样本片段对应的反应时长,确定反应时样本片段对应的真实警觉度类别。S102: Determine a real alertness category corresponding to the reaction time sample segment based on the reaction time corresponding to the reaction time sample segment.
如前所述,对多个受试者进行警觉性任务测试,可以得到多个反应时样本数据和多个心电样本数据。也就是说,在不同精神状态下的任意一种状态,每个受试者分别对应有该状态下的一个反应时样本数据和一个心电样本数据。举例来说,不同精神状态包括睡眠良好状态和睡眠不足状态,则针对每个受试者而言,其可以对应有睡眠良好状态下的反应时样本数据和心电样本数据,以及对应有睡眠不足状态下的反应时样本数据和心电样本数据。以下如无特别说明,反应时样本数据和心电样本数据均是指单状态下的样本数据。As mentioned above, multiple subjects are tested on the alertness task, and multiple reaction time sample data and multiple ECG sample data can be obtained. That is to say, in any state of different mental states, each subject has a reaction time sample data and an ECG sample data corresponding to the state. For example, different mental states include a good sleep state and a lack of sleep state. For each subject, it can correspond to the reaction time sample data and ECG sample data in the good sleep state, and the reaction time sample data and ECG sample data in the lack of sleep state. Unless otherwise specified below, the reaction time sample data and the ECG sample data refer to the sample data in a single state.
在基于预设的滑动窗口对每个反应时样本数据进行片段数据提取后,每个反应时样本数据可以得到至少一个反应时样本片段。After extracting fragment data from each reaction time sample data based on a preset sliding window, each reaction time sample data may obtain at least one reaction time sample fragment.
如前所述,预设的滑动窗口的窗口长度和滑动步长均大于相邻两个试次之间的时间间隔。也就是说,每个反应时样本片段可以包括多个试次。每个试次包括受试者对随机出现的目标的反应时长。As mentioned above, the window length and sliding step length of the preset sliding window are both greater than the time interval between two adjacent trials. In other words, each reaction time sample segment may include multiple trials. Each trial includes the reaction time of the subject to a randomly appearing target.
因此,步骤S102包括:对每个反应时样本数据的多个反应时样本片段中每个反应时样本片段,将该反应时样本片段内的各个试次的反应时长的均值,确定为该反应时样本片段对应的目标反应时;对每个受试者在不同精神状态下的反应时样本片段,将目标反应时小于第一预设反应时的反应时样本片段对应的真实警觉度类别设置为警觉类别,并将目标反应时大于第二预设反应时的反应时样本片段对应的真实警觉度类别设置为困倦类别。Therefore, step S102 includes: for each reaction time sample segment in multiple reaction time sample segments of each reaction time sample data, determining the mean reaction time of each trial in the reaction time sample segment as the target reaction time corresponding to the reaction time sample segment; for the reaction time sample segments of each subject in different mental states, setting the real alertness category corresponding to the reaction time sample segment with a target reaction time less than a first preset reaction time as the alertness category, and setting the real alertness category corresponding to the reaction time sample segment with a target reaction time greater than a second preset reaction time as the sleepiness category.
也就是说,本实施例是对每个受试者在每种精神状态下的反应时样本数据对应的多个反应时样本片段中每个反应时样本片段,基于该反应时样本片段中各个试次的反应时长的均值,确定该反应时样本片段的目标反应时;将每个受试者在不同精神状态下的反应时样本片段的目标反应时进行合并,得到每个受试者在不同精神状态下的反应时样本片段;对每个受试者在不同精神状态下的反应时样本片段,将目标反应时小于第一预设反应时的反应时样本片段对应的警觉度类别设置为警觉类别,并将目标反应时大于第二预设反应时的反应时样本片段对应的警觉度类别设置为困倦类别。That is to say, in this embodiment, for each reaction time sample segment in multiple reaction time sample segments corresponding to the reaction time sample data of each subject in each mental state, based on the average of the reaction time of each trial in the reaction time sample segment, the target reaction time of the reaction time sample segment is determined; the target reaction time of the reaction time sample segments of each subject in different mental states are merged to obtain the reaction time sample segments of each subject in different mental states; for the reaction time sample segments of each subject in different mental states, the alertness category corresponding to the reaction time sample segment with a target reaction time less than a first preset reaction time is set as the alertness category, and the alertness category corresponding to the reaction time sample segment with a target reaction time greater than a second preset reaction time is set to the sleepiness category.
其中,确定每个反应时样本片段的目标反应时的实现方式有多种,具体可以如下:There are multiple ways to determine the target reaction time of each reaction time sample segment, which can be specifically as follows:
在一些实施例中,基于该反应时样本片段中各个试次的反应时长的均值,确定该反应时样本片段的目标反应时,包括:针对该反应时样本片段中每个反应时样本片段,确定该反应时样本片段中各个试次的反应时长的均值,并将该均值确定为该反应时样本片段的目标反应时。In some embodiments, based on the average reaction time of each trial in the reaction time sample segment, determining the target reaction time of the reaction time sample segment includes: for each reaction time sample segment in the reaction time sample segment, determining the average reaction time of each trial in the reaction time sample segment, and determining the average as the target reaction time of the reaction time sample segment.
其中,该反应时样本片段中各个试次记为N个试次,该N个试次的反应时长记为{RT1,RT2,RT3,…,RTN},则各个试次的反应时长的均值可以采用如下公式确定:Each trial in the reaction time sample segment is recorded as N trials, and the reaction time of the N trials is recorded as {RT 1 , RT 2 , RT 3 , …, RT N }, then the mean reaction time of each trial is It can be determined using the following formula:
; ;
式中,i为试次的编号;N为试次的总数量;RTi为第i个试次对应的反应时长。Where i is the trial number; N is the total number of trials; RTi is the reaction time corresponding to the i-th trial.
应当注意,本实施例在确定每个反应时样本片段的目标反应时之后,需要将每个受试者在不同精神状态下的反应时样本片段进行合并,形成个体水平上的反应时分布,进而基于个体水平的反应时分布来设置警觉度类别。It should be noted that, after determining the target reaction time of each reaction time sample segment, this embodiment needs to merge the reaction time sample segments of each subject under different mental states to form a reaction time distribution at the individual level, and then set the alertness category based on the reaction time distribution at the individual level.
在一些实施例中,在获得个体水平上的反应时分布后,还可以对个体水平上的反应时分布进行消除量纲影响的处理,并将消除量纲处理之后的反应时作为该反应时样本片段的目标反应时,使得建模样本更加贴合真实的警觉度。其中,消除量纲影响的处理包括归一化、标准化或者Z分数转换等等。以归一化为例,归一化的过程可以表示为如下公式:In some embodiments, after obtaining the reaction time distribution at the individual level, the reaction time distribution at the individual level can also be processed to eliminate the dimensionality effect, and the reaction time after the dimensionality elimination process is used as the target reaction time of the reaction time sample segment, so that the modeled sample is more in line with the actual alertness. Among them, the process of eliminating the dimensionality effect includes normalization, standardization or Z score conversion, etc. Taking normalization as an example, the normalization process can be expressed as the following formula:
; ;
式中,表示归一化的结果,即目标反应时;表示对每个受试者在不同精神状态下的反应时样本片段进行合并后,其中的最大反应时;表示对每个受试者在不同精神状态下的反应时样本片段进行合并后,其中的最小反应时。In the formula, represents the normalized result, i.e., the target reaction time; It represents the maximum reaction time after merging the reaction time sample segments of each subject in different mental states; It represents the minimum reaction time after merging the reaction time sample segments of each subject in different mental states.
本实施例中,归一化的目的在于缩小每个受试者在不同精神状态下的反应时样本片段在反应时特征空间的差异,从而减小对后续确定警觉度的影响,进而减小模型训练精度的影响。In this embodiment, the purpose of normalization is to reduce the differences in the reaction time feature space of the reaction time sample segments of each subject under different mental states, thereby reducing the impact on the subsequent determination of alertness, and further reducing the impact on the accuracy of model training.
其中,每个受试者在不同精神状态下的反应时样本片段包括多个,基于每个受试者在不同精神状态下的反应时样本片段对应的目标反应时,对该反应时样本片段设置警觉度类别,包括:针对每个受试者在不同精神状态下的多个反应时样本片段,确定该些反应时样本片段中,目标反应时小于第一预设反应时的反应时样本片段为第一反应时样本片段;以及确定该些反应时样本片段中,目标反应时大于第二预设反应时的反应时样本片段为第二反应时样本片段;将第一反应时样本片段对应的警觉度类别设置为警觉类别,并将第二反应时样本片段对应的警觉度类别设置为困倦类别。Among them, each subject includes multiple reaction time sample segments under different mental states, and based on the target reaction time corresponding to the reaction time sample segments of each subject under different mental states, the alertness category is set for the reaction time sample segment, including: for each subject under multiple reaction time sample segments under different mental states, determining that among the reaction time sample segments, a reaction time sample segment with a target reaction time less than a first preset reaction time is a first reaction time sample segment; and determining that among the reaction time sample segments, a reaction time sample segment with a target reaction time greater than a second preset reaction time is a second reaction time sample segment; setting the alertness category corresponding to the first reaction time sample segment to the alertness category, and setting the alertness category corresponding to the second reaction time sample segment to the sleepiness category.
其中,确定第一反应时样本片段和第二反应时样本片段的实现方式有多种,具体可以如下:There are many implementation methods for determining the first reaction time sample fragment and the second reaction time sample fragment, which may be specifically as follows:
在一些实施例中,确定第一反应时样本片段和第二反应时样本片段,包括:采用聚类算法对每个受试者在不同精神状态下的反应时样本片段的目标反应时进行聚类,得到聚类结果;基于聚类结果确定第一反应时样本片段和第二反应时样本片段。In some embodiments, determining a first reaction time sample segment and a second reaction time sample segment includes: clustering the target reaction times of the reaction time sample segments of each subject in different mental states using a clustering algorithm to obtain clustering results; and determining the first reaction time sample segment and the second reaction time sample segment based on the clustering results.
以K-means聚类算法为例,聚类的具体实现过程具体可以如下:Taking the K-means clustering algorithm as an example, the specific implementation process of clustering can be as follows:
a1)随机选取K个目标反应时作为初始质心{C1,C2,…Ck},该K个质心作为待建立的K个簇的中心点,K的取值范围为2-10。a1) Randomly select K target reaction times as the initial centroids {C 1 , C 2 , ...C k }, and the K centroids are used as the center points of the K clusters to be established. The value range of K is 2-10.
a2)遍历剩余的目标反应时,计算其到K个质心的欧式距离,并将其划入到最小欧式距离的质心点所在的簇。a2) When traversing the remaining target reactions, calculate their Euclidean distances to the K centroids and assign them to the cluster with the centroid with the minimum Euclidean distance.
a3)更新各个簇的质心,并重复上述步骤a1)和a2),直至质心和簇不再发生变化或者达到最大迭代次数,得到聚类结果。a3) Update the centroid of each cluster and repeat the above steps a1) and a2) until the centroid and cluster no longer change or the maximum number of iterations is reached, and the clustering result is obtained.
a4)基于聚类结果,确定不同聚类K值下的误差平方和SSE(误差平方和),并据此确定最优聚类数和分类阈值。其中,SSE的确定过程如下:a4) Based on the clustering results, determine the error sum of squares SSE (error sum of squares) under different clustering K values, and determine the optimal number of clusters and classification threshold accordingly. The determination process of SSE is as follows:
; ;
式中,CK表示第K个聚类;xi表示第K个聚类中第i个目标反应时;uk是第K个聚类的质心。Where C K represents the K-th cluster; xi represents the i-th target reaction time in the K-th cluster; uk is the centroid of the K-th cluster.
需要注意的是,为了保证最终的聚类数与警觉度类别的数量保持一致,可以通过预先设置聚类数的方式来实现,也可以在获得聚类数之后,将最小的分类阈值对应的反应时样本片段作为第一反应时样本片段,以及将最大的分类阈值对应的反应时样本片段作为第二反应时样本片段。可选的,还可以将剩余的反应时样本片段对应的反应时样本片段作为第三反应时样本片段。其中,第一反应时样本片段对应的警觉度类别为警觉类别,第二反应时样本片段对应的警觉度类别为困倦类别,第三反应时样本片段对应的警觉度类别为一般状态类别。下面结合附图对该实现过程进行说明:It should be noted that in order to ensure that the final number of clusters is consistent with the number of alertness categories, this can be achieved by pre-setting the number of clusters, or after obtaining the number of clusters, the reaction time sample segment corresponding to the smallest classification threshold is used as the first reaction time sample segment, and the reaction time sample segment corresponding to the largest classification threshold is used as the second reaction time sample segment. Optionally, the reaction time sample segments corresponding to the remaining reaction time sample segments can also be used as the third reaction time sample segment. Among them, the alertness category corresponding to the first reaction time sample segment is the alertness category, the alertness category corresponding to the second reaction time sample segment is the sleepiness category, and the alertness category corresponding to the third reaction time sample segment is the general state category. The implementation process is explained below with reference to the accompanying drawings:
图3为本申请实施例提供的聚类结果的示意图。如图3所示,假设最优聚类数为3类,第一分类阈值和第二分类阈值分别为0.399和0.597,则表示不同警觉度类别在整个样本数据中的占比分别为39.85%,19.80%,40.35%,其分别对应警觉度较高(反应速度大致在总体表现水平前40%)的警觉类别,警觉度一般(反应速度在个人总体表现水平的40%~60%)的中间状态类别,和警觉度偏低(反应速度大致在个体总水平后40%)的困倦类别。Figure 3 is a schematic diagram of the clustering results provided by the embodiment of the present application. As shown in Figure 3, assuming that the optimal number of clusters is 3, the first classification threshold and the second classification threshold are 0.399 and 0.597 respectively, which means that the proportions of different alertness categories in the entire sample data are 39.85%, 19.80%, and 40.35% respectively, which correspond to the alertness category with high alertness (reaction speed is roughly in the top 40% of the overall performance level), the middle state category with average alertness (reaction speed is 40% to 60% of the individual's overall performance level), and the sleepiness category with low alertness (reaction speed is roughly in the bottom 40% of the individual's overall level).
基于此,可以将聚类结果为警觉度较高的反应时样本片段确定为目标反应时小于第一预设反应时的反应时样本片段,以及将警觉度偏低的反应时样本片段确定为目标反应时大于第二预设反应时的反应时样本片段。Based on this, the clustering results of reaction time sample segments with higher alertness can be determined as reaction time sample segments with target reaction time less than the first preset reaction time, and the reaction time sample segments with lower alertness can be determined as reaction time sample segments with target reaction time greater than the second preset reaction time.
在一些实施例中,确定第一反应时样本片段和第二反应时样本片段,包括:针对每个受试者,将该受试者在不同精神状态下的反应时样本片段的目标反应时按照由小到大的顺序排序,得到排序结果;将排序结果中排序靠前的M个反应时样本片段,确定为目标反应时小于第一预设反应时的反应时样本片段,并将排序结果中排序靠后的N个反应时样本片段,确定为目标反应时大于第二预设反应时的反应时样本片段,M和N均为正整数。In some embodiments, determining a first reaction time sample segment and a second reaction time sample segment includes: for each subject, sorting the target reaction times of the reaction time sample segments of the subject in different mental states in order from small to large to obtain a sorting result; determining the top M reaction time sample segments in the sorting result as reaction time sample segments with target reaction times less than a first preset reaction time, and determining the bottom N reaction time sample segments in the sorting result as reaction time sample segments with target reaction times greater than the second preset reaction time, where M and N are both positive integers.
在一些实施例中,确定第一反应时样本片段和第二反应时样本片段,包括:针对每个受试者,将该受试者在不同精神状态下的反应时样本片段的目标反应时按照由大到小的顺序排序,得到排序结果;将排序结果中排序靠前的N个反应时样本片段,确定为目标反应时大于第二预设反应时的反应时样本片段,并将排序结果中排序靠后的M个反应时样本片段,确定为目标反应时小于第一预设反应时的反应时样本片段。In some embodiments, determining a first reaction time sample segment and a second reaction time sample segment includes: for each subject, sorting the target reaction times of the reaction time sample segments of the subject in different mental states in order from large to small to obtain a sorting result; determining the top N reaction time sample segments in the sorting result as reaction time sample segments with target reaction times greater than the second preset reaction time, and determining the bottom M reaction time sample segments in the sorting result as reaction time sample segments with target reaction times less than the first preset reaction time.
其中,第一预设时长和第二预设时长可以根据人工经验来确定,比如第一预设时长和第二预设时长可以分别设置为323ms和966ms,300ms和900ms,500ms和1500ms。第一预设时长和第二预设时长也可以基于上述实施例中采用聚类算法得到的聚类结果中的分类阈值来确定,比如,第一预设时长可以基于聚类结果中的第一分类阈值确定,以及第二预设时长可以基于聚类结果中的第二分类阈值确定。另外,第一预设时长和第二预设时长还可以采用第一反应速度和第二反应速度来代替。同样地,第一反应速度和第二反应速度也可以根据人工经验来确定,比如,第一反应速度和第二反应速度可以分别设置为3.1次/每秒和1.04次/每秒。或者基于上述实施例中采用聚类算法得到的聚类结果中的分类阈值对应的反应速度来确定第一反应速度和第二反应速度,本实施例对此不作具体限制。Among them, the first preset duration and the second preset duration can be determined according to manual experience, such as the first preset duration and the second preset duration can be set to 323ms and 966ms, 300ms and 900ms, 500ms and 1500ms respectively. The first preset duration and the second preset duration can also be determined based on the classification threshold in the clustering result obtained by the clustering algorithm in the above embodiment, for example, the first preset duration can be determined based on the first classification threshold in the clustering result, and the second preset duration can be determined based on the second classification threshold in the clustering result. In addition, the first preset duration and the second preset duration can also be replaced by the first reaction speed and the second reaction speed. Similarly, the first reaction speed and the second reaction speed can also be determined according to manual experience, for example, the first reaction speed and the second reaction speed can be set to 3.1 times/second and 1.04 times/second respectively. Or the first reaction speed and the second reaction speed are determined based on the reaction speed corresponding to the classification threshold in the clustering result obtained by the clustering algorithm in the above embodiment, and this embodiment does not make specific restrictions on this.
继续参阅图1,在步骤S102之后,本实施例的警觉度评估模型的构建方法还可以包括如下步骤S103。Continuing to refer to FIG. 1 , after step S102 , the method for constructing an alertness assessment model of this embodiment may further include the following step S103 .
S103、基于心电样本片段和反应时样本片段对应的真实警觉度类别,对预设警觉度评估网络进行训练,得到警觉度评估模型。S103: Based on the real alertness categories corresponding to the ECG sample segments and the reaction time sample segments, a preset alertness assessment network is trained to obtain an alertness assessment model.
本实施例中,是将心电样本片段作为训练样本,并将反应时样本片段对应的真实警觉度类别作为训练标签,对预设警觉度评估网络进行训练,从而得到警觉度评估模型。在训练警觉度评估网络时,需要基于心电样本片段确定目标心率变异特征,并应用目标心率变异特征对警觉度评估网络进行训练。下面结合附图对确定目标心率变异特征的过程进行详细说明:In this embodiment, the ECG sample segments are used as training samples, and the real alertness categories corresponding to the reaction time sample segments are used as training labels to train the preset alertness assessment network, thereby obtaining an alertness assessment model. When training the alertness assessment network, it is necessary to determine the target heart rate variability characteristics based on the ECG sample segments, and use the target heart rate variability characteristics to train the alertness assessment network. The process of determining the target heart rate variability characteristics is described in detail below in conjunction with the accompanying drawings:
图4为本申请实施例提供的确定目标心率变异样本特征的流程示意图。如图4所示,步骤S103可以包括如下步骤S401-S403:FIG4 is a schematic diagram of a process for determining target heart rate variability sample characteristics provided by an embodiment of the present application. As shown in FIG4 , step S103 may include the following steps S401-S403:
S401、确定心电样本片段对应的多个心率变异样本特征及其对应的警觉度贡献度。S401, determining a plurality of heart rate variability sample features corresponding to an electrocardiogram sample segment and their corresponding alertness contribution.
本实施例通过对心电样本片段进行R波检测,可以得到R波(即QRS复合波);之后,基于R波确定心电样本片段对应的RR间期序列,并基于RR间期序列确定该心电样本片段对应的多个心率变异样本特征。In this embodiment, R wave (i.e., QRS complex wave) can be obtained by performing R wave detection on the ECG sample segment; then, the RR interval sequence corresponding to the ECG sample segment is determined based on the R wave, and multiple heart rate variability sample features corresponding to the ECG sample segment are determined based on the RR interval sequence.
其中,确定心电样本片段对应的多个心率变异样本特征,可以包括三大部分:初始R波检测、R波漏检和基于前面两者的检测结果确定心率变异样本特征。下面结合附图依次对每个部分进行解释说明:Among them, determining multiple heart rate variability sample features corresponding to the ECG sample segments can include three parts: initial R wave detection, R wave missed detection, and determining the heart rate variability sample features based on the detection results of the first two. Each part is explained in turn in conjunction with the accompanying drawings:
在一些实施例中,通过针对心电样本片段进行R波检测,可以得到该心电样本片段对应的初始R波及初始RR间期序列。下面结合附图对心率变异样本特征的确定过程进行详细介绍:In some embodiments, by performing R wave detection on an ECG sample segment, an initial R wave and an initial RR interval sequence corresponding to the ECG sample segment can be obtained. The following is a detailed introduction to the process of determining the characteristics of the heart rate variability sample in conjunction with the accompanying drawings:
图5为本申请实施例提供的确定心率变异特征的流程示意图。如图5所示,对心电样本片段进行R波检测,得到R波的实现过程包括如下步骤b1)-b4):FIG5 is a schematic diagram of a process for determining heart rate variability characteristics provided by an embodiment of the present application. As shown in FIG5, performing R wave detection on an ECG sample segment to obtain an R wave includes the following steps b1)-b4):
b1)滤波。b1) Filtering.
其中,滤波包括:对心电样本片段进行滤波处理,得到滤波后的心电样本片段。滤波包括去噪和增强R波信号,具体可以参考如下步骤b11)-b14):The filtering includes: filtering the ECG sample segments to obtain filtered ECG sample segments. The filtering includes denoising and enhancing the R wave signal, which can be specifically referred to in the following steps b11)-b14):
b11)去噪。b11) Denoising.
去噪能够去除高频噪声和基线漂移。其中,为了能够有效地捕捉R波的频率特征,可以采用3阶带通滤波器进行滤波处理,该滤波器的截止频率为5Hz至11Hz。其归一化的截止频率数组为:Denoising can remove high-frequency noise and baseline drift. In order to effectively capture the frequency characteristics of the R wave, a third-order bandpass filter can be used for filtering, and the cutoff frequency of the filter is 5Hz to 11Hz. The normalized cutoff frequency array is:
; ;
式中,fs为心电样本片段的采样率;fs/2是奈奎斯特频率。Where fs is the sampling rate of the ECG sample segment; fs/2 is the Nyquist frequency.
滤波公式具体为:y(n)=filtfilt(a,b,x(n)),其中,a,b可以通过巴特沃斯滤波器设计函数“butter”获得,具体为:。The specific filtering formula is: y(n)=filtfilt(a,b,x(n)), where a and b can be obtained through the Butterworth filter design function "butter", specifically: .
其中,增强R波信号包括步骤b12)至步骤b14)。Among them, enhancing the R wave signal includes steps b12) to b14).
b12)对滤波后的心电样本片段y(n)进行导数运算以突出QRS波的斜率,导数运算的公式具体如下:b12) Performing a derivative operation on the filtered ECG sample segment y(n) to highlight the slope of the QRS wave. The derivative operation formula is as follows:
b13)对导数运算后的进行平方运算,得到,以增强QRS波的特征。b13) After the derivative operation Performing the square operation, we get , to enhance the characteristics of the QRS wave.
b14)对平方后的应用移动平均滤波器,以获得强调QRS区的信号:b14) after square Apply a moving average filter to obtain a signal that emphasizes the QRS region :
本实施例中,采用3阶带通滤波器对心电样本片段进行滤波处理,能够适应短程的心电样本片段,以更好地滤除其中的噪声信号。且带通滤波范围设置为5-15Hz,能够高度符合QRS波对应频率的范围,滤波器的下限设置(5Hz)旨在衰减呼吸、位移等原因带来的基线漂移对信号探测造成的影响,滤波器的上限设置(15Hz)有利于消除15-30Hz的肌电活动带来的生物伪迹,对于高频市电(50Hz)带来的干扰信号也有一定衰减作用。之后采用导数运算、平方运算和移动平均滤波器分别对滤波后的心电样本片段进行处理,逐渐放大并突出QRS波,使得最终得到的滤波后的心电样本片段的QRS波的特征更加明显,以便于后续的QRS波检测。In this embodiment, a third-order bandpass filter is used to filter the ECG sample segments, which can adapt to short-range ECG sample segments to better filter out the noise signals therein. The bandpass filter range is set to 5-15Hz, which can highly conform to the frequency range corresponding to the QRS wave. The lower limit setting of the filter (5Hz) is intended to attenuate the influence of baseline drift caused by breathing, displacement and other reasons on signal detection. The upper limit setting of the filter (15Hz) is conducive to eliminating biological artifacts caused by 15-30Hz electromyographic activity, and also has a certain attenuation effect on the interference signal caused by high-frequency mains (50Hz). Then, derivative operation, square operation and moving average filter are used to process the filtered ECG sample segments respectively, gradually amplifying and highlighting the QRS wave, so that the characteristics of the QRS wave of the final filtered ECG sample segment are more obvious, so as to facilitate the subsequent QRS wave detection.
继续参阅图5,在对心电样本片段进行滤波处理后,便可以进行峰值检测和采用自适应阈值算法进行初始R波检测,具体包括步骤b2)-步骤b3):Continuing to refer to FIG5 , after filtering the ECG sample segments, peak detection and initial R wave detection using an adaptive threshold algorithm can be performed, specifically including steps b2) to b3):
b2)采用峰值探测算法对滤波后的心电样本片段进行峰值点(PEAK)检测,得到滤波后的心电样本片段对应的峰值点,其中,该峰值点对应有幅值和峰值时刻。b2) using a peak detection algorithm to perform peak point (PEAK) detection on the filtered ECG sample segment to obtain a peak point corresponding to the filtered ECG sample segment, wherein the peak point corresponds to an amplitude and a peak time.
可选的,可以采用MATLAB的findpeaks函数获取心电样本片段的峰值点。峰值点是心电样本片段通过上述滤波处理后所识别出来的局部最大值,其代表可能的QRS波幅度。Optionally, the findpeaks function of MATLAB can be used to obtain the peak point of the ECG sample segment. The peak point is the local maximum value identified after the ECG sample segment is processed by the above filtering, which represents the possible QRS wave amplitude.
由于心电信号中存在生理上的不应期(心室去极化后的恢复期间),导致两个QRS波峰的间隔通常在200ms左右,因此,可以设置该findpeaks函数的'MINPEAKDISTANCE'参数为round(0.2*fs),以确保检测到的峰值点之间的最小距离为200ms。也就是说,如果在前一个峰值点后的200毫秒内再次检测到峰值点,该再次检测到的峰值点将被视为无效,从而避免在不应期内错误地标记峰值点。Due to the physiological refractory period (recovery period after ventricular depolarization) in the ECG signal, the interval between two QRS peaks is usually around 200ms. Therefore, the 'MINPEAKDISTANCE' parameter of the findpeaks function can be set to round(0.2*fs) to ensure that the minimum distance between the detected peak points is 200ms. In other words, if a peak point is detected again within 200 milliseconds after the previous peak point, the re-detected peak point will be considered invalid, thereby avoiding incorrect marking of peak points during the refractory period.
该步骤检测得到的峰值点可以视为候选R波。进一步地,还可以基于候选R波确定最终的R波(包括后续介绍的初始R波和漏检R波)。The peak point detected in this step can be regarded as a candidate R wave. Furthermore, the final R wave (including the initial R wave and the missed R wave described later) can be determined based on the candidate R waves.
b3)对滤波后的心电样本片段进行初始R波检测。b3) Performing initial R wave detection on the filtered ECG sample segment.
QRS波是心电活动中能够反映每次心跳的核心特征波,基于QRS波可以确定心电样本片段对应的RR间期,进而基于RR间期来确定该心电样本片段对应的多个心率变异样本特征。The QRS wave is the core characteristic wave in the ECG activity that can reflect each heartbeat. Based on the QRS wave, the RR interval corresponding to the ECG sample segment can be determined, and then based on the RR interval, multiple heart rate variability sample features corresponding to the ECG sample segment can be determined.
由于心电样本片段上可能存在比较大的T波,或者电磁干扰现象,导致心电样本片段上存在噪声信号。但心电信号与噪声信号在峰值上存在明显区别,因此,本实施例可以基于每个峰值点的峰值来确定该峰值点对应的信号是心电信号还是噪声信号。Since there may be a relatively large T wave or electromagnetic interference on the ECG sample segment, there may be a noise signal on the ECG sample segment. However, there is an obvious difference between the ECG signal and the noise signal in the peak value. Therefore, this embodiment can determine whether the signal corresponding to each peak point is an ECG signal or a noise signal based on the peak value of each peak point.
具体的,滤波后的心电样本片段的峰值点包括多个,对滤波后的心电样本片段的峰值点进行初始R波检测,包括:针对多个峰值点中每个峰值点,确定该峰值点的峰值超过信号阈值(THRSIG)的情况下,将该峰值点确定为初始R波;确定该峰值点的峰值位于噪声阈值(THRNOISE)和信号阈值(THRSIG)之间,则确定该峰值点为噪声。Specifically, the peak points of the filtered ECG sample segment include multiple peak points, and initial R wave detection is performed on the peak points of the filtered ECG sample segment, including: for each peak point among the multiple peak points, if the peak value of the peak point exceeds the signal threshold (THRSIG), the peak point is determined as the initial R wave; if the peak value of the peak point is between the noise threshold (THRNOISE) and the signal threshold (THRSIG), the peak point is determined to be noise.
进一步地,在确定峰值点为初始R波时,还可以更新该峰值时刻点的信号水平(Signal Level,SIGLEV)信号阈值(Signal Threshold,THRSIG)和噪声阈值(THRNOISE);以及在确定该峰值点为噪声时,还可以更新该峰值时刻点的噪声水平(NOISELEV)信号阈值(Signal Threshold,THRSIG)和噪声阈值(THRNOISE)。Furthermore, when the peak point is determined to be the initial R wave, the signal level (Signal Level, SIGLEV), signal threshold (Signal Threshold, THRSIG) and noise threshold (THRNOISE) at the peak moment may also be updated; and when the peak point is determined to be noise, the noise level (NOISELEV), signal threshold (Signal Threshold, THRSIG) and noise threshold (THRNOISE) at the peak moment may also be updated.
下面依次介绍该峰值点对应的四项参数的更新过程:The following describes the update process of the four parameters corresponding to the peak point:
其中,该峰值点的信号水平(SIGLEV)可以理解为是心电信号的强度,用于捕捉心电信号中的QRS波幅度的变化,其根据新检测到的PEAK值进行更新。如果新的PEAK值超过了信号阈值THRSIG,则表明该PEAK是一个潜在的QRS波,因此SIGLEV会根据该PEAK值进行调整,以更好地反映QRS波的当前幅度。其更新过程如下:The signal level (SIGLEV) of the peak point can be understood as the strength of the ECG signal, which is used to capture the change in the amplitude of the QRS wave in the ECG signal. It is updated according to the newly detected PEAK value. If the new PEAK value exceeds the signal threshold THRSIG, it indicates that the PEAK is a potential QRS wave, so SIGLEV will be adjusted according to the PEAK value to better reflect the current amplitude of the QRS wave. The update process is as follows:
SIGLEV=k*PEAK+(1-k)*SPKI;SIGLEV=k*PEAK+(1-k)*SPKI;
式中,SPKI为历史信号水平,其表征当前峰值点之前的上一个已检测初始R波的峰值时刻点对应的信号水平;k为权重系数,用于调整当前峰值点的峰值和历史峰值点的峰值在信区计算过程中的相对权重;k的取值范围为0.1~0.5之间;k值越大,代表当前峰值点在信噪水平的估计中占比越大,信号估计更容易对当前信息更敏感,k值越小,代表历史信号水平在信噪水平的估计中占比更大。因此,k值可以设置为0.125。Wherein, SPKI is the historical signal level, which represents the signal level corresponding to the peak time point of the last detected initial R wave before the current peak point; k is the weight coefficient, which is used to adjust the relative weight of the peak value of the current peak point and the peak value of the historical peak point in the signal area calculation process; the value range of k is between 0.1 and 0.5; the larger the k value, the greater the proportion of the current peak point in the estimation of the signal-to-noise level, and the signal estimation is more sensitive to the current information; the smaller the k value, the greater the proportion of the historical signal level in the estimation of the signal-to-noise level. Therefore, the k value can be set to 0.125.
该峰值点的噪声水平(NOISELEV)的更新过程如下:The updating process of the noise level (NOISELEV) at the peak point is as follows:
NOISELEV=k*NOISE+(1-k)*NPKI;NOISELEV=k*NOISE+(1-k)*NPKI;
式中,NPKI为历史噪声水平,其表征当前峰值点之前的上一个已检测噪声点的峰值时刻点对应的噪声水平。Where NPKI is the historical noise level, which represents the noise level corresponding to the peak time point of the last detected noise point before the current peak point.
该峰值点对应的信号阈值,其用于判断一个峰值点是否足够大,旨在区分真正的QRS波和其他生物电噪声(如T波或电极干扰)。其更新过程如下:The signal threshold corresponding to the peak point is used to determine whether a peak point is large enough to distinguish the true QRS wave from other bioelectric noise (such as T wave or electrode interference). The update process is as follows:
THRSIG=NOISELEV+γ1*(SIGLEV-NOISELEV);THRSIG=NOISELEV+γ 1 *(SIGLEV-NOISELEV);
式中,γ1是用来调整信号阈值THRSIG的比例系数,γ1值较大会使得信号阈值在动态调整时对信号水平(QRS波峰)的波动更为敏感,有助于快速适应信号突变,但也可能会增加将噪声虚报为信号的风险;而γ1值较小,会使得阈值周整更为保守,减少误检率,但可能导致其对心电信号变化的反应不够灵敏;因此,γ1可以设置为0.25,可以兼顾上述现象。Wherein, γ1 is the proportional coefficient used to adjust the signal threshold THRSIG. A larger γ1 value will make the signal threshold more sensitive to the fluctuation of the signal level (QRS peak) during dynamic adjustment, which helps to quickly adapt to signal mutations, but may also increase the risk of falsely reporting noise as a signal. A smaller γ1 value will make the threshold adjustment more conservative and reduce the false detection rate, but may cause it to be less sensitive to changes in the ECG signal. Therefore, γ1 can be set to 0.25 to take into account the above phenomena.
该峰值点对应的噪声阈值为:THRNOISE=THRSIG*γ2;The noise threshold corresponding to the peak point is: THRNOISE=THRSIG*γ 2 ;
式中,γ2是噪声阈值调整的比例系数,其决定了噪声阈值相对于噪声阈值的位置,只有明显高于噪声水平的峰值点才会被确定为可能的QRS波。γ2可以设置为0.5。Where γ 2 is the proportional coefficient of the noise threshold adjustment, which determines the position of the noise threshold relative to the noise threshold. Only peak points that are significantly higher than the noise level will be determined as possible QRS waves. γ 2 can be set to 0.5.
举例来说,假设目前检测到4个峰值点为P1、P2、P3和P4,其峰值大小分别为P1=1,P2=1,P3=2,P4=0.4。假设P1时刻对应的初始R波的历史信号水平是1,历史噪声水平是0.2,信号阈值是0.4,噪声阈值是0.1,这时,下一个P2时刻对应的PEAK2因为峰值大小是1,超过信号阈值0.4,因此被判定为初始R波信号(简称为R2)。则信号水平会更新为SIGLEV==0.125*1+(1-0.125)*1=1;作为下一个初始R波信号点出现时,用于更新SIGLEV的公式里的SKPI。此时,噪声水平NOISELEV不变(还是0.2)。信号阈值更新为:THRSIG= 0.2+0.25*(1-0.2)=0.4。接下来对P3进行判断,由于其峰值大小为1,还是超过信号阈值0.4,其还是被判定为初始R波信号(简称为R3)。这时,P2对应的信号水平更新为SIGLEV== 0.125*2+(1-0.125)*1=1.125;NOISELEV不变(还是0.2);信号阈值更新为:THRSIG= 0.2+0.25*(1.125-0.2)=0.43125。接着对P4进行判断时,由于其峰值为0.4,没有超出信号阈值0.43125,因此被判定为噪声。此时,信号水平还是维持上一个R波时刻点对应的1.125。而噪声水平需要更新为:NOISELEV= 0.125*0.4+0.875*0.2=0.225。假设后续还有P5时,如果它被判定为信号,则更新信号水平时,SPKI还是P3时刻对应的1.125(因为P4不是信号,就没有更新这个信号水平,SPKI是最近的一个信号时刻对应的信号水平),如果它被判定为噪声,则更新噪声水平,更新时公式里的NPKI是P4时刻对应的0.225(最近的一个噪声时刻对应的噪声水平)。For example, suppose that 4 peak points are detected, namely P1, P2, P3 and P4, and their peak values are P1=1, P2=1, P3=2, and P4=0.4 respectively. Assume that the historical signal level of the initial R wave corresponding to the moment P1 is 1, the historical noise level is 0.2, the signal threshold is 0.4, and the noise threshold is 0.1. At this time, the PEAK2 corresponding to the next moment P2 is judged to be the initial R wave signal (abbreviated as R2) because the peak value is 1, which exceeds the signal threshold of 0.4. Then the signal level will be updated to SIGLEV==0.125*1+(1-0.125)*1=1; when the next initial R wave signal point appears, the SKPI in the formula used to update SIGLEV. At this time, the noise level NOISELEV remains unchanged (still 0.2). The signal threshold is updated to: THRSIG= 0.2+0.25*(1-0.2)=0.4. Next, P3 is judged. Since its peak value is 1, it still exceeds the signal threshold of 0.4, so it is still judged as the initial R wave signal (abbreviated as R3). At this time, the signal level corresponding to P2 is updated to SIGLEV== 0.125*2+(1-0.125)*1=1.125; NOISELEV remains unchanged (still 0.2); the signal threshold is updated to: THRSIG= 0.2+0.25*(1.125-0.2)=0.43125. Then when P4 is judged, since its peak value is 0.4, it does not exceed the signal threshold of 0.43125, so it is judged as noise. At this time, the signal level still maintains 1.125 corresponding to the previous R wave time point. The noise level needs to be updated to: NOISELEV= 0.125*0.4+0.875*0.2=0.225. Assuming that there is P5 later, if it is judged as a signal, when the signal level is updated, SPKI is still 1.125 corresponding to the P3 moment (because P4 is not a signal, the signal level is not updated, and SPKI is the signal level corresponding to the most recent signal moment). If it is judged as noise, the noise level is updated, and the NPKI in the formula during the update is 0.225 corresponding to the P4 moment (the noise level corresponding to the most recent noise moment).
由于一个人的心跳在一段时间内的峰值相对较为稳定,因此,本实施例通过分别基于历史信号水平和历史噪声水平对当前峰值点的信号水平和噪声水平进行更新,就不会使信号阈值和噪声阈值的波动较大。随着累加的R波越多,其对该段时间内R波检测的准确度也会越高。在心电信号分析中,尤其是短期监测过程中,信号常受到多种干扰因素的影响,例如肌肉震颤、电气噪声或呼吸引起的基线漂移。本实施例通过实时监测的信噪水平,更新信号阈值(THRSIG)和噪声阈值(THRNOISE),有效地区分了真实的QRS波和干扰噪声。这种动态阈值调整策略允许心电监测系统在面对突发的信号变化时快速响应,减少了由瞬时噪声引起的误检,增强了系统的抗干扰能力。Since the peak value of a person's heartbeat is relatively stable over a period of time, this embodiment updates the signal level and noise level of the current peak point based on the historical signal level and the historical noise level, respectively, so that the signal threshold and the noise threshold will not fluctuate greatly. As the number of accumulated R waves increases, the accuracy of R wave detection during this period will also be higher. In ECG signal analysis, especially in short-term monitoring, signals are often affected by a variety of interference factors, such as baseline drift caused by muscle tremor, electrical noise or breathing. This embodiment effectively distinguishes between real QRS waves and interference noise by updating the signal threshold (THRSIG) and the noise threshold (THRNOISE) through real-time monitoring of the signal-to-noise level. This dynamic threshold adjustment strategy allows the ECG monitoring system to respond quickly to sudden signal changes, reduces false detections caused by transient noise, and enhances the system's anti-interference ability.
通过将信号和噪声水平的实时更新与历史数据相结合,不仅能够适应个体心电特征的持续变化,还能对环境干扰因素进行有效的抑制。例如,在心电信号突然受到外界电磁干扰的情况下,该阈值调整机制能迅速调整,防止将干扰误认为心跳信号,从而确保心电分析的准确性和连续性。By combining real-time updates of signal and noise levels with historical data, it can not only adapt to the continuous changes in individual ECG characteristics, but also effectively suppress environmental interference factors. For example, when the ECG signal is suddenly interfered by external electromagnetic interference, the threshold adjustment mechanism can quickly adjust to prevent the interference from being mistaken for a heartbeat signal, thereby ensuring the accuracy and continuity of ECG analysis.
因此,本实施例提供的动态阈值调整策略,可以显著提升短期心电监测的可靠性,对于那些需要在多变环境下进行心电监测的应用场合也有较强的适用性,如在运动过程中或在医疗环境外使用的可穿戴设备中。Therefore, the dynamic threshold adjustment strategy provided in this embodiment can significantly improve the reliability of short-term ECG monitoring, and is also highly applicable to applications that require ECG monitoring in changing environments, such as in wearable devices used during exercise or outside medical environments.
本实施例中,每个峰值点对应的信号水平(SIGLEV)、噪声水平(NOISELEV)、信号阈值(THRSIG)和噪声阈值(THRNOISE)会被实时更新,以便应用于下一个峰值点的QRS波检测。这种动态调整策略能够使得R波检测更好地适应短时间窗口内心电信号的快速变化。In this embodiment, the signal level (SIGLEV), noise level (NOISELEV), signal threshold (THRSIG) and noise threshold (THRNOISE) corresponding to each peak point will be updated in real time so as to be applied to the QRS wave detection of the next peak point. This dynamic adjustment strategy can make R wave detection better adapt to the rapid changes of ECG signals in a short time window.
需要注意的是,针对该心电样本片段的首个峰值点,可以基于该心电样本片段的信号开始时刻的第一预设时长内最大峰值的第一预设倍数来确定首个峰值点的信号阈值。以第一预设时长为2秒,第一预设倍数为1/3为例,首个峰值点的信号阈值可以表示为如下公式:It should be noted that, for the first peak point of the ECG sample segment, the signal threshold of the first peak point can be determined based on the first preset multiple of the maximum peak value within the first preset duration at the start of the ECG sample segment. Taking the first preset duration as 2 seconds and the first preset multiple as 1/3 as an example, the signal threshold of the first peak point is It can be expressed as the following formula:
; ;
以及,基于该心电样本片段的信号开始时刻的第二预设时长内所有峰值点的峰值平均值的第二预设倍数来确定首个峰值点的噪声阈值。以第二预设时长为2秒,第二预设倍数为1/2为例,首个峰值点的噪声阈值可以表示为如下公式:And, the noise threshold of the first peak point is determined based on the second preset multiple of the peak value average value of all peak points within the second preset time length of the signal start time of the ECG sample segment. Taking the second preset time length as 2 seconds and the second preset multiple as 1/2 as an example, the noise threshold of the first peak point is It can be expressed as the following formula:
; ;
继续参阅图5,在步骤b3)之后,还可以包括步骤b4):Continuing to refer to FIG. 5 , after step b3), step b4) may also be included:
b4)对初始R波检测后的心电样本片段进行R波漏检,确定该心电样本片段中的漏检R波。b4) performing R wave missed detection on the ECG sample segment after the initial R wave detection, and determining the missed R waves in the ECG sample segment.
本实施例中,对初始R波检测后的心电样本片段进行R波漏检,确定该心电样本片段中的漏检R波,包括:确定该心电样本片段的回溯时间段;基于回溯时间段内心电样本片段的峰值点进行R波漏检检测,得到该心电样本片段对应的漏检R波。In this embodiment, R wave missed detection is performed on the ECG sample segment after the initial R wave detection to determine the missed R wave in the ECG sample segment, including: determining the retrospective time period of the ECG sample segment; performing R wave missed detection based on the peak point of the ECG sample segment in the retrospective time period to obtain the missed R wave corresponding to the ECG sample segment.
其中,确定心电样本片段的回溯时间段,包括:将该心电样本片段的首个初始RR间期之后预设时长的时间段,或者距离前一个初始R波检测时刻至当前已检测的初始RR间期均值的预设倍数的时间段,确定为该心电样本片段的回溯时间段。Among them, determining the retrospective time period of the ECG sample segment includes: determining a time period of a preset length after the first initial RR interval of the ECG sample segment, or a time period of a preset multiple of the average value of the previous initial R wave detection moment to the currently detected initial RR interval as the retrospective time period of the ECG sample segment.
在一些实施例中,首个初始RR间期可以基于心电样本片段中首先检测到的两个初始R波之间的时间间隔来确定。举例来说,假设预设时长为2s,则心电样本片段的首个初始RR间期之后的2s内为回溯时间段。In some embodiments, the first initial RR interval can be determined based on the time interval between the first two initial R waves detected in the ECG sample segment. For example, assuming the preset duration is 2 seconds, the 2 seconds after the first initial RR interval of the ECG sample segment is the retrospective time period.
在一些实施例中,假设前一个初始R波检测时刻为Ti,当前已检测的初始RR间期均值为RRMean,预设倍数为d,则回溯时间段为[Ti:Ti+d*RRMean]。其中,d可以取值为1.5。In some embodiments, assuming that the previous initial R wave detection time is Ti , the currently detected initial RR interval mean is RR Mean , and the preset multiple is d, the retrospective time period is [ Ti : Ti +d*RR Mean ], where d can be 1.5.
其中,当前已检测的初始RR间期均值RRMean可以根据当前所有判断为初始R波的峰值点计算初始RR间期均值。比如,从第二个判断为初始R波的峰值点开始计算初始RR间期均值。若当前已检测的初始R波为两个,则初始RR间期均值为初始RR均值1=RR1;若当前已检测的初始R波为三个,则初始RR间期均值为RR均值2=(RR1+RR2)/2(即前2个初始RR间期的均值),以此类推,来获得当前已检测的初始RR间期均值RRMean。之后,便可以基于预设倍数的RRMean作为回溯时间段。Among them, the currently detected initial RR interval mean RR Mean can be calculated based on all the peak points currently judged as the initial R wave. For example, the initial RR interval mean is calculated starting from the second peak point judged as the initial R wave. If there are two initial R waves currently detected, the initial RR interval mean is the initial RR mean 1 = RR1; if there are three initial R waves currently detected, the initial RR interval mean is RR mean 2 = (RR1 + RR2) / 2 (that is, the average of the first two initial RR intervals), and so on, to obtain the currently detected initial RR interval mean RR Mean . Afterwards, the RR Mean based on the preset multiple can be used as the retrospective time period.
在确定心电样本片段的回溯时间段之后,便可以基于该回溯时间段,对心电样本片段进行R波漏检检测,得到该心电样本片段对应的漏检R波。具体的:After determining the retrospective time period of the ECG sample segment, the R wave missed detection can be performed on the ECG sample segment based on the retrospective time period to obtain the missed R wave corresponding to the ECG sample segment. Specifically:
针对回溯时间段为首个初始RR间期之后预设时长的时间段的情况,确定待回溯的当前峰值点与上一个初始R波之间的时间差;基于待回溯的当前峰值点之前的初始R波对应的RR间期的平均值,确定信号忽略期;确定时间差小于预设时间且大于信号忽略期时,基于当前峰值点与上一个初始R波的峰值大小,确定当前峰值点是否为漏检R波。For the case where the retrospective time period is a time period of a preset length after the first initial RR interval, determine the time difference between the current peak point to be traced back and the previous initial R wave; determine the signal neglect period based on the average value of the RR interval corresponding to the initial R wave before the current peak point to be traced back; when it is determined that the time difference is less than the preset time and greater than the signal neglect period, determine whether the current peak point is a missed R wave based on the peak value of the current peak point and the previous initial R wave.
其中,待回溯的当前峰值点Ti+1与上一个初始R波Ti之间的时间差为:∆T=Ti+1-Ti。Among them, the time difference between the current peak point Ti +1 to be traced back and the previous initial R wave Ti is: ∆T=Ti +1 - Ti .
在一些实施例中,基于待回溯的当前峰值点之前的初始R波对应的RR间期的平均值,确定信号忽略期,可以表示为如下公式:In some embodiments, the signal ignoring period is determined based on the average value of the RR interval corresponding to the initial R wave before the current peak point to be traced back, which can be expressed as the following formula:
; ;
式中,为信号忽略期;为信号忽略期的调整系数,用来根据当前峰值点之前的初始R波对应的RR间期均值与1000ms的偏离程度调整不应期,使其能够根据心率的快慢自适应调整。可选的,可以设置为0.2。In the formula, is the signal ignoring period; is the adjustment coefficient for the signal ignoring period, which is used to adjust the RR interval corresponding to the initial R wave before the current peak point. The deviation from 1000ms adjusts the refractory period so that it can be adjusted adaptively according to the speed of the heart rate. Can be set to 0.2.
考虑到生理不应期可能会在心率加快的时候相对更短,而在心率减慢的时候相对更长,而且一次心跳完成后,不会很快出现第二次心跳,也就是相邻两次心跳之间会存在一定时间,因此,采用上述公式确定的信号忽略期应用于R波漏检时,可以提高R波漏检的判断准确度。Considering that the physiological refractory period may be relatively shorter when the heart rate is faster and relatively longer when the heart rate is slower, and that a second heartbeat will not occur soon after a heartbeat is completed, that is, there will be a certain amount of time between two adjacent heartbeats, therefore, when the signal ignoring period determined by the above formula is applied to R wave missed detection, the accuracy of R wave missed detection can be improved.
在确定信号忽略期之后,便可以在确定时间差小于预设时间且大于信号忽略期的情况下,基于当前峰值点与上一个初始R波的峰值大小,确定当前峰值点是否为漏检R波。该过程具体可以包括如下几种情况:After determining the signal ignoring period, if it is determined that the time difference is less than the preset time and greater than the signal ignoring period, it can be determined whether the current peak point is a missed R wave based on the peak value of the current peak point and the previous initial R wave. This process can specifically include the following situations:
(1)确定时间差小于预设时间且大于信号忽略期,以及当前峰值点的峰值大于上一个初始R波的峰值的预设倍数,确定当前峰值点为漏检R波。(1) Determine that the time difference is less than a preset time and greater than a signal ignoring period, and that the peak value of the current peak point is greater than a preset multiple of the peak value of the previous initial R wave, and determine that the current peak point is a missed R wave.
即的情况下,对比当前峰值点的峰值与上一个初始R波的峰值的大小,确定当前峰值点的峰值大于上一个初始R波的峰值的预设倍数的情况下,确定当前峰值点为漏检R波;确定当前峰值点的峰值小于或等于上一个初始R波的峰值的预设倍数的情况下,确定当前峰值点为噪声。Right now In the case of a missed R wave, the peak value of the current peak point is compared with the peak value of the previous initial R wave. If it is determined that the peak value of the current peak point is greater than a preset multiple of the peak value of the previous initial R wave, the current peak point is determined to be a missed R wave; if it is determined that the peak value of the current peak point is less than or equal to a preset multiple of the peak value of the previous initial R wave, the current peak point is determined to be noise.
(2)确定时间差小于或等于信号忽略期时,确定当前峰值点对为噪音。(2) When the time difference is less than or equal to the signal ignoring period, the current peak point pair is determined to be noise.
即的情况下,确定当前峰值点对应的信号为噪音。Right now In this case, it is determined that the signal corresponding to the current peak point is noise.
(3)当时间差大于预设时间时,确定当前峰值点为漏检R波。(3) When the time difference is greater than the preset time, the current peak point is determined to be a missed R wave.
可选的,预设时间可以为360ms。即的情况下,将当前峰值点确定为漏检R波。Optionally, the preset time may be 360ms. In this case, the current peak point is determined as a missed R wave.
需要注意的是,当时间差等于预设时间时,可以确定当前峰值点为漏检R波,也可以在确定时间差小于或等于预设时间且大于信号忽略期,以及当前峰值点的峰值大于上一个初始R波的峰值的预设倍数,确定当前峰值点为漏检R波。It should be noted that when the time difference is equal to the preset time, the current peak point can be determined as a missed R wave. It can also be determined that the time difference is less than or equal to the preset time and greater than the signal ignoring period, and the peak value of the current peak point is greater than a preset multiple of the peak value of the previous initial R wave, then the current peak point can be determined as a missed R wave.
下面结合附图对回溯判断机制进行介绍:The following is an introduction to the backtracking judgment mechanism in conjunction with the attached drawings:
图6为本申请实施例提供的回溯判断机制的原理示意图。如图6所示,首先基于当前已有的RR间期序列的平均值在200ms附近调整,得到信号忽略期;之后,采用自适应的双阈值R波检测算法进行R波检测,从图6中可以看出,图中波峰上标注的x代表判断为R波(即信号)的峰值点;基于信号阈值和噪声阈值对峰值点进行R波检测后,可以看到,有一些峰值点的峰值介于信号阈值和噪声阈值之间(图中位于13秒与15秒之间的峰值点),并且该峰值点左右两侧的峰值点之间的时间间隔较大,因此,可以将该时间段作为回溯时间段,并采用回溯判断机制来判断其是否为漏检R波。Fig. 6 is a schematic diagram of the principle of the retrospective judgment mechanism provided by the embodiment of the present application. As shown in Fig. 6, firstly, the average value of the current RR interval sequence is adjusted around 200ms to obtain the signal neglect period; then, an adaptive dual-threshold R wave detection algorithm is used for R wave detection. As can be seen from Fig. 6, the x marked on the peak in the figure represents the peak point judged as the R wave (i.e., the signal); after performing R wave detection on the peak point based on the signal threshold and the noise threshold, it can be seen that there are some peak points whose peak values are between the signal threshold and the noise threshold (the peak point between 13 seconds and 15 seconds in the figure), and the time interval between the peak points on the left and right sides of the peak point is large, therefore, this time period can be used as the retrospective time period, and the retrospective judgment mechanism is used to determine whether it is a missed R wave.
回溯判断机制具体可以参考图6中右侧示出,可以看出,本实施例是针对峰值范围位于当前峰值点(PEAKi)对应的当前信号阈值和当前噪声阈值之间的峰值点进行回溯检索。回溯判断过程可以如下:The backtracking judgment mechanism can be specifically shown on the right side of FIG6 . It can be seen that this embodiment performs backtracking search for the peak point whose peak range is between the current signal threshold and the current noise threshold corresponding to the current peak point (PEAKi). The backtracking judgment process can be as follows:
在待回溯的峰值点(图中PEAKi之后的首个峰值点)与PEAKi之间的时间间隔小于或等于信号忽略期时,则将其判断为噪音。When the time interval between the peak point to be traced back (the first peak point after PEAKi in the figure) and PEAKi is less than or equal to the signal ignoring period, it is judged as noise.
在待回溯的峰值点(图中PEAKi之后的第二个峰值点)与PEAKi之间的时间间隔大于预设时间,比如360ms的情况下,则判断其为漏检R波。When the time interval between the peak point to be traced back (the second peak point after PEAKi in the figure) and PEAKi is greater than a preset time, such as 360ms, it is determined to be a missed R wave.
在待回溯的峰值点与PEAKi之间的时间间隔,大于信号忽略期但小于或等于预设时间(360ms)的情况下,可以进一步基于峰值大小来判断其是否为漏检R波。具体的,当待回溯的峰值点的峰值PEAK’大于PEAKi的峰值的一半时,则判断其为漏检的R波(R峰信号);当待回溯的峰值点的峰值PEAK’小于或等于PEAKi的峰值的一半时,则判断其为噪音。When the time interval between the peak point to be traced back and PEAKi is greater than the signal ignoring period but less than or equal to the preset time (360ms), it can be further determined whether it is a missed R wave based on the peak value. Specifically, when the peak value PEAK' of the peak point to be traced back is greater than half of the peak value of PEAKi, it is determined to be a missed R wave (R peak signal); when the peak value PEAK' of the peak point to be traced back is less than or equal to half of the peak value of PEAKi, it is determined to be noise.
在获得该心电样本片段对应的初始R波和漏检R波之后,便可以基于初始R波和漏检R波,确定该心电样本片段对应的RR间期,并基于RR间期确定其对应的多个心率变异样本特征。After obtaining the initial R wave and the missed R wave corresponding to the ECG sample segment, the RR interval corresponding to the ECG sample segment can be determined based on the initial R wave and the missed R wave, and the corresponding multiple heart rate variability sample features can be determined based on the RR interval.
其中,初始R波和漏检R波将统一称为R波。至此,完成R波检测。The initial R wave and the missed R wave are collectively referred to as the R wave. At this point, the R wave detection is completed.
继续参阅图5,在采用步骤b4)完成R波检测之后,还可以包括步骤b5)-步骤b8)确定目标心率变异特征:Continuing to refer to FIG. 5 , after completing the R wave detection in step b4), the process may further include steps b5) to b8) to determine the target heart rate variability characteristics:
b5)RR间期计算b5) RR interval calculation
具体的,可以基于相邻且连续的两个R波之间的时间差确定RR间期。Specifically, the RR interval may be determined based on the time difference between two adjacent and continuous R waves.
b6)特征计算b6) Feature calculation
具体的,是基于RR间期进行特征计算。其中,该心电样本片段对应的RR间期记为{RR1,RR2,…RRN}。多个心率变异样本特征包括8个HRV时域特征和非线性特征。8个HRV时域特征分别包括:Specifically, the feature calculation is based on the RR interval. The RR interval corresponding to the ECG sample segment is recorded as {RR 1 ,RR 2 ,…RR N }. The multiple heart rate variability sample features include 8 HRV time domain features and nonlinear features. The 8 HRV time domain features include:
(1)平均心率。(1) Average heart rate.
具体的,平均心率Mean HR可以采用如下公式来确定:;Specifically, the average heart rate Mean HR can be determined using the following formula: ;
式中,NNi为相邻正常窦主波的波峰之间的时间差。NN间期序列是去掉了异常RR间期值的RR序列(通常标准是去掉RR间期序列中,超过3~4个标准差的RR间期)因此被称为正常窦波峰之间的时间差序列。大多数情况下,NN间期序列和RR间期序列是完全相同的。对于某些心率不齐的个体可能存在差异。Where NN i is the time difference between the peaks of adjacent normal sinus main waves. The NN interval sequence is the RR sequence with abnormal RR interval values removed (usually the standard is to remove the RR intervals that exceed 3 to 4 standard deviations in the RR interval sequence). Therefore, it is called the time difference sequence between normal sinus peaks. In most cases, the NN interval sequence and the RR interval sequence are exactly the same. There may be differences for some individuals with irregular heartbeats.
(2)平均正常心跳周期。(2) Average normal heart rate.
具体的,平均正常心跳周期Mean NN可以采用如下公式来确定:Specifically, the average normal heartbeat period Mean NN can be determined using the following formula:
; ;
式中,NNi表示剔除4个标准差之外的RR间期。Where NN i represents the RR interval excluding 4 standard deviations.
(3)正常心跳间期标准差。(3) Standard deviation of normal heart beat interval.
具体的,正常心跳间期标准差SDNN可以采用如下公式来确定:Specifically, the standard deviation SDNN of normal heartbeat intervals can be determined using the following formula:
; ;
(4)相邻NN间期差值的均方根。(4) The root mean square of the difference between adjacent NN intervals.
相邻NN间期差值的均方根rMSSD可以采用如下公式来确定:The root mean square of the difference between adjacent NN intervals, rMSSD, can be determined using the following formula:
(5)相邻的NN间期之差大于50ms的心搏数(NN50)。(5) The difference between adjacent NN intervals is greater than 50 ms (NN50).
(6)NN50在NN间期总数中的占比。(6) The proportion of NN50 in the total number of NN intervals.
(7)心电样本片段内NN间期的变化范围。(7) The variation range of NN interval within the ECG sample segment.
其中,心电样本片段内NN间期的变化范围可以采用如下公式来确定:NNmax-min=NNmax-NNmin。The variation range of the NN interval within the ECG sample segment can be determined by the following formula: NNmax-min=NNmax-NNmin.
(8)心电样本片段内心率的变化范围。(8) The range of heart rate variation in the ECG sample segments.
其中,心电样本片段内心率的变化范围可以采用如下公式来确定:HRmax-min=RRmax-RRmin。The variation range of the heart rate in the ECG sample segment can be determined by the following formula: HRmax-min=RRmax-RRmin.
(9)非线性特征包括反映该心电样本片段心率变化的非线性特征的样本熵。(9) The nonlinear feature includes the sample entropy reflecting the nonlinear feature of the heart rate change of the ECG sample segment.
式中,m表示嵌入维度,可以设置为2;r为计算判断阈值的容忍率,可以设置为0.1。In the formula, m represents the embedding dimension, which can be set to 2; r is the tolerance rate for calculating the judgment threshold, which can be set to 0.1.
之后,将上述9的心率变异性特征在个体水平进行汇总,得到个体的特征矩阵。举例来说,对于受试者k,其特征矩阵Fk可以表示为:Afterwards, the above 9 heart rate variability features are summarized at the individual level to obtain the individual feature matrix. For example, for subject k, its feature matrix Fk can be expressed as:
; ;
式中,J为受试者k的所有心电样本片段。Where J is all ECG sample segments of subject k.
继续参阅图5,为了消除不同特征之间的量纲影响,在步骤b6)之后,还可以采用步骤b7)对其进行消除量纲处理:Continuing to refer to FIG. 5 , in order to eliminate the dimensional influence between different features, after step b6), step b7) may be used to eliminate the dimensional influence:
b7)在个体水平对每个受试者的特征矩阵进行消除量纲处理,从而得到原始特征集。其中,消除量纲处理可以是采用max-min算法对每个受试者的特征矩阵进行归一化处理,具体的,归一化处理可以采用如下公式实现:b7) Eliminate the dimension of the feature matrix of each subject at the individual level to obtain the original feature set. The dimension elimination process may be to normalize the feature matrix of each subject using a max-min algorithm. Specifically, the normalization process may be implemented using the following formula:
; ;
式中,表示第i个心电样本片段中第j个特征的归一化值;为第i个心电样本片段中第j个特征的原始值;为第j个特征在所有心电样本片段中的最大值;第j个特征在所有心电样本片段中的最小值。In the formula, represents the normalized value of the jth feature in the i-th ECG sample segment; is the original value of the jth feature in the i-th ECG sample segment; is the maximum value of the jth feature in all ECG sample segments; The minimum value of the jth feature in all ECG sample segments.
将所有受试者的归一化特征矩阵进行合并,便可以得到多个心电样本数据对应的心率变异特征,即原始特征集。By merging the normalized feature matrices of all subjects, the heart rate variability features corresponding to multiple ECG sample data can be obtained, that is, the original feature set.
继续参阅图4,在步骤S401之后,还可以包括步骤S402。Continuing to refer to FIG. 4 , after step S401 , step S402 may be further included.
S402、基于多个心率变异特征各自对应的警觉度贡献度,从多个心率变异特征中筛选出警觉度贡献度大于预设贡献度的目标心率变异样本特征。S402: based on the alertness contribution corresponding to each of the plurality of heart rate variability features, select a target heart rate variability sample feature whose alertness contribution is greater than a preset contribution from the plurality of heart rate variability features.
由于经过步骤S401确定的多个心率变异特征中,其各自对警觉度识别的贡献度不同。为了减少训练数据的数据量,提高训练效率,本实施例可以采用LASSO回归模型进行特征筛选,从而得到最优特征子集(即目标心率变异特征)。继续参阅图5,在步骤b7)之后,还可以包括步骤b8):Since the multiple heart rate variability features determined in step S401 have different contributions to alertness recognition, in order to reduce the amount of training data and improve training efficiency, this embodiment can use the LASSO regression model to screen features, thereby obtaining the optimal feature subset (i.e., the target heart rate variability feature). Continuing to refer to FIG. 5, after step b7), step b8 can also be included):
b8)特征筛选b8) Feature screening
可以采用LASSO回归模型确定多个心率变异特征各自对应的警觉度贡献度,并从多个心率变异特征中筛选出警觉度贡献度大于预设贡献度的目标心率变异样本特征,从而应用于后续的模型训练,不仅有助于降低模型的过拟合风险,还能够降低训练数据量,以提高模型的训练效率。The LASSO regression model can be used to determine the alertness contribution corresponding to multiple heart rate variability features, and the target heart rate variability sample features with alertness contribution greater than the preset contribution can be screened out from the multiple heart rate variability features, which can then be applied to subsequent model training. This not only helps reduce the risk of overfitting of the model, but also reduces the amount of training data to improve the training efficiency of the model.
具体的,可以将每个心电样本片段对应的多个心率变异特征和其对应的警觉度类别输入LASSO模型中,并通过最小化如下目标函数来进行特征筛选:Specifically, multiple heart rate variability features corresponding to each ECG sample segment and their corresponding alertness categories can be input into the LASSO model, and feature screening can be performed by minimizing the following objective function:
; ;
式中,N为所有受试者在不同精神状态下的心电样本片段的总数,M是所有受试者在不同精神状态下的心电样本片段的心率变异特征的总数;yi是第i个心电样本片段的警觉度类别;xij是第i个心电样本片段的第j个心率变异特征的特征值;βj是第j个心率变异特征的系数;λ是控制系数压缩程度的正则化参数。Where N is the total number of ECG sample segments of all subjects in different mental states, M is the total number of heart rate variability features of ECG sample segments of all subjects in different mental states; yi is the alertness category of the ith ECG sample segment; xij is the eigenvalue of the jth heart rate variability feature of the ith ECG sample segment; βj is the coefficient of the jth heart rate variability feature; λ is the regularization parameter that controls the degree of coefficient compression.
在特征筛选阶段,可以通过20折交叉验证和1个标准误差(1SE)准则确定正则化参数λ值,旨在平衡模型的复杂度与预测性能,在确保预测误差较小的前提下防止过拟合。In the feature screening stage, the regularization parameter λ value can be determined by 20-fold cross validation and 1 standard error (1SE) criterion, aiming to balance the complexity and prediction performance of the model and prevent overfitting while ensuring a small prediction error.
在确定了最优的λ之后,LASSO回归模型将自动执行特征筛选过程。其将对警觉度预测的贡献度小于预设贡献度的心率变异特征的系数缩减到0。剩余的非零系数的心率变异特征即为对预测警觉度的贡献度大于预设贡献度的目标心率变异特征。After determining the optimal λ, the LASSO regression model will automatically perform the feature screening process. It will reduce the coefficients of the heart rate variability features whose contribution to the prediction of alertness is less than the preset contribution to 0. The remaining heart rate variability features with non-zero coefficients are the target heart rate variability features whose contribution to the prediction of alertness is greater than the preset contribution.
本实施例中,目标心率变异特征可以包括心电样本片段的平均心率(Mean HR)、平均正常心跳间期(Mean NN)、正常心跳间期标准差(SDNN)、相邻NN间期差值的均方根(RMSSD)、片段内NN间期的变化范围(NNmax-min)和心率的变化范围(HRmax-min),及反映短期心率变异性的非线性域样本熵(SampEn)。该7个特征作为最终用于建模的目标心率变异特征,其在不同精神状态下呈现的特征模式如图7所示。图7中示出的目标心率变异特征的雷达图中,雷达图中的每个位点是各特征按不同警觉类别标签(3类)在各类别下的平均值。In this embodiment, the target heart rate variability features may include the mean heart rate (Mean HR) of the ECG sample segment, the mean normal heart beat interval (Mean NN), the standard deviation of the normal heart beat interval (SDNN), the root mean square difference of adjacent NN intervals (RMSSD), the range of variation of the NN interval within the segment (NNmax-min) and the range of variation of the heart rate (HRmax-min), and the nonlinear domain sample entropy (SampEn) reflecting the short-term heart rate variability. The 7 features are used as the target heart rate variability features for modeling, and their feature patterns presented in different mental states are shown in Figure 7. In the radar chart of the target heart rate variability features shown in Figure 7, each site in the radar chart is the average value of each feature under each category according to different alert category labels (3 categories).
继续参阅图4,在步骤S402之后,本实施例的警觉度评估模型的构建方法还可以包括步骤S403。Continuing to refer to FIG. 4 , after step S402 , the method for constructing an alertness assessment model of this embodiment may further include step S403 .
S403、采用预设警觉度评估网络对目标心率变异特征进行警觉度评估,得到心电样本片段对应的预测警觉度类别。S403: Use a preset alertness assessment network to perform alertness assessment on the target heart rate variability feature to obtain a predicted alertness category corresponding to the ECG sample segment.
具体的,可以将目标心率变异特征输入至预设警觉度评估网络中,以使预设警觉度评估网络基于目标心率变异特征进行警觉度预测,输出该心电样本片段对应的预测警觉度类别。Specifically, the target heart rate variability feature can be input into a preset alertness assessment network, so that the preset alertness assessment network predicts alertness based on the target heart rate variability feature and outputs the predicted alertness category corresponding to the ECG sample segment.
可选的,预设警觉度评估网络可以是基于高斯核的支持向量机分类器(SVC)、K最近邻(KNN)、随机森林(RF)和AdaBoost(AB)。本实施例中,可以采用SVC,其在处理非线性问题时引入了核函数,核函数能够将目标心率变异特征从原始特征空间映射到高维度的特征空间,使得其在高维度特征空间中找到一个线性可分的超平面,即使对于小样本集的复杂数据模式也有较强的评估能力。SVC是众多机器学习算法中具有高预测精度和高稳健性的算法,具有很好地泛化能力,能够克服过渡拟合和维度灾难的问题,可以进一步提高警觉度评估的精准度。Optionally, the preset alertness assessment network can be a Gaussian kernel-based support vector machine classifier (SVC), K nearest neighbor (KNN), random forest (RF) and AdaBoost (AB). In this embodiment, SVC can be used, which introduces a kernel function when dealing with nonlinear problems. The kernel function can map the target heart rate variability feature from the original feature space to a high-dimensional feature space, so that it can find a linearly separable hyperplane in the high-dimensional feature space, and has a strong assessment capability even for complex data patterns of small sample sets. SVC is an algorithm with high prediction accuracy and high robustness among many machine learning algorithms. It has good generalization ability, can overcome the problems of overfitting and dimensionality disaster, and can further improve the accuracy of alertness assessment.
继续参阅图4,在步骤S403之后,本实施例的警觉度评估模型的构建方法还可以包括步骤S404。Continuing to refer to FIG. 4 , after step S403 , the method for constructing an alertness assessment model of this embodiment may further include step S404 .
S404、基于心电样本片段对应的预测警觉度类别与反应时样本片段对应的真实警觉度类别之间的差异,对预设警觉度评估网络进行收敛,得到警觉度评估模型。S404: Based on the difference between the predicted alertness category corresponding to the ECG sample segment and the actual alertness category corresponding to the reaction time sample segment, converge the preset alertness assessment network to obtain an alertness assessment model.
其中,步骤S404可以通过在预先设置的模型参数搜索范围内进行遍历,并在每一种遍历结果对应的模型参数下,对心电样本片段进行警觉度预测,得到预测警觉度类别,进而基于心电样本片段对应的预测警觉度类别与反应时样本片段对应的真实警觉度类别之间的差异,确定预测准确度,以及基于每种遍历结果对应的模型参数下的预测准确度,确定最优模型参数,从而实现对预设警觉度评估网络进行收敛,得到警觉度评估模型。Among them, step S404 can be achieved by traversing within a preset model parameter search range, and predicting the alertness of the ECG sample segment under the model parameters corresponding to each traversal result to obtain a predicted alertness category, and then determining the prediction accuracy based on the difference between the predicted alertness category corresponding to the ECG sample segment and the actual alertness category corresponding to the reaction time sample segment, and determining the optimal model parameters based on the prediction accuracy under the model parameters corresponding to each traversal result, thereby achieving convergence of the preset alertness assessment network and obtaining the alertness assessment model.
具体的,步骤S404可以包括如下步骤c1)-步骤c3):Specifically, step S404 may include the following steps c1) to c3):
c1)确定预设警觉度评估网络的网络参数的搜索范围。c1) Determine a search range for network parameters of a preset alertness assessment network.
其中,网络参数包括惩罚参数c和高斯核参数g。惩罚参数c用于控制训练过程中的警觉度分类误差。高斯核参数g用于控制心电样本数据的特征空间分布情况。The network parameters include the penalty parameter c and the Gaussian kernel parameter g. The penalty parameter c is used to control the alertness classification error during the training process. The Gaussian kernel parameter g is used to control the feature space distribution of the ECG sample data.
可选的,惩罚参数的搜索范围为log2c[−8,8]。高斯核参数g的搜索范围为log2g[−8,8]。Optionally, the search range for the penalty parameter is log 2 c[−8,8]. The search range for the Gaussian kernel parameter g is log 2 g[−8,8].
c2)采用基于k折交叉验证的网格搜索法对网络参数的搜索范围进行搜索,得到目标网络参数。c2) A grid search method based on k-fold cross validation is used to search the search range of network parameters to obtain the target network parameters.
以五折交叉验证的网格搜索法为例,这里将上述得到的多个心电样本数据的目标心率变异特征作为样本数据集。之后,将样本数据集划分为五份,每一次取其中的四份作为训练样本集,并将剩余的一份作为测试样本集,可以得到五组样本数据集。与此同时,还可以将上述两种网络参数的搜索范围进行组合,假设惩罚参数c有U种取值可能,高斯核参数g有V种取值可能,则组合参数可以有L=U*V种组合。则针对每一次训练,是基于L种组合参数中每一种组合参数,对每组样本数据集中四份训练样本集进行训练,并采用该组样本数据集中的测试样本集对训练效果进行预测,得到五组预测准确度;基于五组预测准确度的平均值,可以得到该组组合参数对应的平均准确度。Taking the grid search method of five-fold cross-validation as an example, the target heart rate variability features of the multiple ECG sample data obtained above are used as sample data sets. After that, the sample data set is divided into five parts, four of which are taken as training sample sets each time, and the remaining one is taken as the test sample set, so that five groups of sample data sets can be obtained. At the same time, the search ranges of the above two network parameters can also be combined. Assuming that the penalty parameter c has U possible values and the Gaussian kernel parameter g has V possible values, the combination parameters can have L=U*V combinations. For each training, four training sample sets in each group of sample data sets are trained based on each combination parameter of the L combination parameters, and the test sample set in the group of sample data sets is used to predict the training effect, and five groups of prediction accuracy are obtained; based on the average value of the five groups of prediction accuracy, the average accuracy corresponding to the group of combination parameters can be obtained.
经过上述过程,针对L个组合参数,可以得到L个平均准确度。之后,便可以从L个平均准确度中选取最大平均准确度对应的网络参数组合作为最终的目标网络参数。After the above process, L average accuracies can be obtained for L combination parameters. Then, the network parameter combination corresponding to the maximum average accuracy can be selected from the L average accuracies as the final target network parameters.
c3)基于目标网络参数和多个心电样本数据的目标心率变异特征构建警觉度评估模型,得到该模型的分类决策函数f(x)。c3) constructing an alertness assessment model based on target network parameters and target heart rate variability characteristics of multiple ECG sample data, and obtaining a classification decision function f(x) of the model.
具体的,可以基于目标网络参数构建警觉度评估模型,并将多个心电样本数据的目标心率变异特征输入至构建好的警觉度评估模型中进行警觉度分类,从而得到模型对于多个心电样本数据的目标心率变异特征的分类决策函数f(x)。Specifically, an alertness assessment model can be constructed based on the target network parameters, and the target heart rate variability characteristics of multiple ECG sample data can be input into the constructed alertness assessment model for alertness classification, thereby obtaining the model's classification decision function f(x) for the target heart rate variability characteristics of multiple ECG sample data.
在通过上述的警觉度评估模型构建方法训练得到的警觉度评估模型的基础上,本申请另一实施例还提出一种警觉度评估方法,参见图8所示,该方法包括:Based on the alertness assessment model trained by the above alertness assessment model construction method, another embodiment of the present application further proposes an alertness assessment method, as shown in FIG8 , the method includes:
S801、获取目标用户的目标心电数据。S801. Obtain target ECG data of a target user.
本实施例中,目标用户是指待进行警觉度评估的用户。In this embodiment, the target user refers to a user whose alertness is to be evaluated.
目标用户的目标心电数据可以通过便携式心电监测设备采集得到。便携式心电监测设备包括腕带式心电传感器、可穿戴式心电监测背心等等。The target ECG data of the target user can be collected through a portable ECG monitoring device, which includes a wristband ECG sensor, a wearable ECG monitoring vest, and the like.
S802、基于预设的滑动窗口对目标心电数据进行片段数据提取,得到目标心电数据对应的至少一个目标心电片段。S802: Extract segment data from the target ECG data based on a preset sliding window to obtain at least one target ECG segment corresponding to the target ECG data.
关于采用预设的滑动窗口对心电数据进行片段数据提取的具体实现过程,可以参见上述警觉度模型的构建方法的实施例中关于采用预设的滑动窗口对心电样本数据进行片段数据提取的过程,此处不再赘述。Regarding the specific implementation process of extracting segment data from ECG data using a preset sliding window, please refer to the process of extracting segment data from ECG sample data using a preset sliding window in the embodiment of the method for constructing the alertness model mentioned above, which will not be repeated here.
S803、采用警觉度评估模型基于至少一个目标心电片段进行警觉度评估,得到警觉度评估结果。S803: Use an alertness assessment model to perform alertness assessment based on at least one target ECG segment to obtain an alertness assessment result.
其中,步骤S803可以包括:针对至少一个目标心电片段中每个目标心电片段,确定该目标心电片段对应的目标心率变异特征,目标心率变异特征对警觉度评估的贡献度大于预设贡献度;将至少一个目标心电片段各自对应的目标心率变异特征输入至警觉度评估模型中,得到警觉度指标值;确定警觉度指标值小于预设警觉度阈值的情况下,确定目标用户的警觉度评估结果为警觉类别;确定警觉度指标值大于预设警觉度阈值的情况下,确定目标用户的警觉度评估结果为困倦类别。Among them, step S803 may include: for each target ECG segment in at least one target ECG segment, determining the target heart rate variability feature corresponding to the target ECG segment, and the contribution of the target heart rate variability feature to the alertness assessment is greater than a preset contribution; inputting the target heart rate variability feature corresponding to the at least one target ECG segment into the alertness assessment model to obtain an alertness index value; when it is determined that the alertness index value is less than a preset alertness threshold, determining that the alertness assessment result of the target user is an alertness category; when it is determined that the alertness index value is greater than the preset alertness threshold, determining that the alertness assessment result of the target user is a sleepiness category.
这里,目标心电片段对应的目标心率变异特征包括:片段平均心率(Mean HR)、平均正常心跳间期(Mean NN)、正常心跳间期标准差(SDNN)、相邻NN间期差值的均方根(RMSSD)、片段内NN间期的变化范围(NNmax-min)和心率的变化范围(HRmax-min),以及反映短期心率变异性的非线性域样本熵(SampEn)。Here, the target heart rate variability features corresponding to the target ECG segment include: segment mean heart rate (Mean HR), mean normal heart beat interval (Mean NN), standard deviation of normal heart beat interval (SDNN), root mean square difference between adjacent NN intervals (RMSSD), variation range of NN intervals within the segment (NNmax-min) and variation range of heart rate (HRmax-min), as well as nonlinear domain sample entropy (SampEn) reflecting short-term heart rate variability.
由于在模型构建过程中已经确定了对警觉度评估贡献度较大的特征的类型,因此,这里可以不需要再重复进行特征筛选,可以直接确定目标心电片段的目标心率变异特征。Since the types of features that contribute most to alertness assessment have been determined during the model building process, there is no need to repeat feature screening here, and the target heart rate variability features of the target ECG segment can be directly determined.
在获得至少一个目标心电片段的目标心率变异特征之后,可以直接将至少一个目标心电片段的目标心率变异特征输入至警觉度评估模型中,以得到警觉度评估模型输出的至少一个目标心电片段各自对应的警觉度指标值D。并基于至少一个目标心电片段各自对应的警觉度指标值D与预设警觉度阈值的比较,来确定至少一个目标心电片段各自对应的片段警觉度评估结果。比如,针对至少一个目标心电片段中每个目标心电片段,将该目标心电片段的警觉度指标值D与预设警觉度阈值进行比较,确定该目标心电片段的警觉度指标值D大于预设警觉度阈值的情况下,得到该目标心电片段的警觉度评估结果为困倦类别;以及确定该目标心电片段的警觉度指标值D小于预设警觉度阈值的情况下,得到该目标心电片段的警觉度评估结果为警觉类别。After obtaining the target heart rate variability feature of at least one target ECG segment, the target heart rate variability feature of at least one target ECG segment can be directly input into the alertness assessment model to obtain the alertness index value D corresponding to each of the at least one target ECG segment output by the alertness assessment model. And based on the comparison between the alertness index value D corresponding to each of the at least one target ECG segment and the preset alertness threshold, the segment alertness assessment result corresponding to each of the at least one target ECG segment is determined. For example, for each target ECG segment in the at least one target ECG segment, the alertness index value D of the target ECG segment is compared with the preset alertness threshold, and when it is determined that the alertness index value D of the target ECG segment is greater than the preset alertness threshold, the alertness assessment result of the target ECG segment is obtained as the sleepiness category; and when it is determined that the alertness index value D of the target ECG segment is less than the preset alertness threshold, the alertness assessment result of the target ECG segment is obtained as the alertness category.
本实施例中,警觉度评估结果包括每间隔预设时长输出的针对每个目标心电片段的片段警觉度评估结果,预设时长为滑动窗口的预设步长。也就是说,步骤S802中每获得一个目标心电片段之后,便可以对该目标心电片段确定目标心率变异特征,进而将该目标心率变异特征输入至警觉度评估模型中,得到该目标心电片段对应的警觉度指标值,并基于该警觉度指标值确定该目标心电片段对应的警觉度评估结果。In this embodiment, the alertness evaluation result includes the segment alertness evaluation result for each target ECG segment output at each preset time interval, and the preset time interval is the preset step length of the sliding window. That is to say, after each target ECG segment is obtained in step S802, the target heart rate variability feature can be determined for the target ECG segment, and then the target heart rate variability feature can be input into the alertness evaluation model to obtain the alertness index value corresponding to the target ECG segment, and the alertness evaluation result corresponding to the target ECG segment is determined based on the alertness index value.
仍然以前述介绍的滑动窗口的窗口长度(30s)和滑动步长(10s)为例,采用本实施例的警觉度评估模型,可以在经过30秒输出第一次警觉度评估结果之后,每间隔10秒输出一次警觉度评估结果。Still taking the window length (30s) and sliding step size (10s) of the sliding window introduced above as an example, the alertness assessment model of this embodiment can output an alertness assessment result every 10 seconds after the first alertness assessment result is output after 30 seconds.
警觉度评估结果的输出方式可以是文字显示、语音等方式。其中,可以采用持续输出每个目标心电片段的警觉度评估结果的方式,也可以采用每间隔一段时间输出所收集的多个目标心电片段的警觉度评估结果的方式。仍然以前述介绍的滑动窗口的窗口长度(30s)和滑动步长(10s)为例,采用本实施例的警觉度评估模型,可以在经过30秒输出第一次警觉度评估结果之后,每间隔10秒输出一次警觉度评估结果。也可以是在经过30秒输出第一次警觉度评估结果之后,收集多个10秒的警觉度评估结果之后再输出,本实施例对此不做限定。The alertness assessment result can be output in the form of text display, voice, etc. Among them, the alertness assessment result of each target ECG segment can be continuously output, or the alertness assessment results of multiple target ECG segments collected can be output at intervals. Still taking the window length (30s) and sliding step length (10s) of the sliding window introduced above as an example, the alertness assessment model of this embodiment can output the alertness assessment result every 10 seconds after the first alertness assessment result is output after 30 seconds. It can also be output after collecting multiple 10-second alertness assessment results after the first alertness assessment result is output after 30 seconds, and this embodiment does not limit this.
可选的,在输出警觉度评估结果为困倦的情况下,还可以输出报警信息。其中,报警信息的输出方式可以包括显示、发送或记录报警提示等。Optionally, when the alertness assessment result is output as drowsiness, an alarm message may also be output, wherein the outputting method of the alarm message may include displaying, sending or recording an alarm prompt.
综上,本申请提供的警觉度评估模型的构建方法和警觉度评估方法的有益效果如下:In summary, the beneficial effects of the method for constructing the alertness assessment model and the alertness assessment method provided by the present application are as follows:
(1)本申请通过滑动窗口技术提取适合短程分析的心电样本片段,有效提高了警觉度评估的精准度和预测时效性,这使得本申请可以依靠简便的心电传感装置就能连续监测并及时反馈警觉性高低,可以广泛应用于长途驾驶、空中交通管制、课堂教学等现实场景中,为提升绩效和公共安全提供强有力的技术支持。(1) This application uses sliding window technology to extract ECG sample segments suitable for short-term analysis, which effectively improves the accuracy of alertness assessment and the timeliness of prediction. This allows this application to rely on a simple ECG sensor device to continuously monitor and provide timely feedback on the level of alertness. It can be widely used in real-life scenarios such as long-distance driving, air traffic control, and classroom teaching, providing strong technical support for improving performance and public safety.
(2)本申请通过滑窗技术采集受试者在不同睡眠条件下完成持续性注意测试的行为数据,并依据个体的实际表现水平(反应时分布)来界定分类准则,形成具有状态代表性的建模样本,据此构建的警觉度评估模型不仅能精准捕捉客观警觉度的短期波动,还能有效兼容不同表现水平的个体,确保评估结果与个体真实的警觉-困倦状态客观警觉度高度贴合。从而提升警觉度评估系统的精准度和实用性。(2) This application uses sliding window technology to collect behavioral data of subjects completing sustained attention tests under different sleep conditions, and defines classification criteria based on the individual's actual performance level (reaction time distribution) to form a modeling sample with state representativeness. The alertness assessment model constructed based on this can not only accurately capture the short-term fluctuations of objective alertness, but also effectively accommodate individuals with different performance levels, ensuring that the assessment results are highly consistent with the individual's actual objective alertness in the alert-sleepy state. This improves the accuracy and practicality of the alertness assessment system.
其中,需要说明的是,本方案针对警觉度评估准确度较低的问题,结合滑动窗口技术提取适合短程分析的心电片段进行警觉度评估,提出了一种基于滑动窗口心电分析的实时警觉度评估框架。该框架主要可以包括六个部分:It should be noted that this solution aims to solve the problem of low accuracy of alertness assessment by combining sliding window technology to extract ECG segments suitable for short-term analysis for alertness assessment, and proposes a real-time alertness assessment framework based on sliding window ECG analysis. The framework mainly includes six parts:
如图9所示,该框架可以包括如下步骤d1)-d4):As shown in FIG. 9 , the framework may include the following steps d1)-d4):
d1)数据采集。d1) Data collection.
本实施例通过采集多个受试者在不同精神状态下的心电样本数据和反应时样本数据。其中,不同精神状态可以包括正常睡眠状态和睡眠不足状态。This embodiment collects ECG sample data and reaction time sample data of multiple subjects in different mental states, wherein the different mental states may include a normal sleep state and a sleep-deprived state.
d2)基于滑动窗口技术提取片段数据。d2) Extracting fragment data based on sliding window technology.
本实施例中可以采用窗口长度为30秒,步长为10秒的滑动窗口分别对不同精神状态下的心电样本数据和反应时样本数据进行片段数据提取,从而得到不同精神状态下的心电样本数据对应的心电样本片段和反应时样本数据各自对应的反应时样本片段。In this embodiment, a sliding window with a window length of 30 seconds and a step length of 10 seconds can be used to extract fragment data from the ECG sample data and reaction time sample data under different mental states, thereby obtaining ECG sample fragments corresponding to the ECG sample data under different mental states and reaction time sample fragments corresponding to the reaction time sample data.
d3)计算客观警觉度。d3) Calculate objective alertness.
本实施例中,首先针对每个反应时样本片段计算该反应时样本片段的平均反应时(即前述的目标反应时),并对每个受试者在不同精神状态下的反应时样本片段进行汇总,得到个体水平汇总后的反应时分布。之后,对每个受试者的反应时样本片段,将平均反应时小于第一预设反应时的反应时样本片段的警觉度类别设置为警觉类别,以及将平均反应时大于第二预设反应时的反应时样本片段的警觉度类别设置为困倦类别。其中,第二预设反应时大于第一预设反应时。In this embodiment, the average reaction time (i.e., the aforementioned target reaction time) of each reaction time sample segment is first calculated, and the reaction time sample segments of each subject in different mental states are summarized to obtain the reaction time distribution after individual level summary. Afterwards, for each subject's reaction time sample segment, the alertness category of the reaction time sample segment with an average reaction time less than the first preset reaction time is set as the alertness category, and the alertness category of the reaction time sample segment with an average reaction time greater than the second preset reaction time is set as the sleepiness category. The second preset reaction time is greater than the first preset reaction time.
举例来说,可以将每个受试者在不同精神状态下的反应时样本片段按照平均反应时由小到大的顺序排序,并将排序结果中靠前的40%的反应时样本片段对应的警觉度类别设置为警觉类别,以及将排序结果中靠后的40%的反应时样本片段对应的警觉度类别设置为困倦类别。For example, the reaction time sample segments of each subject in different mental states can be sorted in ascending order according to the average reaction time, and the alertness category corresponding to the top 40% of the reaction time sample segments in the sorting results is set to the alertness category, and the alertness category corresponding to the bottom 40% of the reaction time sample segments in the sorting results is set to the sleepiness category.
至此,所有受试者的反应时样本数据各自对应的反应时样本片段的警觉度类别可以作为标签集。At this point, the alertness categories of the reaction time sample segments corresponding to the reaction time sample data of all subjects can be used as a label set.
d4)特征提取和筛选。d4) Feature extraction and screening.
其中,特征提取和筛选包括:R波峰值探测、计算HRV时域、非线性域特征、对特征值进行归一化处理和筛选最佳特征。Among them, feature extraction and screening include: R wave peak detection, calculation of HRV time domain, nonlinear domain features, normalization of feature values and screening of optimal features.
关于特征提取和筛选过程中所包括的每一个子步骤的具体实现过程,可以参见前述实施例的介绍,此处不再赘述。通过步骤d4)可以获得特征集。For the specific implementation process of each sub-step included in the feature extraction and screening process, please refer to the introduction of the above embodiment, which will not be repeated here. The feature set can be obtained through step d4).
d5)建立警觉度评估模型。d5) Establish a vigilance assessment model.
本实施例中是基于k折交叉验证的网格搜索法调参,从而得到最优参数组合,并基于最优参数组合构建警觉度评估模型,之后基于特征集和最优参数组合获得警觉度评估模型的分类决策函数。In this embodiment, the parameters are adjusted by a grid search method based on k-fold cross-validation to obtain the optimal parameter combination, and an alertness assessment model is constructed based on the optimal parameter combination. Then, the classification decision function of the alertness assessment model is obtained based on the feature set and the optimal parameter combination.
d6)基于警觉度评估模型进行警觉度评估。d6) Conduct alertness assessment based on the alertness assessment model.
当接收到新用户的目标心电数据时,便可以基于滑动窗口技术对新用户的目标心电数据进行片段数据提取,之后,基于提取的目标心电片段进行特征提取,得到目标心电变异特征,以及基于目标心电变异特征和构建好的警觉度评估模型进行警觉度评估,从而新用户的警觉度评估结果,即警觉或困倦。When the target ECG data of a new user is received, segment data extraction can be performed on the target ECG data of the new user based on the sliding window technology. After that, feature extraction can be performed based on the extracted target ECG segments to obtain target ECG variability features, and alertness assessment can be performed based on the target ECG variability features and the constructed alertness assessment model, thereby obtaining the alertness assessment result of the new user, i.e., alertness or sleepiness.
综上,本实施例提出了一种基于滑动窗口心电分析的实时警觉度评估方案,利用滑动窗口分割技术动态提取警觉性测试任务期间的心电样本数据和反应时样本数据,并基于提取的心电样本片段进行R波检测,以及计算每个滑动窗口内的RR间期序列,从中提取心率变异性的时域和非线性域特征;利用个体水平的反应时分布评估客观警觉度,从而得到高度贴合个体真实警觉水平的客观警觉度分类标签;并通过LASSO回归算法筛选与客观警觉度分类标签相关度较大的目标心率变异特征,作为建模的特征集;使用支持向量机分类算法构建警觉度评估模型,并对新用户的目标心电数据应用相同的滑动窗口进行滑窗处理和特征提取技术,输入构建好的警觉度评估模型中,以实现每10秒一次的警觉度评估,从而克服传统心电监测技术存在的警觉度评估实时性不足和准确度较低的问题,进而提高了警觉度评估的精准度和时效性,对短期发生的困倦状态检出率(敏感度)高达92.8%。In summary, this embodiment proposes a real-time alertness assessment scheme based on sliding window ECG analysis, which uses sliding window segmentation technology to dynamically extract ECG sample data and reaction time sample data during the alertness test task, and performs R wave detection based on the extracted ECG sample fragments, and calculates the RR interval sequence in each sliding window, from which the time domain and nonlinear domain features of heart rate variability are extracted; the objective alertness is evaluated by using the reaction time distribution at the individual level, so as to obtain an objective alertness classification label that is highly consistent with the individual's actual alertness level; and the LASSO regression algorithm is used to screen the objective alertness. The target heart rate variability features with a large correlation with the classification label are used as the feature set for modeling; the support vector machine classification algorithm is used to build an alertness assessment model, and the same sliding window processing and feature extraction technology is applied to the target ECG data of new users, which is input into the constructed alertness assessment model to achieve alertness assessment every 10 seconds, thereby overcoming the problems of insufficient real-time and low accuracy of alertness assessment in traditional ECG monitoring technology, thereby improving the accuracy and timeliness of alertness assessment, and the detection rate (sensitivity) of short-term drowsiness is as high as 92.8%.
与上述的警觉度评估模型的构建方法相对应的,本申请实施例还提出一种警觉度评估模型的构建装置,如图10所示,该装置包括:获取单元1001,用于获取警觉性样本数据,警觉性样本数据包括基于预设的滑动窗口分别对心电样本数据和反应时样本数据进行片段数据提取得到的心电样本片段和反应时样本片段,反应时样本片段包括反映警觉度的反应时长;警觉度类别确定单元1002,用于基于反应时样本片段对应的反应时长,确定反应时样本片段对应的真实警觉度类别;警觉度训练单元1003,用于采用预设警觉度评估网络对心电样本片段进行警觉度评估,得到心电样本片段对应的预测警觉度类别;以及基于心电样本片段对应的预测警觉度类别与反应时样本片段对应的真实警觉度类别之间的差异,对预设警觉度评估网络进行收敛,得到警觉度评估模型。Corresponding to the above-mentioned method for constructing an alertness assessment model, an embodiment of the present application also proposes a device for constructing an alertness assessment model, as shown in Figure 10, the device includes: an acquisition unit 1001, used to acquire alertness sample data, the alertness sample data includes ECG sample segments and reaction time sample segments obtained by extracting segment data from ECG sample data and reaction time sample data based on a preset sliding window, and the reaction time sample segment includes a reaction time reflecting alertness; an alertness category determination unit 1002, used to determine the real alertness category corresponding to the reaction time sample segment based on the reaction time corresponding to the reaction time sample segment; an alertness training unit 1003, used to use a preset alertness assessment network to perform alertness assessment on the ECG sample segment to obtain a predicted alertness category corresponding to the ECG sample segment; and based on the difference between the predicted alertness category corresponding to the ECG sample segment and the real alertness category corresponding to the reaction time sample segment, converge the preset alertness assessment network to obtain the alertness assessment model.
在一些实施例中,心电样本数据为不同精神状态下采集得到的,表征心率变化的样本数据;反应时样本数据为不同精神状态下采集得到的,表征警觉性反应时长的样本数据。In some embodiments, the ECG sample data is sample data collected under different mental states and represents changes in heart rate; the reaction time sample data is sample data collected under different mental states and represents the duration of alertness reaction.
在一些实施例中,反应时样本数据包括多个,每个反应时样本数据包括多个反应时样本片段;每个反应时样本片段中包括多个试次的反应时长,警觉度类别确定单元1002基于反应时样本片段对应的反应时长,确定反应时样本片段对应的真实警觉度类别,包括对每个反应时样本数据:针对多个反应时样本片段中每个反应时样本片段,将该反应时样本片段内的各个试次的反应时长的均值,确定为该反应时样本片段对应的目标反应时;将目标反应时小于第一预设反应时的反应时样本片段对应的真实警觉度类别设置为警觉类别,并将目标反应时大于第二预设反应时的反应时样本片段对应的真实警觉度类别设置为困倦类别。In some embodiments, the reaction time sample data includes multiple, each reaction time sample data includes multiple reaction time sample segments; each reaction time sample segment includes multiple reaction time lengths of trials, and the alertness category determination unit 1002 determines the real alertness category corresponding to the reaction time sample segment based on the reaction time lengths corresponding to the reaction time sample segment, including for each reaction time sample data: for each reaction time sample segment in the multiple reaction time sample segments, determining the average of the reaction time lengths of each trial in the reaction time sample segment as the target reaction time corresponding to the reaction time sample segment; setting the real alertness category corresponding to the reaction time sample segment whose target reaction time is less than the first preset reaction time as the alertness category, and setting the real alertness category corresponding to the reaction time sample segment whose target reaction time is greater than the second preset reaction time as the sleepiness category.
在一些实施例中,警觉度训练单元1003采用预设警觉度评估网络对心电样本片段进行警觉度评估,得到心电样本片段对应的预测警觉度类别,包括:确定心电样本片段对应的多个心率变异样本特征及其对应的警觉度贡献度;基于多个心率变异特征对应的警觉度贡献度,从多个心率变异特征中筛选出警觉度贡献度大于预设贡献度的目标心率变异样本特征;采用预设警觉度评估网络对目标心率变异特征进行警觉度评估,得到心电样本片段对应的预测警觉度类别。In some embodiments, the alertness training unit 1003 uses a preset alertness assessment network to perform alertness assessment on an ECG sample segment to obtain a predicted alertness category corresponding to the ECG sample segment, including: determining multiple heart rate variability sample features corresponding to the ECG sample segment and their corresponding alertness contributions; based on the alertness contributions corresponding to the multiple heart rate variability features, screening out a target heart rate variability sample feature whose alertness contribution is greater than a preset contribution from the multiple heart rate variability features; using a preset alertness assessment network to perform alertness assessment on the target heart rate variability feature to obtain a predicted alertness category corresponding to the ECG sample segment.
在一些实施例中,警觉度训练单元1003确定心电样本片段对应的多个心率变异样本特征,包括:针对心电样本片段进行R波检测,得到该心电样本片段对应的初始R波及初始RR间期序列;确定该心电样本片段的回溯时间段,并对回溯时间段内的心电样本片段进行R波漏检检测,得到该心电样本片段对应的漏检R波,回溯时间段为距离首个初始RR间期为预设时长的时间段,或者距离前一个R波检测时刻至当前已检测的初始RR间期均值的预设倍数的时间段;基于该心电样本片段对应的初始R波和漏检R波,确定各个心电样本片段各自对应的心率变异样本特征。In some embodiments, the alertness training unit 1003 determines multiple heart rate variability sample features corresponding to the ECG sample segment, including: performing R wave detection on the ECG sample segment to obtain the initial R wave and initial RR interval sequence corresponding to the ECG sample segment; determining the retrospective time period of the ECG sample segment, and performing R wave missed detection detection on the ECG sample segment within the retrospective time period to obtain the missed R wave corresponding to the ECG sample segment, the retrospective time period being a time period with a preset time length from the first initial RR interval, or a time period with a preset multiple of the average value of the current detected initial RR interval from the previous R wave detection moment; based on the initial R wave and missed R wave corresponding to the ECG sample segment, determining the heart rate variability sample features corresponding to each ECG sample segment.
在一些实施例中,回溯时间段内包括多个峰值点,警觉度训练单元1003确定该心电样本片段的回溯时间段,并对回溯时间段内的心电样本片段进行R波漏检检测,得到该心电样本片段对应的漏检R波,包括:针对回溯时间段位于距离首个初始RR间期为预设时长的时间段之后的情况,确定待回溯的当前峰值点与上一个初始R波之间的时间差;基于待回溯的当前峰值点之前的初始R波对应的RR间期的平均值,确定信号忽略期;确定时间差小于预设时间且大于信号忽略期,且当前峰值点的峰值大于上一个初始R波的峰值的预设倍数,确定当前峰值点为漏检R波;确定时间差小于或等于信号忽略期时,确定当前峰值点对应的信号为噪音;确定时间差大于预设时间时,确定当前峰值点对应的信号为漏检R波。In some embodiments, the backtracking time period includes multiple peak points, and the alertness training unit 1003 determines the backtracking time period of the ECG sample segment, and performs R wave missed detection detection on the ECG sample segment within the backtracking time period to obtain the missed R wave corresponding to the ECG sample segment, including: determining the time difference between the current peak point to be backtracked and the previous initial R wave for the case where the backtracking time period is after a time period of a preset time length from the first initial RR interval; determining the signal neglect period based on the average value of the RR interval corresponding to the initial R wave before the current peak point to be backtracked; determining that the time difference is less than the preset time and greater than the signal neglect period, and the peak value of the current peak point is greater than a preset multiple of the peak value of the previous initial R wave, determining that the current peak point is a missed R wave; determining that when the time difference is less than or equal to the signal neglect period, determining that the signal corresponding to the current peak point is noise; determining that when the time difference is greater than the preset time, determining that the signal corresponding to the current peak point is a missed R wave.
本实施例提供的警觉度评估模型的构建装置,与本申请上述实施例所提供的警觉度评估模型的构建方法属于同一申请构思,可执行本申请上述任意实施例所提供的警觉度评估模型的构建方法,具备执行警觉度评估模型的构建方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请上述实施例提供的警觉度评估模型的构建方法的具体处理内容,此处不再加以赘述。The device for constructing the alertness assessment model provided in this embodiment belongs to the same application concept as the method for constructing the alertness assessment model provided in the above embodiments of this application, and can execute the method for constructing the alertness assessment model provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the method for constructing the alertness assessment model. For technical details not fully described in this embodiment, please refer to the specific processing content of the method for constructing the alertness assessment model provided in the above embodiments of this application, and will not be repeated here.
在另一实施例中,还提出了一种与上述的警觉度评估方法相对应的警觉度评估装置,如图11所示,该装置包括:获取单元1101,用于获取目标用户的目标心电数据;片段数据提取单元1102,用于基于预设的滑动窗口对目标心电数据进行片段数据提取,得到目标心电数据对应的至少一个目标心电片段;警觉度评估单元1103,用于采用警觉度评估模型基于至少一个目标心电片段进行警觉度评估,得到警觉度评估结果,警觉度评估结果包括每间隔预设时长输出的针对每个目标心电片段的片段警觉度评估结果;其中,警觉度评估模型为采用上述实施例中介绍的警觉度模型的构建方法得到的模型。In another embodiment, an alertness assessment device corresponding to the above-mentioned alertness assessment method is also proposed, as shown in Figure 11, the device includes: an acquisition unit 1101, used to acquire the target ECG data of the target user; a segment data extraction unit 1102, used to extract segment data from the target ECG data based on a preset sliding window, and obtain at least one target ECG segment corresponding to the target ECG data; an alertness assessment unit 1103, used to perform alertness assessment based on at least one target ECG segment using an alertness assessment model to obtain an alertness assessment result, wherein the alertness assessment result includes a segment alertness assessment result for each target ECG segment output at each preset time interval; wherein the alertness assessment model is a model obtained by using the method for constructing the alertness model introduced in the above-mentioned embodiment.
在一些实施例中,警觉度评估单元1103采用警觉度评估模型基于至少一个目标心电片段进行警觉度评估,得到警觉度评估结果,包括:针对至少一个目标心电片段中每个目标心电片段,确定该目标心电片段对应的目标心率变异特征,目标心率变异特征对警觉度评估的贡献度大于预设贡献度;将至少一个目标心电片段各自对应的目标心率变异特征输入至警觉度评估模型中,得到警觉度指标值;确定警觉度指标值小于预设警觉度阈值的情况下,确定目标用户的警觉度评估结果为警觉类别;确定警觉度指标值大于预设警觉度阈值的情况下,确定目标用户的警觉度评估结果为困倦类别。In some embodiments, the alertness assessment unit 1103 uses an alertness assessment model to perform alertness assessment based on at least one target ECG segment to obtain an alertness assessment result, including: for each target ECG segment in the at least one target ECG segment, determining a target heart rate variability feature corresponding to the target ECG segment, wherein a contribution of the target heart rate variability feature to the alertness assessment is greater than a preset contribution; inputting the target heart rate variability feature corresponding to each of the at least one target ECG segments into the alertness assessment model to obtain an alertness index value; determining that the alertness assessment result of the target user is an alertness category when the alertness index value is less than a preset alertness threshold; determining that the alertness assessment result of the target user is a sleepiness category when the alertness index value is greater than the preset alertness threshold.
本实施例提供的警觉度评估装置,与本申请上述实施例所提供的警觉度评估方法属于同一申请构思,可执行本申请上述任意实施例所提供的警觉度评估方法,具备执行警觉度评估方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请上述实施例提供的警觉度评估方法的具体处理内容,此处不再加以赘述。The alertness assessment device provided in this embodiment belongs to the same application concept as the alertness assessment method provided in the above embodiments of this application, and can execute the alertness assessment method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the alertness assessment method. For technical details not fully described in this embodiment, please refer to the specific processing content of the alertness assessment method provided in the above embodiments of this application, and will not be repeated here.
以上的模型训练装置和警觉度评估装置中的各个单元所实现的功能可以分别由相同或不同的处理器实现,本申请实施例不作限定。The functions implemented by each unit in the above model training device and alertness assessment device can be implemented by the same or different processors respectively, and the embodiments of the present application are not limited thereto.
应理解,以上警觉度模型的构建装置和说话人识别装置中的单元可以以处理器调用软件的形式实现。例如该装置包括处理器,处理器与存储器连接,存储器中存储有指令,处理器调用存储器中存储的指令,以实现以上任一种方法或实现该装置各单元的功能,其中处理器可以为通用处理器,例如CPU或微处理器等,存储器可以为装置内的存储器或装置外的存储器。或者,装置中的单元可以以硬件电路的形式实现,可以通过对硬件电路的设计,实现部分或全部单元的功能,该硬件电路可以理解为一个或多个处理器;例如,在一种实现中,该硬件电路为ASIC,通过对电路内元件逻辑关系的设计,实现以上部分或全部单元的功能;再如,在另一种实现中,该硬件电路可以通过PLD实现,以FPGA为例,其可以包括大量逻辑门电路,通过配置文件来配置逻辑门电路之间的连接关系,从而实现以上部分或全部单元的功能。以上装置的所有单元可以全部通过处理器调用软件的形式实现,或全部通过硬件电路的形式实现,或部分通过处理器调用软件的形式实现,剩余部分通过硬件电路的形式实现。It should be understood that the units in the above alertness model construction device and the speaker recognition device can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the unit in the device can be implemented in the form of a hardware circuit, and the functions of some or all units can be realized by designing the hardware circuit. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all units above are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to realize the functions of some or all units above. All units of the above device can be implemented in the form of a processor calling software, or in the form of a hardware circuit, or in the form of a processor calling software, and the remaining part can be implemented in the form of a hardware circuit.
在本申请实施例中,处理器是一种具有信号的处理能力的电路,在一种实现中,处理器可以是具有指令读取与运行能力的电路,例如CPU、微处理器、GPU、或DSP等;在另一种实现中,处理器可以通过硬件电路的逻辑关系实现一定功能,该硬件电路的逻辑关系是固定的或可以重构的,例如处理器为ASIC或PLD实现的硬件电路,例如FPGA等。在可重构的硬件电路中,处理器加载配置文档,实现硬件电路配置的过程,可以理解为处理器加载指令,以实现以上部分或全部单元的功能的过程。此外,还可以是针对人工智能设计的硬件电路,其可以理解为一种ASIC,例如NPU、TPU、DPU等。In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.
可见,以上装置中的各单元可以是被配置成实施以上方法的一个或多个处理器(或处理电路),例如:CPU、GPU、NPU、TPU、DPU、微处理器、DSP、ASIC、FPGA,或这些处理器形式中至少两种的组合。It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
此外,以上装置中的各单元可以全部或部分可以集成在一起,或者可以独立实现。在一种实现中,这些单元集成在一起,以SOC的形式实现。该SOC中可以包括至少一个处理器,用于实现以上任一种方法或实现该装置各单元的功能,该至少一个处理器的种类可以不同,例如包括CPU和FPGA,CPU和人工智能处理器,CPU和GPU等。In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.
本申请实施例还提出一种电子设备,参见图12所示,该设备包括:存储器200和处理器210;其中,所述存储器200与所述处理器210连接,用于存储程序;所述处理器210,用于通过运行所述存储器200中存储的程序,实现上述任一实施例公开的警觉度模型的构建方法或警觉度评估方法。An embodiment of the present application also proposes an electronic device, as shown in Figure 12, which includes: a memory 200 and a processor 210; wherein the memory 200 is connected to the processor 210 and is used to store programs; the processor 210 is used to implement the method for constructing a vigilance model or the method for evaluating vigilance disclosed in any of the above embodiments by running the program stored in the memory 200.
具体的,上述电子设备还可以包括:总线、通信接口220、输入设备230和输出设备240。Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .
处理器210、存储器200、通信接口220、输入设备230和输出设备240通过总线相互连接。其中:总线可包括一通路,在计算机系统各个部件之间传送信息。The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are interconnected via a bus, wherein the bus may include a path for transmitting information between various components of the computer system.
处理器210可以是通用处理器,例如通用中央处理器(CPU)、微处理器等,也可以是特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本发明方案程序执行的集成电路。还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
处理器210可包括主处理器,还可包括基带芯片、调制解调器等。The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.
存储器200中保存有执行本发明技术方案的程序,还可以保存有操作系统和其他关键业务。具体地,程序可以包括程序代码,程序代码包括计算机操作指令。更具体的,存储器200可以包括只读存储器(read-only memory,ROM)、可存储静态信息和指令的其他类型的静态存储设备、随机存取存储器(random access memory,RAM)、可存储信息和指令的其他类型的动态存储设备、磁盘存储器、flash等等。The memory 200 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
输入设备230可包括接收用户输入的数据和信息的装置,例如键盘、鼠标、摄像头、扫描仪、光笔、语音输入装置、触摸屏、计步器或重力感应器等。The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
输出设备240可包括允许输出信息给用户的装置,例如显示屏、打印机、扬声器等。Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
通信接口220可包括使用任何收发器一类的装置,以便与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(WLAN)等。The communication interface 220 may include any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
处理器210执行存储器200中所存放的程序,以及调用其他设备,可用于实现本申请上述实施例所提供的任意一种警觉度模型的构建方法或警觉度评估方法的各个步骤。The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement each step of any alertness model construction method or alertness assessment method provided in the above embodiments of the present application.
本申请实施例还提出一种芯片,该芯片包括处理器和数据接口,处理器通过数据接口读取并运行存储器上存储的程序,以执行上述任意实施例介绍的警觉度模型的构建方法或警觉度评估方法,具体处理过程及其有益效果可参见上述的警觉度模型的构建方法或警觉度评估方法的实施例介绍。An embodiment of the present application also proposes a chip, which includes a processor and a data interface. The processor reads and runs a program stored in a memory through the data interface to execute the method for constructing a vigilance model or the method for evaluating vigilance introduced in any of the above embodiments. The specific processing process and its beneficial effects can be found in the introduction to the embodiments of the method for constructing a vigilance model or the method for evaluating vigilance.
除了上述方法和设备以外,本申请的实施例还可以是计算机程序产品,其包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述任意实施例中描述的警觉度模型的构建方法或警觉度评估方法中的步骤。In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method for constructing a vigilance model or the method for evaluating vigilance described in any of the above-mentioned embodiments of this specification.
所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本申请实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
此外,本申请的实施例还可以是存储介质,其上存储有计算机程序,计算机程序被处理器执行本说明书上述任意实施例中描述的警觉度模型的构建方法或警觉度评估方法中的步骤。In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the method for constructing a vigilance model or the method for evaluating vigilance described in any of the above embodiments of this specification.
对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,故描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
本申请各实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减,各实施例中记载的技术特征可以进行替换或者组合。The steps in the methods of each embodiment of the present application can be adjusted in sequence, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
本申请各实施例种装置及终端中的模块和子模块可以根据实际需要进行合并、划分和删减。The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.
本申请所提供的几个实施例中,应该理解到,所揭露的终端,装置和方法,可以通过其它的方式实现。例如,以上所描述的终端实施例仅仅是示意性的,例如,模块或子模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个子模块或模块可以结合或者可以集成到另一个模块,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
作为分离部件说明的模块或子模块可以是或者也可以不是物理上分开的,作为模块或子模块的部件可以是或者也可以不是物理模块或子模块,即可以位于一个地方,或可以分布到多个网络模块或子模块上。根据实际的需要选择其中的部分或者全部模块或子模块来实现本实施例方案的目的。The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能模块或子模块可以集成在一个处理模块中,也可以是各个模块或子模块单独物理存在,也可以两个或两个以上模块或子模块集成在一个模块中。上述集成的模块或子模块既可以采用硬件的形式实现,也可以采用软件功能模块或子模块的形式实现。In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件单元,或者二者的结合来实施。软件单元可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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 process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410726882.3A CN118312883B (en) | 2024-06-06 | 2024-06-06 | Model construction method, alertness assessment method, device, equipment and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410726882.3A CN118312883B (en) | 2024-06-06 | 2024-06-06 | Model construction method, alertness assessment method, device, equipment and product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118312883A CN118312883A (en) | 2024-07-09 |
CN118312883B true CN118312883B (en) | 2024-08-23 |
Family
ID=91726525
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410726882.3A Active CN118312883B (en) | 2024-06-06 | 2024-06-06 | Model construction method, alertness assessment method, device, equipment and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118312883B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106919948A (en) * | 2015-12-28 | 2017-07-04 | 西南交通大学 | A kind of recognition methods for driving Sustained attention level |
CN113415285A (en) * | 2021-07-07 | 2021-09-21 | 西南交通大学 | Driver alertness assessment method and system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9477993B2 (en) * | 2012-10-14 | 2016-10-25 | Ari M Frank | Training a predictor of emotional response based on explicit voting on content and eye tracking to verify attention |
CN104586384B (en) * | 2013-10-30 | 2017-06-16 | 深圳华清心仪医疗电子有限公司 | Electrocardiosignal real-time heart rate detection method and system |
CN106913333B (en) * | 2015-12-28 | 2020-03-13 | 西南交通大学 | Method for selecting sensitivity characteristic index of continuous attention level |
-
2024
- 2024-06-06 CN CN202410726882.3A patent/CN118312883B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106919948A (en) * | 2015-12-28 | 2017-07-04 | 西南交通大学 | A kind of recognition methods for driving Sustained attention level |
CN113415285A (en) * | 2021-07-07 | 2021-09-21 | 西南交通大学 | Driver alertness assessment method and system |
Also Published As
Publication number | Publication date |
---|---|
CN118312883A (en) | 2024-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Cai et al. | Feature-level fusion approaches based on multimodal EEG data for depression recognition | |
CN110876626B (en) | Depression detection system based on multi-lead EEG optimal lead selection | |
EP3698707B1 (en) | Electrocardiogram information dynamic monitoring system, computer program and computer readable storage medium | |
US11350868B2 (en) | Electrocardiogram information processing method and electrocardiogram workstation system | |
Bravi et al. | Review and classification of variability analysis techniques with clinical applications | |
Lim et al. | Analysis of single-electrode EEG rhythms using MATLAB to elicit correlation with cognitive stress | |
CN102184415B (en) | Electroencephalographic-signal-based fatigue state recognizing method | |
Jameil et al. | Efficient cnn architecture on fpga using high level module for healthcare devices | |
Yan et al. | Emotion classification with multichannel physiological signals using hybrid feature and adaptive decision fusion | |
CN110151203B (en) | Fatigue driving identification method based on multistage avalanche convolution recursive network EEG analysis | |
Azami et al. | Entropy analysis of univariate biomedical signals: Review and comparison of methods | |
CN119498776B (en) | Feature information extraction method and system of sleep state monitoring model | |
Wang et al. | Integration of artificial intelligence and wearable internet of things for mental health detection | |
Luo et al. | Exploring adaptive graph topologies and temporal graph networks for EEG-based depression detection | |
CN114550932A (en) | A sleep apnea risk assessment method, device, equipment and storage medium | |
Peimankar et al. | Automatic detection of cardiac arrhythmias using ensemble learning | |
Ingolfsson et al. | EpiDeNet: An energy-efficient approach to seizure detection for embedded systems | |
CN119446410A (en) | Personalized health care management method based on bioelectric signal monitoring | |
CN118378063B (en) | Risk assessment method and system based on multi-bioelectric signal fusion | |
CN119272125A (en) | A multimodal fusion feature emotion recognition method | |
CN118383730A (en) | Epileptic seizure early warning method, epileptic seizure early warning system, electronic equipment and storage medium | |
CN118312883B (en) | Model construction method, alertness assessment method, device, equipment and product | |
Chen et al. | Mental fatigue recognition study based on 1D convolutional neural network and short-term ECG signals | |
Naregalkar et al. | Artificial intelligence driven mental health diagnosis based on physiological signals | |
Zhang et al. | ACM-GNN: Adaptive Cluster-Oriented Modularity Graph Neural Network for EEG Depression Detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |