Arrhythmia detection model modeling method based on multi-view multi-scale fusion network

Through the multi-view multi-scale fusion network, the ECG signal features are extracted from multiple dimensions and combined with auxiliary information, which solves the problem of single-dimensional feature extraction and neglect of auxiliary information in the existing technology, and achieves high-accuracy and efficient arrhythmia detection.

CN118673402APending Publication Date: 2024-09-20ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410700775.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing arrhythmia detection methods mainly extract features from a single dimension and ignore the role of auxiliary information, resulting in limited detection performance and difficulty in fully mining the abnormal characteristics of arrhythmia.

Method used

An arrhythmia detection model using a multi-view multi-scale fusion network extracts ECG signal features from three dimensions through the spatial attention module, channel attention module and multi-scale temporal attention module, and combines auxiliary information for deep feature extraction and fusion. Classification and detection using residual network and multi-layer perceptron.

Benefits of technology

It effectively improves the accuracy and efficiency of arrhythmia detection, comprehensively mines abnormal features, overcomes the limitations of a single scale and a single view, uses auxiliary information to enhance detection performance, and solves the problem of data imbalance through joint loss and focus loss functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673402A
    Figure CN118673402A
Patent Text Reader

Abstract

The invention discloses an arrhythmia detection model modeling method based on a multi-view multi-scale fusion network, and the method comprises the steps: obtaining three-dimensional features of an original ECG signal through a space attention module, a channel attention module and a multi-scale time attention module, and carrying out the residual connection of the features and the original ECG signal, so as to form two mixed features; the two mixed features are input into two parallel networks for deep feature extraction, and the auxiliary information is input into the parallel networks to be fused with the deep features; and extracting the features fused with the auxiliary information in the two paths for further fusion, inputting the fused features into a new multi-layer perceptron to generate a prediction result, taking the prediction result as network output, and using focus loss during training. According to the method, the abnormal features shown in different views when the arrhythmia occurs are concerned, the features of the arrhythmia on the original ECG signals in the different views are extracted, and the accuracy, efficiency and practicability of arrhythmia detection are effectively improved in combination with auxiliary information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer signal processing, and in particular relates to a method for modeling an arrhythmia detection model based on a multi-view multi-scale fusion network. Background Art

[0002] Cardiovascular disease (CVD) is the leading cause of death worldwide. According to the World Health Organization (WHO), 32% of deaths worldwide are caused by cardiovascular disease each year, and the vast majority of acute cardiovascular diseases are emergencies. Cardiovascular disease has become the leading cause of death among non-communicable diseases worldwide. Therefore, early warning of cardiovascular disease is very important.

[0003] Arrhythmia is one of the common manifestations of cardiovascular diseases in clinical practice, and ECG is a reliable means of monitoring and recording arrhythmia. Due to its large amount of data, manual labeling is time-consuming and labor-intensive, and prone to errors. With the popularity of various portable ECG monitoring devices in recent years, the amount of ECG data that needs to be analyzed has increased too fast, and the analysis speed of cardiologists cannot keep up with the growth rate of ECG data. Therefore, real-time and high-precision arrhythmia detection methods have become a current research hotspot.

[0004] In recent years, researchers have tried to apply machine learning methods to arrhythmia detection, but due to the need for manual feature extraction in machine learning, the effect of machine learning methods is not good enough. With the development of deep learning, neural networks have shown excellent results in classification tasks. Researchers have begun to try to apply neural networks to arrhythmia detection tasks, but their methods often only extract features from a single dimension, which ignores many abnormal features of arrhythmias, and they often ignore the role of auxiliary information in diagnosis, which limits the performance of their networks. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the prior art, and propose a modeling method for arrhythmia detection model based on a multi-view multi-scale fusion network. The method uses a spatial attention module, a channel attention module and a multi-scale time attention module to extract ECG signal features from three dimensions, and then uses a residual network to extract deep features in three dimensions, and then fuses auxiliary information into the deep features of the three dimensions respectively, and finally fuses all features through a multi-layer perceptron to detect and classify whether there is arrhythmia and what type of arrhythmia it is. This method extracts features from ECG signals from three different dimensions, and combined with the patient's auxiliary information, it can effectively improve the accuracy, efficiency and practicality of arrhythmia detection.

[0006] The technical solution adopted by the present invention is:

[0007] The present invention provides a method for modeling an arrhythmia detection model based on a multi-view multi-scale fusion network, comprising the following steps:

