A cross-state metric open set identification network-based electrocardio identity authentication method and system thereof

By employing multi-stage preprocessing and adaptive decision boundary control through the CMOR-Net network, the robustness of ECG identity recognition across physiological states and the identification of unknown users are addressed, achieving highly secure identity authentication.

CN123158609APending Publication Date: 2026-11-24HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611335576.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing ECG identity recognition technology has poor robustness across physiological states, cannot effectively identify unknown users, and is difficult to balance decision boundaries, resulting in insufficient security and practicality.

Method used

The Cross-State Metric Open Set Recognition Network (CMOR-Net) adopts a decoupled two-stage framework. It optimizes the feature space through multi-stage cascaded preprocessing and cross-state triplet loss function, and combines adaptive decision boundary control to extract individual-specific features and achieve unknown user rejection.

Benefits of technology

It improves the accuracy and stability of ECG identity authentication across physiological states, effectively suppresses the risk of unknown user intrusion, and adapts to diverse application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158609A_ABST
    Figure CN123158609A_ABST
Patent Text Reader

Abstract

This invention discloses an ECG identity authentication method and system based on a cross-state metric open set recognition network. The method includes: firstly, acquiring raw ECG signals and filtering high-quality ECG beats through multi-stage cascaded preprocessing; constructing a CMOR-Net network to extract discriminative embedding features of high-quality ECG beats; optimizing the feature space distribution using cross-state triplet loss; and achieving open set recognition by combining an adaptive decision boundary based on intra-class distance distribution. This invention employs a closed-set / open-set two-stage verification framework to effectively solve the problems of ECG cross-physiological state variations and unknown user intrusion, improving the robustness and security of ECG identity authentication in complex scenarios. It can be widely applied to high-security scenarios such as smart wearables, mobile payments, and security access control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biometric identification technology, and more particularly to an electrocardiogram (ECG) authentication method and system based on an open set identification network with cross-state metrics. This invention can be applied to various scenarios requiring high-security identity verification, such as unlocking smart wearable devices, secure authentication for mobile payments, medical data privacy protection, and access control systems. It is particularly suitable for open and dynamic environments with fluctuating physiological states and the risk of unknown user intrusion. Background Technology

[0002] Biometric identification is a core authentication technology in the field of information security. Electrocardiogram (ECG) signals, originating from the electrophysiological activity of the heart, possess natural liveness, strong anti-counterfeiting properties, and individual uniqueness, making them impossible to copy or steal. This makes them a high-quality biometric for identity authentication, widely used in security, finance, healthcare, and wearable devices. Compared to surface features like fingerprints and faces, which are easily forged or interfered with by environmental factors, the liveness detection characteristics of ECG signals effectively resist forgery attacks using photos, videos, and 3D printing, giving them an irreplaceable advantage in high-security authentication scenarios. Furthermore, ECG signals can be continuously and non-invasively collected through wearable devices such as smartwatches and wristbands, making seamless and continuous identity authentication possible.

[0003] Existing ECG identity recognition technologies are mostly closed-set deep learning solutions, relying on fixed feature matching mechanisms, and can only identify users seen during the training phase. In practical applications, they suffer from three major drawbacks: First, ECG is easily affected by various physiological and psychological factors such as heart rate, emotion, exercise, medication, sleep quality, and diet. Cross-state morphological shifts lead to feature diffusion within classes, making it difficult for fixed feature matching mechanisms to extract stable and consistent identity representations, resulting in insufficient robustness. For example, when a user engages in strenuous exercise, their heart rate increases, the RR interval of the ECG waveform shortens, and the T wave morphology changes, often causing traditional models to fail to identify them correctly. Second, under the closed-set assumption, the model lacks the ability to reject unknown users. In open environments, unauthorized intruders are easily misclassified as legitimate users, posing a serious security risk. In practical applications, it is impossible for the system to pre-register all possible users. When an unregistered user attempts to access the system, the traditional model will forcibly classify them as a known user, causing the identity authentication system to fail. Third, the decision boundary is difficult to balance inclusiveness and exclusivity. A boundary that is too wide easily misidentifies unknown users, while a boundary that is too tight easily rejects legitimate users with changing states, making it difficult to balance security and practicality.

