An electrocardiosignal identity recognition method and system based on single-domain generalization

By employing a personalized data augmentation pool and a two-level constraint and discriminative learning approach using deep learning models, the problem of cross-session data distribution shift in ECG signal identification was solved. This resulted in stable cross-session identification and efficient resistance to physiological state interference, improving identification accuracy and generalization ability.

CN122196991APending Publication Date: 2026-06-12HANGZHOU DIANZI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2026-01-23
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing ECG signal identification technologies face the problem of data distribution offset in cross-session scenarios, and it is difficult to effectively extract identity invariant features that do not change with physiological state under single source domain data, resulting in a decrease in recognition rate and insufficient generalization ability.

Method used

We employ personalized data augmentation pools, intra-individual two-level constraints, and inter-individual discriminative learning methods. Through multi-scale feature extraction and deep learning models, we construct an ECG signal identity recognition method based on single-domain generalization. We utilize SoftDice loss and ArcFace angular boundary loss functions to extract stable identity features and enhance discriminative capabilities.

Benefits of technology

It effectively resists changes in physiological state under single source domain data, improves the accuracy and robustness of cross-session recognition, reduces the burden of data collection for users, and significantly enhances the model's ability to discriminate in unknown target domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122196991A_ABST
    Figure CN122196991A_ABST
Patent Text Reader

Abstract

The application provides an electrocardiosignal identity recognition method and system based on single-domain generalization, which comprises the following steps: obtaining a single-domain source electrocardiosignal and pre-processing, then performing physiological waveform transformation to generate an enhanced electrocardiosignal; constructing an electrocardio identity recognition model comprising an intra-individual double-level constraint module and an inter-individual discriminative learning module; inputting the original signal and the enhanced signal into the model for training, and finally inputting the electrocardiosignal to be identified into the trained model to output the identity recognition result. The application introduces a single-domain generalization mechanism, combines personalized data enhancement and double-feature constraint, effectively solves the data distribution deviation problem in the cross-session scene, realizes the extraction of intra-individual identity-invariant features and the enhancement of inter-individual discriminability, and improves the robustness and accuracy of electrocardiosignal identity recognition under complex physiological conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of identity recognition technology, specifically relating to a method and system for identity recognition based on single-domain generalization of electrocardiogram (ECG) signals. Background Technology

[0002] With the continuous advancement of digitalization, biometric identification has become a key technology for identity authentication. Current biometric identification technologies mainly include fingerprint recognition, facial recognition, and iris recognition. Although widely used, their physiological characteristics are susceptible to duplication and spoofing attacks; for example, fingerprints and faces are easily forged, posing serious security risks. In contrast, electrocardiogram (ECG) signals, as an emerging biometric identification modality, are determined by an individual's anatomical characteristics (such as myocardial thickness, heart shape, and changes in ion potential), possessing inherent individual uniqueness and difficulty in forgery. Furthermore, since they must be collected from a living organism, they naturally possess dynamic liveness detection capabilities. Therefore, research on identity recognition technology based on ECG signals has extremely high application value for achieving high-level information security and healthcare management.

[0003] While advancements in deep learning have provided various methods for ECG identity recognition, existing research largely focuses on intra-session scenarios, where both training and test sets originate from the same time period and physiological state, maintaining a consistent data distribution. However, in real-world applications, ECG signals, as typical non-stationary time series data, are highly susceptible to influences from factors such as human movement, posture changes, emotional fluctuations, and time spans, resulting in significant waveform variations and a severe distribution shift between training and actual test data. Existing cross-session recognition methods often rely on target domain data for domain adaptation, but in practical deployments, target domain data is typically unpredictable and difficult to obtain. Furthermore, existing data augmentation methods easily distort the physiological characteristics of ECGs, and models struggle to effectively separate physiological state interference from essential identity features during feature extraction, leading to blurred feature boundaries between different individuals. This severely limits the generalization ability and practicality of ECG identity recognition technology in complex real-world scenarios.

