TRAINING METHOD AND MODEL FOR NEURAL FOLDING NETWORK BASED ON IMPROVEMENT OF SAMPLE DISTRIBUTION

DE602020043179T2Active Publication Date: 2024-12-11SHANGHAI SID MEDICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE602020043179
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-07-22
Filing Date
2020-08-14
Publication Date
2024-12-11
Estimated Expiration
2040-08-14

AI Technical Summary

Technical Problem

It is very important to screen out all premature ventricular beats from a long-time ECG signal segment when determining a patient's condition, but this is time-consuming and labor-intensive.

Benefits of technology

[0010]The present disclosure has following beneficial effects: According to the method and model for training a convolutional neural network based on sample distribution improvement in the present disclosure, an average value x avg , a maximum value x MAX , a minimum value x MIN , a peak x F , and a kurtosis value x Q of a heartbeat are calculated in advance, and whether the values satisfy conditions is determined to screen a sample. When heartbeat data satisfies less than three of x avg - 3σ avg < x avg < x avg + 3σ avg , x MAX - 3σ MAX < x MAX < x MAX + 3σ MAX , x MIN - 3σ MIN < x MIN < x MIN + 3σ MIN , x F - 3σ F , < x F < x F + 3σ F , and x Q - 3σ Q < x Q < x Q + 3σ Q , it is considered that training data used by the model does not conform to sample distribution, and a heartbeat signal failing to satisfy this requirement is eliminated, so as to reduce misjudgment of a heartbeat type.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of heartbeat type screening in an artificial neural network, and in particular, to a method and model for training a convolutional neural network based on sample distribution improvement.BACKGROUND

[0002] An electrocardiogram (ECG) signal is a comprehensive reflection of electrical activities of numerous cardiac myocytes of a heart. Under a normal circumstance, cardiac myocytes of a sinoatrial node, an atrium, and a ventricle are depolarized in turn to form a heartbeat containing a signal segment of P, QRS, and T waves, and a plurality of heartbeats are combined to form an ECG signal segment. A premature ventricular beat is a heartbeat formed by depolarization of the ventricle due to an early electric impulse from an ectopic rhythm point of any part of the ventricle or a ventricular septum before an impulse of the sinoatrial node reaches the ventricle. It is very important to screen out all premature ventricular beats from a long-time ECG signal segment when determining a patient's condition, but this is time-consuming and labor-intensive. Therefore, it is of significance to screen out the premature ventricular beat from the ECG signal by using a computer. However, an electric shock can be generated from many positions in the heart, heartbeat shapes displayed in different electric shock positions are different, and there is a lot of interference. Therefore, during heartbeat classification, it is almost impossible to find all patterns and data of the premature ventricular beat and "other" types of heartbeats to train a deep learning model, which is easy to cause incorrect determination of a heartbeat type.

[0003] CN 109620207 A discloses method and apparatus for recognizing premature ventricular beat based on an improved convolutional neural network, which includes: pretreating an electrocardiosignal; truncating the electrocardiosignal as several heartbeat sequences, extracting RR spacing between each heartbeat and the prior heartbeat; calculating kurtosis value and deviation value of each heartbeat sequence; and recognizing heartbeat by inputting the heartbeat sequences, RR spacing, kurtosis value and deviation value into the improved convolutional neural network, to determine whether the heartbeat belongs to premature ventricular beat.SUMMARY

[0004] In order to resolve the shortcomings in the prior art, the present disclosure provides a method and model for training a convolutional neural network based on sample distribution improvement.