[0008] 1) Preprocessing the original ECG data, the preprocessing process is to cut or fill 0, obtain auxiliary information, denoise and enhance the data of the denoised ECG signal, and then divide it into training set, validation set and test set;

[0009] 2) Construct an arrhythmia detection model, as follows: use a channel attention module, a spatial attention module, and a multi-scale time attention module to extract multidimensional features of each preprocessed ECG signal; these multidimensional features are residually connected with the preprocessed ECG signal to form two mixed features, one of which is a mixed feature containing three dimensions of time, channel, and space, and the other is a mixed feature containing channel and space; the two mixed features are input into two parallel residual networks, each residual network contains a residual block, a backbone network, and a multi-layer perceptron, and the residual block is input into the backbone network after deep feature extraction, and the patient's auxiliary information is input into the two residual networks, and is concatenated with the output of the backbone network and fused once by the multi-layer perceptron; then, the two features fused with the auxiliary information are fused twice; finally, the features after the secondary fusion are input into another multi-layer perceptron to generate predicted classification labels as the final output of the arrhythmia detection model; at the same time, the two features fused with the auxiliary information also use the multi-layer perceptron to generate predicted classification labels;

[0010] 3) Train, verify and test the constructed arrhythmia detection model.

[0011] Preferably, the process of truncating or filling with zeros is: taking the first 30 seconds of the ECG signal that exceeds 30 seconds in the original ECG data, and filling with zeros for the ECG signal that is less than 30 seconds, so that its length reaches 30 seconds.

[0012] Preferably, the auxiliary information includes weight, age, gender, and history of hypertension.

[0013] Preferably, the denoising process is: selecting Daubechies6 wavelet function as the mother wavelet to filter the signal noise of the ECG signal after truncation or 0-filling, decomposing the signal into 9 levels, and deleting the D1, D2, D3 and A9 components; wherein the signal noise includes electromyographic interference and power frequency noise.

[0014] Preferably, data enhancement is performed on the four categories of arrhythmia ECG signals of ST segment elevation, atrial premature beats, ventricular premature beats, and left bundle branch block after denoising.

[0015] Preferably, the construction process of the multi-scale temporal attention module is as follows:

[0016] b1) Use the maximum pooling layer and residual block to downsample and extract features from the preprocessed ECG signal, and retain the features extracted at each scale; the formula is as follows:

[0017]

[0018] Among them, x i is the input preprocessed ECG signal, P m is the maximum pooling layer, R is the residual block, is the feature of the kth scale in the downsampling process;

[0019] b2) Use residual blocks and linear interpolation layers to upsample and extract features extracted at each scale, and concatenate them with the features retained by downsampling; the formula is as follows:

[0020]

[0021] in, is the feature of the kth scale in the upsampling process, B is the linear interpolation layer, R is the residual block, cat is concatenation, and A is the attention mechanism;

[0022] b3) The output of the last residual block in step b2), that is, the multi-scale time attention weight output by the multi-scale time attention module, is multiplied by the pre-processed ECG signal to obtain the weighted ECG signal output; the formula is as follows:

[0023]

[0024] in is the weighted ECG signal output, It is the dot product.

[0025] Preferably, the process of extracting multidimensional features and performing residual connection with the preprocessed ECG signal is as follows:

[0026] The preprocessed ECG signal is input into the channel attention module, spatial attention module and multi-scale temporal attention module respectively to obtain three ECG features weighted by attention weights, namely channel features Spatial characteristics Time characteristics The three weighted ECG features are residually connected using the following formula:

[0027]

[0028] where x i is the preprocessed ECG signal, Res is the residual connection, x u is the input of the upper branch residual network, xl is the input of the lower branch residual network; where the lower branch residual network is a residual network connected to the multi-scale temporal attention module.

[0029] Preferably, during the training and verification process of the arrhythmia detection model, the joint loss and focal loss function are used to calculate the loss; during testing, the classification labels predicted by the arrhythmia detection model for each ECG signal in the test set are combined with the actual classification labels recorded for each ECG signal in the test set to calculate the evaluation index, and the arrhythmia detection model is evaluated. If the evaluation index meets the requirements, the optimal parameters of the arrhythmia detection model are obtained; otherwise, the parameters of the arrhythmia detection model are adjusted, and the arrhythmia detection model is retrained, verified and tested.

