Keywords

1 Introduction

The world is concerned about the cardiovascular disease [1]. Mainly relying on the detection of ECG signals to promote research on related issues of cardiovascular diseases. The electrocardiogram represents cardiac function and graphic signals [2], which is an important means of diagnosing abnormal cardiac activity.

ECG signals are the product of a wide range of clinical ECG techniques. In recent years, research methods for ECG signals have made significant progress, such as using machine learning [3], neural network, clustering [4], partial fractal dimension [5], wavelet transform [6], and other methods to classify the detection of arrhythmia. The most typical representative of the emerging ECG research method is ECG scatter gram [7,8,9].

The variant method is an emerging technique for dealing with spatial changes in signal phase. Since the 1990s, the application of the variant method in processing binary image classification and transformation [10, 11] had been proposed, and the variant method has been perfected until now [12, 13]. Variant method is applied to different data samples: quantum sequences [14, 15], random sequences [16], non-coding DNA [17,18,19], bat echo signals [20], and electrocardiographic signals [21, 22], and effective research results have been obtained in these samples.

This chapter is a further study of the use of variant measurements in the detection of ECG sequences. The sample ECG signals are provided by the First People’s Hospital of Yunnan Province. In this chapter, two groups of signals are used: normal ECG signal and abnormal ECG signal groups. In the second part of this chapter, we describe variant map for ECG. Showing sample results and making a brief analysis in the third part, the last part is the summary of the chapter.

2 Variant Map for ECG

Variant map for ECG is composed of six parts: Input, Processing, Segmenting, Statistics, Mapping, and Output. Figure 1 is the overall structure of the variant map for ECG, which specific content about each part in the following description:

  1. A.

    Input Part

Testing ECG signals are provided by the hospital as a data source. Let ECG signals be p with N elements.

$$ p = \left\{ {p_{0,}\,\ldots,\,p_{N - 1} } \right\} $$
  1. B.

    Processing Part

In processing part, a multivalve ECG signal sequence will be transformed into a four-valued pseudo-DNA sequence.

Fig. 1
figure 1

The overall structure of the variant map for ECG

Input: the ECG sequence

$$ p = \left\{ {p_{0,}\,\ldots,\,p_{N - 1} } \right\} $$

Parameters: W sliding window value; R interval value.

Output: a four-valued pseudo-DNA sequence

$$ q = \left\{ {q_{0},\,\ldots,\,q_{N - 1} } \right\} $$

Processing:

Let \( \overline{{p_{i} }} \) be an average value; r be a range value; ti be a conversion value. Three values are calculated in the equations:

$$ \bar{p}_{i} = \sum\limits_{i = 0}^{N - 1} {\frac{{p_{i} }}{W}} $$
$$ p_{{\text{max}}} = \text{max}\left\{ {p_{\text{i}} } \right\}, 0 \le i < N - 1 $$
$$ p_{{\text{min}}} = \hbox{min} \left\{ {p_{\text{i}} } \right\}, 0 \le i < N - 1 $$
$$ r = \left( {p_{{\text{max}}} - p_{{\text{min}}} } \right)*\frac{R}{2} $$
$$ t_{i} = \frac{{2\left( {p_{i} - \bar{p}_{i} } \right)}}{r*R} $$

Transforming rules: \( 0 \le i < N - 1 \)

$$ {\text{if}}\;\;t_{i} > R > 0:q_{i} = A;\;\;{\text{if}}\;\; 0 < t_{i } < R: q_{i} = G; $$
$$ {\text{if}}\;\;0 > t_{i} > - R:q_{i} = C;\;\;{\text{if}} \,0 > - R > t_{i } :q_{i} = T; $$
  1. C.

    Segmenting Part

    Input: \( q = \left\{ {q_{0}, \ldots, q_{N - 1} } \right\} \).

    Parameters: m is a segment value.

    Output: \( Q = \left\{ {Q_{0}, \ldots, Q_{j}, \ldots, Q_{M - 1} } \right\} \), \( 0 \le j < M \); M is segments and N = m * M.

    Processing: the j-th element in \( Q = \left\{ {Q_{0}, \ldots, Q_{j}, \ldots, Q_{M - 1} } \right\} \);

$$ Q_{j} = \left\{ {q_{j*m} , \ldots, q_{j*m + i} , \ldots, q_{j*m + m - 1} } \right\},\,0 \le i < m, 0 \le j < M. $$
  1. D.

    Statistics Part

    Input: \( Q = \left\{ {Q_{0} , \ldots, Q_{j} , \ldots, Q_{M - 1} } \right\} \), \( 0 \le j < M \)

    Output: \( S = \left\{ {S_{j}^{A} ,S_{j}^{C} ,S_{j}^{G} ,S_{j}^{T} } \right\} \), \( 0 \le j < M \)