[0004] In view of this, there is an urgent need to provide an ECG signal identity recognition method based on single-domain generalization, which can effectively mine identity invariant features that do not change with physiological state when relying only on data from a single source domain, solve the data distribution offset problem in cross-session scenarios, and thus achieve more intelligent, robust and accurate identity authentication. Summary of the Invention

[0005] The purpose of this invention is to address the data distribution offset problem faced by existing electrocardiogram (ECG) signal identity recognition technologies in cross-session scenarios, as well as the difficulty in obtaining ECG signals from multiple individual states for model training in practical applications. This invention provides an ECG signal identity recognition method based on single-domain generalization. By introducing a personalized data augmentation pool, intra-individual two-level constraints, and inter-individual discriminative learning, this method extracts identity-invariant features that do not change with physiological state, achieving stable cross-session identity recognition, while relying solely on data from a single source domain.

[0006] To solve the above problems, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for electrocardiogram signal identification based on single-domain generalization, comprising the following steps:

[0008] Acquire single-source domain ECG signals and perform preprocessing;

[0009] The preprocessed electrocardiogram (ECG) signal is subjected to physiological waveform transformation to generate an enhanced ECG signal;

[0010] An electrocardiogram (ECG) identification model is constructed, comprising a feature extractor, an intra-individual two-level constraint module, and an inter-individual discriminative learning module. The feature extractor is used to extract deep features of the ECG signal. The intra-individual two-level constraint module is used to constrain the feature consistency and probability distribution stability of the single-source domain ECG signal and the enhanced ECG signal. The inter-individual discriminative learning module is used to enhance the angular boundary discrimination between deep features of different individuals and output the identification result of the ECG signal.

[0011] The ECG identity recognition model is trained using single-source domain ECG signals and enhanced ECG signals. Then, the single-source domain ECG signal to be recognized is input into the trained model to obtain the ECG identity recognition result.

[0012] Furthermore, the feature extractor adopts a multi-dilation rate convolutional network structure that combines an attention mechanism, specifically including an initial processing block, a multi-scale dilated residual module, and a CBAM attention module connected in sequence.

[0013] The initial processing block contains a one-dimensional convolutional layer, a batch normalization layer, and a ReLU activation function connected in sequence.

[0014] The multi-scale dilated residual module contains three parallel branch paths, each branch path consisting of multiple cascaded basic residual blocks, and the convolutional layers in the three branch paths are set with different dilation rates; the outputs of the three branch paths are fused element-wise and then input to a one-dimensional max pooling layer for downsampling, and then input to the CBAM attention module.

[0015] The CBAM attention module adaptively weights the received features based on channel and spatial dimensions, and then outputs the deep features of the electrocardiogram signal.

[0016] Furthermore, the basic residual block contains two stacked convolutional units and a skip connection; each convolutional unit consists of a one-dimensional convolutional layer, a batch normalization layer, a ReLU activation function, and a Dropout layer connected in sequence; the skip connection is used to add the input of the basic residual block to the output of the stacked convolutional units.

[0017] Furthermore, the intra-individual two-level constraint module adopts a twin network architecture, including the feature extractor and identity classifier with shared weights;

[0018] After the feature extractor outputs a high-dimensional feature map, it is divided into a first path and a second path; the first path directly outputs a feature vector; the second path generates an attention mask through a one-dimensional convolutional layer and a sigmoid activation function.

[0019] The feature vector of the first path is fused with the attention mask of the second path by element-wise multiplication to obtain key features, and the key features are then input into the identity classifier.

[0020] The output of the feature extractor is defined as the feature space, where the feature consistency between single-source domain ECG signals and enhanced ECG signals is constrained.

[0021] The output of the identity classifier is defined as the output space, where the stability of the probability distribution of single-source ECG signals and enhanced ECG signals is constrained.

[0022] Furthermore, the SoftDice loss between the attention mask for single-source domain ECG signal generation and the attention mask for enhanced ECG signal generation is calculated in the feature space;

[0023] The bidirectional KL divergence between the classification probability distribution of the single-source domain ECG signal and the classification probability distribution of the enhanced ECG signal is calculated in the output space.