[0030] More preferably, the construction process of the joint loss and focal loss function is as follows:

[0031] c1) using the cross entropy loss function to calculate the loss of the feature input after the secondary fusion into the multi-layer perceptron to generate the predicted classification label and the loss of the feature fused with the auxiliary information using the multi-layer perceptron to generate the predicted classification label; the formula of the cross entropy loss function is as follows:

[0032]

[0033] where y i is the true classification label of the i-th ECG signal record in the training set or validation set, and p i is the predicted i-th classification label, N is the number of ECG signals in the training set or validation set;

[0034] c2) Calculate the focal loss weight of the ECG signal of each category of arrhythmia, then use the multilayer perceptron to generate the loss of the predicted classification label using the two features fused with auxiliary information and the loss of the secondary fused features input into the multilayer perceptron to generate the predicted classification label. The loss is multiplied by the focal loss weight respectively to obtain three focal losses. Finally, the three focal losses are added together to obtain the joint loss; the formula is as follows:

[0035]

[0036] Where b is the number of ECG signals in the original ECG data, n i is the number of ECG signals of the i-th type arrhythmia in the original ECG data, w i is the weight assigned to the ECG signal of the i-th arrhythmia. If the i-th category is the arrhythmia category of the ECG signal after data enhancement, use formula (2), otherwise use formula (1), m is the number of arrhythmia categories of the original ECG data, w i′ is the focal loss weight of the ECG signal of the i-th type arrhythmia, It is the loss of generating predicted classification labels by using multi-layer perceptron with features fused with auxiliary information or the loss of generating predicted classification labels by inputting features after secondary fusion into multi-layer perceptron. is the focal loss function, It is the focal loss of the upper branch residual network output that integrates the auxiliary information features and uses the multi-layer perceptron to generate the predicted classification label. It is the focal loss of the residual network output of the lower branch that integrates the auxiliary information and uses a multi-layer perceptron to generate the predicted classification label. It is the focal loss of the second fused feature input into the multi-layer perceptron to generate the predicted classification label. It’s a joint loss.

[0037] Preferably, all arrhythmia ECG signals except the test set are divided into ten piles, and all normal ECG signals are also divided into ten piles. Each training process selects nine different piles of arrhythmia ECG signals and nine piles of normal ECG signals as training sets, and the corresponding verification process selects the remaining pile of arrhythmia ECG signals and the pile of normal ECG signals as verification sets. After the training and verification are completed, the test set is used for testing, and the average evaluation index of each test result is used as the evaluation index of one process; the training, verification and testing process is repeated 10 times, and the evaluation indexes of the ten processes are averaged, and this average value is used as the final evaluation index of the arrhythmia detection model.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention comprehensively mines the abnormal features of arrhythmia through multi-scale and multi-view, specifically, using a spatial attention module, a channel attention module and a multi-scale time attention module to extract ECG signal features from three dimensions, and then using a residual network to extract deep features in three dimensions, and then integrating auxiliary information into the deep features of the three dimensions respectively, and finally integrating all features through a multi-layer perceptron to detect and classify whether there is arrhythmia and what type of arrhythmia it is, overcoming the problem that the previous arrhythmia detection method is mainly based on a single scale or a single view, and it is difficult to comprehensively mine the abnormal features of arrhythmia. Further, the present invention uses auxiliary information to assist the network in the detection of arrhythmia, effectively improving the accuracy of arrhythmia detection, and overcoming the problem that the previous method ignores the role of auxiliary information. Further, the present invention uses a new dual-branch fusion network structure, which can ensure the comprehensiveness of feature extraction, and use dual branches to complete the features ignored by a single branch. Finally, the present invention uses a joint loss and a newly designed focal loss function to solve the problem of data imbalance, and effectively improves the accuracy, efficiency and practicality of arrhythmia detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the pretreatment process in the present invention;

[0041] Figure 2 It is a schematic diagram of the arrhythmia detection model of the present invention;

[0042] Figure 3 Schematic diagram of the multi-scale temporal attention module in the present invention. DETAILED DESCRIPTION

[0043] The present invention will be further described below in conjunction with the accompanying drawings.

[0044] like Figure 1 , Figure 2 As shown in FIG, the modeling method of arrhythmia detection model based on multi-view multi-scale fusion network is as follows:

