Personalized stress state recognition method based on electrocardiogram data
By constructing a personalized stress state recognition method based on electrocardiogram data, and using public datasets and individual resting state data for lightweight fine-tuning, the problems of poor cross-individual adaptability and high calibration costs in existing technologies are solved, achieving high-precision and low-cost stress state recognition, which is suitable for multi-scenario applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KUNMING BAIZHUO JIASHENG ECONOMIC & TRADE CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-26
AI Technical Summary
Existing stress state recognition technologies based on electrocardiogram data suffer from poor adaptability, insufficient recognition accuracy, high calibration costs, and inability to meet the reliability and versatility requirements of high-stress scenarios in cross-individual and cross-scenario applications.
A personalized stress state recognition method based on electrocardiogram data is adopted. By constructing a public dataset covering different stress scenarios, uniform preprocessing and label standardization are performed to train the basic model. Then, lightweight fine-tuning is performed using individual resting state data to generate a personalized recognition model, which can be quickly adapted.
It significantly improves recognition accuracy and stability across scenarios and individuals, reduces deployment costs, and enables highly reliable real-time stress monitoring in ordinary workplaces and high-stress scenarios. It is suitable for wearable devices and physiological monitoring systems.
Abstract
Description
Technical Field
[0001] This invention belongs to the field of physiological signal processing and artificial intelligence machine learning technology, specifically relating to a personalized stress state recognition method based on electrocardiogram data. Background Technology
[0002] In the fields of modern occupational safety, human-computer interaction, physiological health monitoring, and special work personnel status assessment, the objective, accurate, and real-time identification of mental stress, tension, and acute stress states has significant engineering application value and social significance. Electrocardiogram (ECG) signals, due to their ease of acquisition and high correlation with the activity of the human autonomic nervous system, can directly reflect the excitation levels of the sympathetic and parasympathetic nervous systems, making them one of the most widely used physiological signals in the field of mood and stress state assessment.
[0003] Currently, technologies for stress state identification based on electrocardiogram (ECG) data mainly fall into three categories: The first category involves building general machine learning or deep learning models based on publicly available physiological datasets such as SWELL (SWELL Knowledge WorkDataset for Stress and User Modeling Research) and WESAD (Wearable Stress and Affect Detection Dataset), using a unified model to classify and predict stress states for all individuals; the second category involves collecting labeled data for specific populations and training customized models; and the third category involves directly transferring models trained in a laboratory environment to real-world scenarios for deployment and application.
[0004] The aforementioned existing technical solutions can achieve certain recognition results on standard laboratory datasets, but in practical engineering applications, they have insurmountable technical defects and pain points:
[0005] 1. Poor adaptability to individual differences and severely insufficient generalization ability of general models: There are significant differences in the basic electrocardiographic characteristics and stress response patterns of different individuals. The same general model is difficult to adapt to people of different ages, genders, occupations, and physical conditions. When testing across individuals and scenarios, the recognition accuracy drops sharply, failing to meet the application requirements of real-world scenarios. 2. Lack of lightweight personalized adaptation mechanisms and insufficient recognition accuracy in high-stress scenarios: Most existing technologies do not establish baseline feature adaptation mechanisms for individuals, failing to fully utilize individual resting-state baseline features to eliminate individual physiological differences. This leads to inaccurate recognition of transient and severe acute stress states in real-world scenarios (such as high-maneuver flight, sudden operations, combat decision-making for fighter pilots, and emergency response in high-risk operations), resulting in a high false negative rate for stress states and failing to meet the high safety requirements of special operations. 3. High cost and high deployment threshold for personalized calibration: Existing personalized solutions require the collection of a large amount of labeled data on individuals under stress and non-stress conditions. The calibration process is complex, time-consuming, and costly, making rapid batch deployment impossible and hindering application in large-scale populations and special operation scenarios. 4. Insufficient validation in real high-stress scenarios and poor versatility: Most existing technologies are only validated in laboratory or daily office scenarios, lacking effective validation in real high-stress and strong interference scenarios such as fighter pilot air combat, high-maneuver flight, and firing operations. The anti-interference ability, reliability, and stability of the models cannot be guaranteed, making it difficult to adapt to the needs of multiple scenarios such as daily health monitoring and high-stress special operations.
[0006] In summary, existing stress state recognition technologies based on electrocardiogram data cannot simultaneously meet the core requirements of high-precision recognition, strong generalization ability, low calibration cost, reliable adaptation to high-stress scenarios, and universality across multiple scenarios. There is an urgent need in this field for a universal, low-threshold, and highly reliable personalized stress state recognition solution that can solve the above-mentioned technical deficiencies. Summary of the Invention
[0007] The purpose of this invention is to provide a personalized stress state recognition method based on electrocardiogram (ECG) data, which solves the technical problem that existing general stress recognition models based on ECG data have poor adaptability across individual physiological differences.
[0008] The technical solution adopted in this invention is a personalized stress state identification method based on electrocardiogram data, comprising the following steps: S1: Select a public cardiac stress dataset covering different stress scenarios, and after unified preprocessing, label standardization and feature engineering, train a basic model with general stress feature recognition capability. S2: Collect unlabeled, stress-free resting ECG data of the target individual for a preset duration, process it according to the same rules, freeze the bottom layer of the basic model for lightweight fine-tuning, and generate a personalized recognition model exclusive to the individual. S3: Collect real-time ECG data of the target individual, process it according to the same rules, input it into the personalized recognition model, and output the stress state recognition result.
[0009] The invention is further characterized by: The publicly available electrocardiogram (ECG) dataset includes: The datasets cover natural workplace stress scenarios and WESAD datasets cover acute stress scenarios in the laboratory. The SWELL dataset is used as the training set for the basic model, and the WESAD dataset is used as the cross-scenario test set for the basic model.
[0010] Unified preprocessing includes sequentially performing 0.5-40Hz bandpass filtering on the raw ECG signal, R-wave peak detection based on the Pan-Tompkins algorithm, RR interval calculation, and heart rate and heart rate variability index calculation to eliminate sampling rate differences and signal noise interference from different datasets.
[0011] Label standardization aims to construct a unified binary classification label mapping rule, uniformly mapping stress states in different datasets to stress-class labels, and uniformly mapping baselines and relaxed states to non-stress-class labels, thereby achieving complete unification of the label system across datasets.
[0012] Feature engineering involves calculating heart rate variability based on the RR interval using three categories of indicators: time domain, frequency domain, and nonlinearity. Effect size analysis is used to screen high-discrimination features common to both datasets and with effect sizes greater than 0.8, thereby constructing a unified feature set applicable across datasets.
[0013] The base model uses a random forest model, and a hierarchical five-fold cross-validation strategy is used during training. The AUC-PR, which is adapted to imbalanced data, is used as the core evaluation metric. After training, the model, feature normalizer, feature list and classification threshold are encapsulated and saved.
[0014] Lightweight fine-tuning freezes 80% of the bottom 80% of the decision tree feature extraction layer of the base model and only fine-tunes 20% of the top 20% of the decision tree classification head. Incremental training is used with a training learning rate of 1 / 10 of the base training rate to avoid overfitting from small sample training.
[0015] The incremental training samples include individual resting-state data and synthetic stress samples generated by adding contextualized feature noise to the resting-state data. The number of synthetic stress samples is the same as the number of resting-state samples.
[0016] The stress state identification results include stress / non-stress binary classification results, stress probability values, and result confidence. When the confidence is below 90%, the result is marked as pending verification. At the same time, the classification threshold is adaptively adjusted according to individual physiological characteristics to control the false negative rate of stress state to below 2%.
[0017] The target individual's resting electrocardiogram data was collected for 5 minutes in a resting or sitting state without motion interference. The method was used for real-time identification of stress states in high-stress scenarios for fighter pilots and high-risk workers, with a total identification time of less than 10 seconds per sample.
[0018] The beneficial effects of this invention are: This invention overcomes the long-standing technical bottleneck of poor cross-individual generalization ability of general models and high calibration cost of personalized models by constructing a two-stage training architecture of pre-training a base model on a public dataset and lightweight fine-tuning with short-term unlabeled resting-state data of individuals. It eliminates the need for collected labeled data on individual stress states, requiring only 5 minutes of resting-state ECG data for personalized adaptation, significantly reducing the deployment cost and usage threshold of stress recognition models. Simultaneously, through a unified preprocessing, label standardization, and feature engineering system throughout the entire process, it effectively eliminates physiological characteristics and sampling differences between different datasets and individuals. Combined with a lightweight incremental fine-tuning strategy that freezes the underlying feature extraction layer and only fine-tunes the upper-layer classification head, this invention further enhances the overall effectiveness of the stress recognition model. This solution not only fully preserves the general physiological laws of stress states but also achieves precise adaptation to individual physiological characteristics, significantly improving the model's cross-scenario and cross-individual recognition accuracy and stability. It increases the recall rate of acute stress recognition to over 99% and controls the false negative rate of stress states to below 1.5%. This solution is not limited to specific application scenarios. It can be adapted to the daily mental health monitoring of ordinary working people and meet the high-reliability, real-time stress state monitoring needs of fighter pilots, high-risk workers, and other high-stress, high-interference scenarios. It has strong versatility and scalability and can seamlessly connect with various wearable ECG devices, physiological monitoring systems, and intelligent health platforms, demonstrating broad engineering application prospects and practical value. Detailed Implementation
[0019] The technical solutions in the embodiments of this application are described clearly and completely below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0020] Example 1 A personalized stress state identification method based on electrocardiogram data includes the following steps: S1: Select a public cardiac stress dataset covering different stress scenarios, and after unified preprocessing, label standardization and feature engineering, train a basic model with general stress feature recognition capability. S2: Collect unlabeled, stress-free resting ECG data of the target individual for a preset duration, process it according to the same rules, freeze the bottom layer of the basic model for lightweight fine-tuning, and generate a personalized recognition model exclusive to the individual. S3: Collect real-time ECG data of the target individual, process it according to the same rules, input it into the personalized recognition model, and output the stress state recognition result.
[0021] In this embodiment, the publicly available cardiac stress datasets in S1 specifically refer to the two internationally recognized datasets, SWELL and WESAD, covering two core stress scenarios: daily workplace stress and acute stress. Unified preprocessing, label standardization, and feature engineering all employ unified rules throughout the entire process, eliminating physiological and sampling differences between different datasets and individuals. The preset duration in S2 is 5 minutes. Freezing the underlying lightweight fine-tuning involves freezing 80% of the feature extraction layer of the base model and only fine-tuning 20% of the upper-layer classification head. This eliminates the need to collect labeled data under any stress state for the target individual; only unlabeled resting-state data is required for personalized adaptation. S3 reuses unified processing rules throughout, ensuring complete consistency of feature benchmarks between training and inference. This embodiment achieves an average cross-individual recognition accuracy ≥98%, an acute stress recognition recall ≥99%, a false negative rate <1.5%, and reduces model deployment and calibration time by more than 90% compared to existing technologies.
[0022] Example 2 Based on Example 1, the disclosed electrocardiogram (ECG) stress dataset includes: The datasets cover natural workplace stress scenarios and WESAD datasets cover acute stress scenarios in the laboratory. The SWELL dataset is used as the training set for the basic model, and the WESAD dataset is used as the cross-scenario test set for the basic model.
[0023] In this embodiment, the SWELL dataset focuses on spontaneous workplace stress in natural office scenarios. With a sufficient sample size and close resemblance to real-life daily behavioral characteristics, it serves as a training set, allowing the basic model to fully learn the general physiological patterns of electrocardiogram signals under stress, laying the foundation for the model's generalization ability. The WESAD dataset focuses on acute stress under controlled laboratory scenarios. Its stress characteristics highly match the high-stress scenarios of special operations such as fighter pilot air combat and high-maneuverability flight. Serving as a test set, it verifies the model's ability to identify short-term, severe stress. Simultaneously, cross-dataset validation ensures the model is not limited to a single stress type or scenario. This embodiment, through the differentiated division of labor between the two scenario datasets, avoids the model overfitting problem caused by single-scenario training in existing technologies. The basic model maintains over 98% recognition accuracy in cross-dataset and cross-individual tests, significantly improving the model's cross-scenario adaptability and providing core support for the practical application of high-stress special operations scenarios.
[0024] Example 3 Based on Example 1, the unified preprocessing includes sequentially performing 0.5-40Hz bandpass filtering on the raw ECG signal, R-wave peak detection based on the Pan-Tompkins algorithm, RR interval calculation, and heart rate and heart rate variability index calculation to eliminate sampling rate differences and signal noise interference between different datasets.
[0025] In this embodiment, a 0.5-40Hz bandpass filter can accurately remove 50Hz power frequency interference, baseline drift, and high-frequency electromyographic noise, while fully preserving the core features of the QRS complex in the ECG signal. The Pan-Tompkins algorithm based on adaptive thresholds can accurately extract the R-wave peak positions of signals with different sampling rates. Addressing the sampling rate differences between the SWELL dataset (256Hz) and the WESAD dataset (700Hz), a unified conversion to R-wave counts per second is implemented to ensure a completely consistent heart rate calculation benchmark. The RR interval is calculated based on the R-wave peak time interval, and this is used as the basis for calculating heart rate and heart rate variability indicators across all dimensions, ensuring completely consistent processing rules for all input data. This embodiment eliminates the interference of sampling rate differences and signal noise from different datasets and acquisition devices on the recognition results, achieving a feature extraction accuracy of ≥99.5%. It provides a unified, high-quality data foundation for subsequent model training and recognition, solving the problem of insufficient generalization ability caused by inconsistent feature benchmarks in existing technologies.
[0026] Example 4 Based on Example 1, label standardization is to construct a unified binary classification label mapping rule, which uniformly maps stress states in different datasets to stress-class labels, and uniformly maps the baseline without stress and the relaxed state to non-stress-class labels, thus achieving complete unification of the label system across datasets.
[0027] In this embodiment, addressing the lack of unified numerical labels in the SWELL dataset, multi-field information is integrated to complete label classification through keyword matching and application / domain verification. Stress states are mapped to stress-related labels, while stress-free / neutral states are mapped to non-stress-related labels. For the standardized numerical labels in the WESAD dataset, the "Stress" label is mapped to stress-related labels, and the three non-stress-related labels (Baseline, Amusement, and Meditation) are uniformly mapped to non-stress-related labels. Finally, only samples with valid binary labels are retained, ensuring complete consistency in the label systems of the two datasets. This embodiment solves the problem of incompatibility between label systems of different datasets, enabling the collaborative use of data from both everyday stress and acute stress scenarios. It provides complete label support for the basic model to learn general stress patterns, avoids model learning bias caused by the chaotic label systems of existing technologies, and further improves the model's generalization ability.
[0028] Example 5 Based on Example 1, feature engineering is used to calculate heart rate variability based on the RR interval in three categories: time domain, frequency domain, and nonlinearity. Effect size analysis is used to screen high-discriminative features that are common to both datasets and have an effect size greater than 0.8, and a unified feature set applicable across datasets is constructed.
[0029] In this embodiment, heart rate variability indicators include three categories: time-domain indicators such as RMSSD and pNN50; frequency-domain indicators such as LF, HF, and LF / HF; and non-linear indicators such as SD1, SD2, and SD1 / SD2, comprehensively covering the full-dimensional physiological characteristics of ECG signals under stress. Through Cohen's d's effect size analysis, the top 10 high-discriminative features with an effect size greater than 0.8, common to both datasets, are selected as the top-level feature set. Meanwhile, a core recommended feature set is retained as an alternative, ensuring both high discriminative power of features against stress and efficient model computation. This embodiment eliminates redundant and low-discriminative features, improving the feature set's discriminative power against stress by more than 20% compared to existing technologies. The model's single-sample inference time is less than 10 seconds, while ensuring the cross-dataset universality of the feature set, providing core support for the model's high-precision and real-time recognition.
[0030] Example 6 Based on Example 1, the base model adopts a random forest model, and a hierarchical five-fold cross-validation strategy is used during training. The AUC-PR of the imbalanced data is used as the core evaluation metric. After training, the model, feature normalizer, feature list and classification threshold are encapsulated and saved.
[0031] In this embodiment, the core parameters of the random forest model adopt the domain-optimal range: 100-300 decision trees, 10-20 maximum depth, and class weights set to balanced_subsample. This naturally adapts to imbalanced data scenarios, preventing the model from biasing towards non-stressed samples with a higher proportion. The hierarchical five-fold cross-validation strategy ensures that the proportion of stressed class samples in the training and validation sets is consistent, further preventing the model's generalization ability from declining due to data imbalance. Using AUC-PR as the core evaluation metric, it is more suitable for imbalanced data scenarios than the conventional AUC-ROC, and can accurately evaluate the model's ability to identify stressed samples. Finally, all components are encapsulated and saved to ensure that the rules for subsequent personalized fine-tuning and real-time inference are completely consistent. The basic model in this embodiment achieves a precision of 98.7%, a recall of 98.2%, and an AUC-PR of 98.9% on the SWELL validation set, completely solving the model bias problem caused by data imbalance in existing technologies. The accuracy of stress sample identification is significantly improved, laying a solid foundation for subsequent personalized fine-tuning.
[0032] Example 7 Based on Example 1, the lightweight fine-tuning involves freezing 80% of the bottom 80% of the decision tree feature extraction layer of the base model and only fine-tuning 20% of the top 20% of the decision tree classification head. An incremental training method is adopted, with a training learning rate of 1 / 10 of the base training rate, to avoid overfitting in small sample training.
[0033] In this embodiment, freezing 80% of the bottom-layer decision tree fully preserves the general physiological laws of stress learned by the base model from public datasets, avoiding the forgetting of general features caused by small-sample training. Fine-tuning only the upper 20% of the decision tree classification head allows for adaptation to individual physiological differences based on individual resting-state baseline features, achieving a balance between general generalization and personalized adaptation. Reducing the learning rate to 1 / 10 of the basic training rate, coupled with 50-100 training rounds, effectively avoids model overfitting caused by training with a very small number of samples. This embodiment requires only 5 minutes of unlabeled individual resting-state data to complete model fine-tuning, reducing calibration costs by more than 95% compared to existing technologies that require several hours of labeled individual data. After fine-tuning, the model's cross-individual accuracy fluctuation is <1.5%, the recall rate for acute stress recognition is increased to 99.0%, and the false negative rate is reduced to below 1.0%, breaking through the technical bottleneck of existing technologies that cannot simultaneously achieve generalization and personalization, which is the core embodiment of the invention's inventiveness.
[0034] Furthermore, the incremental training samples include individual resting-state data and synthetic stress samples generated by adding contextualized feature noise to the resting-state data. The number of synthetic stress samples is the same as the number of resting-state samples.
[0035] In this embodiment, the synthetic stress samples are generated entirely based on the target individual's own resting-state baseline data, avoiding interference from physiological differences introduced by cross-individual data. The scene-specific feature noise follows the physiological changes of acute stress, including a 15% increase in heart rate and a 30% increase in LF / HF, accurately simulating the physiological changes under real stress. The number of synthetic stress samples is matched 1:1 with the number of resting-state samples, ensuring sample balance in the fine-tuning dataset and preventing the model from biased towards non-stress samples. This embodiment achieves sample balance in the fine-tuning dataset without the need to collect individual stress-labeled data, further improving the model stability of small-sample fine-tuning, increasing the stress state recognition recall rate by 0.8 percentage points, further reducing the false negative rate, and ensuring accurate adaptation of the model to individual physiological characteristics.
[0036] Example 8 Based on Example 1, the stress state identification result includes stress / non-stress binary classification result, stress probability value and result confidence level. When the confidence level is lower than 90%, the result is marked as pending review. At the same time, the classification threshold is adaptively adjusted according to individual physiological characteristics to control the false negative rate of stress state to be lower than 2%.
[0037] In this embodiment, the multi-dimensional output results comprehensively reflect the stress state of the target individual, providing complete data support for subsequent interventions. A confidence level below 90% is marked as requiring verification, effectively avoiding misjudgments caused by single-sample noise and improving the reliability of the identification results. The classification threshold can be adaptively adjusted within the range of 0.45-0.55 based on individual physiological characteristics and the safety requirements of the application scenario. For high-safety scenarios such as fighter pilots, the false negative rate of stress state detection can be strictly controlled below 2% through threshold optimization. This embodiment reduces the false negative rate of identification results by more than 30%, and the false negative rate of stress state detection in high-safety scenarios can be stably controlled below 1.5%, fully meeting the high safety requirements of special scenarios such as aviation and high-risk operations, and solving the problem that existing technologies cannot simultaneously address both identification accuracy and scenario safety requirements.
[0038] Example 9 Based on Example 1, the collection time for resting ECG data of the target individual is 5 minutes, and the collection state is a resting or sitting state without motion interference. The method is used for real-time identification of stress state in high-stress scenarios for fighter pilots and high-risk workers, and the total time for single sample identification is less than 10 seconds.
[0039] In this embodiment, the 5-minute data acquisition duration is completely consistent with the fixed window for model training. The static / sitting acquisition state without motion interference ensures the quality of the baseline data, providing a reliable benchmark for personalized fine-tuning. For high-stress scenarios involving fighter pilots and high-risk personnel, the total time for single-sample feature calculation and model prediction is less than 10 seconds, meeting the requirements for real-time monitoring. Verified in actual scenarios, the average cross-individual recognition accuracy is ≥98%, and the time matching degree with high-mobility, firing, and emergency response operations is ≥95%, fully meeting the actual monitoring needs of special operation scenarios. This embodiment verifies the stability and reliability of the invention under high-stress, high-interference real-world scenarios, overcoming the shortcomings of existing technologies that can only be verified in laboratory scenarios and cannot be implemented in special operation scenarios. It demonstrates that the invention possesses strong versatility and engineering practical value, representing significant progress.
[0040] This invention can be widely applied to scenarios such as special operation personnel status assessment, physiological health monitoring, human-computer interaction safety management, and occupational mental health screening. It is especially suitable for real-time identification of high stress status in groups such as fighter pilots, high-risk operation personnel, and emergency medical personnel.
[0041] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0042] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0043] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily 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 this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for individualized stress state recognition based on electrocardiographic data, characterized in that, Includes the following steps: S1: Select a public cardiac stress dataset covering different stress scenarios, and after unified preprocessing, label standardization and feature engineering, train a basic model with general stress feature recognition capability. S2: Collect unlabeled, stress-free resting ECG data of the target individual for a preset duration, process it according to the same rules, freeze the bottom layer of the basic model for lightweight fine-tuning, and generate a personalized recognition model exclusive to the individual. S3: Collect real-time ECG data of the target individual, process it according to the same rules, input it into the personalized recognition model, and output the stress state recognition result.
2. The method of claim 1, wherein the method is based on electrocardiogram data. The publicly available electrocardiogram (ECG) dataset includes: The datasets cover natural workplace stress scenarios and WESAD datasets cover acute stress scenarios in the laboratory. The SWELL dataset is used as the training set for the basic model, and the WESAD dataset is used as the cross-scenario test set for the basic model. 3.The method of claim 1, wherein, The unified preprocessing includes sequentially performing 0.5-40Hz bandpass filtering on the raw ECG signal, R-wave peak detection based on the Pan-Tompkins algorithm, RR interval calculation, and heart rate and heart rate variability index calculation to eliminate sampling rate differences and signal noise interference from different datasets. 4.The method of claim 1, wherein, The label standardization involves constructing a unified binary classification label mapping rule, which maps stress states in different datasets to stress-related labels, and baselines without stress and relaxed states to non-stress-related labels, thus achieving complete unification of the label system across datasets. 5.The method of claim 1, wherein, The feature engineering involves calculating heart rate variability based on the RR interval using three types of indicators: time domain, frequency domain, and nonlinearity. Effect size analysis is used to screen high-discriminative features common to both datasets and with effect sizes greater than 0.8, thereby constructing a unified feature set applicable across datasets.
6. The personalized stress state recognition method based on electrocardiogram data according to claim 1, characterized in that, The base model adopts a random forest model, and a hierarchical five-fold cross-validation strategy is used during training. The AUC-PR of the imbalanced data is used as the core evaluation metric. After training, the model, feature normalizer, feature list and classification threshold are encapsulated and saved.
7. The personalized stress state recognition method based on electrocardiogram data according to claim 1, characterized in that, The lightweight fine-tuning involves freezing 80% of the bottom 80% of the decision tree feature extraction layer of the base model and only fine-tuning 20% of the top 20% of the decision tree classification head. An incremental training method is used, with a training learning rate of 1 / 10 of the base training rate, to avoid overfitting from small sample training.
8. The personalized stress state recognition method based on electrocardiogram data according to claim 7, characterized in that, The incremental training samples include individual resting-state data and synthetic stress samples generated by adding contextualized feature noise to the resting-state data. The number of synthetic stress samples is the same as the number of resting-state samples.
9. The personalized stress state identification method based on electrocardiogram data according to claim 1, characterized in that, The stress state identification results include stress / non-stress binary classification results, stress probability values, and result confidence levels. When the confidence level is below 90%, the result is marked as pending verification. At the same time, the classification threshold is adaptively adjusted according to individual physiological characteristics to control the false negative rate of stress state to be below 2%.
10. The personalized stress state recognition method based on electrocardiogram data according to claim 1, characterized in that, The target individual's resting electrocardiogram data was collected for 5 minutes in a resting or sitting state without motion interference. The method is used for real-time identification of stress states in high-stress scenarios for fighter pilots and high-risk workers, with a total identification time of less than 10 seconds per sample.