[0004] In recent years, although some studies have attempted to introduce open set recognition mechanisms to address the problem of rejecting unknown users, existing OSR methods still face significant bottlenecks when dealing with scenarios involving different physiological states. Fluctuations in the physiological state of subjects can lead to intra-class diffusion in ECG signals and inter-class overlap of unknown individuals, creating a dilemma for the recognition system in setting boundaries: if the boundaries are set too wide, they cannot effectively reject unauthorized intrusions; if the boundaries are set too tight, legitimate users in emotional or physical states may be mistakenly identified as abnormal. Furthermore, most existing methods treat signal preprocessing and feature learning as independent modules, ignoring the deep correlation between signal quality and identity discriminability. The introduction of low-quality heartbeats can lead to "class overlap" in the feature space, further blurring the decision boundaries.

[0005] Therefore, there is an urgent need for an ECG identity authentication method that can effectively cope with variations across physiological states and has the ability to reject unknown users, so as to break through the application limitations of existing technologies in open and complex scenarios. Summary of the Invention

[0006] The purpose of this invention is to address the technical problems of poor robustness across physiological states, insufficient ability to reject unknown users in open environments, and imbalanced decision boundaries in existing technologies. This invention provides an ECG authentication method and system based on the Cross-state Metric Open-set Recognition Network (CMOR-Net). This invention employs a decoupled two-stage framework, reconstructing traditional closed-set classification into discriminative embedding learning and statistical hypothesis testing. Multi-stage cascaded preprocessing suppresses noise interference at the source, constructs a CMOR-Net network to extract individual-specific features, optimizes the feature space distribution using cross-state triplet loss, and combines adaptive decision boundary control to achieve open-set recognition. This ensures accurate identification of legitimate users while rejecting unknown users.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] In a first aspect, the present invention provides an electrocardiogram (ECG) authentication method based on a cross-state metric open set identification network, comprising the following steps:

[0009] The raw ECG signal was acquired and preprocessed to obtain a standardized heartbeat sequence;

[0010] Construct a CMOR-Net network and extract discriminative embedding features from standardized heartbeat sequences;

[0011] CMOR-Net is trained based on the cross-state triplet loss function to optimize the intra-class compactness and inter-class separability of the feature space. In the cross-state triplet, the anchor sample is taken from the ECG feature of a single physiological state of the subject, the positive sample is taken from the ECG feature of other physiological states of the same subject, and the negative sample is taken from the ECG feature of other subjects.

[0012] The discriminative embedding features of all known identity samples in the training set are extracted using the trained CMOR-Net; the mean of the embedding features of all samples for each known identity is calculated as the feature class center, and the Euclidean distance from the embedding features of each training sample to its class center is calculated to generate the intra-class distance distribution of the known identities; a preset quantile of the intra-class distance distribution is selected as the adaptive decision boundary threshold.

[0013] The ECG signal to be authenticated is obtained, preprocessed, and then input into the trained CMOR-Net to generate test embedding features. The Euclidean distance between the test embedding feature and the class centers of all known identity features is calculated and the minimum distance is determined. If the minimum distance is less than or equal to the adaptive decision boundary threshold, it is determined to be the corresponding known identity; otherwise, it is determined to be an unknown user and the authentication is rejected.

[0014] Furthermore, the preprocessing includes:

[0015] The original ECG signal is converted into a voltage signal by ADC counting and then zero-centered;

[0016] A bandpass filter is used to perform noise reduction processing to remove baseline drift and high-frequency electromyographic noise;

[0017] The R-peak of the noise-reduced ECG signal is detected, and the initial heartbeat is generated by dividing the signal into preset intervals before and after the R-peak.