[0045] 1) Preprocess the original ECG data (data from the CPSC 2018 database can be used). The preprocessing process is to truncate or fill in 0, obtain auxiliary information, denoise, and perform data enhancement on the denoised ECG signal (electrocardiogram signal), and then divide it into training set, validation set and test set. The specific steps include:

[0046] a1) Since the length of ECG signals in the collected original ECG data is often different, for example, the data length of the CPSC 2018 database ranges from 6s to 60s, it is necessary to intercept ECG signals longer than 30s and take the first 30s as input; the ECG signals less than 30s are padded with 0 to make their length reach 30s.

[0047] a2) Obtain auxiliary information related to arrhythmia for each patient from the original ECG data, including weight, age, gender, and history of hypertension.

[0048] a3) The Daubechies6 wavelet function is selected as the mother wavelet to filter the signal noise of the ECG signal after truncation or 0-filling, and the signal is decomposed into 9 levels, and the D1, D2, D3 and A9 components are deleted to remove the noise; among them, the signal noise includes electromyographic interference, baseline drift and power frequency noise.

[0049] a4) Data enhancement is performed on the four categories of arrhythmia ECG signals after denoising, namely ST segment elevation, atrial premature beats, ventricular premature beats, and left bundle branch block, which have fewer samples. Specifically, the four categories of arrhythmia ECG signals after denoising are randomly denoised to enhance the network's sensitivity to these four categories of arrhythmias.

[0050] a5) 90% of the arrhythmia ECG signals and normal ECG signals in the preprocessed ECG signals are selected as the training set and the validation set, respectively, and the remaining 10% of the arrhythmia ECG signals and normal ECG signals are selected as the test set.

[0051] 2) Construct an arrhythmia detection model. The specific steps are as follows: Use channel attention module, spatial attention module and multi-scale time attention module to extract multi-dimensional features of each pre-processed ECG signal. These multi-dimensional features are residually connected with the pre-processed ECG signal to form two mixed features, one of which is a mixed feature containing three dimensions of time, channel and space, and the other is a mixed feature containing channel and space. The two mixed features are input into two parallel residual networks. Each residual network contains a residual block, a backbone network and a multi-layer perceptron. The residual block is input into the backbone network after deep feature extraction. The patient's auxiliary information is input into the two residual networks and spliced ​​with the output of the backbone network and then fused by the multi-layer perceptron. Then, the two features fused with auxiliary information are fused twice. Finally, the features after secondary fusion are input into another multi-layer perceptron to generate predicted classification labels. At the same time, the two features fused with auxiliary information also use multi-layer perceptron to generate predicted classification labels. These prediction results are only used to calculate the loss and are not used as the output of the arrhythmia detection model. The output of the final arrhythmia detection model is the predicted classification label generated by inputting the secondary fused features into a multi-layer perceptron.

[0052] 3) Training, verifying and testing the constructed arrhythmia detection model; during the training and verification process, a joint loss and a new focal loss function designed by the present invention are used to calculate the loss; during the test, the classification labels predicted by the arrhythmia detection model for each ECG signal in the test set are combined with the actual classification labels recorded for each ECG signal in the test set to calculate the evaluation index, and the arrhythmia detection model is evaluated. If the evaluation index meets the requirements, the optimal parameters of the arrhythmia detection model are obtained, otherwise the parameters of the arrhythmia detection model are adjusted, and the arrhythmia detection model is retrained, verified and tested.

[0053] As a preference, Figure 3 As shown in FIG. 1 , the multi-scale time attention module is a new attention module proposed in the present invention, and the construction process is as follows:

[0054] b1) Use the maximum pooling layer and residual block to downsample and extract features from the preprocessed ECG signal, and retain the features extracted at each scale. The formula is as follows:

[0055]

[0056] Among them, x iis the input preprocessed ECG signal, P m is the maximum pooling layer, R is the residual block, It is the feature of the kth scale in the downsampling process, where the fourth scale is the scale after three downsamplings and the first scale is the original scale.

[0057] In the downsampling process, the maximum pooling layer can better retain the prominent features of the ECG signal, and the residual block can retain the original features while extracting features, which can prevent the loss of important features; the residual block formula is expressed as:

[0058] x1=CBR(x i )

[0059] x o =x1+CBR(x1)

[0060] where x i is the preprocessed ECG signal of the input, CBR is the convolution layer, normalization layer and activation function ReLU, x o is the feature extracted by the residual block.

[0061] b2) Use residual blocks and linear interpolation layers to upsample and extract features extracted from each scale, and concatenate them with the features retained by downsampling. The formula is as follows:

[0062]

[0063] in, is the feature of the kth scale in the upsampling process, B is the linear interpolation layer, R is the residual block, cat is the concatenation, A is the attention mechanism, and the fourth scale is the scale after three downsamplings, and the first scale is the original scale. Linear interpolation in the upsampling process can better sample the low-frequency features of the ECG signal.

[0064] b3) The output of the last residual block in step b2), that is, the multi-scale temporal attention weight output by the multi-scale temporal attention module, is multiplied by the pre-processed ECG signal to obtain the weighted ECG signal output. The formula is as follows:

[0065]

[0066] in is the weighted ECG signal output, is the dot product, It is the feature of the first scale in the upsampling process.

[0067] Preferably, the process of extracting multidimensional features and performing residual connection on the preprocessed ECG signal is as follows:

[0068] The preprocessed ECG signal is input into the channel attention module, spatial attention module and multi-scale temporal attention module respectively to obtain three ECG features weighted by attention weights, namely channel features Spatial characteristics Time characteristics The three weighted ECG features are residually connected using the following formula:

[0069]

[0070] where x i is the preprocessed ECG signal, Res is the residual connection, x u is the input of the upper branch residual network, x l is the input of the lower branch residual network; where the lower branch residual network is a residual network connected to the multi-scale temporal attention module.

[0071] As a preference, the auxiliary information is input into the residual network, and the process of splicing and fusing with the output of the backbone network is expressed as follows:

[0072] x o =f(cat(b(x i ),x0,x1…,x k ))

[0073] where x i is the preprocessed ECG signal, x o is the output of the residual network, x0,x1…,x k is k auxiliary information, b is the residual network, cat is concatenation, and f is the multi-layer perceptron.

[0074] As a preferred method, two features fused with auxiliary information are fused twice, and the features after the secondary fusion are input into the multi-layer perceptron to generate the predicted classification label process, which is expressed by the following formula:

[0075] Y f =F(cat(f l ,f u ))

[0076] where f u is the feature of the upper branch residual network output, f i is the feature of the residual network output of the lower branch, cat is concatenation, F is a multi-layer perceptron, and Y f is the output classification label.

[0077] As a preferred method, the construction process of the joint loss and the new focal loss function is as follows:

[0078] c1) Use the cross entropy loss function to calculate the loss of the second fused feature input into the multi-layer perceptron to generate the predicted classification label and the loss of the feature fused with auxiliary information to generate the predicted classification label using the multi-layer perceptron. The formula of the cross entropy loss function is as follows:

[0079]

[0080] where y i is the true classification label of the i-th ECG signal record in the training set or validation set, and p i is the predicted i-th classification label, and N is the number of ECG signals in the training set or validation set.

[0081] c2) Calculate the focal loss weight of the ECG signal of each category of arrhythmia, then use the multilayer perceptron to generate the loss of the predicted classification label using the two features fused with auxiliary information and the loss of the secondary fused features input into the multilayer perceptron to generate the predicted classification label. The loss is multiplied by the focal loss weight respectively to obtain three focal losses, and finally the three focal losses are added together to obtain the joint loss. The formula is as follows:

[0082]

[0083] Where b is the number of ECG signals in the original ECG data, n i is the number of ECG signals of the i-th type arrhythmia in the original ECG data, w i is the weight assigned to the ECG signal of the i-th arrhythmia. If the i-th category is the arrhythmia category of the ECG signal after data enhancement, use formula (2), otherwise use formula (1), m is the number of arrhythmia categories of the original ECG data, w′ i is the focal loss weight of the ECG signal of the i-th type arrhythmia, It is the loss of generating predicted classification labels by using multi-layer perceptron with features fused with auxiliary information or the loss of generating predicted classification labels by inputting features after secondary fusion into multi-layer perceptron. is the focal loss function. Adding the focal loss function when calculating the loss can solve the data imbalance problem to a certain extent. It is the focal loss of the upper branch residual network output that integrates the auxiliary information features and uses the multi-layer perceptron to generate the predicted classification label. It is the focal loss of the residual network output of the lower branch that integrates the auxiliary information and uses a multi-layer perceptron to generate the predicted classification label. It is the focal loss of the second fused feature input into the multi-layer perceptron to generate the predicted classification label. It’s a joint loss.