[0024] Furthermore, the inter-individual discriminative learning module employs the ArcFace angular boundary loss function.

[0025] Furthermore, the physiological waveform transformation employs one or more of the following four enhancement strategies:

[0026] (1) Heartbeat rearrangement strategy: By detecting the R peak and calculating the RR interval between adjacent R peaks, the order of heartbeats is randomly shuffled;

[0027] (2) ST segment enhancement strategy: Locate the start and end points of the ST segment, and apply a random stretching factor with a range of 0.7-1.4 to stretch or compress the ST segment in the time domain;

[0028] (3) QTc interval enhancement strategy: detect the position of the T wave peak, calculate the corrected QT interval length based on the heart rate range, and resample the ST segment within the prediction range;

[0029] (4) QRS complex amplitude attenuation enhancement strategy: Locate the QRS group boundary and apply amplitude attenuation or gain to the signal area before or after the QRS group.

[0030] Secondly, the present invention provides an electrocardiogram signal identification system based on single-domain generalization for implementing the above method, comprising the following modules:

[0031] The data preprocessing module is used to acquire and preprocess the electrocardiogram signal to be identified.

[0032] The identity authentication module uses a trained ECG identity recognition model to process the preprocessed ECG signal to be identified and outputs the identity recognition result.

[0033] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the above-described method.

[0034] Fourthly, the present invention provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above-described method.

[0035] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0036] (1) This invention constructs a deep identity recognition architecture based on single-domain generalization, breaking through the dependence of cross-scene recognition on multi-source data. By designing an ECG identity recognition model that includes multi-scale feature extraction, intra-individual dual-level constraints, and inter-individual discriminative learning, the feature extraction layer of the intra-individual dual-level constraint module uses Soft Dice loss to force the model to focus on stable identity feature regions, and the output layer uses KL divergence to ensure the consistency of the prediction distribution, thereby effectively resisting the interference of physiological state changes such as movement and emotion on recognition. Thus, it can obtain identity representation with strong generalization ability when only ECG data of a single scenario (such as resting state) of the subject is obtained as the source domain. This not only significantly reduces the burden on users during the registration stage (no need to collect data in multiple states such as movement and emotional fluctuations), but also effectively solves the technical problem that the recognition rate of existing models drops significantly in cross-session and cross-state scenarios due to the single distribution of source domain data. In addition, the inter-individual discriminative learning uses angle boundary constraints (ArcFace) instead of the traditional Softmax loss, so that the feature space presents a "compact intra-individual and separated inter-individual" structure, which significantly improves the model's discriminative ability in unknown target domains.

[0037] (2) The present invention designs a personalized data augmentation pool. Unlike traditional random transformations such as Gaussian noise, the personalized data augmentation pool combines physiological knowledge (such as ST segment changes and QTc interval changes) to simulate waveform changes in real scenarios while maintaining semantic consistency of individual categories, effectively expanding the sample space. Attached Figure Description

[0038] Figure 1 This is an overall flowchart of the method of the present invention.

[0039] Figure 2 This is a schematic diagram of the personalized data enhancement pool in this invention.

[0040] Figure 3 This is a schematic diagram of the intra-individual dual-level constraint module in this invention.

[0041] Figure 4 This is a schematic diagram of the feature extractor in this invention. Detailed Implementation

[0042] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.

[0043] This embodiment provides a method for ECG signal identification based on single-domain generalization, such as... Figure 1 As shown, the specific steps include:

[0044] S1: Acquire single-source domain ECG signals and perform preprocessing.

[0045] First, the raw electrocardiogram (ECG) signals of the subjects were acquired. To eliminate noise interference, a second-order Butterworth high-pass filter and a fourth-order Chebyshey type I band-pass filter were used for joint filtering, and baseline drift was eliminated through detrending processing. Subsequently, a quality assessment system was established based on frequency domain, statistical, and morphological characteristics to remove low-quality signal segments, and a fixed length of heartbeats was extracted as input data.

[0046] S2: Building a Personalized Data Augmentation Pool