[0018] Calculate the morphological similarity between a single heartbeat and the mean heartbeat template of the subjects, and screen high-quality heartbeats with a correlation coefficient greater than or equal to a preset threshold;

[0019] Z-score normalization was performed on the selected high-quality heartbeats to generate standardized heartbeat sequences.

[0020] Furthermore, the CMOR-Net network includes an initial feature extraction layer, a stacked morphological aggregation unit (MAU), a channel-domain feature refiner (CFR), a temporal feature refiner (SFR), and an embedding output layer. The initial feature extraction layer extracts basic ECG morphological features through one-dimensional convolution, batch normalization, ReLU activation, and max pooling. The MAU extracts local fine features using a two-layer convolution and residual aggregation structure. The CFR and SFR refine and enhance the features in the channel dimension and temporal dimension, respectively. The embedding output layer generates discriminative embedding features of a unit hypersphere through global average pooling, a fully connected layer, and L2 normalization.

[0021] Furthermore, the formula for the triplet loss function is as follows:

[0022]

[0023] Where A is the anchor point sample embedding feature, P is the positive sample embedding feature, N is the negative sample embedding feature, d(·,·) is the Euclidean distance metric, and α is the preset interval parameter.

[0024] Furthermore, the formula for calculating the feature class center is:

[0025]

[0026] in, For the feature class center of the k-th known identity, Let be the number of samples belonging to the k-th identity. It is the i-th sample in the k-th class.

[0027] Furthermore, the present invention also includes a performance evaluation step:

[0028] A two-stage verification framework of closed set / open set is adopted. First, the intrinsic quality of features is evaluated in the closed set environment, and then the overall performance is tested in the real open set environment.

[0029] Intrinsic Feature Quality Assessment: To pre-validate the discriminative ability of the embeddings learned by CMOR-Net, benchmark testing was performed using a K-Nearest Neighbors (KNN) classifier in a standard closed-set environment. This process directly uses the discriminative embeddings extracted by the trained CMOR-Net without requiring an additional fully connected classification layer. Specific steps include:

[0030] 1) Feature Extraction: Using the trained CMOR-Net, obtain the discriminative embedding vectors of samples from the training set and the test set (containing only known identities), denoted as Z. trian and Z test ;

[0031] 2) KNN model training: Construct a K-nearest neighbor classifier, utilizing only Z... trian and its identity tag Y trian Complete the training;

[0032] 3) Closed set prediction and evaluation: Use the trained KNN classifier to predict and evaluate Z. test Perform identity prediction, calculate the classification accuracy between predicted and real labels, and verify the clustering characteristics of compact similar groups and separation of dissimilar groups in the embedding space.

[0033] In real-world open-set recognition scenarios, the evaluation data consists of known identity data and unknown identity samples that were pre-divided during the preprocessing stage and never participated in training. To ensure the rigor of the evaluation metric calculation, when constructing the open-set test set, all unknown identity samples are uniformly assigned a specific unknown label to clearly distinguish them from all known identity labels.