[0084] Preferably, in order to further prevent overfitting and underfitting and improve the robustness of the model, all arrhythmia ECG signals except the test set are divided into ten piles, and all normal ECG signals are also divided into ten piles. Each training process selects nine different piles of arrhythmia ECG signals and nine piles of normal ECG signals as training sets, and the corresponding verification process selects the remaining pile of arrhythmia ECG signals and a pile of normal ECG signals as verification sets. The verification set is used to observe whether the arrhythmia detection model has overfitting and underfitting phenomena. After training and verification, the test set is used for testing, and the average evaluation index of each test result is used as the evaluation index of one process. The training, verification and testing process is repeated 10 times, and the evaluation indexes of the ten processes are averaged again, and this average value is used as the final evaluation index of the arrhythmia detection model.

[0085] When the method of the present invention is actually used, after replacing the original ECG data with the ECG data to be detected to execute a1) to a4) in step 1), the arrhythmia detection model that has been trained, verified and tested can accurately determine whether the ECG data to be detected is normal ECG data or arrhythmia ECG data.

[0086] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for modeling arrhythmia detection model based on a multi-view multi-scale fusion network, which is characterized by: comprising the following steps: 1) Preprocessing the original ECG data, the preprocessing process is to cut or fill 0, obtain auxiliary information, denoise and enhance the data of the denoised ECG signal, and then divide it into training set, validation set and test set; 2) Construct an arrhythmia detection model, as follows: use a channel attention module, a spatial attention module, and a multi-scale time attention module to extract multidimensional features of each preprocessed ECG signal; these multidimensional features are residually connected with the preprocessed ECG signal to form two mixed features, one of which is a mixed feature containing three dimensions of time, channel, and space, and the other is a mixed feature containing channel and space; the two mixed features are input into two parallel residual networks, each residual network contains a residual block, a backbone network, and a multi-layer perceptron, and the residual block is input into the backbone network after deep feature extraction, and the patient's auxiliary information is input into the two residual networks, and is concatenated with the output of the backbone network and fused once by the multi-layer perceptron; then, the two features fused with the auxiliary information are fused twice; finally, the features after the secondary fusion are input into another multi-layer perceptron to generate predicted classification labels as the final output of the arrhythmia detection model; at the same time, the two features fused with the auxiliary information also use the multi-layer perceptron to generate predicted classification labels; 3) Train, verify and test the constructed arrhythmia detection model.

2. According to the method for modeling arrhythmia detection model based on multi-view multi-scale fusion network in claim 1, the process of truncation or filling with 0 is: take the first 30 seconds of ECG signal exceeding 30 seconds in the original ECG data, and fill with 0 for ECG signal less than 30 seconds to make its length reach 30 seconds.

3. According to claim 1, the arrhythmia detection model building method based on multi-view multi-scale fusion network is characterized in that the auxiliary information includes weight, age, gender, and history of hypertension.

4. According to the method for modeling arrhythmia detection model based on multi-view multi-scale fusion network in claim 1, the denoising process is as follows: the Daubechies6 wavelet function is selected as the mother wavelet to filter the signal noise of the ECG signal after truncating or filling 0, the signal is decomposed into 9 levels, and the D1, D2, D3 and A9 components are deleted; wherein, Signal noise includes electromyographic interference and power frequency noise.

5. According to the method for modeling arrhythmia detection model based on multi-view multi-scale fusion network in claim 1, its characteristic is that data enhancement is performed on the four categories of arrhythmia ECG signals after denoising: ST segment elevation, atrial premature beats, ventricular premature beats, and left bundle branch block.

6. According to the method for modeling arrhythmia detection model based on multi-view multi-scale fusion network in claim 1, its characteristic is that the construction process of the multi-scale temporal attention module is as follows: b1) Use the maximum pooling layer and residual block to downsample and extract features from the preprocessed ECG signal, and retain the features extracted at each scale; the formula is as follows: in, x i is the input preprocessed ECG signal, P m is the maximum pooling layer, R is the residual block, is the feature of the kth scale in the downsampling process; b2) Use residual blocks and linear interpolation layers to upsample and extract features extracted at each scale, and concatenate them with the features retained by downsampling; the formula is as follows: in, is the feature of the kth scale in the upsampling process, B is the linear interpolation layer, R is the residual block, cat is concatenation, and A is the attention mechanism; b3) The output of the last residual block in step b2), that is, the multi-scale time attention weight output by the multi-scale time attention module, is multiplied by the pre-processed ECG signal to obtain the weighted ECG signal output; the formula is as follows: in is the weighted ECG signal output, It is the dot product.

