ECG algorithm and portability in an ECG analysis device
Patent Information
- Application Number
- EP2024711552
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-17
- Filing Date
- 2024-03-15
- Publication Date
- 2026-01-21
AI Technical Summary
Existing ECG analysis algorithms, both non-deep learning and deep learning, are resource-intensive and difficult to implement on lightweight devices with limited computing capacity, such as portable watches and heart rate monitors, due to their need for significant computing power and labeled databases, which hinders their embedding on these devices while maintaining battery life.
A method for analyzing ECG signals using a multi-level convolutional neural network that preprocesses the signal by extracting voltage values around R peaks, generating a reduced-size dataset for deep learning algorithms, allowing for efficient classification or regression on devices with limited resources, with a computer program weighing less than 10KB and consuming less than 2 megaFlops of processor power.
Enables real-time ECG signal analysis on low-power devices, reducing computational load and energy consumption, while maintaining high performance in classifying ECG signals, thus overcoming the limitations of existing algorithms in portable devices.
Smart Images

Figure EP2024057032_26092024_PF_FP
Abstract
Description
Description ECG ALGORITHM AND EMBARKABILITY IN AN ECG ANALYSIS DEVICE [1] The present invention relates to the field of electrocardiograms (ECG or EKG) and in particular to algorithms for characterizing (classification, regression) ECG signals and relates in particular to devices (in particular portable devices) incorporating such algorithms. [2] Characterization means, in particular, the identification of certain temporal characteristics in the ECG signal. Previous technique [3] More and more portable devices today integrate an ECG module comprising electrodes and a processor capable of processing the ECG signal. [4] In this regard, we can cite documents WO2015 / 021391 (Apple™), WG2021 / 020706 (Samsung™), WG2021 / 204809 (Withings™), WO2015 / 035251 (AliveCor™). [5] Machine learning algorithms for ECG can be divided into two broad categories: non-deep learning algorithms (these are traditional algorithms based on the extraction of spatially separable vectors, such as decision forests) and deep learning algorithms (using channels). The term "deep learning" will be used to mean "deep learning". [6] Non-deep learning algorithms require manually extracting features from the ECG signal (e.g., a scalar representing the regularity of RR intervals, the proportion of visible P waves, etc.). Obtaining a separable feature vector that contains sufficient information is a difficult task, and the maximum performance of these algorithms is lower than the performance achievable with a deep learning algorithm. [7] Deep learning algorithms, on the other hand, rely on labeled databases and significant computing power in order to be able to build models taking the raw signal as input. [8] The paper “ECG arrhythmia classification using a 2-D convolutional neural network” by Jun et al. uses a two-dimensional neural network which requires converting the ECG signal into an ECG image with a grey gradient. [9] The paper “Classification of ECG Arrhythmia using Recurrent Neural Networks” by Singh et al. uses a recursive neural network.
[0010] The paper "Robust ECG Signal Classification for Detection of Atrial Fibrillation using a Novel Neural Network" by Xiong et al. uses a neural network on the ECG signal.
[0011] The document “Articial intelligence and deep neural networks can identify patients with electrocardiographically concealed long QT syndrome from the surface 12-lead electrocardiogram” by Bos et al. (AliveCor™) uses a deep neural network.
[0012] All these algorithms are expensive to train and infer.
[0013] Furthermore, there is a need to implement ECG algorithms on lightweight devices with limited processing power that must maintain long battery life. In this regard, smartwatches or hybrid devices (Apple Watch™, Samsung Galaxy Watch™), heart rate monitors (Polar™), scales (Withings BodyScan™), and others (Alivecord™ Kardiamobile™, for example) can impose such significant constraints that most existing deep learning algorithms cannot be satisfactorily implemented on these lightweight devices. Summary
[0014] This description relates to a method for analyzing an electrocardiogram (ECG) signal, as well as to a computer program implementing this method and a recording medium storing this computer program. This description also relates to an electrocardiogram module, referred to as the ECG module, implementing the aforementioned ECG signal analysis method, and to an electrocardiogram analysis device that includes the ECG module.
[0015] According to one aspect, the analysis method is defined as a method for analyzing an electrocardiogram (ECG) signal, the ECG signal comprising QRS complexes with an R peak, the analysis method being implemented by an ECG module, the method comprising: i. receiving a digital ECG signal, the digital ECG signal corresponding to points defined each by a time index and a voltage value T, ii. preprocessing of the received digital ECG signal, the preprocessing comprising: ii.a. determining, for a plurality of QRS complexes of the digital ECG signal, the time index of the point representing the R peak, called point R, of each QRS complex, ii.b. extracting, around each point R, a set of voltage values, the set of voltage values comprising the voltage values T of a set of points of the ECG signal, the set of points being determined by a predetermined set of time index deviations from the time index of point R, ii.c.generation of an ECG dataset comprising: ii.c.1. a time series using the time indices of the plurality of points, ii.c.2. a voltage series using the voltage value sets, within which the. voltage values T of points R are regularly arranged, iii. characterization of the ECG signal using the ECG dataset as input to a deep learning algorithm.
[0016] In one embodiment, the characterization includes the identification of at least one temporal feature in the ECG signal.
[0017] In one embodiment, characterization includes, in particular, classification or regression.
[0018] In one embodiment, classification is the assignment of a probability among a plurality of classes, the plurality of classes comprising at least two classes, for example between two and five classes.
[0019] In one embodiment, the classes are as follows: "poor ECG signal quality", "atrial fibrillation", "sinus rhythm", "other".
[0020] In one embodiment, regression is the assignment of a value that represents a probability of presence of cardiac peculiarity.
[0021] In one embodiment, the predetermined set of temporal index deviations is a predetermined set of positive and negative temporal index deviations.
[0022] In one embodiment, the predetermined set of time index deviations includes a zero deviation, in other words the series includes the value of the tension of the plurality of points R.
[0023] In one embodiment, the time series includes the time index differences between two successive time indices of point R (tR2-tR1, tR3-tR2, ...).
[0024] In one embodiment, the set of points includes i points before the time index of point R, point R and j points after the time index, for example i=j and for example i and j are between 20 and 40.
[0025] In one embodiment, the ECG dataset is the only input to the classifier.
[0026] In one embodiment, the ECG dataset consists solely of said time series and said voltage series.
[0027] In one embodiment, the deep learning algorithm includes a multilevel convolutional neural network and one level processes sets of voltage values, which all have an identical structure, thus enabling information factorization.
[0028] In one embodiment, the output of the classifier is a probability among a plurality of classes, the plurality of classes comprising at least two classes, for example between two and five classes.
[0029] In one embodiment, the analysis method further includes a visualization method comprising a superposition of QRS complexes centered on the R point and a display of said superposition.
[0030] According to one aspect, a computer program is defined as a computer program comprising instructions which, when the program is executed by an ECG module, cause the ECG module to implement an analysis method as described previously.
[0031] In one embodiment, the computer program weighs at most 100KB, preferably less than 60KB, even more preferably less than 20KB and even less than 10KB.
[0032] In one aspect, a recording medium is defined as a computer-readable recording medium comprising a computer program as described above.
[0033] According to one aspect, the ECG module is defined as an ECG module comprising a processor and memory, the ECG module being configured to implement a method as described previously.
[0034] In one embodiment, the execution of the method as described above consumes less than 2 megaFlops of the processor and / or consumes less than 20 KB of volatile memory, for example equal to or less than 10 KB.
[0035] According to one aspect, the ECG analysis device is defined as an electrocardiogram, ECG, analysis device, comprising electrodes and an ECG module as described above, the ECG module receiving a digital ECG signal from an analog ECG signal obtained by the electrodes.
[0036] In one embodiment, the ECG analysis device includes an analog-to-digital controller, ADC, configured to convert the analog ECG signal from the electrodes (102, 104, 106) and convert it to a digital ECG signal, and the voltage value is set as the ADC step value.
[0037] In one embodiment, the ECG analysis device further includes a communication module, connected to the ECG module, and the ECG module is configured to generate instructions to send the characterization to the communication module. Brief description of the drawings
[0038] Other features, details and advantages will become apparent upon reading the detailed description below, and upon analyzing the attached drawings, in which: Fig. 1.
[0039] [Fig. 1] This figure represents two portable devices according to embodiments. Fig. 2
[0040] [Fig. 2] This figure represents a schematic view of a portable device and its connectivity environment according to one embodiment. Fig. 3
[0041] [Fig. 3] This figure represents a method of obtaining ECG involving a method of analyzing the ECG signal, according to one embodiment. Fig. 4
[0042] [Fig. 4] This figure represents an ECG analysis method involving ECG signal preprocessing and algorithm, according to one embodiment.
[0043] Fig. 5
[0044] [Fig. 5] This figure represents in more detail a part of the pretreatment, according to one embodiment. Fig. 6
[0045] [Fig. 6] This figure represents in more detail a part of the pretreatment, according to one embodiment. Fig. 7
[0046] [Fig. 7] This figure shows alternative embodiments of part of the preprocessing, with different predetermined sets of time index deviations applied around a time index. Fig. 8
[0047] [Fig. 8] This figure represents a visualization method. Description of the embodiments
[0048] The description below will present the invention and its possible variations. The invention relates in particular to a portable electrocardiogram (ECG) analysis device comprising at least two electrodes configured to acquire an ECG electrical signal and an ECG electronic module configured to analyze said ECG electrical signal. The ECG electronic module includes memory and a processor. In particular,
[0049] Figure 1 illustrates two types of portable devices 100, 100' that can be configured to incorporate an ECG signal analysis method algorithm.
[0050] The device 100 is a watch (e.g., a hybrid watch, shown without hands here) worn on a user's wrist. The device 100' is a portable electrocardiograph, in the form of a card-like grip, such as the KardiaMobile™ from Alivecor™ or the Duoek™ from Wellue™.
[0051] The watch 100 comprises at least two ECG electrodes 102, 104, 106. For example, a first electrode 102 is integrated into a bezel of the watch 100 and a second electrode 104 is integrated into a case back. (back in English). A third electrode 104 may be provided, for example, on the case back as well. According to two examples, the case back may comprise a metal piece or a glass with a metallic coating. Alternatively, the first electrode 102 may be on a crown or elsewhere.
[0052] The card 100' similarly includes at least two electrodes 102', 104'. For example, a first electrode 102' on one side of the card 100' and a second electrode 104' on the first side of the card 00'. A third electrode 106' may be provided, for example on a second side of the card, opposite the first side.
[0053] The device can take other forms (such as a scale that performs an electrocardiogram, for example).
[0054] For the remainder of this description, reference will be made to the two ECG electrodes 102 and 104 for obtaining an ECG electrical signal. However, this description applies similarly to the various embodiments described above, including those with three or more electrodes.
[0055] Presentation of the ECG analysis device
[0056] Figure 2 schematically illustrates the components of an electrocardiogram analysis device 200, which could, for example, be device 100 or 100'.
[0057] The two ECG electrodes 102, 104 are electrically connected to a control unit 202. The control unit 202 includes various modules which are involved in obtaining and analyzing the ECG signal.
[0058] The control unit 202 thus comprises an acquisition module 204 capable of receiving the analog ECG signals from the ECG electrodes 102, 104 and of generating a digital ECG signal as output. The acquisition module 204 may include filters, amplifiers and an analog-to-digital controller, ADC (for “analog to digital converter” in English) 206.
[0059] The control unit 202 includes, in particular, an ECG module 208 configured to implement a method for analyzing an ECG signal, based on a digital ECG signal generated by the acquisition module 204, and specifically to generate a characterization of the digital ECG signal. In this respect, the ECG module 208 includes control circuitry 210, with a processor 212 and memory 214, 215. The memory is comprised of volatile memory 214, of the RAM type, and non-volatile memory, of the flash (or ROM or SSD) type. The control circuitry 210 also includes an I / O interface (Input / Output) for communicating with other modules or components.
[0060] The ECG 208 module is configured to run an ECG computer program that includes instructions for an ECG analysis method. The program The computer ECG is stored on non-volatile memory 215. The ECG analysis method will be described in more detail later.
[0061] The volatile memory 214 is used for executing the analysis method, and the non-volatile memory 215 is used for storing the computer program and / or the results obtained by said computer program.
[0062] The control circuitry 210 of the ECG module 208 can be shared with a control circuitry of the control unit 202 or other modules.
[0063] Device 200 may also include one or more of the following sensors: accelerometer, thermometer, optical sensor, photoplethysmographic (PPG) type, etc.
[0064] To supply the various components with electrical power, the device 200 includes a battery 216, for example, a cell or a rechargeable battery. The battery 216 is configured to power, in particular, the control unit 202 and, specifically, the ECG module 208. Each ECG processing by the processing unit 202 and each ECG analysis by the module 208 consumes a certain amount of energy supplied by the battery 216. Alternatively, the device 200 can be connected to the mains power supply.
[0065] The control unit 202 includes a communication interface 218 for communicating with various components of the device 200. In particular, the device 200 includes a communication module 220 (for example a Bluetooth™, Bluetooth Low Energy BLE™, WiFi™, cellular module, etc.), connected to the communication interface 218 and which enables it to communicate bidirectionally with at least one external terminal 222, such as a mobile phone.
[0066] The external terminal 222 can then communicate (bidirectionally) with a remote server 224 for data storage and processing. Alternatively or additionally, the wireless communication module 220 can communicate directly with the remote server 224, for example, via a cellular or Wi-Fi network. Data produced by the device 200, such as an ECG signal or information related to that ECG signal, is transmitted to the external terminal 222 via the wireless communication module 220.
[0067] Methods
[0068] The ECG computer program and the associated ECG analysis method will now be described in relation to Figures 3 to 8. An (analog) ECG signal is an electrical signal generated by the nerve activity of the user's heart, which is transmitted to the ECG electrodes when the user touches them simultaneously (illustrated in diagram (i) of Figure 3 by the user's gesture of placing their index finger on electrode 102 of watch 100). In a known manner, the ECG signal (illustrated in diagram (ii) of Figure 3 (in the form of a filtered ECG signal, with seconds on the x-axis and voltage in mV on the y-axis) includes peaks, notably the PQRST peaks, and more specifically the QRS complex. The interval between two peaks R is called the R-R interval. The description and understanding of ECG signals are well established and will not be described in further detail here.
[0069] Method of obtaining an ECG
[0070] The ECG analysis method may be part of an ECG obtaining method 300 illustrated in diagram (iii) of FIG. 3. The ECG obtaining method 300 comprises in particular the acquisition 302 by the acquisition module 204 and the electrodes 102, 104 of an analog ECG signal to convert it into a digital ECG signal, and the analysis 304 by the ECG module 208 of the digital ECG signal to automatically extract information therefrom. Finally, the ECG obtaining method 300 may comprise the sending 306 of a notification to the device 200 and / or the sending of the result of the analysis 304 and / or the ECG signal to the mobile terminal 222. The acquisition 302 and the sending 306 may be carried out by known techniques already implemented on current devices. Acquisition 302 can involve a single-lead ECG signal ("ECG 1 lead") or a multi-lead ECG signal. Analysis 304, also called the ECG analysis method, will now be described in more detail.
[0071] ECG analysis method
[0072] Figure 4 illustrates an ECG 400 analysis method according to one embodiment. As previously stated, the ECG 400 analysis method is implemented by the ECG module 208, whose processor 212 executes a computer program (called the ECG computer program) corresponding to said ECG analysis method, stored in memory 214. In one embodiment, the ECG 400 analysis method is applied to one channel of the ECG signal. In the case of a multi-channel ECG signal, the ECG 400 analysis method can be applied to each channel successively or in parallel.
[0073] The ECG analysis method 400 includes the reception 402 of a digital ECG signal, resampling 404 (optional) of the digital ECG signal, preprocessing 406 of the received (or resampled, if applicable) ECG signal to generate an input dataset (hereafter referred to as the "DS dataset"), and characterizing 408 said DS dataset using a deep learning algorithm, for example a classifier-type algorithm, implemented by the ECG module 208. The deep learning algorithm will be described in more detail later.
[0074] Preprocessing 406 and characterization 408 are each designed to work in relation to the other to generate processing synergy: in particular, preprocessing 406 does not use machine learning but, for example, is an algorithm of Signal processing algorithm. This signal processing algorithm is computationally inexpensive for the 212 processor of the ECG 208 module and is small in size and memory-efficient, allowing for a smaller input dataset for the deep learning algorithm. Conversely, the deep learning algorithm receives less data as input relative to the total size of the ECG signal, requiring less computing power and simplifying the training of the deep learning algorithm.
[0075] Resampling 404 consists of resampling the digitized ECG signal received at reception 402 to put it at the desired frequency. The resampling depends in particular on the frequency values that the preprocessing 406 can manage. Typically, the acquisition module 204 can generate a signal at a higher frequency (for example 500 Hz) than the operating frequency of the ECG module 208 (for example 300 Hz). Resampling 404 thus makes it possible to transform a digital ECG signal from a first frequency to a second frequency.
[0076] With reference to figures 5, 6, 7, pretreatment 406 will be described in more detail.
[0077] Preprocessing 406 is applied to a digital ECG signal sampled at a given frequency (e.g., 300 Hz). This means that the digital ECG signal consists of a series of points, each defined by a time index t and a voltage value T. The time index t is usually a time value, expressed, for example, in seconds; the voltage value T can be expressed in ADC steps, which directly represent the voltage value. The digitized ECG signal is therefore a large signal in terms of data: for example, a 30-second digital ECG signal (which is a standard duration for ECG acquisition) at 300 Hz comprises 30 seconds x 300 points per second, or 9000 points, typically 18 KB.
[0078] Preprocessing 406 aims to extract from this digital ECG signal information of significantly reduced size compared to the size of the digital ECG signal, which directly impacts the design and operation of the characterization 408.
[0079] Preprocessing 406 may include cleaning 500 of the digital ECG signal. Cleaning 500 may involve applying one or more filters to remove the signal baseline and electromagnetic noise. For example, a high-pass filter and a low-pass filter may be used.
[0080] Preprocessing 406 includes, in particular, the determination 502 of R points in QRS complexes. The ECG signal generally contains a plurality of QRS complexes. N is the number of ECG complexes contained in an ECG signal received at reception 402 (N=2 in Figure 5, for purely illustrative purposes, since N is usually around 30). For each of these ECG complexes, the ECG module 208 identifies the R peak (called R point) and extracts the time index tR of the R point. The TR voltage values of the R points can also be extracted.
[0081] We call tR1, tR2, tR3, ... , tRN the time indices of the successive R points of the ECG signal. We call R1 , R2, ... , RN the N R points. We call TR1, TR2, TR3, ... , TRN the N voltage values of the R points.
[0082] Determination 502 thus generates a series of data relating to points R1, ..., RN.
[0083] Subsequently, an extraction 504 of a plurality of voltage values is performed by the ECG module 208 around each point R. In one embodiment, the extraction uses a predetermined set EA of time index deviations, stored in memory 214. From an input time index, said predetermined set EA generates a set EtA of time indices which are, respectively, with respect to the input time index, deviations from the predetermined set EA of deviations. For example, (for a time index in seconds), the predetermined set of time index deviations might include: EA = {-0.30s; -0.29s; -0.28s; ....; -0.01s; 0s; +0.01s; ....; +0.28s; +0.29s; +0.30s}. Applied to a time index t, the predetermined set EA generates a set EtA of time indices as follows: EtA = {t-0.30s; t-0.29s; t- 0.28s; ....; t-0.01s; t; t+0.01s; ....; t+0.28s; t+0.29s; t+0.30s}.
[0084] More generally, in one embodiment, the predetermined set EA can include {-AL(i); -AL(i-1); AL(1); 0; +AR(1); ...; +ARQ(1); +ARQ)}, where i and j are positive natural numbers, with AL(k) and AR(k) (for k ranging from 1 to i and j respectively) representing deviations along the time index (typically in seconds), with AL(i) > AL(i-1) > ... > AL(1) > 0 and 0 < AR(1) < ... < AR(j-1) < AR(j). We denote EtA = {t(i); t(i-1); ...; t(1); tR; t'(1); ...; t'(j-1); t'(j)} are the time indices obtained from the time index tR of a peak R. In pseudo-mathematical notation, the data pair (tR ; EA) allows us to generate EtA. Each set EtA therefore comprises i+1+j time indices.
[0085] In a simplified embodiment, we have ai=j and AL(k) = AR(k) for k ranging from 1 to i or j. Thus, the predetermined set EA then includes {-AR(j) ; -AR(j-1) ; ... ; -AR(1) ; 0 ; +AR(1) ; ... ; +AR(0-1) ; +ARQ)}.
[0086] In an even more simplified embodiment, the deviations of the predetermined set EA are regular, of value A, so that the predetermined set EA can be written: {-Ai; - A. (i-1); ...; - A.1; 0; + A.1; ...; + AQ-1); + Aj}, where the points signify a multiplication.
[0087] Figure 6 illustrates an example with N = 3 (three QRS complexes), with i=j=2 and for which the distances between two successive temporal index deviations of the set Predetermined EAs are all regular: AL(2)-AL(1) = AL(1) = AR(2)-AR(1) = AR(1). For each of the three QRS complexes, a set EtA of time indices is generated (EtA1, EtA2, EtA3).
[0088] As previously stated, this predetermined set EA is applied to each time index tR1, ..., tRN to generate a set of time indices EtA1, EtAN around each point R. Therefore, for each point R, there are time indices to the left (therefore before temporally) the time index tR of the point R and j time indices to the right (therefore after temporally) the time index tR of the point R.
[0089] The ECG module 208 then extracts the voltage values corresponding to each of the indexes of the set EtA. Thus, for each index of each set EtA1, ..., EtAN, the ECG module 208 extracts a voltage value, thus generating for each set EtA1, ..., EtAN a set of voltage values JV (JV1, ...., JVN). Figure 6 illustrates the three sets of voltage values JV1, JV2, JV3 extracted for the sets EtA1, EtA2, EtA3.
[0090] At the end of extraction 504, N sets of voltage values JV1, ..., JVN are obtained. All sets of voltage values J are obtained using the same technique, with the same time index deviations from the time index tR of point R. By applying the same predetermined set EA to each of the time indices tR1, ..., tRN of points R1, ..., RN, the structure of all sets of voltage values JV1, ..., JVN is similar: in each set of voltage values JV, the first voltage value corresponds to the deviation -A(i) from peak R, and then the i+1 voltage value corresponds to peak R, and the jth voltage value corresponds to the deviation A'(j) from peak R. Thus, the time information of each voltage value is converted into a position in the set of voltage values JV.In particular, the structural identity between the sets of JV voltage values allows the generation of simplified data for the deep learning algorithm.
[0091] In an embodiment illustrated in diagram (i) of Figure 7, the distances between two consecutive AL(k) gaps and / or between two consecutive AR(k) gaps are regular. This means that the ECG module 208 extracts voltage values from the ECG signal in a regular manner around the point R.
[0092] The choice of values for i and j, and the predetermined values AL(k) and AR(k), depends on the information in the ECG signal that allows the ECG 208 module to classify the signal. Therefore, this choice also depends on what the deep learning algorithm needs to process. In one embodiment illustrated in diagram (ii) of Figure 7, ai is different from j. In another embodiment, i and j are included to ensure that the preprocessing recovers relevant information from the ECG signal. The numbers i and j can thus depend on the distances between successive gaps and the value of resampling 404. The determination of i and j is therefore done on a case-by-case basis. However, as an order of magnitude, we can obtain a functional 400 analysis method with i and j less than 100, or even less than 40, for example between 25 and 35.
[0093] In an embodiment illustrated in diagram (iii) of figure 7, the distances between two consecutive AL(k) gaps and / or between two consecutive AR(k) gaps are not regular.
[0094] In a fictitious example (illustrative virtue only), if the ECG signal includes relevant information between 0.2s and 0.1s before the R-peak and between 0.2s and 0.3s after the R-peak, the predetermined set EA can be chosen to generate more temporal indices in these areas than in the others. Thus, in the fictitious example, we can have EA = [- 0.30s ; -0.25s ; -0.20s ; -0.18s ; -0.16s ; -0.14s ; -0.12s ; -0.10s ; -0.5s ; 0s ; +0.05s ; +0.10s; +0.15s; +0.20s; +0.22s; +0.24s; +0.26s; +0.28s; +0.30s; +0.35s; +0.40s],
[0095] The preprocessing 406 then includes, via the ECG module 208, a generation 506 of ECG dataset (called DS dataset) which serves as input for the deep learning algorithm of the characterization 408.
[0096] This input may be supplemented with other data, but, more specifically in one embodiment, the DS dataset serves as the sole input to the deep learning algorithm.
[0097] The DS data set comprises in particular two series: a time series using the time indices of the plurality of points R, i.e. the time indices tR1, ... , tRN and a voltage series using the sets of voltage values JV1, ... , JVN of the N QRS complexes identified in the ECG signal.
[0098] The time series is used to inform the deep learning algorithm of the position of the R peaks relative to each other. In particular, in one embodiment, the time series comprises the RR intervals of the QRS complexes, i.e. {tR2-tR1, tR3- tR2, ... ,}. This information makes it possible in particular to calculate the heart rate and its variations.
[0099] The voltage series is used to inform the deep learning algorithm about the shape of the ECG signal and in particular the shape of each PQRST complex.
[0100] In one embodiment, the DS dataset does not include any other time indices than those of the R peaks: the position of the voltage values in the value sets provides sufficient information to the classifier.
[0101] In one embodiment, the deep learning algorithm is a classifier. It is then trained to classify the input according to a plurality of classes. In the case of an ECG classification algorithm, the following classes may be used: "poor ECG signal quality", "atrial fibrillation", "sinus rhythm", "other" (default class). The number of classes depends on the type of classification desired and, in fact, on the identification of the particularity of the ECG signal that one wishes to identify.
[0102] In one embodiment, the deep learning algorithm is a regressor. It is then trained to assign a value to the input. In the case of an ECG classification algorithm, this value might represent the probability of the presence of a cardiac abnormality.
[0103] The 406 preprocessing method is specifically designed to reduce the computational load associated with inference by the deep learning algorithm. In other words, to offload the deep learning algorithm, the 406 preprocessing method generates a small DS dataset with an identical structure for each QRS complex: the input dimension is thus significantly reduced. More specifically, the constant positioning of point R within the dataset greatly reduces the complexity of the deep learning algorithm. Therefore, the structure of the DS dataset allows for factoring the complexity of the deep learning algorithm, which executes a simple operation N times (N being the number of QRS complexes in the input dataset) instead of executing a very complex operation once.However, the execution of multiple operations that are not very complex compared to the execution of a complex operation has strong technical consequences, particularly on the use of RAM and on the training of the algorithm, which then becomes a simple task. These considerations are critical in terms of embedding in a portable device.
[0104] For example, when the ECG signal includes N QRS complexes and when each set of voltage values includes 61 voltage values (i=j=30, plus the voltage value of point R), the input of the deep learning algorithm is of size 61xN; but with the aforementioned factorization, the input data of the deep learning algorithm is in fact reduced to a size of 61.
[0105] Conversely, in machine learning algorithms where the entire digital ECG signal is used as input, the input size is significantly larger: for a 30s ECG signal at a frequency of 300Hz, the size is 30x300=30000 points. Furthermore, the machine learning algorithm has no information about the input ECG signal and must extract the features of interest from it itself during inference.
[0106] Within the framework of this description, for a 30-second ECG signal with 30 QRS complexes, the same inference is applied 30 times over windows of size 61.
[0107] The ECG 400 analysis method can be applied to any channel of an ECG, for example a multi-channel ECG (according in particular to the IEC 60601-2-47 standard).
[0108] The deep learning algorithm can operate continuously, over sliding windows (e.g., 30 seconds), with a granularity on the order of a second. This means that the deep learning algorithm can generate real-time (e.g., every second) characterizations of ECG signals. It is therefore possible to apply the ECG 400 analysis method to a continuous chest heart rate monitor. If a cardiac event occurs, the user can be notified almost in real time (with a delay equal to the duration of the acquisition window, which is typically 30 seconds).
[0109] This continuous operation is possible on a low power device thanks to the synergy allowed between pretreatment 406 and characterization 408.
[0110] Description of one implementation of the deep learning algorithm
[0111] The deep learning algorithm can comprise a two-level neural network, each level containing, for example, a set of convolutional or dense layers. The first level can process the tension series of the DS dataset, and the second level can process the time series of the DS dataset.
[0112] In one embodiment, the number of trainable parameters of the deep learning algorithm is less than 5000.
[0113] As mentioned earlier, the deep learning algorithm can be a classifier or a regressor.
[0114] Training
[0115] The deep learning algorithm is pre-trained. In particular, preprocessing 406 is applied identically to a deep learning algorithm training method. Therefore, ECG analysis method 400 also functions as a training method.
[0116] As previously discussed, the small size of the DS dataset for the deep learning algorithm has two implications: inference is resource-efficient and training is economical in the amount of training data.
[0117] It should be remembered that a large training data set is expensive (in human and financial resources), particularly because labeling training data is a tedious and costly process.
[0118] Acceptable performance was observed from approximately 500 training ECG signals. Without input dimensionality reduction as described herein, such performance is not achieved with 500 training ECG signals.
[0119] Power consumption and computing power
[0120] Thanks to preprocessing, the deep learning algorithm can be small in size. For example, the computer program whose instructions allow the implementation of the ECG analysis method 400 (which therefore includes preprocessing 406 and the characterization 408) can weigh less than 100 KB, or even less than 60 KB, or even less than 20 KB, or even less than 10 kB.
[0121] The computer program is typically a binary in a low-level language (e.g., C), to simplify integration into any suitable device.
[0122] Similarly, thanks to preprocessing, the deep learning algorithm can require minimal flash memory. For example, the ECG 400 analysis method uses less than 100kB of flash memory, preferably less than 50kB, preferably less than 10kB, or even less than 5kB.
[0123] Similarly, thanks to preprocessing, the deep learning algorithm can require minimal RAM. For example, the RAM usage of the ECG 400 analysis method is less than 20 KB, or even 10 KB.
[0124] Similarly, thanks to preprocessing, the algorithm can consume very little energy.
[0125] Similarly, thanks to preprocessing, the deep learning algorithm consumes less than 2 megaFlops of the processor.
[0126] With these specifications, the computer program incorporating the ECG 400 analysis method can be easily embedded on a plurality of devices: watch, chest patch, scale, card, etc.
[0127] Description of the tracing module
[0128] In another aspect, the ECG 208 module can also generate ECG signal tracings directly usable by a doctor, via a visualization method 800, illustrated in figure 8.
[0129] The ECG 208 module uses the resampled signal after the 404 resampling.
[0130] The visualization method 800 therefore includes, downstream of the resampling 404, a filtering 802 of the ECG signal, a detection 804 of the R peaks (similarly to the detection 502), a superposition 806 of each of the superimposed QRS complexes of the ECG signal centered on the R peaks and finally a display 808 of said superposition.
[0131] Figure 8 illustrates in graph (i) the raw ECG signal 810 (noisy), before filtering 802, the filtered ECG signal 812 (noiseless) after filtering 802 and in graph (ii) the result 814 of the display 808. In Figure 8, a superposition 816 of the unfiltered QRS complexes has been shown for comparison.
[0132] The 800 visualization method thus allows the doctor to assist in the interpretation of the ECG signal: the position of the P, Q, R, S, or T peaks is more accessible.
[0133] The execution of the visualization method by the ECG module 208 which also implements the measurement method 400 on the same ECG signals allows an approach holistic ECG, with continuous monitoring by an algorithm and occasional monitoring by a physician.
[0134] The visualization method 800 may be independent of the analysis method 400 or incorporated therein.
Claims
Claims 1. Computer program comprising instructions which, when the program is executed by an ECG module, cause the ECG module to implement a method (400) for analyzing an electrocardiogram signal, ECG, the ECG signal comprising QRS complexes with an R peak, the method comprising: receiving (402) a digital ECG signal, the digital ECG signal corresponding to points each defined by a time index and a voltage value, preprocessing (404) the received digital ECG signal, the preprocessing comprising: o determining (502), for a plurality (N) of QRS complexes of the digital ECG signal, the time index of the point representing the R peak, called point R, of each QRS complex, o extracting (504), around each point R, a set of voltage values (JV), the set of voltage values comprising the voltage values of a set (E) of points of the ECG signal,the point set being determined by a predetermined set (EA) of time index deviations from the time index of point R, o generation (506) of an ECG data set (DS) comprising:, ■ a time series using the time indexes (t1, ...., tn) of the plurality of points R (R1,... Rn), ■ a voltage series using the voltage value sets, within which the voltage values of the R points are regularly arranged, characterizing (408) the ECG signal using the ECG data set as input to a deep learning algorithm.
2. Computer program according to claim 1, wherein the predetermined set (EA) of time index deviations is a predetermined set of positive and negative time index deviations.
3. A computer program according to any one of claims 1 to 2, wherein the predetermined set of time index deviations includes a zero deviation, in other words the series includes the voltage value of the plurality of points R.
4. Computer program according to any one of claims 1 to 3, in which the time series comprises the time index differences between two successive time indexes of point R (tR2-tR1, tR3-tR2, ...).
5. Computer program according to any one of claims 1 to 4, wherein the set of points comprises i points before the time index of point R, point R and j points after the time index, for example i=j and for example i and j are between 20 and 40.
6. A computer program according to any one of claims 1 to 5, wherein the ECG dataset (DS) is the sole input to the deep learning algorithm.
7. Computer program according to any one of claims 1 to 6, wherein the ECG data set (DS) is composed solely of said time series and said voltage series.
8. A computer program according to any one of claims 1 to 7, wherein the deep learning algorithm comprises a multi-level convolutional neural network and one level processes the sets of voltage values, which all have an identical structure, thus enabling factorization of the information.
9. A computer program according to any one of claims 1 to 8, wherein the deep learning algorithm is a classifier and the output of the classifier is a probability among a plurality of classes, the plurality of classes comprising at least two classes, for example between two and five classes.
10. A computer program according to any one of claims 1 to 9, wherein the preprocessing (406) does not use machine learning but, for example, is a signal processing algorithm.
11. Computer program according to any one of claims 1 to 10, in which the distances between two consecutive time index gaps of the predetermined set (EA) are not regular.
12. Computer program according to any one of claims 1 to 11, wherein the computer program weighs at most 100KB, preferably less than 60KB, more preferably less than 20KB and even more preferably less than 10KB.
13. Electrocardiogram module (208), called ECG module, comprising a processor (212) and a memory (214), the ECG module (208) being configured to implement a method described in any one of claims 1 to 12.
14. ECG module (208) according to claim 13, wherein the execution of the method described in any one of claims 1 to 12 consumes less than 2 megaFlops of the processor and / or consumes volatile memory less than 20 KB, for example equal to or less than 10 KB.
15. An electrocardiogram analysis device (200), ECG, comprising electrodes (102, 104, 106) and an ECG module (208) according to any one of claims 13 to 14, the ECG module (208) receiving a digital ECG signal from an analog ECG signal obtained by the electrodes (102, 104, 106).