[0034] For a given test sample x test_real First, its discriminative embedding is z through the CMOR-Net network. test_real =F(x test_real Then, calculate z. test_real To all known class centers {c1,…,c K Find the Euclidean distance between} and find the minimum value d. min and its corresponding nearest category k min As shown in the formula:

[0035]

[0036] Minimum distance d min As a discriminant statistic, it is compared with a preset decision boundary threshold τ, and a final decision is made according to the following rules: If d min If x ≤ τ, then determine x test_real Belongs to known identity k min If d min If x > τ, then determine x test_real For unknown individuals, rejection is warranted.

[0037] In a second aspect, the present invention provides an ECG authentication system based on a cross-state metric open set identification network, for implementing the method described in the first aspect, the system comprising:

[0038] The data acquisition and preprocessing module is used to acquire the ECG signal to be certified and preprocess it to obtain a standardized heartbeat sequence.

[0039] The feature extraction module is used to extract discriminative embedding features of standardized heartbeat sequences using the trained CMOR-Net network;

[0040] The registration and database construction module is used to extract discriminative embedding features of all known identity samples in the training set after the CMOR-Net network training is completed, calculate the mean of the embedding features of all samples for each known identity as the feature class center, generate an intra-class distance distribution based on the Euclidean distance from the embedding features of each training sample to its class center, construct an adaptive decision boundary threshold with the preset quantile of the intra-class distance distribution, and store all known identity class centers and the threshold.

[0041] The online authentication module is used to calculate the Euclidean distance between the discriminative embedded features and the center of all known identity classes and determine the minimum distance, and determine the known identity or reject the unknown user based on the threshold.

[0042] 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.

[0043] 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.

[0044] The beneficial effects of the present invention include at least the following:

[0045] (1) This invention designs a multi-stage cascaded preprocessing strategy. Through cascaded operations of signal conversion, filtering and noise reduction, R-peak detection and segmentation, morphological correlation quality control and standardization, noise and abnormal samples are filtered out from the source, effectively alleviating the covariate shift caused by cross-physiological states and providing a high-quality data foundation for subsequent feature learning.

[0046] (2) The present invention constructs a CMOR-Net network, which accurately captures individual-specific subtle morphological features in ECG signals through the synergistic effect of morphological aggregation units, channel domain and temporal feature refiners.

[0047] (3) The present invention adopts a decoupled two-stage framework and cross-state triplet loss training to separate feature learning from the decision-making process, effectively solving the defect of traditional closed set model in having no ability to reject unknown users.

[0048] (4) The adaptive decision boundary control strategy proposed in this invention dynamically sets the threshold based on the statistical characteristics of intra-class distance distribution, solving the problem that traditional fixed boundaries are difficult to balance inclusiveness and exclusivity. The threshold can be flexibly adjusted according to different application scenarios to adapt to diverse needs. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating an ECG identity authentication method and system based on cross-state metric open set identification network according to an embodiment of the present invention.

[0051] Figure 2 This is a flowchart of the multi-stage cascaded preprocessing of ECG signals according to an embodiment of the present invention.

[0052] Figure 3 This is a schematic diagram of the CMOR-Net network structure according to an embodiment of the present invention.

[0053] Figure 4 This is a schematic diagram of the online identity decision-making logic in an embodiment of the present invention.

[0054] Figure 5 This is a graph illustrating the open set performance verification of an embodiment of the present invention. Detailed Implementation

[0055] To more clearly illustrate the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described herein are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0056] This application provides a method and system for ECG identity authentication based on cross-state metric open set identification network, aiming to effectively address cross-physiological state variations, improve the ability to reject unknown users in open environments, and solve the problems of poor robustness and insufficient security of traditional ECG identity authentication technology in cross-state scenarios.

[0057] The above technical solution will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0058] like Figure 1 As shown in the figure, this invention provides a block diagram of an ECG authentication method and system based on a cross-state metric open set identification network, comprising:

[0059] S1. Perform multi-stage cascaded preprocessing on the raw ECG signal to screen high-quality heartbeats and generate standardized heartbeat sequences;

[0060] S2. Construct a CMOR-Net network and extract discriminative embedding features of ECG heartbeats;

[0061] S3. Train CMOR-Net based on cross-state triplet loss function to optimize intra-class compactness and inter-class separation of feature space;

[0062] S4. Calculate the class centers of known identity features and construct an adaptive decision boundary threshold based on the intra-class distance distribution;

[0063] S5. The model performance is evaluated using a two-stage closed-set / open-set framework. The test ECG embedded features are compared with the known identity class centers, and the known identity is determined or the unknown user is rejected based on the threshold.

[0064] This invention introduces a cross-state metric learning mechanism in the feature learning stage, which, combined with multi-stage preprocessing and adaptive decision boundaries, improves the accuracy and stability of ECG identity authentication under non-static physiological states, effectively suppresses the risk of unknown user intrusion, and has broad scenario adaptability and promotional application value.