$$ \begin{aligned} S_{j}^{A} \,{\text{is}}\,{\text{value}}\,{\text{of}}\,{\text{the}}\,{\text{number}}\,{\text{of}}\,A\,{\text{element}}\,{\text{in}}\,Q_{j} \hfill \\ S_{j}^{C} \,{\text{is}}\,{\text{value}}\,{\text{of}}\,{\text{the}}\,{\text{number}}\,{\text{of}}\,C\,{\text{element}}\,{\text{in}}\,Q_{j} \hfill \\ S_{j}^{G} \,{\text{is}}\,{\text{value}}\,{\text{of}}\,{\text{the}}\,{\text{number}}\,{\text{of}}\,G\,{\text{element}}\,{\text{in}}\,Q_{j} \hfill \\ S_{j}^{T} \,{\text{is}}\,{\text{value}}\,{\text{of}}\,{\text{the}}\,{\text{number}}\,{\text{of}}\,T\,{\text{element}}\,{\text{in}}\,Q_{j} \hfill \\ \end{aligned} $$
  1. E.

    Mapping Part

Selecting a pair of two elements in \( S = \left\{ {S_{j}^{A} ,S_{j}^{C} ,S_{j}^{G} ,S_{j}^{T} } \right\}, \) \( 0 \le j < M \), as a mapping object. This chapter selects \( \left( {S_{j}^{C} ,S_{j}^{G} } \right) \). \( S_{j}^{C} \) is corresponding to the X-axis and \( S_{j}^{G} \) is corresponding to the Y-axis. All M pairs are mapping to the 2D map as output.

  1. F.

    Output

The results of the mapping are output in the form of 2D variant maps.

3 Sample Results and Brief Analysis

Visualization results of ECG signal obtained by variant map for ECG show that the morphological features of ECG signals have regular changes. Sample results are illustrated and a brief analysis is described.

  1. A.

    Data Source Description

The ECG signals in this chapter are provided by the First People Hospital of Yunnan Province. The ECG signals contain a total of 202,626 cases. There are 104,742 normal cases and 97,884 abnormal cases of records. For this experiment, 97,884 normal cases and 97,884 abnormal cases were selected.

Since ECG signals have multiple attributes, this chapter chooses the attributes of the P wave samples to be processed. Figure 2 is the sample of part of abnormal ECG data source.

  1. B.

    Visualization Features

Using the variant map for ECG, multiple maps can be generated.

Fig. 2
figure 2

The sample of part of abnormal ECG data source

The interesting finding is that the changes of the parameters affect the spatial characteristics and phase changes of the maps.

Overall in Fig. 3, two 2D maps are illustrated for two normal/abnormal maps, parameters are \( W = 24 \), \( R = 0.95 \), \( m = 50 \). X and Y are \( \left( {S_{j}^{C} ,S_{j}^{G} } \right) \) \( 0 \le j < M \), the ECG variant map shows the regular characteristics. In Fig. 3a, a normal map for P wave is an oval. In Fig. 3b, an abnormal map for P wave is a stick.

Fig. 3
figure 3

The example of normal and not ECG variant map

In Fig. 4, a list of normal maps for P wave on parameters \( R = \left\{ {0.6,0.72,0.84,0.96,65,1.08,1.2} \right\} \). When the parameter R increases, the feature of relevant maps has a nonlinear displacement along the top right corner of the image.

Fig. 4
figure 4

A list of normal maps for P wave on parameters \( R = \left\{ {0.6,0.72,0.84,0.96,65,1.08,1.2} \right\} \); af maps on \( R = \left\{ {0.6,0.72,0.84,0.96,65,1.08,1.2} \right\} \)

In Fig. 5, a list of abnormal maps for P wave on parameters \( R = \left\{ {0.6,0.72,0.84,0.96,65,1.08,1.2} \right\} \). When the parameter R increases, the feature of relevant maps has a nonlinear displacement along the top right corner of the image.

Fig. 5
figure 5

A list of abnormal maps for P wave on parameters \( R = \left\{ {0.6,0.72,0.84,0.96,65,1.08,1.2} \right\} \); af maps on \( R = \left\{ {0.6,0.72,0.84,0.96,65,1.08,1.2} \right\} \)

Comparing with Figs. 4 and 5, differences between normal and abnormal map features.

4 Summary and Prospect

Electrocardiogram (ECG) detection is the key to clinical diagnosis of heart disease and has important clinical value. At present, the automatic analysis function of dynamic ECG detection is not satisfactory. There are also problems that the features of waveform lesions are small and cannot be marked, and even the characteristics of lesions are neglected. Therefore, excavating the effective information existing in the massive ECG signal can avoid the blind area of ECG analysis to some extent, which has certain application value.

This chapter presents a new scheme of statistical distribution, variant map for ECG. This method can process massive ECG data sequences as 2D maps with visual characteristics. The sample results show classification of arrhythmia characteristics to identify the normal ECG signals and abnormal ECG signals significantly different. Further explorations and more experiments are required.