[0005] The present disclosure resolves the technical problems with following technical solutions: A method for training a convolutional neural network based on sample distribution improvement includes following steps: step S31: collecting enough lead-II heartbeat signals from a marked 12-lead ECG signal to form an initial dataset, where the lead-II heartbeat signals include a premature ventricular heartbeat signal and a non-premature ventricular heartbeat signal that each account for half of a total quantity of lead-II heartbeat signals; and setting a tag of the premature ventricular heartbeat signal to a, and a tag of the non-premature ventricular heartbeat signal to b; step S32: taking statistics on all heartbeat data in the collected dataset to obtain an average value, a maximum value, a minimum value, a peak, and a kurtosis value of each piece of heartbeat data to form an average value array AVG={a1, a2, a3, ..., aN}, a maximum value array MAX={m1, m2, m3, ..., mN}, a minimum value array MIN={c1, c2, ..., cN}, a peak array F={f1, f2, ..., fN}, and a kurtosis value array Q={q1, q2, ..., qN}, and then calculating average values and standard deviations of the average value array, the maximum value array, the minimum value array, the peak array, and the kurtosis value array, which are denoted as x avg , σ avg , x MAX , σ MAX , x MIN , σ MIN , x F , σ F , x Q , and σ Q respectively; step S33: determining whether following conditions are satisfied for all heartbeat data in each piece of data: x avg - 3σ avg < x avg < x avg + 3σ avg , x MAX - 3σ MAX < x MAX < x MAX + 3σ MAX , x MIN - 3σ MIN < x MIN < x MIN + 3σ MIN , x F - 3σ F < x F < x F + 3σ F , and x Q -3σ Q < x Q < x Q + 3σ Q , obtaining a number of the conditions satisfied, and eliminating heartbeat data satisfying less than three of the above conditions in initial data to form a new heartbeat dataset; step S34: repeating step S32 until a heartbeat dataset does not change, and using the heartbeat dataset as training data; and step S35: inputting the training data and a corresponding tag to a convolutional neural network for training, to obtain a convolutional neural network model based on sample distribution improvement.

[0006] Preferably, according to the method for training a convolutional neural network based on sample distribution improvement, the lead-II heartbeat signal is sampled at a frequency of 500 Hz and filtered by a 0.5 Hz to 100 Hz Butterworth bandpass filter.

[0007] Preferably, according to the method for training a convolutional neural network based on sample distribution improvement, each heartbeat signal is an ECG signal from 0.38s before an R wave peak to 0.5s after the R wave peak.

[0008] Preferably, according to the method for training a convolutional neural network based on sample distribution improvement, the convolutional neural network model based on sample distribution improvement includes 10 network layers, namely, layers 1 to 9 and a classifier, where layers 1 to 5 each include a convolutional layer and a pooling layer, and use a LeakyReLU activation function; the convolutional layer in the layer 1 contains 32 kernels with a size of 7 each, and both a stride and a kernel size of the pooling layer in the layer 1 are 2; the convolutional layer in the layer 2 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 2 are 2; the convolutional layer in the layer 3 contains 32 kernels with a size of 3 each, and both a stride and a kernel size of the pooling layer in the layer 3 are 2; the convolutional layer in the layer 4 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 4 are 2; the convolutional layer in the layer 5 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 5 are 2; the convolutional layer in the layer 6 contains 32 kernels with a size of 5 each; the layer 7 is an input layer of a bidirectional long short term memory network layer, a quantity of neurons in the layer 7 is consistent with a quantity of output characteristics of the layer 6, and the bidirectional long short term memory network layer outputs 60 neurons in total, namely 30 neurons output forward and 30 neurons output backward; the layer 8 is an attention mechanism layer, which receives an output of the layer 7; and the layer 9 is a fully connected layer, which receives an output of the layer 8 and outputs 4 neurons.

[0009] Preferably, according to the method for training a convolutional neural network based on sample distribution improvement, a=1, b=0, and when an output value of the convolutional neural network model based on sample distribution improvement is greater than 0.5, a heartbeat of an unknown type is considered as a premature ventricular beat; or when an output value is less than or equal to 0.5, a heartbeat of an unknown type is considered as the non-premature ventricular heartbeat signal.