[0065] As shown in Figure 2, which illustrates the ECG signal preprocessing flowchart of an embodiment of the present invention, the following will describe each step in detail with reference to Figure 2:

[0066] In step S1, a multi-stage cascaded preprocessing is performed on the raw ECG signal to select high-quality heartbeats and generate a standardized heartbeat sequence. This step solves the problem of overlapping feature space domains caused by low-quality heartbeats.

[0067] This embodiment uses a short subset of the CYBHi dataset, employing ECG recordings from healthy subjects under three typical physiological states: high mood, low mood, and calm. The sampling frequency is 1000Hz, and the resolution is 12 bits. The dataset contains 65 subjects, with one recording for each of the three typical physiological states. The dataset is divided into a development set and an open validation set: the development set comprises 70% of the total data and is further divided into training, testing, and validation sets in a 7:2:1 ratio for model training and closed-set validation; the open validation set comprises 30% of the total data and consists of unknown-identity subjects who have never participated in training, used for open-set performance evaluation.

[0068] 1-1 Obtain a set of raw ECG signals under multiple physiological conditions.

[0069] 1-2 Convert the ADC count of the original ECG signal to voltage units using the following formula:

[0070] V = (ADC - 2048) * 3.3 / 4096

[0071] Where 2048 is the DC bias value of the 12-bit ADC, 3.3V is the reference voltage, and 4096 is the maximum range of the 12-bit ADC; the converted signal is zero-centered to eliminate the static error of the system.

[0072] 1-3 A fourth-order Butterworth bandpass filter was used for noise reduction, with a passband range of 0.5Hz to 40Hz and an order of 4. This filter has the flattest amplitude response within the passband, effectively removing baseline drift (<0.5Hz) and high-frequency electromyographic noise (>40Hz) from the signal, while preserving key morphological features of the ECG signal such as the P wave, QRS complex, and T wave. Zero-phase filtering was used to avoid phase distortion.

[0073] 1-4 The Pan-Tompkins algorithm is used to detect the R-peak of the ECG signal. The specific steps are as follows: the signal is differentiated using the differential operator [1, 2, 0, -2, -1]; the differential result is squared; the local energy is calculated by integration over a 150ms sliding window; the R-peak position is detected using an adaptive threshold, with the initial threshold value being 0.6 times the peak value of the signal, and dynamically updated based on the amplitude of the most recent 8 R-peaks; a 200ms refractory period is set to avoid false detections.

[0074] 1-5 An initial heartbeat sequence with 600 sampling points was generated by dividing the interval into 200ms before and 400ms after the R peak, covering the complete P wave, QRS complex and T wave.

[0075] 1-6 Calculate the empirical mean template x for all heartbeats under each physiological state for each subject. template .

[0076] Where N is the number of heartbeats in this state, x i Let i be the i-th heartbeat.

[0077] 1-7 Quantification of Single-Heart Beats Based on Pearson Correlation Coefficient i The formula for morphological similarity with the mean template is:

[0078]

[0079] Set the preset heartbeat quality control threshold ρ th =0.90, only the correlation coefficient ρ i Exceeding the preset threshold ρ th Only the highest quality photos are preserved.

[0080] 1-8 Perform Z-score standardization on the selected high-quality heartbeats.

[0081] In step S2, a CMOR-Net network is constructed to extract discriminative embedding features from ECG heartbeats. This step addresses the problem that traditional networks struggle to capture subtle morphological differences in ECGs, thereby improving feature discriminative power.

[0082] In this embodiment, the CMOR-Net network takes a standardized heartbeat sequence with 600 sampling points as input and outputs a 128-dimensional discriminative embedding feature.

[0083] 2-1 Initial Feature Extraction: The preprocessed heartbeat is input into the initial feature extraction layer, and then sequentially passes through one-dimensional convolution (convolution kernel size 15×1, stride 2, output channels 64, padding=7), batch normalization, ReLU activation and max pooling (pooling size 2×1, stride 2) to extract the basic macroscopic morphological features of the ECG signal, while reducing the feature length to 150.

