Optimization method for electrocardiosignal data processing
By designing the ECG signal processing model, using the channel and time processing module combined with attention mechanism, the subjectivity and noise sensitivity problems of traditional methods are solved, the accuracy and robustness of ECG signal classification are improved, and the time is achieved The efficiency of in-depth analysis of sequence data and abnormality detection.
Patent Information
- Application Number
- CN202411603881.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional electrocardiogram classification methods have problems such as strong subjectivity, low efficiency, high noise sensitivity, imbalance in sample categories and difficulty in obtaining high-quality labeled data, and it is difficult to ensure real-time and accuracy in large-scale data processing.
An electrocardiogram signal processing model is designed, including a channel processing module, a time processing module and a decision processing module. Multi-level and multi-scale features are extracted through convolution and pooling modules, and time is combined with long and short-term memory networks and global maximum pooling. Dependency analysis, introducing channel attention and spatial attention mechanisms, and optimizing feature expression and decision-making process.
It improves the accuracy and robustness of ECG signal processing, enhances the processing ability of time series data, improves the accuracy and efficiency of abnormal detection, and can more effectively capture key features and timing patterns in ECG signals.
Smart Images

Figure CN119128445A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal processing, and in particular relates to an optimization method for processing electrocardiogram signal data. Background Art
[0002] ECG signals are important physiological signals that reflect the electrical activity of the heart and are widely used in the diagnosis and monitoring of cardiovascular diseases. Traditional ECG signal classification methods mostly rely on manual labeling and feature extraction by experts, which have problems such as strong subjectivity, low efficiency, and reliance on manual experience. With the popularization of ECG monitoring equipment, the amount of data has increased dramatically. Traditional methods are difficult to cope with the processing needs of large-scale data, especially in terms of real-time and accuracy.
[0003] In recent years, deep learning technology has been widely used in the field of ECG signal classification. Deep learning models, especially convolutional neural networks and recurrent neural networks, can automatically extract complex features from large-scale ECG data, avoiding the limitations of traditional manual feature extraction. They show stronger robustness and generalization ability when processing nonlinear and non-stationary ECG signals, and can achieve better results in various arrhythmia classification tasks.
[0004] Although deep learning has made some progress in ECG signal classification, it still faces several major problems: First, ECG data usually contains a lot of noise, and the sensitivity of deep learning models to noisy data may lead to a decrease in classification accuracy; second, the problem of sample category imbalance makes the model prone to identifying common categories and ignoring anomalies in rare categories; in addition, the training process of the model is highly dependent on large-scale labeled data, and obtaining high-quality labeled data is time-consuming and labor-intensive, which limits the application of deep learning in actual medical scenarios. The above problems urgently need to be solved through optimization methods to improve the accuracy and robustness of ECG signal classification. Summary of the invention
[0005] The present invention provides an optimization method for processing ECG signal data, aiming to propose an ECG signal processing model, wherein the design of a channel processing module helps to improve the accuracy and efficiency of ECG signal processing, and the addition of convolution and pooling modules enables the model to more effectively extract multi-level and multi-scale feature information, thereby improving the feature expression capability and robustness of ECG signals; the time processing module can improve the model's processing capability for time series data, especially the time-dependent features in ECG signals, and through the combination of a long short-term memory network and a global maximum pooling, the model can not only extract spatial features, but also perform in-depth analysis on the time dimension; the decision processing module not only effectively integrates spatial and temporal features, but also enhances the model's ability to focus on key features through channel attention and spatial attention mechanisms, optimizes the feature expression and decision-making process, and further extracts and optimizes features through multi-layer fully connected layers, thereby making the model more accurate and efficient in the task of ECG signal anomaly detection.
[0006] In order to achieve the above-mentioned purpose, the present invention provides the following technical solution: an optimization method for electrocardiogram signal data processing, the specific steps are as follows.
[0007] S1. Collect and preprocess ECG signal data sets.
[0008] S2. Build a channel processing module, including convolutional layer and pooling layer.
[0009] S3. Build a time processing module, including long short-term memory network and pooling layer.
[0010] S4. Build a decision processing module, including channel attention, spatial attention, fully connected layer, activation function and splicing operation.
[0011] S5. Construct an ECG signal processing model, including input, channel processing module, time processing module, decision processing module and output.
[0012] S6. ECG signal processing model training and detection: using the ECG signal data set to train the ECG signal processing model. After the training is completed, the ECG signal that needs to be detected for abnormalities is obtained and input into the ECG signal processing model to obtain the detection result of the input signal.
[0013] Preferably, in step S1, an ECG signal acquisition device is used to collect ECG signal data, the collected signals are labeled, the labeled ECG signals constitute an ECG signal data set, and a bandpass filter is used to preprocess the ECG signal data set to remove noise interference in the ECG signals.
[0014] Preferably, in step S2, for the channel processing module, the input is an ECG signal ,in, represents the number of samples, Represents the number of channels. The ECG signal first passes through the convolution layer, then through the maximum pooling process, and then through the convolution layer, maximum pooling, convolution layer, and finally through the global maximum pooling to obtain the output , ,in, represents 1x1 convolution, represents 3x3 convolution, represents a 5x5 convolution, represents global maximum pooling, stands for max pooling.
[0015] Preferably, in step S2, for the channel processing module, the added 1x1, 3x3, and 5x5 convolutional layers further enhance the model's ability to capture features of different scales, and can capture local and global feature details respectively, thereby improving the model's understanding depth of ECG signals and helping to extract more delicate temporal and spatial information; adding more convolution and pooling layers can deepen the number of layers of the model and improve its expressive power. Through deep convolution, the model can learn more abstract and complex features; through different convolution kernel processing, the model can process local and global information, avoid information that may be lost when a single convolution kernel processes complex signals, effectively retain key details in ECG signals, and improve the comprehensiveness of ECG feature extraction.
[0016] Preferably, in step S3, for the time processing module, the input is the ECG signal ,in, represents the number of samples, Represents the number of channels, and the input passes through two long short-term memory networks in sequence , and finally after global maximum pooling, the output is obtained , , represent network, Represents global maximum pooling.
[0017] Preferably, in step S3, for the time processing module, the long short-term memory network is good at processing sequence data and can capture long-term dependencies. The ECG signal is a signal with time series characteristics, in which each data point has time dependence on the previous and next data. After adding the long short-term memory network, the model can better capture the characteristics of the ECG signal and further improve the detection accuracy of abnormal ECG signals. The first layer of the long short-term memory network extracts short-term time information, while the second layer of the long short-term memory network integrates the global time context information, so that the model captures the time series pattern more comprehensively; compared with the traditional recurrent neural network, the long short-term memory network has a forget gate and an input gate mechanism, which can effectively alleviate the common gradient vanishing problem in long-term dependencies, so that the network can maintain a stable gradient when processing long time series, thereby facilitating deeper time pattern learning; by performing maximum pooling processing on the global features output by the long short-term memory network, the key feature values in the entire sequence can be extracted, the computational complexity can be reduced, and the sensitivity of the model to global trends and abnormal signals can be improved.
[0018] Preferably, in step S4, for the decision processing module, the input is and , first concatenate the input to get , ,in, represents the concatenation operation, and then after channel attention, we get , ,in, represents global average pooling, represents the fully connected layer, represent Activation function, represent The activation function, followed by spatial attention, gives , ,in, represents average pooling, represents maximum pooling, represents the convolutional layer, Represents the concatenation operation, and finally passes through three fully connected layers in sequence to get the output , ,in, , , Represents three different fully connected layers.
[0019] Preferably, in step S4, for the decision processing module, the outputs of the channel processing module and the time processing module are spliced, which can help the model to simultaneously utilize information in the spatial and temporal dimensions, thereby more comprehensively understanding the ECG signal; the channel attention mechanism can automatically learn the weight of each feature channel, enhance the influence of key channels, weaken unimportant channels, automatically adjust the weight distribution of features, and enhance the model's ability to focus on key features in ECG signals, thereby improving the model's robustness and predictive ability; the spatial attention mechanism is introduced to further strengthen the model's attention to local important areas by weighting the spatial dimensions of the feature map, so that the model can focus more on important local features in the input signal and enhance the model's ability to process details; the fully connected layer further linearly combines the high-dimensional features of the input to generate the final decision output, and the multi-layer fully connected structure improves the model's nonlinear representation ability, thereby optimizing the detection effect.
[0020] Preferably, in step S5, for the ECG signal processing model, the ECG signal data is first input into the model, the input ECG signal first passes through a channel processing module to extract the channel characteristics of the signal, and at the same time, it is input in parallel through a time processing module to extract the time characteristics of the ECG signal, and then the results of the channel processing module and the time processing module are input into the decision processing module. After the processing is completed, the final ECG signal processing model is obtained.
[0021] Compared with the prior art, the present invention has the following technical effects: the technical solution provided by the present invention proposes an ECG signal processing model, wherein the design of the channel processing module helps to improve the accuracy and efficiency of ECG signal processing, and the addition of convolution and pooling modules enables the model to more effectively extract multi-level and multi-scale feature information, thereby improving the feature expression capability and robustness of ECG signals; the time processing module can improve the model's processing capability for time series data, especially the time-dependent features in ECG signals, and through the combination of long short-term memory networks and global maximum pooling, the model can not only extract spatial features, but also perform in-depth analysis of the time dimension; the decision processing module not only effectively integrates spatial and temporal features, but also enhances the model's ability to focus on key features through channel attention and spatial attention mechanisms, optimizes the feature expression and decision-making process, and further extracts and optimizes features through multi-layer fully connected layers, thereby making the model more accurate and efficient in the task of ECG signal anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the electrocardiogram signal processing method provided by the present invention.
[0023] Figure 2 It is a structural diagram of the channel processing module provided by the present invention.
[0024] Figure 3It is a structural diagram of the time processing module provided by the present invention.
[0025] Figure 4 It is a structural diagram of the decision processing module provided by the present invention.
[0026] Figure 5 It is a rendering of the training and testing process of the ECG signal processing model provided by the present invention. DETAILED DESCRIPTION
[0027] The present invention aims to propose an optimization method for ECG signal data processing and proposes an ECG signal processing model, wherein the design of a channel processing module helps to improve the accuracy and efficiency of ECG signal processing, and the addition of convolution and pooling modules enables the model to more effectively extract multi-level and multi-scale feature information, thereby improving the feature expression capability and robustness of ECG signals; the time processing module can improve the model's processing capability for time series data, especially the time-dependent features in ECG signals, and through the combination of long short-term memory networks and global maximum pooling, the model can not only extract spatial features, but also perform in-depth analysis of the time dimension; the decision processing module not only effectively integrates spatial and temporal features, but also enhances the model's ability to focus on key features through channel attention and spatial attention mechanisms, optimizes the feature expression and decision-making process, and further extracts and optimizes features through multi-layer fully connected layers, thereby making the model more accurate and efficient in the task of ECG signal anomaly detection.
[0028] See also Figure 1 As shown, an optimization method for electrocardiogram signal data processing in an embodiment of the present application, the specific steps are as follows.
[0029] S1. Collect and preprocess ECG signal data sets.
[0030] Furthermore, in step S1, an ECG signal acquisition device is used to collect ECG signal data, and the collected signals are labeled. The labeled ECG signals constitute an ECG signal data set, and a bandpass filter is used to preprocess the ECG signal data set to remove noise interference in the ECG signals.
[0031] S2. Build a channel processing module, including 1x1 convolution, 3x3 convolution, 5x5 convolution, maximum pooling, and global maximum pooling.
[0032] Furthermore, in step S2, for the channel processing module, its structure is as follows: Figure 2 As shown, the input is an ECG signal ,in, represents the number of samples, Represents the number of channels. The ECG signal first passes through the convolution layer, then through the maximum pooling process, and then through the convolution layer, maximum pooling, convolution layer, and finally through the global maximum pooling to obtain the output , ,in, represents 1x1 convolution, represents 3x3 convolution, represents a 5x5 convolution, represents global maximum pooling, stands for max pooling.
[0033] S3. Build a time processing module, including two long short-term memory networks and global maximum pooling.
[0034] Furthermore, in step S3, for the time processing module, its structure is as follows Figure 3 As shown, the input is an ECG signal ,in, represents the number of samples, Represents the number of channels, and the input passes through two long short-term memory networks in sequence , and finally after global maximum pooling, the output is obtained , , represent network, Represents global maximum pooling.
[0035] S4, build a decision processing module, including channel attention, spatial attention, three fully connected layers, Activation functions and concatenation operations.
[0036] Furthermore, in step S4, for the decision processing module, its structure is as follows: Figure 4 As shown, the input is and , first concatenate the input to get , ,in, represents the concatenation operation, and then after channel attention, we get , ,in, represents global average pooling, represents the fully connected layer, represent Activation function, represent The activation function, followed by spatial attention, gives , ,in, represents average pooling, represents maximum pooling, represents the convolutional layer, Represents the concatenation operation, and finally passes through three fully connected layers in sequence to get the output , ,in, , , Represents three different fully connected layers.
[0037] S5. Construct an ECG signal processing model, including input, channel processing module, time processing module, decision processing module and output.
[0038] Furthermore, in step S5, for the ECG signal processing model, the ECG signal data is first input into the model, the input ECG signal first passes through the channel processing module to extract the channel characteristics of the signal, and at the same time, it is input in parallel through the time processing module to extract the time characteristics of the ECG signal, and then the results of the channel processing module and the time processing module are input into the decision processing module. After the processing is completed, the final ECG signal processing model is obtained.
[0039] S6. ECG signal processing model training and detection: using the ECG signal data set to train the ECG signal processing model. After the training is completed, the ECG signal that needs to be detected for abnormalities is obtained and input into the ECG signal processing model to obtain the detection result of the input signal.
[0040] Furthermore, in step S5, for the ECG signal processing model, it is written in Python language and uses the Pytorch framework. The ECG signal is input into the ECG signal processing model. The SGD optimizer is used, the learning rate is set to 0.001, the training batch size is 64, the training data set is repeated 100 times, the input ECG signal is trained, the training accuracy is output, and the final trained ECG signal processing model is obtained.
[0041] Furthermore, in step S6, the results of the ECG signal processing model training and testing process are as follows: Figure 5 As shown in the figure, it can be seen that the accuracy rate increases continuously during the training process. After the number of iterations reaches 20, the accuracy rate gradually stabilizes and can reach 0.95. Compared with the training process, the initial accuracy rate of the test process is higher, and the final accuracy rate is equivalent to the accuracy rate of the training process. For ECG signals, the ECG signal processing model is used to detect ECG signals with abnormal conditions, which has a superior and stable detection effect, verifying the effectiveness of the model proposed in this method.
[0042] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. An optimization method for electrocardiogram signal data processing, characterized in that: The specific steps include: S1. Collect and preprocess ECG signal data sets; S2, build a channel processing module, including convolution layer and pooling layer; S3, build the time processing module, including long short-term memory network and pooling layer; S4, build a decision processing module, including channel attention, spatial attention, fully connected layer, activation function and splicing operation; S5. Construct an ECG signal processing model, including input, channel processing module, time processing module, decision processing module and output; S6. ECG signal processing model training and detection: using the ECG signal data set to train the ECG signal processing model. After the training is completed, the ECG signal that needs to be detected for abnormalities is obtained and input into the ECG signal processing model to obtain the detection result of the input signal.
2. The optimization method for electrocardiogram signal data processing according to claim 1, characterized in that: In the step S1, an ECG signal acquisition device is used to collect ECG signal data, and the collected signals are labeled. The labeled ECG signals constitute an ECG signal data set, and a bandpass filter is used to preprocess the ECG signal data set to remove noise interference in the ECG signals.
3. The optimization method for electrocardiogram signal data processing according to claim 2, characterized in that: In the step S2, for the channel processing module, the input is the ECG signal ,in, represents the number of samples, Represents the number of channels. The ECG signal first passes through the convolution layer, then through the maximum pooling process, and then through the convolution layer, maximum pooling, convolution layer, and finally through the global maximum pooling to obtain the output , ,in, represents 1x1 convolution, represents 3x3 convolution, represents a 5x5 convolution, represents global maximum pooling, stands for max pooling.
4. The optimization method for electrocardiogram signal data processing according to claim 3, characterized in that: In the step S3, for the time processing module, the input is the ECG signal ,in, represents the number of samples, Represents the number of channels, and the input passes through two long short-term memory networks in sequence , and finally after global maximum pooling, the output is obtained , , represent network, Represents global maximum pooling.
5. The optimization method for electrocardiogram signal data processing according to claim 4, characterized in that: In the step S4, for the decision processing module, the input is and , first concatenate the input to get , ,in, represents the concatenation operation, and then after channel attention, we get , ,in, represents global average pooling, represents the fully connected layer, represent Activation function, represent The activation function, followed by spatial attention, gives , ,in, represents average pooling, represents maximum pooling, represents the convolutional layer, Represents the concatenation operation, and finally passes through three fully connected layers in sequence to get the output , ,in, , , Represents a fully connected layer.
6. The optimization method for electrocardiogram signal data processing according to claim 5, characterized in that: In the step S5, for the ECG signal processing model, the ECG signal data is first input into the model, the input first passes through the channel processing module to extract the channel features of the signal, and at the same time, the input passes through the time processing module in parallel to extract the time features of the ECG signal, and the results of the channel processing module and the time processing module are input into the decision processing module. After the processing is completed, the final ECG signal processing model is obtained.
Citation Information
Patent Citations
Multi-lead electrocardiosignal classification method based on convolutional neural network
CN113080994A
Multi-feature fusion electrocardiosignal classification model modeling method based on attention mechanism
CN113288163A
Construction method and detection method of short-time rPPG signal detection model
CN113920387A
Data poisoning attack-oriented electricity stealing detection method
CN114239725A
Error correlation potential classification method based on multichannel electroencephalogram integration
CN114997315A