[0010] The present disclosure has following beneficial effects: According to the method and model for training a convolutional neural network based on sample distribution improvement in the present disclosure, an average value x avg , a maximum value x MAX , a minimum value x MIN , a peak x F , and a kurtosis value x Q of a heartbeat are calculated in advance, and whether the values satisfy conditions is determined to screen a sample. When heartbeat data satisfies less than three of x avg - 3σ avg < x avg < x avg + 3σ avg , x MAX - 3σ MAX < x MAX < x MAX + 3σ MAX , x MIN - 3σ MIN < x MIN < x MIN + 3σ MIN , x F - 3σ F , < x F < x F + 3σ F , and x Q - 3σ Q < x Q < x Q + 3σ Q , it is considered that training data used by the model does not conform to sample distribution, and a heartbeat signal failing to satisfy this requirement is eliminated, so as to reduce misjudgment of a heartbeat type.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The technical solutions of the present disclosure are described in further detail below with reference to the drawings and embodiments. FIG. 1 is a flowchart of a method for identifying a heartbeat type of a convolutional neural network based on sample distribution improvement according to an embodiment of the present disclosure; and FIG. 2 is a schematic structural diagram of a convolutional neural network model based on sample distribution improvement according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] It should be noted that the embodiments in the present disclosure and features in the embodiments may be combined with each other in a non-conflicting situation.

[0013] The technical solutions of the present disclosure will be described in detail below with reference to the drawings. As shown in FIG. 1, a method for training a convolutional neural network based on sample distribution improvement according to an embodiment includes following steps.

[0014] Step S31: Enough lead-II heartbeat signals are collected from a marked 12-lead ECG signal to form an initial dataset, where the lead-II heartbeat signals include a premature ventricular heartbeat signal and a non-premature ventricular heartbeat signal that each account for half of a total quantity of lead-II heartbeat signals; and a tag of the premature ventricular heartbeat signal is set to a, and a tag of the non-premature ventricular heartbeat signal is set to b.

[0015] Step S32: Statistics is taken on all heartbeat data in the collected dataset to obtain an average value, a maximum value, a minimum value, a peak, and a kurtosis value of each piece of heartbeat data to form an average value array A VG={a1, a2, a3, ..., aN}, a maximum value array MAX={m1, m2, m3, ..., mN}, a minimum value array MIN={c1, c2, ..., cN}, a peak array F={f1, f2, ..., fN}, and a kurtosis value array Q={q1, q2, ..., qN}, and then average values and standard deviations of the average value array, the maximum value array, the minimum value array, the peak array, and the kurtosis value array are calculated, which are denoted as x avg , σ avg , x MAX , σ MAX , x MIN , σ MIN , x F , σ F , x Q , and σ Q respectively.

[0016] Step S33: Whether following conditions are satisfied is determined for all heartbeat data in each piece of data: x avg - 3σ avg < x avg < x avg + 3σ avg , x MAX - 3σ MAX < x MAX < x MAX + 3σ MAX , x MIN - 3σ MIN < x MIN < x MIN + 3σ MIN , x F - 3σ F < x F < x F + 3σ F , and x Q - 3σ Q < x Q < x Q + 3σ Q , a number of the conditions satisfied is obtained, and heartbeat data satisfying less than three of the above conditions in initial data is eliminated to form a new heartbeat dataset.

[0017] Step S34: Step S32 is repeated until a heartbeat dataset does not change, and the heartbeat dataset is used as training data.

[0018] Step S35: The training data and a corresponding tag are input to a convolutional neural network for training, to obtain a convolutional neural network model based on sample distribution improvement.

[0019] The lead-II heartbeat signal in step S31 is sampled at a frequency of 500 Hz and filtered by a 0.5 Hz to 100 Hz Butterworth bandpass filter. The sampling frequency of the lead-II heartbeat signal needs to be adjusted to 500 Hz first if it is not 500 Hz. Each heartbeat signal is an ECG signal from 0.38s before an R wave peak to 0.5s after the R wave peak.

[0020] The convolutional neural network model based on sample distribution improvement includes 10 network layers, namely, layers 1 to 9 and a classifier. Layers 1 to 5 each include a convolutional layer and a pooling layer, and use a LeakyReLU activation function. The convolutional layer in the layer 1 contains 32 kernels with a size of 7 each, and both a stride and a kernel size of the pooling layer in the layer 1 are 2. The convolutional layer in the layer 2 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 2 are 2. The convolutional layer in the layer 3 contains 32 kernels with a size of 3 each, and both a stride and a kernel size of the pooling layer in the layer 3 are 2. The convolutional layer in the layer 4 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 4 are 2. The convolutional layer in the layer 5 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 5 are 2. The convolutional layer in the layer 6 contains 32 kernels with a size of 5 each. The layer 7 is an input layer of a bidirectional long short term memory network layer, a quantity of neurons in the layer 7 is consistent with a quantity of output characteristics of the layer 6, and the bidirectional long short term memory network layer outputs 60 neurons in total, namely 30 neurons output forward and 30 neurons output backward. The layer 8 is an attention mechanism layer, which receives an output of the layer 7. The layer 9 is a fully connected layer, which receives an output of the layer 8 and outputs 4 neurons.