[0047] like Figure 2 As shown, to simulate cross-domain diversity under single-domain conditions, this invention constructs a personalized data augmentation module incorporating physiological knowledge. The original ECG signal is considered the source domain, and the augmented ECG signal is considered the augmentation domain. The personalized data augmentation pool includes four strategies, implemented as follows:

[0048] 1) Heartbeat rearrangement: Detect R peaks and calculate the RR intervals between adjacent R peaks, randomly shuffle the order of these intervals, and resample heartbeat segments based on the new RR interval sequence to simulate heart rate variability.

[0049] 2) ST segment enhancement: For each R peak, locate the start point (60ms after R peak) and end point (350ms after R peak) of the ST segment, and resample the segment by applying a random stretching factor (range 0.7-1.4).

[0050] 3) QTc interval enhancement: The T-wave peak position was detected, and the corrected QT interval length was calculated based on the heart rate range (0.6-1.2 times the normal RR interval). A personalized linear fit was calculated for each subject to predict the T-wave peak position at different heart rates, and the ST segment was resampled accordingly.

[0051] 4) Enhanced amplitude attenuation of QRS complex: Locate the boundary of the QRS complex (15% of the heartbeat length before and after the R peak) and apply a 10% amplitude attenuation or gain to the area outside the QRS complex.

[0052] During the training phase, for each original heartbeat, one of the above strategies is selected to generate augmented samples with a preset probability (e.g., QRS augmentation 0.4, and the rest 0.2).

[0053] S3: Construct an ECG identification model and extract features.

[0054] like Figure 4As shown, the feature extractor employs a multi-dilation rate convolutional network. The input ECG signal (including the original signal and the enhanced signal) is first initially extracted through 1D convolution, batch normalization, and ReLU activation. Subsequently, it passes through three dilated convolutional blocks with dilation rates set to {1,2,4}, {1,3,5}, and {1,2,3}, respectively, to capture the rhythm and morphological features of the ECG signal at multiple time scales. Finally, a CBAM (Convolutional Block Attention Module) is introduced to adaptively enhance discriminative features.

[0055] S4: Model Training and Dual Constraint Optimization

[0056] This step inputs the original signal and the enhanced signal into the network in parallel, and performs collaborative training through the following two modules;

[0057] (1) Intra-individual two-level constraints

[0058] like Figure 3 As shown, this module aims to guide the model to learn identity features that do not change with physiological state.

[0059] First layer constraint (feature space): Soft attention maps are generated through convolutional layers and the sigmoid function. The SoftDice loss function is introduced. The attention maps of the original and enhanced signals are kept consistent, and the calculation formula is as follows:

[0060]

[0061] In the formula, and These are soft attention maps of the original signal and the enhanced signal, respectively. To prevent a smoothing factor with a denominator of zero, this loss forces the model to focus on the same key identity region regardless of changes in the signal waveform.

[0062] The second layer of constraints (output space): Introducing KL divergence to constrain the stability of the probability distribution. This applies to the probability distribution of the classifier output. and Calculate the two-way KL divergence The calculation formula is as follows:

[0063]

[0064] By minimizing This ensures that the model produces a consistent prediction distribution for different morphological inputs of the same individual.

[0065] (2) Discriminative learning between individuals

[0066] To address the boundary blurring issue caused by traditional Softmax loss, this invention employs ArcFace angular boundary loss. The feature vector... and weight vector Perform L2 normalization to map it onto a hypersphere. Calculate the angle between the feature vector and the target class weights. And add an angular boundary m, whose loss function The calculation formula is as follows:

[0067]

[0068] In the formula, ∑ is the summation symbol (i from 1 to N), and the summation symbol ∑ in the denominator is for the case where j ≠ yi. N is the batch size, s is the feature scaling factor, and m is the angular boundary. This module makes the feature space present a "compact intra-class, separated inter-class" structure, enhancing the model's tolerance to distribution shifts.

[0069] The overall training objective function of this invention The weighted sum of the losses from the three parts mentioned above:

[0070]

[0071] S5: Identity Recognition