[0084] 2-2 MAU Feature Aggregation: Four morphological aggregation units (MAUs) are stacked. Each MAU adopts a two-layer 3×1 convolutional architecture: the first convolutional layer (128 output channels, padding=1) is followed by BatchNorm and then ReLU transformation is performed; the second convolutional layer (128 output channels, padding=1) is followed by the output of BatchNorm and the shortcut path signal, and then element-wise addition is performed, followed by a unified ReLU function. When the dimensions of the main path and the shortcut path do not match, adaptive dimension adjustment is performed through a projection module containing 1×1 convolutions and batch normalization layers.

[0085] 2-3 Feature Refinement: Features are sequentially input into the Channel Domain Feature Refiner (CFR) and the Temporal Domain Feature Refiner (SFR). The CFR generates 128-dimensional channel statistical features through global average pooling and global max pooling, respectively, and feeds them into a shared two-layer MLP (32-dimensional hidden layer) to generate channel weights, which are then multiplied by the original features one channel at a time. The SFR performs mean and maximum concatenation along the channel axis, uses a 15×1 large kernel convolution to capture temporal context information, generates temporal weights, and performs element-wise multiplication with the original features.

[0086] 2-4 Embedded Output: The refined features are compressed into a 128-dimensional feature vector by global average pooling, and then passed through a fully connected layer (output dimension 128), batch normalization, ReLU activation, Dropout (dropout rate 0.2) and L2 normalization to generate discriminative embedded features of a unit hypersphere.

[0087] In step S3, CMOR-Net is trained based on the cross-state triplet loss function to optimize the intra-class compactness and inter-class separability of the feature space. This step solves the problem of intra-class feature diffusion across physiological states, thereby reducing the intra-class feature dispersion.

[0088] 3-1 Triple Construction: In each training iteration, cross-state triples (A, P, N) are constructed by sampling from the training set. The anchor sample A is taken from the feature representation of a certain physiological state of subject X, the positive sample P is randomly drawn from the heartbeats of subject X in other different physiological states, and the negative sample N is randomly selected from any state records of other subjects in the training set. The triple strategy is used for training.

[0089] 3-2 Loss Optimization: The sample distribution in the feature space is constrained by the triplet loss function, as shown in the formula:

[0090]

[0091] Where d(·,·) is the Euclidean distance metric; A is the anchor sample embedding feature, P is the positive sample embedding feature, N is the negative sample embedding feature, and α is the preset interval parameter, which is α=1 in this embodiment. This loss function encourages the feature vectors of different physiological states of the same subject to converge, while pushing outlier samples away from the preset interval.

[0092] In step S4, the known identity feature class centers are calculated, and an adaptive decision boundary threshold is constructed based on the intra-class distance distribution.

[0093] 4-1 Class Center Calculation: After training, for each known identity in the training set, calculate the mean of the discriminative embedding vectors of all training samples for that identity, and use this mean as the feature class center c for that identity. k The formula is:

[0094]

[0095] in, For the feature class center of the k-th known identity, Let be the number of samples belonging to the k-th identity. It is the i-th sample in the k-th class.

[0096] 4-2 Intra-class distance distribution modeling: Calculate z for each training sample i To its corresponding identity class center c yi The Euclidean distance di is given by the formula:

[0097]

[0098] Where, d i Let z be the Euclidean distance from the training sample to the center of the corresponding identity class. i To embed features into training samples, c yi The feature class center corresponds to the identity.

[0099] All Euclidean distances constitute the intra-class distance distribution P for known identities. train (d)

[0100] 4-3 Select P train (d) The higher percentile is used to determine the decision boundary threshold τ.

[0101]

[0102] Where F train (d) is P train (d) is the empirical cumulative distribution function, where η is the selected percentile value. In CMOR-Net, through experimental verification, this embodiment sets τ to the 90th percentile of the intra-class distance (i.e., η=90). Those skilled in the art can also adjust it according to actual needs, which is not limited here.