[0021] Values of a and b may be set to 1 and 0 respectively. When an output value of the convolutional neural network model based on sample distribution improvement is greater than 0.5, a heartbeat of an unknown type is considered as a premature ventricular beat; or when an output value is less than or equal to 0.5, a heartbeat of an unknown type is considered as the non-premature ventricular heartbeat signal.

[0022] A convolutional neural network model is obtained through training by using the above-mentioned method for training a convolutional neural network. The convolutional neural network model can be used by performing the following steps: Step S1: A heartbeat in a lead-II heartbeat signal of a 12-lead ECG signal of an unknown type is collected, and an average value x avg , a maximum value x MAX , a minimum value x MIN , a peak x F , and a kurtosis value x Q of the heartbeat are calculated. Step S2: A number of conditions satisfied is obtained, wherein the conditions are x avg - 3σ avg < x avg < x avg + 3σ avg , x MAX - 3σ MAX < x MAX < x MAX + 3σ MAX , x MIN - 3σ MIN < x MIN , < x MIN , + 3σ MIN , x F - 3σ F < x F < x F + 3σ F , and x Q - 3σ Q < x Q < x Q + 3σ Q . Step S3: If heartbeat data satisfies at least three of the above conditions in step S2, the heartbeat data is input to the convolutional neural network model based on sample distribution improvement in Embodiment 2 to determine a type of the heartbeat. Otherwise, it is considered that the heartbeat of the unknown type is a "type that cannot be determined". Step S4: When an output value of the convolutional neural network model based on sample distribution improvement is approximate to a, the heartbeat of the unknown type is considered as a premature ventricular beat; or when an output value is approximate to b, the heartbeat of the unknown type is considered as a non-premature ventricular heartbeat signal.

[0023] Values of a and b may be set to 1 and 0 respectively. In step S4, when the output value of the convolutional neural network model based on sample distribution improvement is greater than 0.5, the heartbeat of the unknown type is considered as the premature ventricular beat; or when the output value is less than or equal to 0.5, the heartbeat of the unknown type is considered as the non-premature ventricular heartbeat signal. The technical scope of the present disclosure is subjected to the scope of the claims, and is not limited to the content of the specification.

[0024] Those skilled in the art should understand that the embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Therefore, the present disclosure may use a form of hardware only embodiments, software only embodiments, or embodiments with a combination of software and hardware. Moreover, the present disclosure may be in a form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a magnetic disk memory, a CD-ROM, an optical memory, and the like) that include computer-usable program code.

[0025] The present disclosure is described with reference to the flowcharts and / or block diagrams of the method, the device (system), and the computer program product according to the embodiments of the present disclosure. It should be understood that computer program instructions may be used to implement each process and / or each block in the flowcharts and / or the block diagrams and a combination of a process and / or a block in the flowcharts and / or the block diagrams. These computer program instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of another programmable data processing device to generate a machine, such that the instructions executed by a computer or a processor of another programmable data processing device generate an apparatus for implementing a specific function in one or more processes in the flowcharts and / or in one or more blocks in the block diagrams.

[0026] These computer program instructions may be stored in a computer-readable memory that can instruct a computer or another programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a specific function in one or more processes in the flowcharts and / or in one or more blocks in the block diagrams. These computer program instructions may alternatively be loaded onto a computer or another programmable data processing device, such that a series of operations and steps are performed on the computer or the another programmable device, thereby generating computer-implemented processing. Therefore, the instructions executed on the computer or the another programmable device provide steps for implementing a specific function in one or more processes in the flowcharts and / or in one or more blocks in the block diagrams.

Claims

