Lead channel self-adaptive independent fetal electrocardiogram extraction method and training method and system thereof
Through the independent fetal ECG extraction method adapted by lead channel, the problem of weak and susceptible interference of fetal ECG signals is solved, and higher extraction accuracy and robustness is achieved, providing new technical means for clinical diagnosis.
Patent Information
- Application Number
- CN202510275438.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-06
AI Technical Summary
The fetal electrocardiogram signal is weak and susceptible to interference. It is difficult for traditional extraction methods to accurately separate or reduce the fetal QRS waveform, and the diversity of acquisition conditions and signal defects lead to poor applicability.
The independent fetal ECG extraction method with lead channel adaptation is used to generate independent fetal ECG signals through signal encoding, feature evaluation, multi-channel weighted fusion and signal decoding, deep feature extraction and confidence evaluation.
It significantly improves the accuracy and robustness of fetal electrocardiogram extraction, can effectively adapt under different acquisition conditions, and provides higher signal extraction effects and clinical diagnostic basis.
Smart Images

Figure CN120093325A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of non-invasive fetal electrocardiogram detection, and in particular relates to a lead channel adaptive independent fetal electrocardiogram extraction method and a training method and system thereof. Background Art
[0002] As a non-invasive examination method, fetal electrocardiogram technology has important clinical significance in prenatal monitoring of fetal heart activity, evaluation of heart development and functional changes, especially in the early diagnosis of arrhythmias in high-risk pregnant women. Usually, the fetal electrocardiogram signal is collected by a fetal electrocardiograph through the mother's abdominal wall. The obtained signal contains both the mother's and fetal's electrocardiogram waveforms. Therefore, a certain signal processing method must be used to extract an independent fetal electrocardiogram for accurate interpretation by clinical physicians.
[0003] However, the existing technology has the following main problems:
[0004] 1. The signal is weak and susceptible to interference
[0005] Fetal electrocardiogram signals are extremely weak in nature and are easily affected by the pregnant woman's own electrocardiogram, muscle electrical activity, and external electromagnetic interference, resulting in high signal noise and increased difficulty in extraction.
[0006] 2. Limitations of traditional extraction methods
[0007] Currently commonly used filtering and frequency domain separation methods are difficult to capture subtle changes in the fetal ECG rhythm, especially unable to accurately separate or restore the fetal QRS waveform; some methods even require the simultaneous acquisition of maternal chest leads as reference signals, which is complex and easily introduces additional noise.
[0008] 3. Diversity of acquisition conditions and signal loss issues
[0009] In clinical practice, due to the inconsistency of ECG machine models, number of acquisition channels, and acquisition conditions, the acquired multi-lead signals have large differences in signal quality and integrity. In addition, factors such as maternal movement, probe shedding, or equipment failure often lead to incomplete or missing signals from some leads, making traditional methods less applicable under different conditions and limiting their promotion and application.
[0010] The above problems restrict the widespread clinical application of existing fetal electrocardiogram technology and the demand for high-precision diagnosis. Summary of the invention
[0011] The purpose of the present invention is to address the deficiencies of the above-mentioned background technology and to provide an independent fetal electrocardiogram extraction method with adaptive lead channels and its training method and system. By performing deep feature extraction, confidence evaluation, multi-channel weighted fusion and signal decoding on multi-lead signals, the problems of weak signals, severe interference and acquisition signal defects are effectively solved, and the accuracy and robustness of fetal electrocardiogram extraction are significantly improved, providing a new technical means for the early clinical diagnosis of fetal arrhythmias.
[0012] The technical solution adopted by the present invention is: a lead channel adaptive independent fetal electrocardiogram extraction method, comprising the following steps:
[0013] Signal encoding: Encode the multi-lead mixed ECG signal collected from the maternal abdominal wall and convert each channel signal into a high-dimensional feature representation;
[0014] Feature evaluation: Evaluate the high-dimensional feature representation and assign confidence to each feature through spatiotemporal attention mechanism and uncertainty perception;
[0015] Multi-channel fusion: weight and fuse the features of different lead channels based on confidence to generate fused feature representation;
[0016] Signal decoding: decoding the fused feature representation into an independent fetal electrocardiogram signal.
[0017] In the above technical solution, the signal encoding step uses a deep neural network to perform feature conversion on the mixed electrocardiogram signal.
[0018] In the above technical solution, the feature evaluation step uses a certain dimension in the high-dimensional feature matrix as the basic unit, performs confidence calculation on each dimension, and then uses the remaining dimensions as indexes to calculate one by one and finally generate a confidence value matrix of the same size as the original high-dimensional feature matrix.
[0019] In the above technical solution, the feature evaluation process includes:
[0020] For each basic unit, keep the Monte Carlo random drop sampling open, perform multiple forward propagations to obtain a set of output samples, and use the sample set to calculate the variance of each dimension, and generate an uncertainty score after normalization;
[0021] Adopting the spatiotemporal attention mechanism, the attention weight is calculated according to the location of the basic unit and its context information;
[0022] The uncertainty score attention weights of each basic unit are dynamically fused, and the original features of the basic unit are combined in a residual manner to generate a confidence value vector for each basic unit.
[0023] Rearrange the confidence value vectors of all basic units according to the index of the original high-dimensional feature matrix to form a confidence value matrix of the same size as the original high-dimensional feature matrix;
[0024] The confidence value matrix is multiplied and accumulated element by element with the original three-dimensional feature matrix to form a weighted feature representation.
[0025] In the above technical solution, the process of multi-channel fusion includes:
[0026] Multiply the confidence value matrix of each lead channel by a preset weight coefficient;
[0027] In all lead channels, the weighted confidence values at the same index position are compared and the maximum value at that position is retained to form a confidence feature matrix after weighted fusion.
[0028] In the above technical solution, the signal decoding step uses a convolutional neural network combined with a bidirectional long short-term memory network to restore the fused feature representation to a one-dimensional fetal electrocardiogram signal to accurately capture the QRS complex characteristics in the signal.
[0029] The present invention also provides a training method for independent fetal electrocardiogram extraction, comprising the following steps:
[0030] Acquire training data including maternal abdominal wall multi-lead mixed electrocardiogram signals and fetal direct electrocardiogram signals, and preprocess and segment the data to form multiple data segments;
[0031] Performing signal loss simulation processing on the data segments to reproduce the signal loss situation that may occur in actual acquisition;
[0032] Signal encoding is performed on the processed data segments to generate high-dimensional feature representations;
[0033] Performing feature evaluation on the high-dimensional feature representation to generate a confidence value matrix of the same size as the high-dimensional feature representation;
[0034] Perform weighted fusion on the confidence value matrices from different leads to generate a fused confidence feature representation;
[0035] Performing signal decoding on the fused confidence feature representation to obtain an independent fetal electrocardiogram signal;
[0036] The loss of the decoding result is calculated based on the reference fetal direct electrocardiogram signal, and the back propagation algorithm is used to optimize the parameters of the signal encoding and signal decoding until the loss converges.
[0037] In the above technical solution, the preprocessing and segmentation steps of the training data include equally dividing the maternal abdominal wall ECG signals of multiple leads and at least a single lead of the fetal direct ECG signals in a single training sample of the data set into several groups of data segments, each group of data segments contains all the maternal abdominal wall ECG signal segments and the corresponding fetal direct ECG signal segments, and the length of each group of data segments is consistent and contains at least a complete QRS waveform signal.
[0038] In the above technical solution, the step of processing the defect of the data segments includes: determining whether to perform defect processing on the maternal abdominal wall ECG signal channel in each group of data segments with a preset probability; if it is determined to perform defect processing, setting all signal values of each maternal abdominal wall ECG signal channel to zero with a preset probability.
[0039] The present invention provides an independent fetal electrocardiogram extraction system with adaptive lead channels, comprising:
[0040] A signal encoding module is used to encode the multi-lead mixed electrocardiogram signal collected from the maternal abdominal wall and convert each channel signal into a high-dimensional feature representation;
[0041] A feature evaluation module, used to evaluate the high-dimensional feature representation and assign confidence to each feature through a spatiotemporal attention mechanism and uncertainty perception;
[0042] The multi-channel fusion module is used to weight and fuse the features of different lead channels based on confidence and generate a fused feature representation;
[0043] A signal decoding module is used to decode the fused feature representation into an independent fetal electrocardiogram signal.
[0044] The beneficial effects of the present invention are as follows: the present invention discloses an independent fetal electrocardiogram extraction method based on multiple steps (signal encoding, feature evaluation, multi-channel fusion and signal decoding), which can accurately extract independent fetal electrocardiogram signals from mixed signals collected from the maternal abdominal wall. The method is adaptable to different numbers of leads without relying on maternal chest leads, and improves the accuracy and robustness of signal extraction through modular processing.
[0045] Furthermore, the present invention adopts deep neural network for signal encoding, which gives the system powerful feature extraction and filtering capabilities, can effectively suppress noise and capture weak fetal ECG characteristics, thereby improving the extraction effect.
[0046] Furthermore, the present invention uses a certain dimension in the high-dimensional feature matrix as the basic unit for confidence calculation, and then uses other dimensional information as indexes to assign confidence to each basic feature, thereby achieving a detailed assessment of feature quality. This processing method provides reliable confidence information for subsequent fusion and decoding, which is conducive to accurately restoring fetal ECG signals.
[0047] Furthermore, the present invention adopts Monte Carlo random dropout and multiple forward propagation to calculate the variance of output samples on each basic unit, and combines the spatiotemporal attention mechanism for dynamic fusion, and then combines the original features with the fusion results in a residual manner, so that the confidence value vector can simultaneously reflect the uncertainty and context relevance of the features. This combined method can effectively suppress the influence of low-confidence (noise or distortion) features, thereby improving the accuracy and stability of overall signal extraction.
[0048] Furthermore, the present invention uses preset weights to weight the confidence value matrix of each lead channel, and compares the weighted results of each channel at the same position to obtain the maximum value of the fusion strategy, which helps to automatically select the most reliable signal feature at a specific moment. This multi-channel fusion method can effectively balance the differences in signal quality between different leads and improve the adaptability and robustness of the system to signal defects or interference.
[0049] Furthermore, the present invention adopts a signal decoding method combining a convolutional neural network with a bidirectional long short-term memory network, which can fully capture the timing information and accurately restore the key waveforms (such as QRS complex) in the fetal electrocardiogram. This decoding method ensures the high accuracy of signal reconstruction and provides a reliable basis for clinical diagnosis.
[0050] Furthermore, the present invention proposes a complete training method, from data preprocessing, signal defect simulation, feature extraction, confidence evaluation, signal fusion to decoding and parameter optimization, to build an end-to-end training process. This method can not only optimize the noise and signal incompleteness problems in actual acquisition, but also realize the joint optimization of encoder and decoder parameters through back propagation, which significantly improves the generalization ability and practical application performance of the model.
[0051] Furthermore, in the training data preprocessing and segmentation steps, the present invention equally divides the multi-lead maternal abdominal wall ECG signals and fetal direct ECG signals in a single training sample into several groups of data segments, ensuring that each segment has the same length and contains a complete QRS waveform. This data slicing method ensures the consistency and representativeness of the training data, and provides a good data foundation for the model to learn stable ECG features.
[0052] Furthermore, the present invention implements defect processing on the data segments, by determining whether the maternal abdominal wall ECG signal channel is defective with a preset probability, and setting the signal of each channel to zero when it is defective, simulating the signal loss that may occur in actual acquisition. The defect processing enables the model to learn how to automatically eliminate or compensate for the signal loss problem during the training process, thereby enhancing the robustness and applicability of the model under different acquisition conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the independent fetal electrocardiogram extraction method proposed by the present invention;
[0054] Figure 2 It is a schematic diagram of the feature evaluation module and the multi-channel fusion module in the method proposed in the present invention. DETAILED DESCRIPTION
[0055] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments to facilitate a clear understanding of the present invention, but they do not constitute a limitation on the present invention.
[0056] Example 1
[0057] like Figure 1 As shown, the present invention provides a lead channel adaptive independent fetal electrocardiogram extraction method, comprising the following steps:
[0058] Signal encoding: Encode the multi-lead mixed ECG signal collected from the maternal abdominal wall and convert each channel signal into a high-dimensional feature representation;
[0059] Feature evaluation: Evaluate the high-dimensional feature representation and assign confidence to each feature through spatiotemporal attention mechanism and uncertainty perception;
[0060] Multi-channel fusion: weight and fuse the features of different lead channels based on confidence to generate fused feature representation;
[0061] Signal decoding: decoding the fused feature representation into an independent fetal electrocardiogram signal.
[0062] Specifically, the signal encoding step can perform feature conversion and feature extraction on the mixed ECG signal of each lead channel, specifically by using a deep neural network algorithm, such as a one-dimensional convolutional neural network, a long short-term memory neural network, a gated recurrent neural network, and various hybrid neural networks based on convolutional neural networks and recurrent neural networks, to encode the mixed signal, obtain the deep features or high-dimensional feature matrix of the mixed ECG signal, and output a three-dimensional feature matrix.
[0063] The three dimensions of the above three-dimensional matrix can represent the following information respectively:
[0064] Spatial / channel dimension: corresponds to different leads or sensor channels;
[0065] Time dimension: reflects the continuous change of the signal over time;
[0066] Feature dimension: represents the multi-dimensional feature information obtained at each time step after extraction by the deep neural network.
[0067] This three-dimensional structure helps the subsequent feature evaluation module to use a certain dimension (usually the feature dimension) as the basic unit, combine spatiotemporal attention and uncertainty perception mechanisms for processing, and align and compare when multi-channel fusion occurs.
[0068] In this embodiment, the three-dimensional feature matrix is selected to output mainly to facilitate the simultaneous capture of space (leads), time and feature information, so that subsequent modules (such as feature evaluation and multi-channel fusion) can make full use of and refine this information. In theory, the dimensional arrangement of features can be adjusted according to the needs of specific tasks and network structures. For example, if the network architecture is redesigned, two-dimensional or higher-dimensional tensors can also be output, but this requires corresponding adjustments to subsequent processing steps to ensure effective fusion and utilization of information. The use of a three-dimensional feature matrix allows the model to better express the complex features in the mixed electrocardiogram, and is also in line with the common multi-dimensional data representation methods in current deep learning processing (for example, video data is usually represented as a three-dimensional or four-dimensional tensor).
[0069] Preferably, the signal encoding process first pre-processes the mixed electrocardiogram signal collected from each lead (such as denoising and normalization) to ensure that the signal quality meets the subsequent processing requirements.
[0070] The deep neural network algorithm used in this embodiment includes:
[0071] Convolutional neural network (CNN) layer, which uses a one-dimensional convolution layer to extract local features of the preprocessed signal to capture short-term waveforms and local time domain patterns, and at the same time reduces the dimension through the pooling layer to enhance robustness;
[0072] The recurrent neural network (RNN) layer uses the long short-term memory network (LSTM), gated recurrent neural network (GRU) or its variants to capture the long-term dependency and global dynamic information of the signal. These layers can remember the key historical information in the time series and further improve the feature representation ability.
[0073] In this embodiment, CNN may be used to extract local features first, and then the feature sequence output by CNN may be passed to the RNN layer to combine local and global information.
[0074] Alternatively, multiple parallel branches are set up in the input layer, one branch focuses on local feature extraction (CNN), and the other branch focuses on time series modeling (RNN). Finally, the results of each branch are integrated through the fusion layer.
[0075] The above design methods can effectively improve the accuracy and robustness of feature extraction.
[0076] After the hybrid neural network processing, the system will get a high-dimensional feature representation. This representation is organized into a three-dimensional matrix according to a certain logic, where:
[0077] The first dimension can represent the time step (or sampling window), reflecting the timing information of the signal;
[0078] The second dimension can represent the combination of features of each lead or parallel branches;
[0079] The third dimension represents the deep feature dimension, that is, the abstract features extracted by multi-layer networks.
[0080] This three-dimensional structure can fully preserve the local, global and inter-channel information of the signal, providing a sufficient basis for subsequent feature evaluation, fusion and decoding.
[0081] Specifically, the feature evaluation step uses a certain dimension in the high-dimensional feature matrix as a basic unit, performs confidence calculation on each dimension, and then uses the remaining dimensions as indexes to calculate one by one and finally generate a confidence value matrix of the same size as the original high-dimensional feature matrix.
[0082] The feature evaluation process includes:
[0083] For each basic unit, keep the Monte Carlo random drop sampling open, perform multiple forward propagations to obtain a set of output samples, and use the sample set to calculate the variance of each dimension, and generate an uncertainty score after normalization;
[0084] Adopting the spatiotemporal attention mechanism, the attention weight is calculated according to the location of the basic unit and its context information;
[0085] The uncertainty score attention weights of each basic unit are dynamically fused, and the original features of the basic unit are combined in a residual manner to generate a confidence value vector for each basic unit.
[0086] Rearrange the confidence value vectors of all basic units according to the index of the original high-dimensional feature matrix to form a confidence value matrix of the same size as the original high-dimensional feature matrix;
[0087] The confidence value matrix is multiplied and accumulated element by element with the original three-dimensional feature matrix to form a weighted feature representation.
[0088] Preferably, the feature evaluation process specifically includes:
[0089] 1. Basic unit division
[0090] Input: Assume that the three-dimensional feature matrix output by the signal encoding module is:
[0091]
[0092] in:
[0093] D 1 Represents one of the time dimension or channel dimension; D 2 Indicates another spatial or temporal dimension; D 3 Represents the dimension of deep features.
[0094] Select D 3 (or other suitable dimensions) as the basic unit, corresponding to each position (denoted by D 1 and D 2 For example, for a fixed index i,j, its basic unit is:
[0095] x i,j =[F i,j,1 , F i,j,2 , ..., F i,j , D 3 ]
[0096] 2. Evaluate uncertainty for each basic unit
[0097] For each basic unit x i,j , keep the Dropout (random dropout) mechanism open in the signal encoding module, perform multiple (T times) forward propagation, and obtain a set of output samples:
[0098]
[0099] Calculate the variance of this set of samples in each dimension, recorded as:
[0100]
[0101] The variance is normalized using the Sigmoid function, and then the uncertainty measure score is obtained by subtracting the normalized result from 1 (smaller variance corresponds to higher confidence):
[0102] b i,j =1-Sigmoid(Var(x i,j ))
[0103] Here i,j is a i,j A vector of the same size, representing the uncertainty adjustment score for each feature dimension.
[0104] 3. Calculate spatiotemporal attention weights
[0105] A spatiotemporal attention mechanism is used to model the location of the basic unit and its contextual information in the entire matrix.
[0106] The query (q), key (k), and value (v) vectors can be constructed and the similarity can be calculated through dot product to obtain the attention score.
[0107] Calculate the attention weight at a certain position of the basic unit, recorded as:
[0108] a i,j =Attention(x i,j , Context)
[0109] Among them, Attention() represents the spatiotemporal attention calculation process (including scaling, Softmax normalization, etc.), and the output a i,j For a i,j Vectors of the same size.
[0110] 4. Dynamic Fusion and Residual Fusion
[0111] The uncertainty score b obtained in step 2 i,j and the attention weight a in step 3 i,j To fuse the two, element-by-element multiplication is generally used to combine the information:
[0112]
[0113] To prevent the loss of original feature information during attention and uncertainty adjustment, the basic unit x i,j Add the residual to the fused result:
[0114]
[0115] Where l is the balance coefficient (between 0 and 1), which is used to adjust the weight of the adjusted features and the original features; the final C i,j It is the 1-dimensional confidence value vector after confidence calculation.
[0116] 5. Reconstruct the three-dimensional confidence value matrix
[0117] For each basic unit determined by index i, j in the three-dimensional feature matrix, the corresponding confidence value vector C is calculated according to steps 2 to 4. i,j .
[0118] C in all positions i,j Rearrange according to its original index to obtain a confidence value matrix of the same size as the input feature matrix F:
[0119]
[0120] 6. Feature Fusion
[0121] Before inputting the multi-channel fusion module, the obtained confidence value matrix C is usually multiplied and accumulated element by element with the original three-dimensional feature matrix F to form a weighted feature representation, which provides more reliable information for subsequent decoding.
[0122] Specifically, the process of multi-channel fusion includes:
[0123] Multiply the confidence value matrix of each lead channel by a preset weight coefficient;
[0124] In all lead channels, the weighted confidence values at the same index position are compared and the maximum value at that position is retained to form a confidence feature matrix after weighted fusion.
[0125] Preferably, the multi-channel fusion process comprises the following steps:
[0126] a) Weighted processing
[0127] For each lead channel m (m = 1, 2, ..., M, where M is the total number of lead channels), the confidence value matrix obtained after processing by the signal encoding and feature evaluation module is recorded as:
[0128]
[0129] Where D 1 ×D 2 ×D 3 is the matrix size. For each lead channel, the preset weight coefficient w is used m (The value range is 0.5 to 2, determined according to the importance of each lead), and the confidence value matrix of the channel is weighted element by element to form a weighted matrix:
[0130] C′ (m) =w m ·C (m)
[0131] Here, "·" means element-by-element multiplication, that is, for all index positions (i, j, k), we have:
[0132]
[0133] b) Position comparison and fusion
[0134] In all lead channels, for the weighted confidence values at the same index position (i, j, k), compare and retain the maximum value at that position to form the fused confidence feature matrix. That is, define the output matrix
[0135]
[0136] Each element of is:
[0137]
[0138] Output matrix C * It represents the feature fusion result with the maximum confidence value after multi-channel weighting at each position.
[0139] Specifically, the signal decoding step uses a convolutional neural network combined with a bidirectional long short-term memory network to restore the fused feature representation to a one-dimensional fetal electrocardiogram signal to accurately capture the QRS complex characteristics in the signal.
[0140] Preferably, the signal decoding process specifically includes the following steps:
[0141] 1. Dimensionality reduction
[0142] Firstly, a convolutional neural network (CNN) is used to process the input three-dimensional matrix of confidence feature fusion.
[0143] In this step, by designing multiple convolutional layers, the correlation information between local space and channels can be extracted, and the convolution results are activated using nonlinear functions (such as ReLU, tanh, etc.), thereby realizing nonlinear transformation of data.
[0144] After convolution and activation, the dimension of the three-dimensional matrix is reduced to a two-dimensional feature matrix using appropriate pooling operations (such as maximum pooling or average pooling). This process retains the sequence information on the time step and the expression of deep features, while reducing data redundancy and providing a more compact representation for subsequent time series modeling.
[0145] 2. Timing decoding
[0146] The reduced two-dimensional feature matrix can be viewed as a time series with multiple feature channels, where each row or column represents a feature vector for a time step.
[0147] In order to capture the forward and backward dependencies in the sequence and accurately restore the dynamic characteristics of the signal, a bidirectional long short-term memory network (BiLSTM) is used to decode the two-dimensional matrix.
[0148] Bidirectional LSTM can extract information from both the past and future directions of the time series, which helps to reconstruct continuous ECG signals containing key ECG waveforms (such as QRS complexes).
[0149] If the system design includes signal beam splitting branches connected to the three-dimensional characteristic matrix, the three-dimensional characteristic matrix obtained from each beam splitting is first normalized so that its value range is limited to between 0 and 1.
[0150] Subsequently, the normalized beam-by-beam matrices are superimposed (e.g., element-by-element addition) on the three-dimensional matrix of the confidence feature fusion obtained from the main branch to form a comprehensive feature representation.
[0151] This comprehensive feature representation is then subjected to the above-mentioned dimensionality reduction and BiLSTM decoding process to output a more robust and comprehensive independent fetal ECG signal.
[0152] The independent fetal electrocardiogram extraction method proposed in this embodiment can not only automatically exclude the channel features of the electrocardiogram signal defect, but also make the electrocardiogram extraction algorithm more robust. It does not require the synchronous acquisition of the electrocardiogram signal by the mother's chest lead, and supports the input of any number of abdominal wall lead channel electrocardiogram signals. It can be extended and applied on different electrocardiographs, and has higher application value for various types of fetal electrocardiogram data collected in actual clinical practice.
[0153] Example 2
[0154] The present invention provides an independent fetal electrocardiogram extraction system with adaptive lead channels, comprising:
[0155] A signal encoding module is used to encode the multi-lead mixed electrocardiogram signal collected from the maternal abdominal wall and convert each channel signal into a high-dimensional feature representation;
[0156] A feature evaluation module, used to evaluate the high-dimensional feature representation and assign confidence to each feature through a spatiotemporal attention mechanism and uncertainty perception;
[0157] The multi-channel fusion module is used to weight and fuse the features of different lead channels based on confidence and generate a fused feature representation;
[0158] A signal decoding module is used to decode the fused feature representation into an independent fetal electrocardiogram signal.
[0159] Specifically, the signal encoding module can perform feature conversion and feature extraction on the mixed ECG signal of each lead channel: specifically, it uses a deep neural network algorithm, such as a one-dimensional convolutional neural network, a long short-term memory neural network, a gated recurrent neural network, and various hybrid neural networks based on convolutional neural networks and recurrent neural networks to encode the mixed signal, obtain the deep features or high-dimensional feature matrix of the mixed ECG signal, and output a three-dimensional feature matrix. The signal encoding module is based on a deep neural network algorithm and has very strong signal filtering and feature extraction capabilities, and can deeply extract weak fetal ECG signals in the mixed ECG.
[0160] Specifically, the feature evaluation module can perform feature evaluation on the three-dimensional feature matrix of the mixed electrocardiogram signal, specifically taking a specific one-dimensional in the three-dimensional feature matrix as the basic unit, performing confidence calculation on the eigenvalue of the one-dimensional matrix, and outputting a one-dimensional confidence value matrix of the same size. Taking the remaining two-dimensional matrices as indexes, confidence calculation is performed on each one-dimensional feature matrix one by one, and finally a confidence value matrix of the same size as the three-dimensional feature is output. The confidence calculation method is to first perform an equal-size feature transformation on the one-dimensional matrix, and then perform a nonlinear calculation on each tuple of the one-dimensional matrix to set its value to a certain score between 0 and 1; after multiplying the obtained score with the corresponding tuple value, it is added to each original tuple value to form a one-dimensional confidence value matrix. The confidence calculation method is a hybrid calculation mechanism of spatiotemporal attention and uncertainty perception. Specifically, Monte Carlo random discarding is introduced in the signal encoding module, and the input one-dimensional feature matrix is sampled through multiple forward propagation to generate a feature distribution, and the uncertainty measurement score is calculated by the variance of the distribution; the spatiotemporal attention weight is calculated for the input one-dimensional feature matrix, and then it is dynamically fused with the uncertainty measurement score, and then residual fusion is performed with the one-dimensional feature matrix to output a one-dimensional confidence value matrix. Before entering the multi-conduction fusion module, the three-dimensional confidence value matrix is multiplied and accumulated with the corresponding three-dimensional feature matrix. Other conventional electrocardiogram extraction methods directly use convolutional neural networks to reduce the dimensionality of multi-lead channel signals, which is essentially to directly add features and cannot fuse the signal features of multi-channels. The confidence calculation method proposed in this embodiment combines spatiotemporal attention with uncertainty perception, and can adapt to the signal quality and noise type of different leads. In the extraction of fetal electrocardiogram signals, low-confidence features (such as noise interference areas) can be dynamically suppressed, which helps to improve the robustness of signal separation.
[0161] Specifically, after the mixed ECG signal of each lead channel is processed by the signal encoding module and the feature evaluation module in turn, a three-dimensional confidence value matrix is output; the multi-channel fusion module is used to fuse the three-dimensional confidence value matrices corresponding to different lead channels into one. The proposed fusion method is to multiply each three-dimensional confidence value matrix by a weight coefficient, and the coefficient range is 0.5 to 2. Weight coefficients of different sizes are selected according to the importance of the lead channel; then, between the three-dimensional matrices corresponding to different leads, the confidence values of each are compared according to the same tuple position, and the tuple with the largest confidence value is retained, and a three-dimensional matrix of confidence feature fusion is output. The multi-channel fusion module can perform feature fusion on signals of different lead channels, which is a fusion extraction of fetal ECG signals in different lead channels, which helps to capture and balance the differences in fetal ECG signals on multi-lead channels and extract true and accurate independent fetal ECGs.
[0162] Specifically, the signal decoding module can decode the aforementioned three-dimensional matrix of confidence feature fusion, specifically by using a convolutional neural network algorithm and nonlinear function transformation to reduce the dimension of the three-dimensional matrix of confidence feature fusion to a two-dimensional feature matrix, and then using a bidirectional long short-term memory network algorithm to decode the two-dimensional feature matrix into a one-dimensional ECG signal, that is, an independent fetal ECG signal; if it contains a signal beam connected to the three-dimensional feature matrix, then each three-dimensional feature matrix is first normalized to the range of 0 to 1 and then matrix superimposed and summed with the three-dimensional matrix of confidence feature fusion, and then the aforementioned decoding process is performed. The signal decoding module is based on a bidirectional long short-term memory network algorithm, and has a very strong ability to restore time series signals, which helps to accurately capture and restore the QRS complex of the fetal ECG signal; it includes a signal routing beam between the signal encoding module and the signal decoding module, which helps to reduce the excessive discarding of signal features by the multi-channel fusion module.
[0163] Example 3
[0164] To execute the independent fetal electrocardiogram extraction method and system proposed in Examples 1 and 2, it is necessary to configure the neural network parameters in the signal encoding module and the signal decoding module, and then process the abdominal wall electrocardiogram data of any lead channel to extract an independent fetal electrocardiogram.
[0165] In other words, this embodiment proposes a training method for independent fetal electrocardiogram extraction, and the specific steps are as follows:
[0166] (1) Training data preparation: The data currently available for parameter training of signal encoding and decoding modules are open-source abdominal and direct fetal electrocardiogram (ADFECG, the same below) datasets, which are generally 4-lead channel electrocardiograms collected from the abdominal wall of pregnant women during labor and single-channel electrocardiograms collected synchronously from the fetal scalp. Specifically, they are the open-source ADFECG datasets from the PhysioNet website (https: / / physionet.org.) and the ADFECG datasets provided by the Scientific Data open-source database under the Springer-Nature Group.
[0167] In addition, a dataset containing independent fetal ECG and multi-channel abdominal wall mixed ECG generated by a fetal digital ECG simulator is also used as current training data, such as the open source fetal ECG simulator on the Complex Physiological Signal Source (PhysioNet) website.
[0168] (2) Input training data slicing: The maternal abdominal wall ECG signals of the four lead channels and the fetal ECG signals of the single lead channel in the data set are equally sliced into N groups of segment signals, that is, one group of segment signals contains four maternal abdominal wall ECG signal segments and one fetal direct ECG signal segment. The signal segments in each group have the same length and contain at least one complete QRS waveform signal.
[0169] (3) Probabilistic defect processing: For the four maternal abdominal wall ECG signal segments of a certain group of segment signals in step 2, a uniform probability p is used to determine whether any channel data is set to zero (i.e., signal discarded), where p is greater than or equal to 0.2; if any channel data is set to zero, each channel is independently defective with a probability q, i.e., all current channel signal values are set to zero, and the probability q ranges from 0.25 to 0.75.
[0170] (4) Signal encoding: The network parameters in the signal encoding module are initialized according to a random normal distribution. Subsequently, the signal segments of each channel after probability defect processing are input into the signal encoder module to generate the corresponding three-dimensional feature matrix; then they are input into the feature evaluation module for processing to generate the three-dimensional confidence value matrix corresponding to each channel.
[0171] The confidence value matrix is calculated as follows: first set the random dropout factor to 0.25-0.5, perform T forward propagations in the signal encoding module for the same input signal X, randomly generate feature distribution p(X), calculate the corresponding variance Var(X), and calculate the uncertainty metric b=1-Sigmoid(Var(X)); then calculate the spatiotemporal attention weight a of the input signal X according to the attention mechanism. Finally, the confidence value matrix C=l·(a⊙b)·X+(1-l)·X is calculated, where l is a self-balancing coefficient between 0 and 1.
[0172] (5) Signal fusion: Multiple three-dimensional confidence value matrices are input into the multi-channel fusion module to generate a three-dimensional matrix of confidence feature fusion. The default weight coefficient of each three-dimensional confidence value matrix is 1.0, and the adjustable range is 0.5 to 2. At the same time, the three-dimensional feature matrix of each channel is normalized to the range of 0 to 1, and then accumulated to the confidence feature fusion three-dimensional matrix.
[0173] (6) Signal decoding: The network parameters in the signal decoding module are initialized according to a random normal distribution. The three-dimensional matrix fused with the confidence features is input into the signal decoding module and decoded into a single-channel independent fetal electrocardiogram waveform, the length of which is the same as the length of the abdominal wall electrocardiogram signal segment.
[0174] (7) Calculate the loss error of the decoded signal: Take the fetal direct ECG signal segment in step (2) as a reference to calculate the loss error of the decoded fetal ECG waveform. First, normalize the fetal direct ECG signal segment according to the maximum amplitude of the waveform to generate a set of weight coefficients; then calculate the square value of the difference between the decoded ECG waveform value and the direct ECG signal segment value point by point, generate a set of square differences and multiply them with the corresponding weight coefficients to form a set of error values. Take the average value of the set of error values as the loss error of the current decoded signal.
[0175] (8) Network weight parameter adjustment: The loss error calculated in step (7) is forwarded to the neural network nodes (i.e., computing neurons) of the signal decoding module and the signal encoding module through the back propagation algorithm. The neural network weight parameters are adjusted in the manner of training the artificial neural network based on the back propagation algorithm. The adjustment step size (learning rate) is 0.0001 to 0.01.
[0176] (9) For the remaining N-1 groups of fragment signals in step (2), randomly repeat steps (3) to (8) one by one in sequence.
[0177] (10) For the N groups of fragment signals in step (2), steps (3) to (8) are performed again randomly and group by group.
[0178] (11) Repeat step (10) until the signal loss error calculated in step (7) no longer decreases, that is, the neural network parameter configuration of the signal encoding / decoding module is completed, and the neural network parameters of the signal encoding / decoding module are configured according to the characteristic evaluation module and the multi-channel fusion module. Figure 1 The connections shown here constitute a complete ECG extraction model.
[0179] (12) The electrocardiogram signal of the maternal abdominal wall collected by an electrocardiograph may be a two-lead, four-lead or more lead channel signal depending on the model of the electrocardiograph and the collection conditions. The collected electrocardiogram signal is input into the electrocardiogram extraction model formed in step (11), and the lead channel is adaptively adapted to extract an independent fetal electrocardiogram.
[0180] Example 4
[0181] The present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the lead channel adaptive independent fetal electrocardiogram extraction method described in the above technical solution is implemented.
[0182] Example 5
[0183] The present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the lead channel adaptive independent fetal electrocardiogram extraction method described in the above technical solution by executing the computer instructions.
[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0188] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0189] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
Claims
1. A lead channel adaptive independent fetal electrocardiogram extraction method, characterized in that: The following steps are involved: Signal encoding: Encode the multi-lead mixed ECG signal collected from the maternal abdominal wall and convert each channel signal into a high-dimensional feature representation; Feature evaluation: Evaluate the high-dimensional feature representation and assign confidence to each feature through spatiotemporal attention mechanism and uncertainty perception; Multi-channel fusion: weight and fuse the features of different lead channels based on confidence to generate fused feature representation; Signal decoding: decoding the fused feature representation into an independent fetal electrocardiogram signal.
2. The method according to claim 1, characterized in that: The signal encoding step uses a deep neural network to perform feature conversion on the mixed electrocardiogram signal.
3. A method according to claim 1, characterized in that: The feature evaluation step uses a certain dimension in the high-dimensional feature matrix as a basic unit, performs confidence calculation on each dimension, and then uses the remaining dimensions as indexes to calculate one by one and finally generate a confidence value matrix of the same size as the original high-dimensional feature matrix.
4. The method according to claim 3, characterized in that: The feature evaluation process includes: For each basic unit, keep the Monte Carlo random drop sampling open, perform multiple forward propagations to obtain a set of output samples, and use the sample set to calculate the variance of each dimension, and generate an uncertainty score after normalization; Adopting the spatiotemporal attention mechanism, the attention weight is calculated according to the location of the basic unit and its context information; The uncertainty score attention weights of each basic unit are dynamically fused, and the original features of the basic unit are combined in a residual manner to generate a confidence value vector for each basic unit. Rearrange the confidence value vectors of all basic units according to the index of the original high-dimensional feature matrix to form a confidence value matrix of the same size as the original high-dimensional feature matrix; The confidence value matrix is multiplied and accumulated element by element with the original three-dimensional feature matrix to form a weighted feature representation.
5. The method according to claim 1, characterized in that: The process of multi-channel fusion includes: Multiply the confidence value matrix of each lead channel by a preset weight coefficient; In all lead channels, the weighted confidence values at the same index position are compared and the maximum value at that position is retained to form a confidence feature matrix after weighted fusion.
6. The method according to claim 1, characterized in that: The signal decoding step uses a convolutional neural network combined with a bidirectional long short-term memory network to restore the fused feature representation to a one-dimensional fetal electrocardiogram signal to accurately capture the QRS complex characteristics in the signal.
7. A training method for independent fetal electrocardiogram extraction, characterized in that: The following steps are involved: Acquire training data including maternal abdominal wall multi-lead mixed electrocardiogram signals and fetal direct electrocardiogram signals, and preprocess and segment the data to form multiple data segments; Performing signal loss simulation processing on the data segments to reproduce the signal loss situation that may occur in actual acquisition; Signal encoding is performed on the processed data segments to generate high-dimensional feature representations; Performing feature evaluation on the high-dimensional feature representation to generate a confidence value matrix of the same size as the high-dimensional feature representation; Perform weighted fusion on the confidence value matrices from different leads to generate a fused confidence feature representation; Performing signal decoding on the fused confidence feature representation to obtain an independent fetal electrocardiogram signal; The loss of the decoding result is calculated based on the reference fetal direct electrocardiogram signal, and the back propagation algorithm is used to optimize the parameters of the signal encoding and signal decoding until the loss converges.
8. The method according to claim 7, characterized in that: The preprocessing and segmentation steps of the training data include equally dividing the maternal abdominal wall ECG signals of multiple leads and the fetal direct ECG signals of at least a single lead in a single training sample of the data set into several groups of data segments, each group of data segments contains all maternal abdominal wall ECG signal segments and corresponding fetal direct ECG signal segments, and the lengths of the data segments of each group are consistent and at least contain a complete QRS waveform signal.
9. The method according to claim 7, characterized in that: The data segment defect processing step includes: determining whether to perform defect processing on the maternal abdominal wall ECG signal channel in each group of data segments with a preset probability; if it is determined to perform defect processing, setting all signal values of each maternal abdominal wall ECG signal channel to zero with a preset probability.
10. An independent fetal electrocardiogram extraction system with adaptive lead channels, characterized in that: include: A signal encoding module is used to encode the multi-lead mixed electrocardiogram signal collected from the maternal abdominal wall and convert each channel signal into a high-dimensional feature representation; A feature evaluation module, used to evaluate the high-dimensional feature representation and assign confidence to each feature through a spatiotemporal attention mechanism and uncertainty perception; The multi-channel fusion module is used to weight and fuse the features of different lead channels based on confidence and generate a fused feature representation; A signal decoding module is used to decode the fused feature representation into an independent fetal electrocardiogram signal.
Citation Information
Patent Citations
Fetal heart rate extraction method based on maternal electrocardiosignals
CN106691437A
Multi-class arrhythmia detection method based on lead attention mechanism
CN110890155A
Method for extracting and identifying electrocardiogram signals in real scene
CN110897635A
Frequency domain signal and time domain signal-based modal fusion fetal heart rate classification method
CN114259255A
Fetal heart ultrasound image detection method and related device
CN114469176A