[0103] In step S5, a two-stage framework of closed set / open set is used for model evaluation and identity authentication. The test ECG embedded features are compared with the known identity class centers, and the known identity is determined or the unknown user is rejected based on the threshold.

[0104] 5-1 Quality Assessment of Intrinsic Characteristics in Closed-Set Environments

[0105] This phase uses only samples with known identities to verify the clustering properties of the extracted features:

[0106] 1) Using the trained CMOR-Net, extract the embedding vectors Z from the training set and closed test set of subjects with known identities, respectively. trian and Z test ;

[0107] 2) Construct a KNN classifier with K=3, using only Z0. trian and corresponding identity tag Y trian Conduct training;

[0108] 3) Use the trained KNN on Z test Identity prediction was performed, and classification accuracy was calculated to prove that the extracted features have good discriminative power.

[0109] 5-2 Comprehensive Performance Evaluation in Open Set Environment

[0110] 1) Mix the closed-set test set of 70% known-identity subjects with all data of 30% unknown-identity subjects who have never participated in training to construct an open-set test set; assign a unique unknown label to all unknown-identity samples.

[0111] 2) Test Feature Extraction: Perform multi-stage cascaded preprocessing on the input test ECG signal, identical to the offline stage, and input it into the trained CMOR-Net network to generate test embedding features Z. test .

[0112] 3) Distance calculation: Calculate the test embedding feature Z. test Find the minimum value d among the Euclidean distances to the centers of all known identity classes. min and its corresponding nearest category k min .

[0113] 4) Identity Determination: Compare the minimum distance dmin with the preset adaptive decision boundary threshold τ. If dmin... min If the value is less than or equal to τ, then the test sample is determined to belong to the known identity k. min If d min If the value is greater than τ, the user is considered an unknown user and denied authentication. Performance is evaluated by comparing the authentication success rate for known individuals with the authentication rejection rate for unknown individuals.

[0114] To comprehensively evaluate CMOR-Net's cross-state ECG authentication capabilities, this invention uses a short subset of the CYBHi dataset for evaluation, mixing open validation set and training set data to verify the open set recognition accuracy, i.e., the authentication pass accuracy for known individuals and the authentication rejection accuracy for unknown individuals.

[0115] All experiments were implemented using the PyTorch deep learning framework on a hardware platform equipped with an NVIDIA RTX 3060 GPU with 16 GB of memory. The raw ECG signals were segmented, and the length of each heartbeat sequence input to the network was fixed at 600 samples. AdamW was used as the optimizer with an initial learning rate of 0.0001. The batch size was set to 32, and the model was trained for 200 epochs. Experimental results are as follows: Figure 5 As shown.

[0116] according to Figure 5 The experimental results show that the open-set authentication performance of CMOR-Net is significantly correlated with the choice of decision boundary quantiles. The results indicate that when the quantile increases from 90 to 91, both metrics improve and reach a peak; after this peak, they exhibit an overall downward trend with fluctuations. When the decision boundary quantile is set to 91, the system achieves the optimal performance balance, with known-set authentication accuracy and open-set authentication accuracy reaching peak values ​​of 96.59% and 94.22%, respectively. These results demonstrate that at this quantile, CMOR-Net can construct a decision surface in the feature embedding space that balances rigor and inclusiveness, accurately capturing the feature distribution of known classes while preserving sufficient discriminative power for unknown class samples.