1. A method for training a convolutional neural network based on sample distribution improvement, comprising following steps: a collection step (S31) of collecting enough lead-II heartbeat signals from a marked 12-lead electrocardiogram signal to form an initial dataset, wherein the lead-II heartbeat signals comprise a premature ventricular heartbeat signal and a non-premature ventricular heartbeat signal that each account for half of a total quantity of lead-II heartbeat signals; and setting a tag of the premature ventricular heartbeat signal to a, and a tag of the non-premature ventricular heartbeat signal to b; a statistics step (S32) of taking statistics on all heartbeat data in the collected dataset to obtain an average value, a maximum value, a minimum value, a peak, and a kurtosis value of each piece of heartbeat data to form an average value array AVG={a1, a2, a3, ..., aN}, a maximum value array MAX={m1, m2, m3, ..., mN}, a minimum value array MIN={c1, c2, ..., cN}, a peak array F={f1, f2, ..., fN}, and a kurtosis value array Q={q1, q2, ..., qN}, and then calculating average values and standard deviations of the average value array, the maximum value array, the minimum value array, the peak array, and the kurtosis value array, which are denoted as xavg, σavg, xMAX, σMAX, xMIN, σMIN, xF, σF, xQ, and σQ respectively; an elimination step (S33) of determining whether following conditions are met for all heartbeat data in each piece of data: xavg - 3σavg < xavg < xavg + 3σavg, xMAX - 3σMAX < xMAX < xMAX + 3σMAX, xMIN - 3σMIN < xMIN < xMIN + 3σMIN, xF - 3σF < xF < xF + 3σF, and xQ - 3σQ < xQ < xQ + 3σQ, obtaining a number of the conditions satisfied, and eliminating heartbeat data satisfying less than three of the above conditions in initial data to form a new heartbeat dataset; a repetition step (S34) of repeating the statistics step (S32) until a heartbeat dataset does not change, and using the heartbeat dataset as training data; and an input step (S35) of inputting the training data and a corresponding tag to a convolutional neural network for training, to obtain a convolutional neural network model based on sample distribution improvement.

2. The method for training a convolutional neural network based on sample distribution improvement according to claim 1, wherein the lead-II heartbeat signal is sampled at a frequency of 500 Hz and filtered by a 0.5 Hz to 100 Hz Butterworth bandpass filter.

3. The method for training a convolutional neural network based on sample distribution improvement according to claim 1 or 2, wherein each heartbeat signal is an electrocardiogram signal from 0.38s before an R wave peak to 0.5s after the R wave peak.

4. The method for training a convolutional neural network based on sample distribution improvement according to claim 1 or 2, wherein the convolutional neural network model based on sample distribution improvement comprises 10 network layers, namely, layers 1 to 9 and a classifier, wherein layers 1 to 5 each comprise a convolutional layer and a pooling layer, and use a LeakyReLU activation function; the convolutional layer in the layer 1 contains 32 kernels with a size of 7 each, and both a stride and a kernel size of the pooling layer in the layer 1 are 2; the convolutional layer in the layer 2 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 2 are 2; the convolutional layer in the layer 3 contains 32 kernels with a size of 3 each, and both a stride and a kernel size of the pooling layer in the layer 3 are 2; the convolutional layer in the layer 4 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 4 are 2; the convolutional layer in the layer 5 contains 32 kernels with a size of 5 each, and both a stride and a kernel size of the pooling layer in the layer 5 are 2; the convolutional layer in the layer 6 contains 32 kernels with a size of 5 each; the layer 7 is an input layer of a bidirectional long short term memory network layer, a quantity of neurons in the layer 7 is consistent with a quantity of output characteristics of the layer 6, and the bidirectional long short term memory network layer outputs 60 neurons in total, namely 30 neurons output forward and 30 neurons output backward; the layer 8 is an attention mechanism layer, which receives an output of the layer 7; and the layer 9 is a fully connected layer, which receives an output of the layer 8 and outputs 4 neurons.

5. The method for training a convolutional neural network based on sample distribution improvement according to any one of claims 1 to 3, wherein a=1, b=0, and when an output value of the convolutional neural network model based on sample distribution improvement is greater than 0.5, a heartbeat of an unknown type is considered as a premature ventricular beat; or when an output value is less than or equal to 0.5, a heartbeat of an unknown type is considered as the non-premature ventricular heartbeat signal.