[0072] During the testing phase, the target ECG signal to be identified is input into the trained feature extractor and classifier. Because the feature space structure was optimized during training through intra-individual bi-level constraints and inter-individual discriminative learning modules, the model can effectively extract identity-invariant features from the target signal, calculate its cosine similarity to the feature centers of registered users, and output the final identity recognition result.

[0073] To further illustrate the superiority of this invention, the method of this invention was used to perform ECG identification on four different datasets (ECG-ID, Wilson Central Terminal, CYBHi, and Private-Lab). Accuracy (Acc), Precision (Pre), Recall (Ree), and Harmonic Mean (F1-score, F1) were introduced as performance evaluation parameters. The performance is shown in Table 1. It can be seen that the method of this invention exhibits good performance and is effective. Normal and Low represent the short-term CYBHi dataset, while Now and Later represent the long-term CYBHi dataset.

[0074] Table 1 Performance of the present invention on different datasets

[0075] Database Indicator Single Heartbeat More Heartbeats Private_Lab Accuracy / %Precision / %Recall / %F1-score 70.0773.9070.0768.99 84.0787.9084.0782.99 ECG-ID Accuracy / %Precision / %Recall / %F1-score 93.0293.1292.3192.07 96.2096.6296.0495.66 Normal,Low Accuracy / %Precision / %Recall / %F1-score 61.9463.7061.9059.82 92.8592.3393.0191.78 Now,Later Accuracy / %Precision / %Recall / %F1-score 55.2655.6555.2552.06 84.4882.7384.5482.17 WCT Accuracy / %Precision / %Recall / %F1-score 98.8399.1099.0299.01 99.0799.2699.2699.15

[0076] The cross-membership identity recognition performance was analyzed using the present invention and existing ECG identity recognition methods (ECGIoT, EDITH, ECGXtractor), and the results are shown in Table 2.

[0077] Table 2 Comparison results of the present invention with other existing electrocardiogram identification methods

[0078] Related Works Dataset Heartbeat Length(s) Heartbeat Number Accuracy(%) ECGIoTEDITHERM++ECGXtractorOur Proposed Now,Later 33333 55555 40.9468.1060.9966.0582.17 ECGIoTEDITHERM++ECGXtractorOur Proposed Normal,Low 33333 55555 76.0779.5588.6583.1591.78 ECGIoTEDITHERM++ECGXtractorOur Proposed WCT 0.80.80.80.80.8 11111 98.3797.9097.4493.7199.15 ECGIoTEDITHERM++ECGXtractorOur Proposed ECG-ID 1.761.761.761.761.76 22222 93.9283.1693.7289.7395.66

[0079] As can be seen from Table 2, the present invention has excellent recognition capabilities in long time interval scenarios. In the cross-session test of the CYBHi long-term dataset, the recognition accuracy of the method of the present invention reached 82.17%, which is about 40 percentage points higher than the ECGIoT method, and significantly solves the distribution offset problem in cross-session scenarios.

[0080] The above embodiments are not intended to limit the present invention, and the present invention is not limited to the above embodiments. Any embodiment that meets the requirements of the present invention is within the protection scope of the present invention.

Claims

1. A method for identifying individuals using electrocardiogram (ECG) signals based on single-domain generalization, characterized in that, Includes the following steps: Acquire single-source domain ECG signals and perform preprocessing; The preprocessed electrocardiogram (ECG) signal is subjected to physiological waveform transformation to generate an enhanced ECG signal; An electrocardiogram (ECG) identification model is constructed, comprising a feature extractor, an intra-individual two-level constraint module, and an inter-individual discriminative learning module. The feature extractor is used to extract deep features of the ECG signal. The intra-individual two-level constraint module is used to constrain the feature consistency and probability distribution stability of the single-source domain ECG signal and the enhanced ECG signal. The inter-individual discriminative learning module is used to enhance the angular boundary discrimination between deep features of different individuals and output the identification result of the ECG signal. The ECG identity recognition model is trained using single-source domain ECG signals and enhanced ECG signals. Then, the single-source domain ECG signal to be recognized is input into the trained model to obtain the ECG identity recognition result.

