Multi-lead electrocardiogram signal processing method, device and equipment and storage medium
By using a deep neural network model that integrates a dual attention mechanism to extract and aggregate features from multi-dimensional lead ECG data, the problem of receptive field limitation in ECG signal processing by convolutional networks is solved, achieving higher accuracy and richness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-03-04
- Publication Date
- 2026-06-05
Smart Images

Figure CN114711780B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of neural network technology in artificial intelligence, and in particular to a method, apparatus, device and storage medium for processing multi-lead electrocardiogram signals. Background Technology
[0002] Heart disease is one of the major threats to our health, and electrocardiogram (ECG) is an important method for detecting heart disease. An ECG is a technique that uses an ECG machine to record the changes in electrical activity of the heart during each cardiac cycle from the body surface. An ECG shows the health status of the heart rate and can be used to detect abnormal heart rate patterns in ordinary users.
[0003] In the field of medical artificial intelligence, automated electrocardiogram (ECG) analysis methods mainly include manual feature extraction of typical waveforms and bands such as P waves and QRS waves, as well as feature extraction and ECG data classification using deep learning classification networks. Currently, most automated ECG analysis uses convolutional neural networks (CNNs) to train multi-lead ECG data. However, the convolutional layers in CNNs are limited by their receptive fields, which restricts their ability to extract contextual information from long signals and ignores the channel correlations between multiple ECG channels, resulting in low accuracy in ECG signal extraction. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and storage medium for processing multi-lead electrocardiogram (ECG) signals, which improves the accuracy and richness of ECG signal extraction.
[0005] To achieve the above objectives, the first aspect of the present invention provides a method for processing multi-lead electrocardiogram (ECG) signals, comprising: acquiring a multi-lead ECG signal to be processed, wherein the multi-lead ECG signal to be processed is used to indicate cardiac detection information of a target object; performing data preprocessing on the multi-lead ECG signal to be processed to obtain processed ECG data; performing data framing processing on the processed ECG data to obtain multi-dimensional lead channel ECG data; and performing feature extraction and feature aggregation processing on the multi-dimensional lead channel ECG data using a deep neural network model that integrates a dual attention mechanism to obtain target ECG feature data.
[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of performing data preprocessing on the multi-lead electrocardiogram signal to be processed to obtain processed electrocardiogram data includes: removing noise from the multi-lead electrocardiogram signal to be processed through a preset bandpass filter to obtain noise-removed electrocardiogram data; and eliminating baseline drift from the noise-removed electrocardiogram data to obtain processed electrocardiogram data.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of performing data framing processing on the processed electrocardiogram data to obtain multi-dimensional lead channel electrocardiogram data includes: performing length statistics on the processed electrocardiogram data to obtain a target data length; obtaining a frame length and a frame number; performing a difference operation on the target data length and the frame length to obtain a target difference; determining a frame shift based on the target difference and the frame number; and determining the multi-dimensional lead channel electrocardiogram data based on the frame shift, the frame length, and the frame number.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the step of performing feature extraction and feature aggregation processing on the multi-dimensional lead channel ECG data using a deep neural network model that integrates a dual attention mechanism to obtain target ECG feature data includes: extracting features from the multi-dimensional lead channel ECG data using a residual network layer in the deep neural network model that integrates a dual attention mechanism to obtain initial local ECG feature data; performing deep feature processing on the initial local ECG feature data based on the dual attention network layer in the deep neural network model that integrates a dual attention mechanism to obtain initial global ECG feature data, wherein the dual attention network layer includes a cross-channel attention mechanism and a global deep attention mechanism; and performing feature aggregation processing on the initial global ECG feature data using a fully connected network layer in the deep neural network model that integrates a dual attention mechanism to obtain target ECG feature data.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, before acquiring the multi-lead electrocardiogram (ECG) signal to be processed, which is used to indicate cardiac detection information of the target object, the multi-lead ECG signal processing method includes: acquiring initial multi-lead ECG sample data and performing data preprocessing on the initial multi-lead ECG sample data to obtain target multi-lead ECG sample data; dividing the target multi-lead ECG sample data according to a preset ratio to obtain a multi-lead ECG training set, a multi-lead ECG validation set, and a multi-lead ECG test set; and training an initial hybrid model based on the multi-lead ECG training set, the multi-lead ECG validation set, and the multi-lead ECG test set to obtain a deep neural network model that integrates a dual attention mechanism.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the step of training an initial hybrid model based on the multi-lead ECG training set, the multi-lead ECG validation set, and the multi-lead ECG test set to obtain a deep neural network model incorporating a dual attention mechanism includes: forming an initial hybrid model based on an initial deep neural network model and an initial dual attention mechanism model, and initializing each network parameter in the initial hybrid model, wherein the initial hybrid model includes a residual network layer, a dual attention network layer, and a fully connected network layer; training the initial hybrid model according to the multi-lead ECG training set to obtain a trained hybrid model; validating the trained hybrid model and fine-tuning each network parameter using the multi-lead ECG validation set to obtain a target hybrid model; and testing the target hybrid model according to the multi-lead ECG test set to obtain a test result. When the test result is greater than or equal to a preset target value, the target hybrid model is set as a deep neural network model incorporating a dual attention mechanism.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, after the multi-lead channel ECG data is processed by feature extraction and feature aggregation using a deep neural network model that integrates a dual attention mechanism to obtain target ECG feature data, the multi-lead ECG signal processing method further includes: updating the target ECG feature data to a preset knowledge graph library; generating an ECG atlas analysis report based on the preset knowledge graph library; and sending the ECG atlas analysis report to a preset cloud storage terminal and a target terminal respectively, so that the target terminal displays the ECG atlas analysis report.
[0012] A second aspect of the present invention provides a multi-lead electrocardiogram (ECG) signal processing device, comprising: an acquisition module for acquiring a multi-lead ECG signal to be processed, wherein the multi-lead ECG signal to be processed is used to indicate cardiac detection information of a target object; a preprocessing module for performing data preprocessing on the multi-lead ECG signal to be processed to obtain processed ECG data; a framing module for performing data framing processing on the processed ECG data to obtain multi-dimensional lead channel ECG data; and an aggregation module for performing feature extraction and feature aggregation processing on the multi-dimensional lead channel ECG data using a deep neural network model that integrates a dual attention mechanism to obtain target ECG feature data.
[0013] Optionally, in a first implementation of the second aspect of the present invention, the preprocessing module is specifically used to: remove noise from the multi-lead electrocardiogram signal to be processed by using a preset bandpass filter to obtain noise-removed electrocardiogram data; and eliminate baseline drift from the noise-removed electrocardiogram data to obtain processed electrocardiogram data.
[0014] Optionally, in a second implementation of the second aspect of the present invention, the framing module is specifically used for: performing length statistics on the processed electrocardiogram data to obtain a target data length; obtaining a frame length and a frame number; performing a difference operation on the target data length and the frame length to obtain a target difference; determining a frame shift based on the target difference and the frame number; and determining multi-dimensional lead channel electrocardiogram data based on the frame shift, the frame length, and the frame number.
[0015] Optionally, in a third implementation of the second aspect of the present invention, the target aggregation module is specifically used for: extracting features from the multi-dimensional lead channel ECG data through a residual network layer in a deep neural network model that integrates dual attention mechanisms to obtain initial local ECG feature data; performing deep feature processing on the initial local ECG feature data based on the dual attention network layer in the deep neural network model that integrates dual attention mechanisms to obtain initial global ECG feature data, wherein the dual attention network layer includes a cross-channel attention mechanism and a global deep attention mechanism; and performing feature aggregation processing on the initial global ECG feature data through a fully connected network layer in the deep neural network model that integrates dual attention mechanisms to obtain target ECG feature data.
[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the multi-lead electrocardiogram signal processing device further includes: a processing module, configured to acquire initial multi-lead electrocardiogram sample data and perform data preprocessing on the initial multi-lead electrocardiogram sample data to obtain target multi-lead electrocardiogram sample data; a partitioning module, configured to partition the target multi-lead electrocardiogram sample data according to a preset ratio to obtain a multi-lead electrocardiogram training set, a multi-lead electrocardiogram validation set, and a multi-lead electrocardiogram test set; and a training module, configured to train an initial hybrid model based on the multi-lead electrocardiogram training set, the multi-lead electrocardiogram validation set, and the multi-lead electrocardiogram test set to obtain a deep neural network model incorporating a dual attention mechanism.
[0017] Optionally, in the fifth implementation of the second aspect of the present invention, the training module is specifically used for: forming an initial hybrid model based on an initial deep neural network model and an initial dual attention mechanism model, and initializing each network parameter in the initial hybrid model, wherein the initial hybrid model includes a residual network layer, a dual attention network layer, and a fully connected network layer; training the initial hybrid model according to the multi-lead electrocardiogram training set to obtain a trained hybrid model; validating the trained hybrid model and fine-tuning each network parameter using the multi-lead electrocardiogram validation set to obtain a target hybrid model; testing the target hybrid model according to the multi-lead electrocardiogram test set to obtain test results, and when the test results are greater than or equal to a preset target value, setting the target hybrid model as a deep neural network model incorporating a dual attention mechanism.
[0018] Optionally, in a sixth implementation of the second aspect of the present invention, the multi-lead electrocardiogram signal processing device further includes: an update module, configured to update the target electrocardiogram feature data to a preset knowledge graph library, and generate an electrocardiogram analysis report based on the preset knowledge graph library; and a sending module, configured to send the electrocardiogram analysis report to a preset cloud storage terminal and a target terminal respectively, so that the target terminal displays the electrocardiogram analysis report.
[0019] A third aspect of the present invention provides a multi-lead electrocardiogram (ECG) signal processing device, comprising: a memory and at least one processor, wherein the memory stores a computer program; the at least one processor invokes the computer program in the memory to cause the multi-lead ECG signal processing device to perform the above-described multi-lead ECG signal processing method.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the above-described multi-lead electrocardiogram signal processing method.
[0021] The technical solution provided by this invention involves acquiring a multi-lead electrocardiogram (ECG) signal to be processed, which is used to indicate cardiac detection information of a target object; preprocessing the multi-lead ECG signal to obtain processed ECG data; performing data framing on the processed ECG data to obtain multi-dimensional lead-channel ECG data; and using a deep neural network model that integrates dual attention mechanisms to perform feature extraction and feature aggregation on the multi-dimensional lead-channel ECG data to obtain target ECG feature data. In this embodiment, the use of a deep neural network model that integrates dual attention mechanisms to perform feature extraction and feature aggregation on the multi-dimensional lead-channel ECG data to obtain target ECG feature data represents the integration of feature information from different dimensions through two different attention mechanisms to expand contextual information. Specifically, a global deep attention mechanism calculates the dependencies between all positions in the spatial feature map, expanding the receptive field of the architecture; while a cross-channel attention mechanism captures feature information between different channels. The features from these two attention mechanisms are ultimately aggregated to further improve the feature representation, which helps enrich contextual information. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of one embodiment of the multi-lead electrocardiogram signal processing method in this invention;
[0023] Figure 2 This is a schematic diagram of another embodiment of the multi-lead electrocardiogram signal processing method of the present invention;
[0024] Figure 3 This is a schematic diagram of one embodiment of the multi-lead electrocardiogram signal processing device in this invention;
[0025] Figure 4 This is a schematic diagram of another embodiment of the multi-lead electrocardiogram signal processing device of the present invention;
[0026] Figure 5 This is a schematic diagram of one embodiment of the multi-lead electrocardiogram signal processing device of the present invention. Detailed Implementation
[0027] This invention provides a method, apparatus, device, and storage medium for processing multi-lead electrocardiogram (ECG) signals. It is used to extract and aggregate features from multi-dimensional lead channel ECG data using a deep neural network model that integrates dual attention mechanisms to obtain target ECG feature data. In other words, it integrates feature information from different dimensions through two different attention mechanisms to expand contextual information and further improve the feature representation that helps to enrich contextual information.
[0028] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the multi-lead electrocardiogram signal processing method of the present invention includes:
[0030] 101. Acquire the multi-lead electrocardiogram signal to be processed. The multi-lead electrocardiogram signal to be processed is used to indicate the cardiac detection information of the target object.
[0031] The target object's cardiac testing information may include the target object's medical diagnosis information or normal testing information. The multi-lead electrocardiogram (ECG) signal to be processed includes one or more defined bands of heartbeat cycles. Specifically, the server receives the ECG data processing request sent by the target terminal and extracts the multi-lead ECG signal to be processed from the request. The server stores the multi-lead ECG signal to be processed; for example, the server can store the multi-lead ECG signal to be processed in a file of a preset type, or store the multi-lead ECG signal to be processed in a preset in-memory database (remote dictionary service Redis).
[0032] Furthermore, the server queries a pre-defined queue list to obtain query results. When the query results are not empty, the server extracts the multi-lead electrocardiogram (ECG) signal to be processed from the query results. The multi-lead ECG signal to be processed is used to indicate the cardiac detection information of the target object.
[0033] It is understood that the executing entity of this invention can be a multi-lead electrocardiogram signal processing device, a terminal, or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0034] 102. Perform data preprocessing on the multi-lead electrocardiogram signal to be processed to obtain the processed electrocardiogram data.
[0035] It should be noted that over 90% of the energy in a multi-lead ECG signal is concentrated between 0.5 and 35 Hz, and this portion contains the target subject's cardiac detection information. Baseline drift is generally caused by breathing and body movement during signal acquisition, manifesting as low-frequency, slowly changing noise, typically less than 0.5 Hz. Furthermore, multi-lead ECG signals also include interference signals (i.e., noise) above 30 Hz. Therefore, the server can use a bandpass filter with a passband cutoff frequency of (0.5, 35) Hz to filter the multi-lead ECG signal, removing noise and baseline drift to obtain processed ECG data.
[0036] 103. Perform data framing on the processed electrocardiogram data to obtain multi-dimensional lead channel electrocardiogram data.
[0037] It should be noted that clinically collected data often vary in length. Therefore, this invention uses a framing method to cut the processed electrocardiogram data into 10 segments of 1000 points each, with each segment being a frame. The data from each channel can be organized into a combination of 10 frames [10, 1000]. There are a total of 12 lead channels in the electrocardiogram data, so the dimensions of the multi-dimensional lead channel electrocardiogram data are [10, 1000, 12].
[0038] Specifically, the server pre-emphasizes the processed ECG data to obtain emphasized ECG data; the server then performs frame-by-frame processing on the emphasized ECG data to obtain multiple frames of ECG data; the server smooths each frame of ECG data using a Hamming window to obtain windowed ECG data for each frame; and the server sequentially performs signal transformation processing (such as Fourier transform or wavelet transform) and splicing processing on each windowed ECG data frame to obtain multi-dimensional lead channel ECG data.
[0039] 104. By using a deep neural network model that integrates a dual attention mechanism, feature extraction and feature aggregation are performed on multi-dimensional lead channel ECG data to obtain target ECG feature data.
[0040] It should be noted that the deep neural network model integrating the dual attention mechanism (i.e., DACnet) includes a residual network layer (ResNet), a dual-attention network layer (Dual-Attention), and a fully connected network layer. The residual network layer, dual-attention network layer, and fully connected network layer have a predetermined connection method and placement relationship at position i. ResNet is used to extract feature maps from multi-dimensional lead channel ECG data, while Dual-Attention is used to obtain global information from the local features generated by ResNet. There are multiple ResNets, each containing a predetermined number (N1, N2, ..., N6) of stacked sub-blocks with the same number of channels. Each sub-block consists of a 2D convolutional layer, a batch normalization layer, and the ReLU activation function. Dual Attention includes a cross-channel attention mechanism and a global deep attention mechanism. The cross-channel attention mechanism is used to model the contextual information between any two locations on the feature map. The global deep attention mechanism is used to capture feature information between different channels. The deep neural network model integrating the dual attention mechanisms aggregates the features extracted by these two attention mechanisms respectively. Specifically, the server performs feature extraction and aggregation on the multi-dimensional lead channel ECG data through residual network layers, dual attention network layers, and fully connected network layers to obtain target ECG feature data. Further, the server stores the target ECG feature data in a blockchain database; the specifics are not limited here.
[0041] In this embodiment of the invention, a deep neural network model incorporating a dual attention mechanism is used to extract and aggregate features from multi-dimensional lead-channel ECG data to obtain target ECG feature data. This involves integrating feature information from different dimensions through two different attention mechanisms to expand contextual information. Specifically, a global deep attention mechanism calculates the dependencies between all locations in the spatial feature map, expanding the receptive field of the architecture; while a cross-channel attention mechanism captures feature information between different channels. The features from these two attention mechanisms are ultimately aggregated to further improve the feature representation, which enriches the contextual information. This solution can be applied to the field of smart healthcare, thereby promoting the construction of smart cities.
[0042] Please see Figure 2 Another embodiment of the multi-lead electrocardiogram signal processing method in this invention includes:
[0043] 201. Acquire the multi-lead electrocardiogram signal to be processed. The multi-lead electrocardiogram signal to be processed is used to indicate the cardiac detection information of the target object.
[0044] The specific execution process of step 201 is similar to that of step 101, and will not be described in detail here.
[0045] 202. Perform data preprocessing on the multi-lead electrocardiogram signal to be processed to obtain the processed electrocardiogram data.
[0046] Specifically, the server can also use a low-pass filter to clean up noise in the multi-lead electrocardiogram signal to obtain noise-removed electrocardiogram data; and use a high-pass filter to eliminate baseline drift in the noise-removed electrocardiogram data to obtain processed electrocardiogram data.
[0047] Optionally, the server removes noise from the multi-lead electrocardiogram signal to be processed using a preset bandpass filter to obtain noise-removed electrocardiogram data; the server then eliminates baseline drift in the noise-removed electrocardiogram data to obtain processed electrocardiogram data.
[0048] 203. Perform data framing on the processed electrocardiogram data to obtain multi-dimensional lead channel electrocardiogram data.
[0049] It should be noted that the processed ECG data is a long time-domain signal. Typically, the server divides this processed ECG data into multiple frame signals to obtain multi-dimensional lead channel ECG data. Optionally, the server performs length statistics on the processed ECG data to obtain the target data length; the server obtains the frame length and frame number, performs a difference calculation between the target data length and the frame length to obtain the target difference; the server determines the frame shift based on the target difference and the frame number, and determines the multi-dimensional lead channel ECG data based on the frame shift, frame length, and frame number.
[0050] 204. By using a deep neural network model that integrates a dual attention mechanism, feature extraction and feature aggregation are performed on the multi-dimensional lead channel ECG data to obtain the target ECG feature data.
[0051] It should be noted that the server pre-trains a deep neural network model that integrates a dual attention mechanism. Specifically, the server acquires initial multi-lead ECG sample data and performs data preprocessing on the initial multi-lead ECG sample data to obtain target multi-lead ECG sample data. For example, the server performs processing on the initial multi-lead ECG sample data such as removing outliers, filling in missing data, and converting data formats. The server divides the target multi-lead ECG sample data according to a preset ratio to obtain a multi-lead ECG training set, a multi-lead ECG validation set, and a multi-lead ECG test set. For example, the preset ratio can be 8:1:1 or 6:2:2, and the specific ratio is not limited here. The server trains the initial hybrid model based on the multi-lead ECG training set, multi-lead ECG validation set, and multi-lead ECG test set to obtain a deep neural network model that integrates a dual attention mechanism.
[0052] Furthermore, the server constructs an initial hybrid model based on the initial deep neural network model and the initial dual attention mechanism model, and initializes the network parameters in the initial hybrid model. The initial hybrid model includes residual network layers, dual attention network layers, and fully connected network layers. The network parameters include learning rate, learning step size, number of iterations, gradient descent rate, etc. The server trains the initial hybrid model using a multi-lead electrocardiogram training set to obtain a trained hybrid model. The server validates the trained hybrid model and fine-tunes the network parameters using a multi-lead electrocardiogram validation set to obtain a target hybrid model. The server tests the target hybrid model using a multi-lead electrocardiogram test set to obtain test results. When the test results are greater than or equal to a preset target value, the target hybrid model is set as a deep neural network model incorporating the dual attention mechanism.
[0053] Optionally, firstly, the server extracts features from the multi-dimensional lead channel ECG data through the residual network layer in the deep neural network model that integrates dual attention mechanisms to obtain initial local ECG feature data; specifically, the server extracts the convolutional features of the multi-dimensional lead channel ECG data through the residual network in the deep neural network model that integrates dual attention mechanisms to obtain initial local ECG feature data, wherein the residual network includes multiple superimposed residual modules.
[0054] Secondly, the server performs deep feature processing on the initial ECG local feature data based on the dual attention network layer in the deep neural network model that integrates the dual attention mechanism, to obtain the initial ECG global feature data. The dual attention network layer includes a cross-channel attention mechanism and a global deep attention mechanism. Specifically, the server transmits the initial ECG local feature data losslessly to the dual attention network in the deep neural network model, which includes a cross-channel attention mechanism and a global deep attention mechanism. The server then extracts easily lost detail features from the initial ECG local feature data through the cross-channel attention mechanism (embedded compression and activation network) and the global deep attention mechanism, respectively, to obtain the initial ECG global feature data.
[0055] Finally, the server performs feature aggregation on the initial global ECG feature data through a fully connected network layer in a deep neural network model that incorporates a dual attention mechanism, obtaining the target ECG feature data. It should be noted that after the compression and activation networks convert the input signal X into a feature map via the final ResNet, the squeeze operation aggregates features across spatial dimensions into a 1×1×C channel descriptor, representing the global channel information. The target ECG feature data includes ECG abnormality features, sinus rhythm features, sinus tachycardia features, sinus arrhythmia features, sinus bradycardia features, atrial premature beat features, atrial fibrillation features, left ventricular hypervoltage features, lead abnormalities or poor data quality features, ST-T changes features, ventricular premature beats features, T wave changes features, localized right bundle branch block features, and abnormal Q wave features, etc.
[0056] 205. Update the target ECG feature data to the preset knowledge graph library, and generate an ECG analysis report based on the preset knowledge graph library.
[0057] Specifically, the server performs semantic analysis on the target ECG feature data and user questions sequentially to obtain the analyzed ECG feature data; the server writes the analyzed ECG feature data into a pre-defined knowledge graph database; the server performs data extraction, data fusion, data storage, and data calculation on the pre-defined knowledge graph database through a pre-defined graph analysis task to obtain ECG atlas data; the server obtains an atlas template, and the server generates an ECG atlas analysis report based on the atlas template and the ECG atlas data.
[0058] 206. Send the electrocardiogram analysis report to the preset cloud storage terminal and the target terminal respectively, so that the target terminal can display the electrocardiogram analysis report.
[0059] Specifically, the server calls a preset application interface to send the electrocardiogram (ECG) analysis report to a preset cloud storage terminal, so that the cloud storage terminal can securely store the ECG analysis report and respond to the file download request from the target terminal; the server sends the ECG analysis report to the target terminal so that the target terminal can draw and display the ECG analysis report.
[0060] In this embodiment of the invention, a deep neural network model incorporating a dual attention mechanism is used to extract and aggregate features from multi-dimensional lead-channel ECG data to obtain target ECG feature data. This involves integrating feature information from different dimensions through two different attention mechanisms to expand contextual information. Specifically, a global deep attention mechanism calculates the dependencies between all locations in the spatial feature map, expanding the receptive field of the architecture; while a cross-channel attention mechanism captures feature information between different channels. The features from these two attention mechanisms are ultimately aggregated to further improve the feature representation, which enriches the contextual information. This solution belongs to the field of smart healthcare and can promote the construction of smart cities.
[0061] The multi-lead electrocardiogram signal processing method in the embodiments of the present invention has been described above. The multi-lead electrocardiogram signal processing device in the embodiments of the present invention is described below. Please refer to [link to relevant documentation]. Figure 3 One embodiment of the multi-lead electrocardiogram signal processing device of the present invention includes:
[0062] The acquisition module 301 is used to acquire the multi-lead electrocardiogram signal to be processed, which is used to indicate the cardiac detection information of the target object.
[0063] The preprocessing module 302 is used to preprocess the multi-lead electrocardiogram signal to be processed to obtain the processed electrocardiogram data.
[0064] The framing module 303 is used to perform data framing processing on the processed electrocardiogram data to obtain multi-dimensional lead channel electrocardiogram data.
[0065] The aggregation module 304 is used to perform feature extraction and feature aggregation processing on multi-dimensional lead channel ECG data through a deep neural network model that integrates dual attention mechanisms to obtain target ECG feature data.
[0066] Furthermore, the target ECG feature data is stored in a blockchain database, the specifics of which are not limited here.
[0067] In this embodiment of the invention, a deep neural network model incorporating a dual attention mechanism is used to extract and aggregate features from multi-dimensional lead-channel ECG data to obtain target ECG feature data. This involves integrating feature information from different dimensions through two different attention mechanisms to expand contextual information. Specifically, a global deep attention mechanism calculates the dependencies between all locations in the spatial feature map, expanding the receptive field of the architecture; while a cross-channel attention mechanism captures feature information between different channels. The features from these two attention mechanisms are ultimately aggregated to further improve the feature representation, which helps enrich the contextual information.
[0068] Please see Figure 4 Another embodiment of the multi-lead electrocardiogram signal processing device in this invention includes:
[0069] The acquisition module 301 is used to acquire the multi-lead electrocardiogram signal to be processed, which is used to indicate the cardiac detection information of the target object.
[0070] The preprocessing module 302 is used to preprocess the multi-lead electrocardiogram signal to be processed to obtain the processed electrocardiogram data.
[0071] The framing module 303 is used to perform data framing processing on the processed electrocardiogram data to obtain multi-dimensional lead channel electrocardiogram data.
[0072] The aggregation module 304 is used to perform feature extraction and feature aggregation processing on multi-dimensional lead channel ECG data through a deep neural network model that integrates dual attention mechanisms to obtain target ECG feature data.
[0073] Optionally, the preprocessing module 302 can also be specifically used for:
[0074] The noise of the multi-lead electrocardiogram signal to be processed is removed by a preset bandpass filter to obtain noise-removed electrocardiogram data.
[0075] Baseline drift was removed from the noise-reduced electrocardiogram (ECG) data to obtain the processed ECG data.
[0076] Optionally, the framing module 303 can also be specifically used for:
[0077] The length of the processed electrocardiogram data is statistically analyzed to obtain the target data length.
[0078] Obtain the frame length and frame number, and perform a difference operation between the target data length and the frame length to obtain the target difference.
[0079] Frame shift is determined based on target difference and frame number, and multidimensional lead channel ECG data is determined based on frame shift, frame length, and frame number.
[0080] Optionally, the aggregation module 304 can also be specifically used for:
[0081] By incorporating the residual network layer in a deep neural network model with a dual attention mechanism, feature extraction is performed on the ECG data of multi-dimensional lead channels to obtain initial local ECG feature data.
[0082] In a deep neural network model based on a dual attention mechanism, the dual attention network layer performs deep feature processing on the initial local ECG feature data to obtain the initial global ECG feature data. The dual attention network layer includes a cross-channel attention mechanism and a global deep attention mechanism.
[0083] By incorporating a fully connected network layer in a deep neural network model that integrates a dual attention mechanism, the initial global ECG feature data is aggregated to obtain the target ECG feature data.
[0084] Optionally, the multi-lead electrocardiogram signal processing device may also include:
[0085] The processing module 305 is used to acquire initial multi-lead electrocardiogram sample data and perform data preprocessing on the initial multi-lead electrocardiogram sample data to obtain target multi-lead electrocardiogram sample data.
[0086] The partitioning module 306 is used to partition the target multi-lead electrocardiogram sample data according to a preset ratio to obtain a multi-lead electrocardiogram training set, a multi-lead electrocardiogram validation set, and a multi-lead electrocardiogram test set.
[0087] Training module 307 is used to train the initial hybrid model based on the multi-lead electrocardiogram training set, the multi-lead electrocardiogram validation set, and the multi-lead electrocardiogram test set, to obtain a deep neural network model that integrates the dual attention mechanism.
[0088] Optionally, training module 307 can also be specifically used for:
[0089] An initial hybrid model is formed based on an initial deep neural network model and an initial dual attention mechanism model, and the network parameters in the initial hybrid model are initialized. The initial hybrid model includes a residual network layer, a dual attention network layer, and a fully connected network layer.
[0090] The initial hybrid model was trained using the multi-lead electrocardiogram training set to obtain the trained hybrid model.
[0091] The trained hybrid model was validated and the network parameters were fine-tuned using a multi-lead electrocardiogram validation set to obtain the target hybrid model.
[0092] The target hybrid model was tested using a multi-lead electrocardiogram test set. The test results were obtained. When the test results were greater than or equal to the preset target value, the target hybrid model was set as a deep neural network model that integrates a dual attention mechanism.
[0093] Optionally, the multi-lead electrocardiogram signal processing device may also include:
[0094] The update module 308 is used to update the target electrocardiogram feature data to a preset knowledge graph library and generate an electrocardiogram analysis report based on the preset knowledge graph library.
[0095] The sending module 309 is used to send the electrocardiogram analysis report to a preset cloud storage terminal and a target terminal respectively, so that the target terminal can display the electrocardiogram analysis report.
[0096] In this embodiment of the invention, a deep neural network model incorporating a dual attention mechanism is used to extract and aggregate features from multi-dimensional lead-channel ECG data to obtain target ECG feature data. This involves integrating feature information from different dimensions through two different attention mechanisms to expand contextual information. Specifically, a global deep attention mechanism calculates the dependencies between all locations in the spatial feature map, expanding the receptive field of the architecture; while a cross-channel attention mechanism captures feature information between different channels. The features from these two attention mechanisms are ultimately aggregated to further improve the feature representation, which helps enrich the contextual information.
[0097] above Figure 3 and Figure 4 The multi-lead electrocardiogram signal processing device in this embodiment of the invention is described in detail from a modular perspective. The multi-lead electrocardiogram signal processing device in this embodiment of the invention is described in detail from a hardware processing perspective.
[0098] Figure 5 This is a schematic diagram of a multi-lead electrocardiogram (ECG) signal processing device 500 provided in an embodiment of the present invention. The multi-lead ECG signal processing device 500 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of computer program operations on the multi-lead ECG signal processing device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of computer program operations in the storage media 530 on the multi-lead ECG signal processing device 500.
[0099] The multi-lead electrocardiogram signal processing device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 5The illustrated structure of the multi-lead electrocardiogram signal processing device does not constitute a limitation on the multi-lead electrocardiogram signal processing device. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0100] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein a computer program is stored in the computer program, and when the computer program is run on a computer, the computer performs the steps of the multi-lead electrocardiogram signal processing method.
[0101] The present invention also provides a multi-lead electrocardiogram signal processing device, which includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the multi-lead electrocardiogram signal processing method in the above embodiments.
[0102] Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, at least one application required for a function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.
[0103] The blockchain referred to in this invention is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0105] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several computer programs to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0106] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing multi-lead electrocardiogram signals, characterized in that, The multi-lead electrocardiogram signal processing method includes: Acquire a multi-lead electrocardiogram signal to be processed, wherein the multi-lead electrocardiogram signal to be processed is used to indicate cardiac detection information of the target object; The multi-lead electrocardiogram signal to be processed is preprocessed to obtain processed electrocardiogram data. The preprocessing includes noise removal and baseline drift removal. The processed electrocardiogram data is pre-emphasized to obtain amplified electrocardiogram data. The aggravated electrocardiogram data is subjected to data framing processing to obtain multi-dimensional lead channel electrocardiogram data; The target ECG feature data is obtained by performing feature extraction and feature aggregation on the multi-dimensional lead channel ECG data through a deep neural network model that integrates a dual attention mechanism. The target electrocardiogram feature data is updated to a preset knowledge graph database, and an electrocardiogram analysis report is generated based on the preset knowledge graph database; The electrocardiogram analysis report is sent to a preset cloud storage terminal and a target terminal respectively, so that the target terminal can display the electrocardiogram analysis report; The process of extracting and aggregating features from the multi-dimensional lead channel ECG data using a deep neural network model incorporating a dual attention mechanism to obtain target ECG feature data includes: extracting features from the multi-dimensional lead channel ECG data using a residual network layer in the deep neural network model incorporating a dual attention mechanism to obtain initial local ECG feature data; performing deep feature processing on the initial local ECG feature data based on the dual attention network layer in the deep neural network model incorporating a dual attention mechanism to obtain initial global ECG feature data, wherein the dual attention network layer includes a cross-channel attention mechanism and a global deep attention mechanism; and aggregating features on the initial global ECG feature data using a fully connected network layer in the deep neural network model incorporating a dual attention mechanism to obtain target ECG feature data.
2. The multi-lead electrocardiogram signal processing method according to claim 1, characterized in that, The preprocessing of the multi-lead electrocardiogram signal to be processed to obtain processed electrocardiogram data includes: The noise in the multi-lead electrocardiogram signal to be processed is removed by a preset bandpass filter to obtain noise-removed electrocardiogram data. Baseline drift is eliminated from the noise-reduced electrocardiogram (ECG) data to obtain processed ECG data.
3. The multi-lead electrocardiogram signal processing method according to claim 1, characterized in that, The process of performing data framing on the aggravated electrocardiogram data to obtain multi-dimensional lead channel electrocardiogram data includes: The target data length is obtained by performing length statistics on the aggravated electrocardiogram data; Obtain the frame length and frame number, and perform a difference operation between the target data length and the frame length to obtain the target difference; The frame shift is determined based on the target difference and the number of frames, and the multidimensional lead channel ECG data is determined based on the frame shift, the frame length, and the number of frames.
4. The multi-lead electrocardiogram signal processing method according to any one of claims 1-3, characterized in that, Before acquiring the multi-lead electrocardiogram (ECG) signal to be processed, which is used to indicate cardiac detection information of the target object, the multi-lead ECG signal processing method includes: Initial multi-lead electrocardiogram (ECG) sample data is acquired, and the initial multi-lead ECG sample data is preprocessed to obtain target multi-lead ECG sample data; The target multi-lead electrocardiogram sample data are divided proportionally according to a preset ratio to obtain a multi-lead electrocardiogram training set, a multi-lead electrocardiogram validation set, and a multi-lead electrocardiogram test set. The initial hybrid model is trained based on the multi-lead ECG training set, the multi-lead ECG validation set, and the multi-lead ECG test set to obtain a deep neural network model that integrates a dual attention mechanism.
5. The multi-lead electrocardiogram signal processing method according to claim 4, characterized in that, The process of training the initial hybrid model based on the multi-lead electrocardiogram training set, the multi-lead electrocardiogram validation set, and the multi-lead electrocardiogram test set to obtain a deep neural network model incorporating a dual attention mechanism includes: An initial hybrid model is formed based on an initial deep neural network model and an initial dual attention mechanism model, and the network parameters in the initial hybrid model are initialized. The initial hybrid model includes a residual network layer, a dual attention network layer, and a fully connected network layer. The initial hybrid model is trained according to the multi-lead electrocardiogram training set to obtain the trained hybrid model; The trained hybrid model was validated and its network parameters were fine-tuned using the multi-lead electrocardiogram validation set to obtain the target hybrid model. The target hybrid model is tested based on the multi-lead electrocardiogram test set to obtain test results. When the test results are greater than or equal to the preset target value, the target hybrid model is set as a deep neural network model that integrates a dual attention mechanism.
6. A multi-lead electrocardiogram signal processing device, characterized in that, The multi-lead electrocardiogram signal processing device includes: The acquisition module is used to acquire the multi-lead electrocardiogram signal to be processed, which is used to indicate the cardiac detection information of the target object; The preprocessing module is used to preprocess the multi-lead electrocardiogram signal to be processed to obtain processed electrocardiogram data. The preprocessing includes noise removal and baseline drift removal. The framing module is used to pre-emphasize the processed electrocardiogram (ECG) data to obtain amplified ECG data; and to perform data framing processing on the amplified ECG data to obtain multi-dimensional lead channel ECG data. The aggregation module is used to perform feature extraction and feature aggregation processing on the multi-dimensional lead channel ECG data through a deep neural network model that integrates a dual attention mechanism to obtain target ECG feature data. An update module is used to update the target electrocardiogram feature data to a preset knowledge graph library and generate an electrocardiogram analysis report based on the preset knowledge graph library; a sending module is used to send the electrocardiogram analysis report to a preset cloud storage terminal and a target terminal respectively, so that the target terminal can display the electrocardiogram analysis report; The process of extracting and aggregating features from the multi-dimensional lead channel ECG data using a deep neural network model incorporating a dual attention mechanism to obtain target ECG feature data includes: extracting features from the multi-dimensional lead channel ECG data using a residual network layer in the deep neural network model incorporating a dual attention mechanism to obtain initial local ECG feature data; performing deep feature processing on the initial local ECG feature data based on the dual attention network layer in the deep neural network model incorporating a dual attention mechanism to obtain initial global ECG feature data, wherein the dual attention network layer includes a cross-channel attention mechanism and a global deep attention mechanism; and aggregating features on the initial global ECG feature data using a fully connected network layer in the deep neural network model incorporating a dual attention mechanism to obtain target ECG feature data.
7. A multi-lead electrocardiogram signal processing device, characterized in that, The multi-lead electrocardiogram signal processing device includes: a memory and at least one processor, wherein the memory stores a computer program; The at least one processor invokes the computer program in the memory to cause the multi-lead electrocardiogram signal processing device to perform the multi-lead electrocardiogram signal processing method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-lead electrocardiogram signal processing method as described in any one of claims 1-5.