7. According to the method for modeling arrhythmia detection model based on multi-view multi-scale fusion network in claim 1, the characteristic is that the process of extracting multi-dimensional features and performing residual connection with the pre-processed ECG signal is as follows: The preprocessed ECG signal is input into the channel attention module, spatial attention module and multi-scale temporal attention module respectively to obtain three ECG features weighted by attention weights, namely channel features Spatial characteristics Time characteristics The three weighted ECG features are residually connected using the following formula: where x i is the preprocessed ECG signal, Res is the residual connection, x u is the input of the upper branch residual network, x l is the input of the lower branch residual network; where, The lower branch residual network is a residual network connected with a multi-scale temporal attention module.

8. According to the method for modeling an arrhythmia detection model based on a multi-view multi-scale fusion network as described in claim 1, its characteristics are: during the training and verification process of the arrhythmia detection model, a joint loss and a focal loss function are used to calculate the loss; during the test, the classification labels predicted by the arrhythmia detection model for each ECG signal in the test set are combined with the real classification labels recorded in the test set to calculate the evaluation index, and the arrhythmia detection model is evaluated. If the evaluation index meets the requirements, the optimal parameters of the arrhythmia detection model are obtained, otherwise the parameters of the arrhythmia detection model are adjusted, and the arrhythmia detection model is re-trained, verified and tested.

9. According to the method for modeling arrhythmia detection model based on multi-view multi-scale fusion network of claim 8, its characteristic is that the construction process of joint loss and focal loss function is as follows: c1) using the cross entropy loss function to calculate the loss of the feature input after the secondary fusion into the multi-layer perceptron to generate the predicted classification label and the loss of the feature fused with the auxiliary information using the multi-layer perceptron to generate the predicted classification label; the formula of the cross entropy loss function is as follows: where y i is the true classification label of the i-th ECG signal record in the training set or validation set, and p i is the predicted i-th classification label, N is the number of ECG signals in the training set or validation set; c2) Calculate the focal loss weight of the ECG signal of each category of arrhythmia, then use the multilayer perceptron to generate the loss of the predicted classification label using the two features fused with auxiliary information and the loss of the secondary fused features input into the multilayer perceptron to generate the predicted classification label. The loss is multiplied by the focal loss weight respectively to obtain three focal losses. Finally, the three focal losses are added together to obtain the joint loss; the formula is as follows: Where b is the number of ECG signals in the original ECG data, n i is the number of ECG signals of the i-th type arrhythmia in the original ECG data, w i is the weight assigned to the ECG signal of the i-th arrhythmia. If the i-th category is the arrhythmia category of the ECG signal after data enhancement, use formula (2), otherwise use formula (1), m is the number of arrhythmia categories of the original ECG data, w i ′ is the focal loss weight of the ECG signal of the i-th type arrhythmia, It is the loss of generating predicted classification labels by using multi-layer perceptron with features fused with auxiliary information or the loss of generating predicted classification labels by inputting features after secondary fusion into multi-layer perceptron. is the focal loss function, It is the focal loss of the upper branch residual network output that integrates the auxiliary information features and uses the multi-layer perceptron to generate the predicted classification label. It is the focal loss of the residual network output of the lower branch that integrates the auxiliary information and uses a multi-layer perceptron to generate the predicted classification label. It is the focal loss of the second fused feature input into the multi-layer perceptron to generate the predicted classification label. It’s a joint loss.

10. According to claim 1, the modeling method of arrhythmia detection model based on multi-view multi-scale fusion network is characterized in that: all arrhythmia ECG signals except the test set are divided into ten piles, and all normal ECG signals are also divided into ten piles. Each training process selects nine different piles of arrhythmia ECG signals and nine piles of normal ECG signals as training sets, and the corresponding verification process selects the remaining pile of arrhythmia ECG signals and one pile of normal ECG signals as verification sets. After training and verification, the test set is used for testing, and the average evaluation index of each test result is used as the evaluation index of one process; the training, verification and testing process is repeated 10 times, and the evaluation indexes of the ten processes are averaged, and this average value is used as the final evaluation index of the arrhythmia detection model.

Citation Information

Cited By

  • Arrhythmia detection model modeling method based on multi-scale spatial-temporal feature fusion

    CN121071625A