2. The ECG signal identification method based on single-domain generalization according to claim 1, characterized in that, The feature extractor adopts a multi-dilation rate convolutional network structure that combines an attention mechanism, which specifically includes an initial processing block, a multi-scale dilated residual module, and a CBAM attention module connected in sequence. The initial processing block contains a one-dimensional convolutional layer, a batch normalization layer, and a ReLU activation function connected in sequence. The multi-scale dilated residual module contains three parallel branch paths, each branch path consisting of multiple cascaded basic residual blocks, and the convolutional layers in the three branch paths are set with different dilation rates; the outputs of the three branch paths are fused element-wise and then input to a one-dimensional max pooling layer for downsampling, and then input to the CBAM attention module. The CBAM attention module adaptively weights the received features based on channel and spatial dimensions, and then outputs the deep features of the electrocardiogram signal.

3. The ECG signal identification method based on single-domain generalization according to claim 2, characterized in that, The basic residual block contains two stacked convolutional units and a skip connection; each convolutional unit consists of a one-dimensional convolutional layer, a batch normalization layer, a ReLU activation function, and a Dropout layer connected in sequence; the skip connection is used to add the input of the basic residual block to the output of the stacked convolutional units.

4. The ECG signal identification method based on single-domain generalization according to claim 1, characterized in that, The intra-individual two-level constraint module adopts a twin network architecture, including a feature extractor and an identity classifier with shared weights; After the feature extractor outputs a high-dimensional feature map, it is divided into a first path and a second path; the first path directly outputs a feature vector. The second path generates an attention mask through a one-dimensional convolutional layer and a sigmoid activation function; The feature vector of the first path is fused with the attention mask of the second path by element-wise multiplication to obtain key features, and the key features are then input into the identity classifier. The output of the feature extractor is defined as the feature space, where the feature consistency between single-source domain ECG signals and enhanced ECG signals is constrained. The output of the identity classifier is defined as the output space, where the stability of the probability distribution of single-source ECG signals and enhanced ECG signals is constrained.

5. The ECG signal identification method based on single-domain generalization according to claim 4, characterized in that, The SoftDice loss between the attention mask for single-source domain ECG signal generation and the attention mask for enhanced ECG signal generation is calculated in the feature space. The bidirectional KL divergence between the classification probability distribution of the single-source domain ECG signal and the classification probability distribution of the enhanced ECG signal is calculated in the output space.

6. The ECG signal identification method based on single-domain generalization according to claim 1, characterized in that, The inter-individual discriminative learning module uses the ArcFace angular boundary loss function.

7. The ECG signal identification method based on single-domain generalization according to claim 1, characterized in that, The physiological waveform transformation employs one or more of the following four enhancement strategies: (1) Heartbeat rearrangement strategy: By detecting the R peak and calculating the RR interval between adjacent R peaks, the order of heartbeats is randomly shuffled; (2) ST segment enhancement strategy: Locate the start and end points of the ST segment, and apply a random stretching factor with a range of 0.7-1.4 to stretch or compress the ST segment in the time domain; (3) QTc interval enhancement strategy: detect the position of the T wave peak, calculate the corrected QT interval length based on the heart rate range, and resample the ST segment within the prediction range; (4) QRS complex amplitude attenuation enhancement strategy: Locate the QRS group boundary and apply amplitude attenuation or gain to the signal area before or after the QRS group.

8. A single-domain generalization-based electrocardiogram signal identification system implementing the method as described in any one of claims 1-7, characterized in that, Includes the following modules: The data preprocessing module is used to acquire and preprocess the electrocardiogram signal to be identified. The identity authentication module uses a trained ECG identity recognition model to process the preprocessed ECG signal to be identified and outputs the identity recognition result.

9. An electronic device comprising a processor and a memory, characterized in that, The memory stores machine-executable instructions that can be executed by the processor to implement the method as described in any one of claims 1-7.

10. A machine-readable storage medium storing machine-executable instructions, characterized in that, When the machine-executable instructions are invoked and executed by the processor, the machine-executable instructions cause the processor to implement the method as described in any one of claims 1-7.