[0117] The above embodiments are merely preferred embodiments of the present invention. Any equivalent substitutions or improvements based on the core technical solutions of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for ECG identity authentication based on cross-state metric open set recognition networks, characterized in that, Includes the following steps: The raw ECG signal was acquired and preprocessed to obtain a standardized heartbeat sequence; Construct a CMOR-Net network and extract discriminative embedding features from standardized heartbeat sequences; CMOR-Net is trained based on the cross-state triplet loss function to optimize the intra-class compactness and inter-class separability of the feature space. In the cross-state triplet, the anchor sample is taken from the ECG feature of a single physiological state of the subject, the positive sample is taken from the ECG feature of other physiological states of the same subject, and the negative sample is taken from the ECG feature of other subjects. Discriminative embedding features of all known identity samples in the training set are extracted using the trained CMOR-Net; Calculate the mean of the embedded features of all samples for each known identity as the feature class center, and calculate the Euclidean distance from the embedded features of each training sample to its class center to generate the intra-class distance distribution of the known identities; select the preset quantile of the intra-class distance distribution as the adaptive decision boundary threshold. The ECG signal to be authenticated is obtained, preprocessed, and then input into the trained CMOR-Net to generate test embedding features. The Euclidean distance between the test embedding feature and the class centers of all known identity features is calculated and the minimum distance is determined. If the minimum distance is less than or equal to the adaptive decision boundary threshold, it is determined to be the corresponding known identity; otherwise, it is determined to be an unknown user and the authentication is rejected.

2. The ECG authentication method based on cross-state metric open set identification network according to claim 1, characterized in that, The preprocessing includes: The original ECG signal is converted into a voltage signal by ADC counting and then zero-centered; A bandpass filter is used to perform noise reduction processing to remove baseline drift and high-frequency electromyographic noise; The R-peak of the noise-reduced ECG signal is detected, and the initial heartbeat is generated by dividing the signal into preset intervals before and after the R-peak. Calculate the morphological similarity between a single heartbeat and the mean heartbeat template of the subjects, and screen high-quality heartbeats with a correlation coefficient greater than or equal to a preset threshold; Z-score normalization was performed on the selected high-quality heartbeats to generate standardized heartbeat sequences.

3. The ECG authentication method based on cross-state metric open set identification network according to claim 1, characterized in that, The CMOR-Net network comprises an initial feature extraction layer, a stacked morphological aggregation unit (MAU), a channel-domain feature refiner (CFR), a temporal feature refiner (SFR), and an embedding output layer. The initial feature extraction layer extracts basic ECG morphological features through one-dimensional convolution, batch normalization, ReLU activation, and max pooling. The MAU extracts local fine features using a two-layer convolution and residual aggregation structure. The CFR and SFR refine and enhance the features in the channel and temporal dimensions, respectively. The embedding output layer generates discriminative embedding features of a unit hypersphere through global average pooling, a fully connected layer, and L2 normalization.

4. The ECG authentication method based on cross-state metric open set identification network according to claim 1, characterized in that, The formula for the triplet loss function is as follows: Where A is the anchor point sample embedding feature, P is the positive sample embedding feature, N is the negative sample embedding feature, d(·,·) is the Euclidean distance metric, and α is the preset interval parameter.

5. The ECG authentication method based on cross-state metric open set identification network according to claim 1, characterized in that, The formula for calculating the feature class center is: in, For the feature class center of the k-th known identity, Let be the number of samples belonging to the k-th identity. It is the i-th sample in the k-th class.

6. A ECG authentication system based on a cross-state metric open set identification network implementing the method as described in any one of claims 1-5, characterized in that, The system includes: The data acquisition and preprocessing module is used to acquire the ECG signal to be certified and preprocess it to obtain a standardized heartbeat sequence. The feature extraction module is used to extract discriminative embedding features of standardized heartbeat sequences using the trained CMOR-Net network; The registration and database construction module is used to extract discriminative embedding features of all known identity samples in the training set after the CMOR-Net network training is completed, calculate the mean of the embedding features of all samples for each known identity as the feature class center, generate an intra-class distance distribution based on the Euclidean distance from the embedding features of each training sample to its class center, construct an adaptive decision boundary threshold with the preset quantile of the intra-class distance distribution, and store all known identity class centers and the threshold. The online authentication module is used to calculate the Euclidean distance between the discriminative embedded features and the center of all known identity classes and determine the minimum distance, and determine the known identity or reject the unknown user based on the threshold.

7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method as described in any one of claims 1-5.

8. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method as described in any one of claims 1-5.