WO2022052358A1 - 心电异常检测网络训练方法、心电异常预警方法及装置 - Google Patents
心电异常检测网络训练方法、心电异常预警方法及装置 Download PDFInfo
- Publication number
- WO2022052358A1 WO2022052358A1 PCT/CN2020/137332 CN2020137332W WO2022052358A1 WO 2022052358 A1 WO2022052358 A1 WO 2022052358A1 CN 2020137332 W CN2020137332 W CN 2020137332W WO 2022052358 A1 WO2022052358 A1 WO 2022052358A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ecg
- network
- signal
- training
- abnormality detection
- Prior art date
Links
- 230000005856 abnormality Effects 0.000 title claims abstract description 148
- 238000012549 training Methods 0.000 title claims abstract description 118
- 238000001514 detection method Methods 0.000 title claims abstract description 107
- 238000000034 method Methods 0.000 title claims abstract description 76
- 230000000747 cardiac effect Effects 0.000 title claims abstract description 36
- 238000013528 artificial neural network Methods 0.000 claims abstract description 80
- 230000004913 activation Effects 0.000 claims description 62
- 238000005070 sampling Methods 0.000 claims description 50
- 230000002159 abnormal effect Effects 0.000 claims description 45
- 230000006870 function Effects 0.000 claims description 39
- 239000013598 vector Substances 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 23
- 238000000605 extraction Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 claims description 6
- 238000013075 data extraction Methods 0.000 claims description 5
- 230000011218 segmentation Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 3
- 230000001902 propagating effect Effects 0.000 claims 1
- 230000015654 memory Effects 0.000 abstract description 26
- 238000002565 electrocardiography Methods 0.000 description 203
- 238000001994 activation Methods 0.000 description 49
- 206010049418 Sudden Cardiac Death Diseases 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 10
- 238000010606 normalization Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 239000002131 composite material Substances 0.000 description 3
- 230000006403 short-term memory Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000000718 qrs complex Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 208000024172 Cardiovascular disease Diseases 0.000 description 1
- 206010050106 Paroxysmal arrhythmia Diseases 0.000 description 1
- 206010042434 Sudden death Diseases 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013399 early diagnosis Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003183 myoelectrical effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000033764 rhythmic process Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/318—Heart-related electrical modalities, e.g. electrocardiography [ECG]
- A61B5/346—Analysis of electrocardiograms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/02—Alarms for ensuring the safety of persons
Definitions
- the embodiments of the present invention relate to the technical field of electrocardiogram processing, and in particular, to an electrocardiogram abnormality detection network training method, an electrocardiogram abnormality early warning method, an electrocardiogram abnormality detection network training device, an electrocardiogram abnormality early warning device, electronic equipment and a storage medium.
- SCD Sudden cardiac death
- one or more methods are selected in combination to compare and select the waveform detection algorithm with the best effect to detect and extract the characteristics of the ECG signal, and finally output the waveform detection result of the ECG signal.
- the main purpose is to assist the research on early warning of sudden cardiac death and improve the accuracy of the research data.
- Another scheme is for early warning of sudden cardiac death during exercise.
- the ECG during exercise is collected to extract real-time feature parameters and input them into a multi-layer neural network to give early warning of sudden cardiac death during exercise, which is not suitable for general sudden cardiac death.
- Early warning, and the model parameters of the multi-layer neural network are too many, which are not suitable for application to mobile devices such as mobile phones.
- an artificial neural network is first constructed, the weights of each network layer are initialized, and then the sudden death data samples and the normal heart rhythm data samples are processed, the features are extracted and constructed into feature vectors, and the feature vectors are used as the network input to the initialization
- the artificial neural network uses floating-point parameters for calculation, and the network parameters are too many, occupying a large amount of memory during the network operation.
- Artificial neural network requires a computing environment with fast running speed and large storage capacity, which is difficult to apply to mobile devices such as mobile phones.
- the prior art cannot directly provide effective early warning for universal sudden cardiac death, and the neural network used for early warning has high hardware requirements and cannot be applied to mobile devices.
- Embodiments of the present invention provide an ECG abnormality detection network training method, an ECG abnormality early warning method, an ECG abnormality detection network training device, an ECG abnormality early warning device, an electronic device, and a storage medium, so as to solve the problems that cannot be directly detected in the prior art.
- Effective early warning of universal sudden cardiac death, and the neural network used for early warning have high hardware requirements and cannot be applied to mobile devices.
- an embodiment of the present invention provides a network training method for ECG abnormality detection, including:
- the training data is used to train a binary neural network, and the trained binary neural network is used as an abnormality detection network for ECG, wherein, for each network layer in the abnormality detection network for ECG, The value and the weight are binary data, and the node value of the next network layer is obtained by performing a binary operation on the value and the weight of the node of the network layer.
- an embodiment of the present invention provides a method for early warning of abnormal electrocardiogram, including:
- sampling the cardiac beat signal to obtain sampling data
- the ECG abnormality detection network is trained by the ECG abnormality detection network training method described in the first aspect of the embodiment of the present invention.
- an embodiment of the present invention provides a network training device for detecting ECG abnormalities, including:
- the ECG signal acquisition module is used to acquire the ECG signal of patients with abnormal ECG and the ECG signal of normal people;
- a training data extraction module used for extracting training data from the obtained ECG signal
- an ECG abnormality warning device for mobile equipment including:
- the ECG signal acquisition module is used to acquire the ECG signal of the monitored person
- a heartbeat signal extraction module used for extracting the heartbeat signal from the electrocardiogram signal
- a sampling module used for sampling the cardiac beat signal to obtain sampling data
- a network prediction module configured to input the sampled data into a pre-trained ECG abnormality detection network to obtain the probability of the monitored person's ECG abnormality
- an early warning module configured to generate early warning information according to the probability of the abnormal ECG
- the ECG abnormality detection network is trained by the ECG abnormality detection network training method described in the first aspect of the embodiment of the present invention.
- an embodiment of the present invention provides an electronic device, where the electronic device includes:
- processors one or more processors
- the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method for training an ECG abnormality detection network according to any embodiment of the present invention, and/or, Cardiac abnormality early warning method.
- an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the ECG abnormality detection network training method described in any embodiment of the present invention, And/or, a method for early warning of abnormal electrocardiogram.
- the ECG signals of patients with abnormal ECG and the ECG signals of normal people are obtained, training data is extracted from the obtained ECG signals to train the binary neural network, and the trained binary neural network is used as the detection of abnormal ECG Network, on the one hand, because in the ECG anomaly detection network, the value and weight of the node of each network layer are binary data, and the value and weight of the node of the network layer are used for binary operation to obtain the next network layer. Node value, binary data occupies 1 bit of data. Compared with 32-bit real number data, binary neural network requires less memory. The weight file can be reduced from 1GB to 32M, which greatly reduces the memory usage.
- binary data can do AND gate, XOR gate and other operations instead of multiplication, and use 1-bit XOR gate to replace the original 32-bit floating-point multiplication, which can reduce the hardware overhead of the operating environment while achieving fast operations.
- the trained ECG abnormality detection network can be embedded in mobile devices with limited storage capacity and computing power.
- patients with ECG abnormalities can include various ECG abnormalities, and ECG signals of various ECG abnormalities can be obtained.
- the ECG abnormality detection network can directly and effectively predict the probability of various ECG abnormalities.
- Embodiment 1 is a flow chart of steps of a method for training a network for ECG abnormality detection provided in Embodiment 1 of the present invention
- FIG. 2A is a flow chart of steps of a method for training a network for ECG abnormality detection according to Embodiment 2 of the present invention
- 2B is a schematic diagram of a center beat signal according to an embodiment of the present invention.
- Embodiment 3 is a flow chart of steps of a method for early warning of abnormal electrocardiogram provided by Embodiment 3 of the present invention.
- Embodiment 4 is a structural block diagram of an ECG abnormality detection network training device provided in Embodiment 4 of the present invention.
- FIG. 5 is a structural block diagram of an abnormal electrocardiogram early warning device provided in Embodiment 5 of the present invention.
- FIG. 6 is a schematic structural diagram of an electronic device according to Embodiment 6 of the present invention.
- FIG. 1 is a flow chart of steps of a method for training an abnormality detection network for ECG provided by Embodiment 1 of the present invention.
- the embodiment of the present invention is applicable to training an abnormality detection network for detecting ECG to detect abnormality of ECG.
- the method can be implemented by the present invention.
- the network training device for abnormality detection of cardiac electricity can be implemented by the network training device for abnormality detection of cardiac electricity, which can be realized by hardware or software, and is integrated in the electronic device provided by the embodiment of the present invention, such as integrated in a computer device or a server.
- the method for training a network for ECG abnormality detection may include the following steps:
- the ECG signal acquisition device before training, can be used to collect ECG signals from patients with abnormal ECGs and normal people, so as to obtain ECG signals of patients with abnormal ECGs and ECG signals of normal people.
- the patient may be various sudden cardiac death patients or other patients with abnormal ECG.
- the ECG signal may be a single-lead ECG signal, a three-lead ECG signal, a twelve-lead ECG signal, etc. There is no restriction on the manner of the signal and the number of leads of the ECG signal.
- the ECG signal (including the ECG signals of patients with abnormal ECG and normal people) may be denoised first, for example, the power frequency interference noise in the ECG signal may be removed by a notch filter, and the Eliminating myoelectric interference noise through a filter, correcting baseline drift through an IIR zero-phase shift digital filter, etc., the embodiments of the present invention do not limit the noise removal method.
- the denoised ECG signal can be divided into multiple heartbeat signals of each ECG signal, and the sampling data obtained by sampling the heartbeat signal is used as a training sample, and the ECG signal to which the heartbeat signal belongs belongs to abnormal ECG Patients are still normal people as the sample labels of the training samples, and the training samples and sample labels constitute the training data.
- S103 Use the training data to train a binary neural network, and use the trained binary neural network as an abnormality detection network for ECG, wherein, for each network layer in the abnormality detection network for ECG, the The value and weight of the node are binary data, and the node value of the next network layer is obtained by performing a binary operation on the value and weight of the node of the network layer.
- the ECG abnormality detection network in the embodiment of the present invention is a binary neural network.
- the value and weight of the nodes of each network layer are binary data, that is, the values of the nodes and the weights are 1 or - 1. It only occupies 1 bit size.
- the value and weight of the node of each network layer are used as the node value of the next network layer after binary operation.
- a sampled data of the heartbeat signal is randomly extracted and input into the binary neural network for forward propagation.
- Binarization Perform the binarization operation to obtain the predicted value, and calculate the loss rate through the predicted value and the sample label.
- the gradient is calculated according to the loss rate, and the binary neural network is updated through gradient backpropagation.
- the weights of each layer, and then iteratively trained until the loss rate is less than the preset value, the trained binary neural network is the ECG abnormality detection network. After inputting the ECG signal of the monitored person into the trained ECG abnormality detection network, the probability of whether the monitored person is abnormal or not can be obtained, and alarm information can be generated when the probability is greater than the threshold.
- a binary neural network is trained as an abnormality detection network for ECG.
- the value and weight of a node in each network layer are binary data
- the value of a node in the network layer Perform a binary operation with the weight to obtain the node value of the next network layer.
- the binary data only occupies 1 bit of data. Compared with the 32-bit real number data, the memory required by the binary neural network is small.
- the weight file can be downloaded from 1GB is reduced to 32M, which greatly reduces the memory usage.
- binary data can be used for AND gates, XOR gates and other operations instead of multiplication, and 1-bit XOR gates are used to replace the original 32-bit floating-point numbers.
- Multiplication can reduce the hardware overhead of the operating environment while achieving fast operations, so that the trained ECG abnormality detection network can be embedded in mobile devices with limited storage capacity and computing power.
- Various types of ECG abnormalities can be obtained, and ECG signals of various ECG abnormalities can be obtained to train the ECG abnormality detection network, which can directly and effectively predict the probability of various ECG abnormalities.
- FIG. 2A is a flowchart of steps of an ECG abnormality detection network training method provided in Embodiment 2 of the present invention.
- This embodiment of the present invention is optimized on the basis of the foregoing Embodiment 1.
- the ECG abnormality detection network training method of the embodiment may include the following steps:
- the acquired electrocardiogram signal may contain at least one of EMG interference noise, baseline drift noise, and power frequency interference noise. , Eliminate the power frequency interference noise processing to obtain the denoised ECG signal.
- those skilled in the art can also remove other noises in the electrocardiogram signal, which is not limited in this embodiment of the present invention.
- a band notch filter can be used to remove the power frequency interference noise in the ECG signal.
- the band notch filter can be a low-pass filter with a cut-off frequency of 49 Hz and a high-pass filter with a cut-off frequency of 51 Hz.
- the high-pass filter can be composed of an all-pass filter minus a low-pass filter.
- a low-pass filter can be used to remove the EMG interference noise, preferably, a normalized Butterworth analog low-pass filter can be used to remove the EMG interference noise.
- IIR zero-phase shift digital filter For baseline drift noise, IIR zero-phase shift digital filter can be used to correct it. Since baseline drift noise is low-frequency noise, higher frequency selectivity can be obtained with a lower order through IIR zero-phase shift digital filter.
- the input and output of an IIR zero-phase-shift digital filter can be represented by the following equations:
- x() is the input original ECG signal
- y() is the ECG signal after baseline correction (baseline drift noise is removed)
- n is the filter order
- a k , b m are filter coefficients, which are constants
- m represents the first m inputs.
- the noise in the ECG signal can be removed, and the training data extracted from the denoised ECG signal is more accurate, thereby improving the performance of the binary neural network obtained by training. precision.
- FIG. 2B a piece of ECG signal is shown.
- a complete cardiac beat signal consists of P wave, QRS complex and T wave.
- the ECG signal in Figure 2B contains two cardiac beat signals.
- the QRS complex in the cardiac beat signal
- the Other bands in a heartbeat signal can be located correspondingly, so as to intercept the whole heartbeat signal, that is, a total of 6 waveforms of background, P wave, PQ section, QR section, RS section, and ST section of a heartbeat signal can be obtained.
- Other frequency bands can also be obtained in the present invention, which is not limited in this embodiment of the present invention.
- the denoised ECG signal can be input into a pre-trained heart beat segmentation model to extract multiple heart beat signals.
- a pre-trained heart beat segmentation model to extract multiple heart beat signals.
- LSTM Long Short-Term Memory, Long Short-Term Memory
- the waveform of the ECG signal is segmented by the LSTM to obtain multiple cardiac beat signals.
- RNN, DNN, CNN and other models can also be trained instead of just limited to LSTM.
- a plurality of sampling data can be obtained by sampling the cardiac beat signal according to the preset sampling frequency, and it is determined whether the number of sampling data is less than the preset number, and if so, the sampling data is expanded so that the number of sampling data is equal to the preset number, and The sampled data is determined as training data.
- the period of a heartbeat signal is between 0.8s and 1.2s, and the sampling frequency of the electrocardiogram signal is 1000HZ. Since the dimension of the input data of the input layer of the binary neural network is fixed, it is assumed to be 1200 dimensions, that is, 1200 For a heartbeat signal with a period of less than 1.2s, the number of sampled data is less than 1200 after sampling at a sampling frequency of 1000HZ, and 0-padding can be performed at both ends, so that the unified length of the sampled data obtained after sampling the heartbeat signal is 1200 For example, for a heartbeat with a duration of 1s, 100 0-value sampling points are filled at both ends, thereby becoming a data sample with a length of 1200.
- each heartbeat signal it is determined whether the heartbeat signal is derived from an electrocardiogram signal of a patient with abnormal electrocardiogram or an electrocardiogram signal of a normal person, so that a corresponding label can be marked as a sample label.
- the label of the human heart beat signal is set to 0, and the label of the cardiac beat signal of the patient with abnormal ECG is set to 1, so that each training sample corresponds to a sample label.
- the training data includes a sample and a label
- the sample may be sampled data obtained after sampling the heartbeat signal
- the label may be a label marked on the heartbeat signal
- the initialization may be to construct the input layer, hidden layer and output layer of the binary neural network.
- the number of leads of the ECG signal is 1, that is, when the ECG signal is a single-lead ECG signal, the A binary neural network containing 1 input layer, 4 input layers and 1 output layer.
- the width of the input layer is equal to the number of leads of the ECG signal. For example, when the ECG signal is 12 leads, the The width is 12.
- S208 Randomly extract sampling data of a heartbeat signal and input it into the binary neural network for forward propagation to obtain binary activation values and real-number activation values of each network layer.
- the real-number weights of the current network layer are binarized to obtain the binarized weights, and the binarized weights of the current network layer are binarized. Multiply with the binarized activation value of the previous network layer to obtain the real-numbered intermediate vector of the current network layer, and standardize the real-numbered intermediate vector according to the normalization processing parameters of the current network layer to obtain the real-numbered activation value, and judge the current network layer.
- the real-number activation value is used as the predicted value; if not, the real-number intermediate vector is binarized to obtain the binarized activation value of the current network layer, and the next network layer is used as the current network layer, and returns The step of binarizing the real weights of the current network layer to obtain the binarized weights.
- the weight and activation value of each network layer are multiplied as the activation value of the next network layer.
- the heartbeat signal The sampled data is real data, and the weights of the first layer of the binary neural network are real weights.
- the weights and activation values are quantized and quantized into 1-bit binary values through the binarization function.
- Value data i.e. weights and activations are +1 or -1, where the binarization function is:
- x b is the value after binarization of the real number x.
- the real weights and activation values can be binarized, which can reduce the memory footprint of the parameters exponentially.
- the activation value is no longer binarized.
- the logistic activation function is used in the output layer, and the real number between [0,1] is output as the predicted value. The closer the predicted value is to 1, it means that the monitored personnel Higher risk of abnormal heartbeat.
- the weights are binarized by the following formula:
- W k is the real weight of the current network layer k
- Binarize is the binarization function, is the binarized weight of the current network layer k, then the real intermediate vector of the current network layer k is:
- sk is the real intermediate vector of the current network layer k, is the binarized activation value of the previous network layer k-1.
- BatchNorm is the batch normalization function
- ⁇ k is the batch normalization parameter of the current network layer k
- a k is the real activation value of the current network layer k.
- the loss function may be a function that calculates the difference between the sample label and the output.
- the loss function may be calculating the L1 and L2 distances, and may also be a mean square error function.
- the loss function is Functions are not restricted.
- the sample label and the real activation value output by the output layer of the binary neural network can be substituted into the loss function to obtain the loss rate.
- the output layer is the final output result of the binary neural network
- the loss rate is less than the preset threshold, it means that the prediction result of the binary neural network is close to the real value (sample label), and the binary neural network With the ability to accurately predict whether the cardiac beat signal is an abnormal ECG signal, S211 can be executed, otherwise, S212 and S213 can be executed.
- the trained binary neural network is the ECG abnormality detection network.
- the network parameters of the ECG abnormality detection network can be packaged and saved for transplanting to mobile phones. on the device.
- the gradient of the loss rate to the binarized activation value of the network layer is calculated, and then the gradient of the loss rate to the real-valued activation value of the network layer is calculated, and the real-valued activation value is calculated.
- the gradient of the activation value, the real intermediate vector and the standard processing parameters are standardized to obtain the gradient of the real intermediate vector and the gradient of the standard processing parameters, and the permutation matrix of the real intermediate vector and the binarization weight of the previous network layer are calculated.
- the product is used as the gradient of the binarized weights of the network layer.
- C is the loss function
- the gradient g q of the loss function to the binarized value q is known
- the gradient of the loss function to the real value r is as follows:
- the loss function is calculated for the binarized activation value the gradient of Then, the gradient of the loss function to the real activation value as follows:
- the chain rule is a derivative rule in calculus, which is used to find the derivative of a composite function.
- the chain rule is: for a composite function composed of two functions, the derivative of the composite function is equal to the value of the inner function and the outer function. The derivative of is multiplied by the derivative of the function inside, specifically in the embodiment of the present invention,
- the real intermediate vector sk and the batch normalization parameter ⁇ k are also known, and the gradient of the real intermediate vector sk can be calculated by the chain rule. and the gradient of the batch normalized parameter ⁇ k
- the parameters of each network layer can be adjusted by backpropagation.
- the gradient of the preset learning rate and the binarized weight can be calculated The product of ; calculate the difference between the binarized weight and the product as a new weight, the new weight is greater than or equal to -1, less than or equal to 1, the weight is limited within the range of [-1, 1], after the adjustment
- the weights of each network layer are obtained, return to S208 to continue the iterative training of the binary neural network.
- the electrocardiogram signal is acquired, denoising is performed to obtain the denoised electrocardiogram signal, the heartbeat signal is extracted, the training data is obtained by sampling the heartbeat signal, and after the binary neural network is initialized, a sampled data input of the heartbeat signal is randomly extracted and input.
- the binary neural network forward propagation is performed to obtain the binary activation value and real number activation value of each network layer, and the loss rate is calculated by the activation value of the output layer of the binary neural network.
- the loss rate is less than the preset threshold , calculate the gradient of the binarized weights in the network layer according to the loss rate, adjust the weights of the network layer through the gradient and the preset learning rate, and re-train the binary neural network iteratively.
- the value and weight of the node of each network layer are binary data, and the node value of the next network layer is obtained by performing a binary operation on the value and weight of the node in the network layer.
- the data occupies 1 bit of data. Compared with the 32-bit real number data, the memory required by the binary neural network is small, and the weight file can be reduced from 1GB to 32M, which greatly reduces the memory usage.
- the binary data can be Do AND gates, XOR gates and other operations instead of multiplication, and use 1-bit XOR gates to replace the original 32-bit floating-point multiplication, which can reduce the hardware overhead of the operating environment while achieving fast operations, so that the training is good.
- the ECG abnormality detection network can be embedded in mobile devices with limited storage capacity and computing power.
- patients with ECG abnormalities can include various ECG abnormalities, and the ECG signals of various ECG abnormalities can be obtained to train the ECG abnormality detection network.
- the ECG abnormality detection network can directly and effectively predict the probability of various ECG abnormalities.
- FIG. 3 is a flowchart of steps of a method for early warning of abnormal electrocardiogram provided in Embodiment 3 of the present invention.
- the embodiment of the present invention is applicable to the situation of early warning of abnormal electrocardiogram.
- the ECG abnormality warning device can be implemented by hardware or software, and integrated in the electronic equipment provided by the embodiment of the present invention, such as integrated on a mobile device, specifically, as shown in FIG. 3, the present invention
- the cardiac abnormality early warning method of the embodiment may include the following steps:
- the monitored person may be a person at high risk of abnormal ECG
- the ECG signal of the monitored person may be collected through an ECG signal acquisition device.
- the ECG signal acquisition device may be a simple ECG with a small volume. Signal acquisition device, the ECG signal acquisition device is wired or wirelessly connected to the mobile device, the ECG signal acquisition device collects the ECG signal of the monitored person in real time and sends it to the mobile device, and the mobile device can obtain the monitored person's dynamic real-time ECG signal in real time Signal.
- the electrocardiogram signal may be de-noised and input into a pre-trained heart beat segmentation model to extract multiple heart beat signals.
- a pre-trained heart beat segmentation model to extract multiple heart beat signals.
- the heartbeat signal may be sampled according to a preset sampling rate to obtain sampling data, and for details, refer to S204 in the second embodiment.
- S304 Input the sampled data into a pre-trained ECG abnormality detection network to obtain the probability of ECG abnormality of the monitored person.
- the ECG abnormality detection network in the embodiment of the present invention is trained by the ECG abnormality detection network training method in the first embodiment or the second embodiment, and the training method is not described in detail here.
- the sampling data can be input into the abnormal electrocardiogram detection network to obtain the probability of abnormal electrocardiogram of the monitored person, and the value of the probability is between 0 and 1.
- the ECG abnormality early warning information when the probability output by the ECG abnormality detection network is greater than a preset threshold, such as 0.6 or 0.8, the ECG abnormality early warning information is generated, and the ECG early warning information may be text information, voice information, etc.
- the display screen of the mobile device (such as a mobile phone) displays ECG abnormality warning information.
- the mobile device may also be a mobile ECG monitoring device.
- the ECG abnormality detection network in the embodiment of the present invention is a binary neural network, the value and weight of the nodes in each network layer are binary data, and the next value and weight are obtained by performing binary operations on the values and weights of the nodes in the network layer.
- the binary data occupies 1 bit of data.
- the binary neural network requires less memory, and the weight file can be reduced from 1GB to 32M, which greatly reduces the memory usage.
- binary data can be used for AND gates, XOR gates and other operations instead of multiplication, and 1-bit XOR gates are used to replace the original 32-bit floating point multiplication, which can reduce the operating environment while achieving fast operations.
- the trained ECG abnormality detection network can be embedded in mobile devices with limited storage capacity and computing power, so that ECG abnormality early warning can be realized through mobile devices.
- ECG abnormal patients can include various ECG If the abnormality is detected, the ECG signals of various ECG abnormalities can be obtained to train the ECG abnormality detection network, so that the mobile device transplanted with the ECG abnormality detection network can be used to directly and effectively give early warning of various ECG abnormalities.
- the identification process is simple, fast, low cost, and high accuracy.
- Mobile devices can be used to provide timely and effective early warning of ECG abnormalities.
- Fig. 4 is a structural block diagram of a network training device for detecting an abnormality of ECG provided by Embodiment 4 of the present invention.
- the device for training a network for detecting abnormality of ECG according to the embodiment of the present invention may specifically include the following modules:
- the ECG signal acquisition module 401 is used to acquire the ECG signal of the patient with abnormal ECG and the ECG signal of the normal person;
- the training module 403 is used to train a binary neural network by using the training data, and use the trained binary neural network as an abnormality detection network for ECG, wherein, for each network layer in the abnormality detection network for ECG, all The value and weight of the node of the network layer are binary data, and the node of the next network layer is obtained by performing a binary operation on the value and weight of the node of the network layer.
- the training data extraction module 402 includes:
- a de-noising processing sub-module configured to perform de-noising processing on the obtained ECG signal to obtain a de-noised ECG signal
- a heartbeat signal extraction submodule used for extracting the heartbeat signal from the denoised ECG signal
- a training sample sampling submodule used for sampling the heartbeat signal to obtain a training sample
- a labeling submodule configured to label the heartbeat signal to obtain a sample label, where the sample label indicates that the heartbeat signal is an abnormal ECG signal or a normal ECG signal;
- the training data determination submodule is used for determining the training sample and the sample label as training data.
- the denoising processing sub-module includes:
- a de-noising processing unit configured to process the acquired electrocardiogram signal to remove electromyographic interference noise, baseline drift noise, and power frequency interference noise to obtain a denoised electrocardiogram signal.
- the heartbeat signal extraction submodule includes:
- the heartbeat signal extraction subunit is used for inputting the denoised electrocardiogram signal into the pretrained heartbeat segmentation model to extract multiple heartbeat signals.
- the training sample sampling sub-module includes:
- a sampling unit configured to sample the cardiac beat signal according to a preset sampling frequency to obtain a plurality of sampling data
- a quantity judgment unit used for judging whether the quantity of the sampled data is less than a preset quantity
- an expansion unit configured to expand the sampled data, so that the quantity of the sampled data is equal to the preset quantity
- a training data determination unit configured to determine the sample data as training data.
- the training data includes sample data of a heartbeat signal and a sample label of the heartbeat signal
- the training module 403 includes:
- the initialization submodule is used to initialize the binary neural network
- a forward propagation sub-module used for randomly extracting the sampling data of a heartbeat signal and inputting it into the binary neural network for forward propagation to obtain the binary activation value and real number activation value of each network layer;
- a loss rate calculation submodule configured to substitute the real-number activation value and the sample label into a preset loss function to calculate the loss rate
- a loss rate judgment sub-module configured to judge whether the loss rate is less than a preset threshold
- Stop training submodule used to stop the training of the binary neural network, and use the trained binary neural network as an abnormal electrocardiogram detection network
- a gradient calculation submodule used for calculating the gradient of the binarized weights of each network layer by using the loss rate
- the back-propagation sub-module is configured to adjust the weights of each network layer of the binary neural network according to the gradient of the binarized weights and the preset learning rate, and return to the forward-propagation sub-module.
- the initialization submodule includes:
- the input layer initial unit is used to initialize the input layer of the binary neural network, and the width of the input layer is equal to the number of leads of the electrocardiogram signal.
- the forward propagation submodule includes:
- a weight binarization unit configured to binarize the real weights of the current network layer for each network layer of the binary neural network to obtain the binarized weights
- the binary computing unit is used to multiply the binarized weight of the current network layer and the binarized activation value of the previous network layer to obtain the real intermediate vector of the current network layer;
- a normalization processing unit configured to perform normalization processing on the real intermediate vector according to the normalization processing parameters of the current network layer to obtain a real activation value
- a judging unit for judging whether the current network layer is an output layer
- a predicted value determination unit configured to use the real activation value as a predicted value
- an activation value binarization unit configured to perform binarization processing on the real intermediate vector to obtain the binarized activation value of the current network layer
- the forward propagation unit is used to take the next network layer as the current network layer, and return the step of binarizing the real weights of the current network layer to obtain the binarized weights.
- the gradient calculation submodule includes:
- the binarized activation value gradient calculation unit is configured to, for each network layer, calculate the gradient of the loss rate of the network layer to the binarized activation value of the network layer;
- a real-number activation value gradient calculation unit configured to calculate the gradient of the loss rate of the network layer to the real-number activation value of the network layer according to the following formula:
- an intermediate vector and standard processing parameter gradient calculation unit configured to calculate the gradient of the real intermediate vector and the gradient of the standard processing parameter according to the chain rule and the gradient of the real activation value
- the binarization weight gradient calculation unit is configured to calculate the product of the permutation matrix of the real intermediate vector and the binarization weight of the previous network layer as the gradient of the binarization weight of the network layer.
- the backpropagation submodule includes:
- a product calculation unit configured to calculate the product of the preset learning rate and the gradient of the binarization weight
- a new weight calculation unit configured to calculate the difference between the binarized weight and the product as a new weight, where the new weight is greater than or equal to -1 and less than or equal to 1.
- the ECG abnormality detection network training apparatus provided by the embodiment of the present invention can execute the ECG abnormality detection network training method provided by the first and second embodiments of the present invention, and has corresponding functions and beneficial effects of the execution methods.
- FIG. 5 is a structural block diagram of an abnormal electrocardiogram early warning device provided in Embodiment 5 of the present invention. As shown in FIG. 5 , the abnormal electrocardiogram early warning device according to the embodiment of the present invention may specifically include the following modules:
- An electrocardiogram signal acquisition module 501 configured to acquire the electrocardiogram signal of the monitored person
- a heartbeat signal extraction module 502 configured to extract the heartbeat signal from the electrocardiogram signal
- a sampling module 503, configured to sample the cardiac beat signal to obtain sampling data
- a network prediction module 504 configured to input the sampled data into a pre-trained ECG abnormality detection network to obtain the probability of ECG abnormality of the monitored person;
- an early warning module 505, configured to generate early warning information according to the probability of the ECG abnormality
- the ECG abnormality detection network is trained by the ECG abnormality detection network training method described in Embodiment 1 or Embodiment 2.
- the ECG abnormality early warning device provided by the embodiment of the present invention can execute the ECG abnormality early warning method provided by the third embodiment of the present invention, and has corresponding functions and beneficial effects of the execution method.
- the electronic device may specifically include: a processor 601 , a memory 602 , a display screen 603 with a touch function, an input device 604 , an output device 605 , and a communication device 606 .
- the number of processors 601 in the electronic device may be one or more, and one processor 601 is taken as an example in FIG. 6 .
- the number of memories 602 in the electronic device may be one or more, and one memory 602 is taken as an example in FIG. 6 .
- the processor 601 , the memory 602 , the display screen 603 , the input device 604 , the output device 605 , and the communication device 606 of the device may be connected through a bus or other means.
- the connection through a bus is taken as an example.
- the memory 602 can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the ECG abnormality detection network training method described in any embodiment of the present invention (for example, the above-mentioned program instructions/modules).
- the memory 602 may mainly include a storage program area and a storage data area, wherein the storage program The area may store an application program required for operating a device, at least one function; the storage data area may store data created according to the use of the device, and the like.
- memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
- memory 602 may further include memory located remotely from processor 601, which may be connected to the device through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
- the display screen 603 is a display screen 603 with a touch function, which can be a capacitive screen, an electromagnetic screen or an infrared screen.
- the display screen 603 is used for displaying data according to the instruction of the processor 601, and is also used for receiving touch operations acting on the display screen 603, and sending corresponding signals to the processor 601 or other devices.
- the display screen 603 is an infrared screen, it also includes an infrared touch frame, and the infrared touch frame is arranged around the display screen 603, which can also be used to receive infrared signals and send the infrared signals to the processor. 601 or other device.
- the communication device 606 is used to establish a communication connection with other devices, which may be a wired communication device and/or a wireless communication device.
- the input device 604 may be used to receive input numerical or character information, and to generate key signal input related to user settings and function control of the device.
- the output device 605 may include audio devices such as speakers. It should be noted that the specific composition of the input device 604 and the output device 605 can be set according to actual conditions.
- the processor 601 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 602, that is, to realize the above-mentioned ECG abnormality detection network training method, and/or, ECG abnormality early warning method. .
- the processor 601 when the processor 601 executes one or more programs stored in the memory 602, it specifically implements the ECG abnormality detection network training method and/or the ECG abnormality early warning method provided by the embodiment of the present invention.
- Embodiment 7 of the present invention further provides a computer-readable storage medium on which a computer program is stored.
- the program is executed by a processor, the method for training an ECG abnormality detection network in any embodiment of the present invention can be implemented, and/or , Early warning method of abnormal ECG.
- a storage medium containing computer-executable instructions provided by the embodiments of the present invention is not limited to the above-mentioned method operations, and the computer-executable instructions of the present invention can also be applied to any embodiment of the present invention.
- the electrical abnormality detection network training method, and/or the related operations in the electrocardiographic abnormality early warning method are not limited to the above-mentioned method operations, and the computer-executable instructions of the present invention can also be applied to any embodiment of the present invention.
- the present invention can be realized by software and necessary general-purpose hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment .
- the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in a computer-readable storage medium, such as a floppy disk of a computer , read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including several instructions to make a computer device (which can be a personal computer , a server, or a network device, etc.) to execute the network training method for ECG abnormality detection described in various embodiments of the present invention, and/or the ECG abnormality early warning method.
- a computer device which can be a personal computer , a server, or a network device, etc.
- the units and modules included are only divided according to functional logic, but are not limited to the above-mentioned divisions, as long as they can It is enough to realize the corresponding functions; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present invention.
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Surgery (AREA)
- Veterinary Medicine (AREA)
- Cardiology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Animal Behavior & Ethology (AREA)
- Pathology (AREA)
- Public Health (AREA)
- Artificial Intelligence (AREA)
- Emergency Management (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
- Emergency Alarm Devices (AREA)
Abstract
一种心电异常检测网络训练方法、心电异常预警方法及装置,心电异常检测网络训练方法包括:获取心电异常患者的心电图信号和正常人的心电图信号(S101);从获取到的心电图信号中提取训练数据(S102);采用训练数据训练二值神经网络作为心电异常检测网络,其中,网络层的节点的值和权值为二值数据,通过网络层的节点的值和权值进行二值运算来得到下一网络层的节点值(S103)。由于二值数据占1bit数据,大幅度降低了内存的占用,二值数据还可以做与门、异或门运算代替乘法,在快速运算的同时可以降低运行环境的硬件开销,从而使得训练好的心电异常检测网络可嵌入存储容量和运算能力有限的移动设备中,以通过移动设备直接有效地对各种心电异常进行预警。
Description
相关申请的交叉引用
本公开要求2020年9月9日提交的中国专利申请号为“CN202010942309.8”的优先权,其全部内容作为整体并入本申请中。
本发明实施例涉及心电图处理技术领域,尤其涉及一种心电异常检测网络训练方法、心电异常预警方法、心电异常检测网络训练装置、心电异常预警装置、电子设备和存储介质。
心源性猝死(sudden cardiac death,SCD)是心血管疾病中最主要的死亡原因之一,由于其隐蔽性和突发性等特点,一旦发生心源性猝死,病人的存活几率极低,这严重威胁着人类的健康,因此早期诊断和预警是预防SCD的关键所在。
在现有技术的一种方案中,选择一种或多种方法组合对比选择效果最好的波形检测算法来对心电信号进行检测和特征提取,最后输出心电信号的波形检测结果,该方案主要目的是辅助猝死预警研究,提高研究数据的准确性,无法直接对心源性猝死进行有效预警。
另一种方案中是针对运动心源性猝死预警,采集运动时的心电图提取实时特征参数输入到多层神经网络中来对运动心源性猝死进行预警,不适用于普遍性的心源性猝死预警,且多层神经网络的模型参数过多,不适合应用到手机等移动设备上。
在另一个方案中,首先构建人工神经网络,初始化各个网络层的权值,然后对猝死数据样本和正常心律数据样本进行处理,提取出特征并构建成特征向量,将特征向量作为网络输入到初始化的人工神经网络中进行训练,通过训练好的人工神经网络来预测心源性异常,然而,人工神经网络中采用浮点型参数进行计算,网络参数过多,在网络运行过程中占据大量的内存,人工神经网络需求运行速度快和存储容量大的计算环境,难以应用到手机等移 动设备上。
综上所述,现有技术中无法直接对普遍性的心源性猝死进行有效预警,并且预警用的神经网络对硬件要求高,无法应用于移动设备上。
发明内容
本发明实施例提供一种心电异常检测网络训练方法、心电异常预警方法、心电异常检测网络训练装置、心电异常预警装置、电子设备和存储介质,以解决现有技术中无法直接对普遍性的心源性猝死进行有效预警,以及预警用的神经网络对硬件要求高,无法应用于移动设备上的问题。
第一方面,本发明实施例提供了一种心电异常检测网络训练方法,包括:
获取心电异常患者的心电图信号和正常人的心电图信号;
从获取到的所述心电图信号中提取训练数据;
采用所述训练数据训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,其中,对于所述心电异常检测网络中的每一个网络层,所述网络层的节点的值和权值为二值数据,通过所述网络层的节点的值和权值进行二值运算来得到下一网络层的节点值。
第二方面,本发明实施例提供了一种心电异常预警方法,包括:
获取被监测人员的心电图信号;
从所述心电图信号中提取心拍信号;
对所述心拍信号采样获得采样数据;
将所述采样数据输入预先训练好的心电异常检测网络中获得所述被监测人员心电异常的概率;
根据所述心电异常的概率生成预警信息;
其中,心电异常检测网络通过本发明实施例第一方面所述的心电异常检测网络训练方法所训练。
第三方面,本发明实施例提供了一种心电异常检测网络训练装置,包括:
心电图信号获取模块,用于获取心电异常患者的心电图信号和正常人的心电图信号;
训练数据提取模块,用于从获取到的所述心电图信号中提取训练数据;
训练模块,用于采用所述训练数据训练二值神经网络,将训练好的二值 神经网络作为心电异常检测网络,其中,对于所述心电异常检测网络中的每一个网络层,所述网络层的节点的值和权值为二值数据,通过所述网络层的节点的值和权值进行二值运算来得到下一网络层的节点。
第四方面,本发明实施例提供了一种心电异常预警装置,用于移动设备,包括:
心电图信号获取模块,用于获取被监测人员的心电图信号;
心拍信号提取模块,用于从所述心电图信号中提取心拍信号;
采样模块,用于对所述心拍信号采样获得采样数据;
网络预测模块,用于将所述采样数据输入预先训练好的心电异常检测网络中获得所述被监测人员心电异常的概率;
预警模块,用于根据所述心电异常的概率生成预警信息;
其中,心电异常检测网络通过本发明实施例第一方面所述的心电异常检测网络训练方法所训练。
第五方面,本发明实施例提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明任一实施例所述的心电异常检测网络训练方法,和/或,心电异常预警方法。
第六方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本发明任一实施例所述的心电异常检测网络训练方法,和/或,心电异常预警方法。
本发明实施例在获取心电异常患者的心电图信号和正常人的心电图信号,从获取到的心电图信号中提取训练数据来训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,一方面,由于在心电异常检测网络中,每一个网络层的节点的值和权值为二值数据,通过网络层的节点的值和权值进行二值运算来得到下一网络层的节点值,二值数据占1bit数据,相比32-bit的实数型数据,二值神经网络所需要的内存小,权值文件可以从1GB降低到32M,大幅度降低了内存的占用,再者,二值数据可以做与门、异或门等运算来代替乘法,用1-bit的异或门代替了原本的32-bit浮点数乘法,在 实现快速运算的同时可以降低运行环境的硬件开销,从而使得训练好的心电异常检测网络可嵌入存储容量和运算能力有限的移动设备中,另一方面,心电异常患者可以包括各种心电异常,可以获得各种心电异常的心电图信号来训练心电异常检测网络,该心电异常检测网络可以直接有效地预测各种心电异常的概率。
图1是本发明实施例一提供的一种心电异常检测网络训练方法的步骤流程图;
图2A是本发明实施例二提供的一种心电异常检测网络训练方法的步骤流程图;
图2B是本发明实施例中心拍信号的示意图;
图3是本发明实施例三提供的一种心电异常预警方法的步骤流程图;
图4是本发明实施例四提供的一种心电异常检测网络训练装置的结构框图;
图5是本发明实施例五提供的一种心电异常预警装置的结构框图;
图6是本发明实施例六提供的一种电子设备的结构示意图。
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互结合。
实施例一
图1为本发明实施例一提供的一种心电异常检测网络训练方法的步骤流程图,本发明实施例可适用于训练心电异常检测网络来检测心电异常的情况,该方法可以由本发明实施例的心电异常检测网络训练装置来执行,该心电异常检测网络训练装置可以由硬件或软件来实现,并集成在本发明实施例所提供的电子设备中,如集成在计算机设备或者服务器上,具体地,如图1所示, 本发明实施例的心电异常检测网络训练方法可以包括如下步骤:
S101、获取心电异常患者的心电图信号和正常人的心电图信号。
在本发明实施例中,在训练前可以通过心电图信号采集设备对心电异常患者和正常人的采集心电图信号,从而获得心电异常患者的心电图信号和正常人的心电图信号,其中,心电异常患者可以是各种心源性猝死患者,还可以是其他心电异常患者,心电图信号可以单导联心电图信号、三导联心电图信号、十二导联心电图信号等,本发明实施例对获取心电图信号的方式以及心电图信号的导联数均不加以限制。
S102、从获取到的所述心电图信号中提取训练数据。
在一个可选实施例中,可以先对心电图信号(包括心电异常患者和正常人的心电图信号)进行去噪处理,如可以通过带陷滤波器去除心电图信号中的工频干扰噪声、通过低通滤波器消除肌电干扰噪声、通过IIR零相移数字滤波器纠正基线漂移等,本发明实施例对去除噪声的方式不加以限制。
在去噪处理后,可以对去噪处理后的心电图信号分割心拍得到每个心电图信号的多个心拍信号,对心拍信号采样获得的采样数据作为训练样本,心拍信号所属的心电图信号属于心电异常患者还是正常人作为训练样本的样本标签,训练样本和样本标签即构成训练数据。
S103、采用所述训练数据训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,其中,对于所述心电异常检测网络中的每一个网络层,所述网络层的节点的值和权值为二值数据,通过所述网络层的节点的值和权值进行二值运算来得到下一网络层的节点值。
本发明实施例的心电异常检测网络为二值神经网络,在二值神经网络中,每个网络层的节点的值和权值为二值数据,即节点和权值的值为1或-1,只占1bit大小,每个网络层的节点的值和权值进行二值运算后作为下一网络层的节点值。
在实际应用中,在初始化二值神经网络的输入层、隐藏层、输出层后,随机提取一个心拍信号的采样数据输入到二值神经网络中进行前向传播,在前向传播过程中将数值二值化进行二值化运算得到预测值,通过预测值和样本标签来计算损失率,当损失率大于预设值时,根据损失率来计算梯度,通过梯度反向传播来更新二值神经网络的各个层的权值,然后重新迭代训练直 到损失率小于预设值时得到训练好的二值神经网络即为心电异常检测网络。将被监测人员的心电图信号输入训练好的心电异常检测网络后即可以得到被监测人员是否是心电异常的概率,在概率大于阈值是可以生成告警信息。
本发明实施例训练二值神经网络来作为心电异常检测网络,一方面,在心电异常检测网络中,每一个网络层的节点的值和权值为二值数据,通过网络层的节点的值和权值进行二值运算来得到下一网络层的节点值,二值数据只占1bit数据,相比32-bit的实数型数据,二值神经网络所需要的内存小,权值文件可以从1GB降低到32M,大幅度降低了内存的占用,再者,二值数据可以做与门、异或门等运算来代替乘法,用1-bit的异或门代替了原本的32-bit浮点数乘法,在实现快速运算的同时可以降低运行环境的硬件开销,从而使得训练好的心电异常检测网络可嵌入存储容量和运算能力有限的移动设备中,另一方面,心电异常患者可以包括各种心电异常,可以获得各种心电异常的心电图信号来训练心电异常检测网络,该心电异常检测网络可以直接有效地预测各种心电异常的概率。
实施例二
图2A为本发明实施例二提供的一种心电异常检测网络训练方法的步骤流程图,本发明实施例在前述实施例一的基础上进行优化,具体地,如图2A所示,本发明实施例的心电异常检测网络训练方法可以包括如下步骤:
S201、获取心电异常患者的心电图信号和正常人的心电图信号。
S202、对获取到的所述心电图信号进行去噪处理,得到去噪后的心电图信号。
在实际应用中,采集到的心电图信号可能存在肌电干扰噪声、基线漂移噪声、工频干扰噪声中的至少一种噪声,可以对获取到的心电图信号进行消除肌电干扰噪声、消除基线漂移噪声、消除工频干扰噪声处理得到去噪后的心电图信号。当然,在实际应用中,本领域技术人员还可以去除心电图信号中的其他噪声,本发明实施例对此不加以限制。
具体地,对于工频干扰噪声,可以采用带陷滤波器去除心电图信号中的工频干扰噪声,带陷波滤波器可以是由一个截止频率49HZ的低通滤波器和一个截止频率为51HZ的高通滤波器组成,其中,高通滤波器可以由一个全通滤波器减去一个低通滤波器构成。
对于肌电干扰噪声,可以采用低通滤波器消除肌电干扰噪声,优选地,可以使用归一化巴特沃兹模拟低通滤波器来去除肌电干扰噪声。
对于基线漂移噪声,可以采用IIR零相移数字滤波器纠正,由于基线漂移噪声是低频噪声,通过IIR零相移数字滤波器可以用较低的阶数获得较高的频率选择性。IIR零相移数字滤波器的输入和输出可以用以下方程表示:
上述公式中,x()是输入的原始心电图信号,y()是基线校正后(去除基线漂移噪声)的心电图信号,n为滤波阶数,a
k、b
m为滤波系数,是常数,m表示前m个输入。
本发明实施例通过对心电图信号进行去噪处理,可以去除心电图信号中的噪声,从去噪处理后的心电图信号中提取到的训练数据更为准确,从而可以提高训练得到的二值神经网络的精度。
S203、从所述去噪处理后的心电图信号中提取心拍信号。
如图2B所示为一段心电图信号,一个完整的心拍信号包括P波,QRS波群以及T波组成,图2B中的心电图信号包含了2个心拍信号,通过定位心拍信号中的QRS波群便可以相应的定位一个心拍信号中的其他波段,从而截取整个心拍信号,即获得一个心拍信号的背景、P波、PQ段、QR段、RS段、ST段共6个波形,当然,在实际应用中还可以获取其他波段,本发明实施例对此不加以限制。
在本发明的优选实施例中,可以将去噪处理后的心电图信号输入预先训练好的心拍分割模型中提取出多个心拍信号,示例性地,可以预先训练LSTM(Long Short-Term Memory,长短期记忆网络),将心电图信号输入LSTM后,通过LSTM对心电图信号进行波形分割得到多个心拍信号。当然,还可以训练RNN、DNN、CNN等模型而不仅仅限于LSTM。
S204、对所述心拍信号采样获得训练样本。
可选地,可以按照预设采样频率对心拍信号采样获得多个采样数据,判断采样数据的数量是否小于预设数量,若是,对采样数据进行扩充,使得采样数据的数量等于预设数量,将采样数据确定为训练数据。
示例性地,一个心拍信号的周期在0.8s~1.2s之间,心电图信号的采样频 率为1000HZ,由于二值神经网络的输入层输入的数据的维度是固定,假设为1200个维度,即1200个采样点,对于周期小于1.2s的心拍信号按照1000HZ的采样频率采样后采样数据的数量小于1200个,可以在两端进行0填充,使得对心拍信号采样后得到的采样数据的统一长度为1200个,例如,对于时长为1s的心拍,两端分别填充100个0值采样点,从而变成长度为1200个的数据样本。
S205、对所述心拍信号标注得到样本标签,所述样本标签表示所述心拍信号为异常心电信号或者正常心电信号。
示例性地,对于每个心拍信号,确定该心拍信号是来源于心电异常患者的心电图信号还是正常人的心电图信号,从而可以标注相应的标签作为样本标签,在一个具体示例中,可以将来正常人的心拍信号的标签设置为0,心电异常患者的心拍信号的标签设置为1,从而使得每个训练样本均对应有样本标签。
S206、将所述训练样本和所述样本标签确定为训练数据。
在本发明实施例中,训练数据包括样本和标签,样本可以是对心拍信号采样后得到的采样数据,标签可以是对心拍信号标注的标签。
S207、初始化二值神经网络。
具体地,初始化可以是构建二值神经网络的输入层、隐藏层和输出层,在一个示例中,当心电图信号的导联数为1时,即心电图信号为单导联心电图信号时,可以构建包含1个输入层、4个输入层和1个输出层的二值神经网络,当然,输入层的宽度与心电图信号的导联数相等,比如,心电图信号为12导联时,输入层的的宽度为12。
S208、随机提取一个心拍信号的采样数据输入所述二值神经网络中进行前向传播得到各个网络层的二值化激活值和实数型激活值。
在本发明的可选实施例中,针对二值神经网络的每层网络层,将当前网络层的实数型权值二值化得到二值化权值,将当前网络层的二值化权值和上一层网络层的二值化激活值作乘法得到当前网络层的实数型中间向量,根据当前网络层的标准化处理参数对实数型中间向量做标准化处理得到实数型激活值,判断当前网络层是否为输出层;若是,实数型激活值作为预测值,若否,对实数型中间向量做二值化处理得到当前网络层的二值化激活值,将下 一网络层作为当前网络层,返回将当前网络层的实数型权值二值化得到二值化权值的步骤。
具体地,在前向传播过程中,对于二值神经网络中的各个网络层,每个网络层的权值和激活值做乘法后作为下一网络层的激活值,在实际应用中,心拍信号的采样数据为实数型的数据,二值神经网络的第一层网络的权值为实数型权值,从第二层网络开始通过二值化函数将权值和激活值量化量化为1bit的二值数据,即权值和激活值为+1或-1,其中,二值化函数为:
上述公式中,x
b为实数型数值x二值化之后的值。通过Sign函数可以将实数型的权值和激活值二值化,可以成倍的减小参数的内存占用量。在二值网络的输出层不再对激活值进行二值化处理,在输出层使用logistics激活函数,输出[0,1]之间的实数作为预测值,预测值越接近1,说明被监测人员心电异常的风险越高。
在一个示例中,对于当前网络层k,通过以下公式将权值二值化:
得到当前网络层k的实数型中间向量s
k后,对实数型中间向量s
k做以下处理得到输出层的实数型激活值:
a
k=BatchNorm(s
k,θ
k)
上述公式中BatchNorm为批标准化函数,θ
k为当前网络层k的批标准化参数,a
k为当前网络层k的实数型激活值。
如果当前网络层k不是二值神经网络的输出层,对实数型激活值a
k做二值化处理:
然后将下一网络层作为当前网络层直到当前网络层为输出层。
S209、将所述二值神经网络的输出层的实数型激活值和所述样本标签代 入预设损失函数中计算损失率。
具体地,损失函数可以是计算样本标签与输出之间的差异的函数,在一个示例中,损失函数可以是计算L1、L2距离,还可以是均方差函数等,在本发明实施例中对损失函数不做限制。
对于二值神经网络,可以将样本标签与二值神经网络的输出层输出的实数型激活值代入损失函数中得到损失率。
S210、判断所述损失率是否小于预设阈值。
在本发明实施例中,由于输出层为二值神经网络的最终输出结果,如果损失率小于预设阈值,说明二值神经网络的预测结果已经接近真实值(样本标签),该二值神经网络已经能够准确预测心拍信号是否为异常心电信号的能力,可以执行S211,否则执行S212和S213。
S211、停止对所述二值神经网络进行训练,将训练好的二值神经网络作为心电异常检测网络。
当损失率小于预设阈值后,可以停止对二值神经网络进行训练,训练好的二值神经网络即为心电异常检测网络,可以将心电异常检测网络的网络参数打包保存以便移植到移动设备上。
S212、采用所述损失率计算各个网络层的二值化权值的梯度。
在本发明的可选实施例中,针对每个网络层,计算损失率对网络层的二值化激活值的梯度,然后计算损失率对网络层的实数型激活值的梯度,并对实数型激活值的梯度、实数型中间向量和标准处理参数进行标准化处理得到实数型中间向量的梯度和标准处理参数的梯度,计算实数型中间向量的置换矩阵与上一网络层的二值化权值的乘积作为网络层的二值化权值的梯度。
在实际应用中,对于二值化函数:
q=Sign(r)
由于符号函数Sign的导数为零,无法进行反向传播,在反向传播计算梯度的过程中对符号函数Sign进行宽松。
假设二值化q的梯度g
q如下:
上式中C为损失函数,则已知损失函数对二值化值q的梯度g
q,损失函数对实数型数值r的梯度如下:
g(r)=g
q1
|r|≤1
链式法则(chain rule)是微积分中求导法则,用于求复合函数的导数,链式法则为:对于两个函数组合而成的复合函数,复合函数的导数等于里面函数代入外函数值的导数乘以里面函数之导数,具体地到本发明实施例中,
则二值化权值的梯度为:
S213、根据所述二值化权值的梯度和预设学习率调整所述二值神经网络的各个网络层的权值。
在得到各个网络层的梯度后,可以反向传播对各个网络层的参数进行调整,在一个示例中,对于每个网络层的权值,可以计算预设学习率与二值化权值的梯度的乘积;计算二值化权值与乘积的差值作为新的权值,该新的权值大于等于-1,小于等于1,权值限制在[-1,1]范围内,在调整完各个网络层的权值后,返回S208中继续对二值神经网络迭代训练。
本发明实施例在获取心电图信号后进行去噪处理得到去噪后心电图信号,并提取出心拍信号,对心拍信号采样获得训练数据,初始化二值神经网络后,随机提取一个心拍信号的采样数据输入二值神经网络中进行前向传播得到各个网络层的二值化激活值和实数型激活值,并通过二值神经网络的输 出层的激活值来计算损失率,在损失率小于预设阈值时,根据损失率来计算网络层中二值化权值的梯度,通过梯度和预设学习率来对网络层的权值进行调整并重新迭代训练二值神经网络。由于在心电异常检测网络中,每一个网络层的节点的值和权值为二值数据,通过网络层的节点的值和权值进行二值运算来得到下一网络层的节点值,二值数据占1bit数据,相比32-bit的实数型数据,二值神经网络所需要的内存小,权值文件可以从1GB降低到32M,大幅度降低了内存的占用,再者,二值数据可以做与门、异或门等运算来代替乘法,用1-bit的异或门代替了原本的32-bit浮点数乘法,在实现快速运算的同时可以降低运行环境的硬件开销,从而使得训练好的心电异常检测网络可嵌入存储容量和运算能力有限的移动设备中,另外,心电异常患者可以包括各种心电异常,可以获得各种心电异常的心电图信号来训练心电异常检测网络,该心电异常检测网络可以直接有效地预测各种心电异常的概率。
实施例三
图3为本发明实施例三提供的一种心电异常预警方法的步骤流程图,本发明实施例可适用于对心电异常进行预警的情况,该方法可以由本发明实施例的心电异常预警装置来执行,该心电异常预警装置可以由硬件或软件来实现,并集成在本发明实施例所提供的电子设备中,如集成在移动设备上,具体地,如图3所示,本发明实施例的心电异常预警方法可以包括如下步骤:
S301、获取被监测人员的心电图信号。
在本发明实施例中,被监测人员可以是心电异常高危人员,可以通过心电图信号采集装置采集被监测人员的心电图信号,在一个示例中,心电图信号采集装置可以是简易型体积较小的心电图信号采集装置,该心电图信号采集装置与移动设备有线或者无线连接,心电图信号采集装置实时采集被监测人员的心电图信号并发送到移动设备上,移动设备可以实时获得被监测人员的、动态的实时心电图信号。
S302、从所述心电图信号中提取心拍信号。
在一个示例中,可以将心电图信号去噪处理后输入预先训练好的心拍分割模型中提取出多个心拍信号,详情可参考实施例二中S203。
S303、对所述心拍信号采样获得采样数据。
在实际应用中,可以按照预设采样率对心拍信号进行采样获得采样数据, 具体详情可参考实施例二S204。
S304、将所述采样数据输入预先训练好的心电异常检测网络中获得所述被监测人员心电异常的概率。
本发明实施例的心电异常检测网络通过实施例一或实施例二的心电异常检测网络训练方法所训练,在此对训练方法不再详述。
在获得采样数据后,可以将采样数据输入心电异常检测网络得到被监测人员心电异常的概率,该概率的值在0-1之间。
S305、根据所述心电异常的概率生成预警信息。
具体地,当心电异常检测网络输出的概率大于预设阈值,如0.6或0.8时,生成心电异常预警信息,该心电预警信息可以是文本信息、语音信息等,在一个示例中,可以在移动设备(如手机)的显示屏上显示心电异常预警信息,在另一个示例中,移动设备还可以是可移动式心电监测设备,当心电异常检测网络输出的概率大于预设阈值,可以在心电监测设备播放预警语音。
本发明实施例的心电异常检测网络为二值神经网络,每一个网络层的节点的值和权值为二值数据,通过网络层的节点的值和权值进行二值运算来得到下一网络层的节点值,二值数据占1bit数据,相比32-bit的实数型数据,二值神经网络所需要的内存小,权值文件可以从1GB降低到32M,大幅度降低了内存的占用,再者,二值数据可以做与门、异或门等运算来代替乘法,用1-bit的异或门代替了原本的32-bit浮点数乘法,在实现快速运算的同时可以降低运行环境的硬件开销,从而使得训练好的心电异常检测网络可嵌入存储容量和运算能力有限的移动设备中,从而可以通过移动设备实现心电异常预警,另外,心电异常患者可以包括各种心电异常,可以获得各种心电异常的心电图信号来训练心电异常检测网络,从而可以采用移植了该心电异常检测网络的移动设备直接有效地对各种心电异常进行预警。
进一步度,可以动态获取被监测人员的心电图信号,并自动提取心拍信号和采样数据输入心电异常检测网络中,避免了短时心电图容易漏掉阵发性心率失常的缺陷,以及医务人员在分析心电图时受主观影响而导致的错检或漏检,识别过程简便、快速、成本较低、准确率较高,可以采用移动设备对心电异常及时、有效预警。
实施例四
图4是本发明实施例四提供的一种心电异常检测网络训练装置的结构框图,如图4所示,本发明实施例的心电异常检测网络训练装置具体可以包括如下模块:
心电图信号获取模块401,用于获取心电异常患者的心电图信号和正常人的心电图信号;
训练数据提取模块402,用于从获取到的所述心电图信号中提取训练数据;
训练模块403,用于采用所述训练数据训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,其中,对于所述心电异常检测网络中的每一个网络层,所述网络层的节点的值和权值为二值数据,通过所述网络层的节点的值和权值进行二值运算来得到下一网络层的节点。
可选地,训练数据提取模块402包括:
去噪处理子模块,用于对获取到的所述心电图信号进行去噪处理,得到去噪后的心电图信号;
心拍信号提取子模块,用于从所述去噪处理后的心电图信号中提取心拍信号;
训练样本采样子模块,用于对所述心拍信号采样获得训练样本;
标注子模块,用于对所述心拍信号标注得到样本标签,所述样本标签表示所述心拍信号为异常心电信号或者正常心电信号;
训练数据确定子模块,用于将所述训练样本和所述样本标签确定为训练数据。
可选地,所述去噪处理子模块包括:
去噪处理单元,用于对获取到的所述心电图信号进行消除肌电干扰噪声、消除基线漂移噪声、消除工频干扰噪声处理得到去噪后的心电图信号。
可选地,所述心拍信号提取子模块包括:
心拍信号提取子单元,用于将所述去噪处理后的心电图信号输入预先训练好的心拍分割模型中提取出多个心拍信号。
可选地,所述训练样本采样子模块包括:
采样单元,用于按照预设采样频率对所述心拍信号采样获得多个采样数据;
数量判断单元,用于判断所述采样数据的数量是否小于预设数量;
扩充单元,用于对所述采样数据进行扩充,使得所述采样数据的数量等于所述预设数量;
训练数据确定单元,用于将所述采样数据确定为训练数据。
可选地,所述训练数据包括一个心拍信号的采样数据和所述心拍信号的样本标签,所述训练模块403包括:
初始化子模块,用于初始化二值神经网络;
前向传播子模块,用于随机提取一个心拍信号的采样数据输入所述二值神经网络中进行前向传播得到各个网络层的二值化激活值和实数型激活值;
损失率计算子模块,用于根据所述实数型激活值和所述样本标签代入预设损失函数中计算损失率;
损失率判断子模块,用于判断所述损失率是否小于预设阈值;
停止训练子模块,用于停止对所述二值神经网络进行训练,将训练好的二值神经网络作为心电异常检测网络;
梯度计算子模块,用于采用所述损失率计算各个网络层的二值化权值的梯度;
反向传播子模块,用于根据所述二值化权值的梯度和预设学习率调整所述二值神经网络的各个网络层的权值,返回前向传播子模块。
可选地,所述初始化子模块包括:
输入层初始单元,用于初始化所述二值神经网络的输入层,所述输入层的宽度等于所述心电图信号的导联数。
可选地,所述前向传播子模块包括:
权值二值化单元,用于针对所述二值神经网络的每层网络层,将当前网络层的实数型权值二值化得到二值化权值;
二值计算单元,用于将所述当前网络层的二值化权值和上一层网络层的二值化激活值作乘法得到所述当前网络层的实数型中间向量;
标准化处理单元,用于根据所述当前网络层的标准化处理参数对所述实数型中间向量做标准化处理得到实数型激活值;
判断单元,用于判断所述当前网络层是否为输出层;
预测值确定单元,用于将所述实数型激活值作为预测值;
激活值二值化单元,用于对所述实数型中间向量做二值化处理得到所述当前网络层的二值化激活值;
前向传播单元,用于将下一网络层作为当前网络层,返回将当前网络层的实数型权值二值化得到二值化权值的步骤。
可选地,所述梯度计算子模块包括:
二值化激活值梯度计算单元,用于针对每个网络层,计算所述网络层的损失率对所述网络层的二值化激活值的梯度;
实数型激活值梯度计算单元,用于根据以下公式计算所述网络层的损失率对所述网络层的实数型激活值的梯度:
中间向量和标准处理参数梯度计算单元,用于根据链式法则和所述实数型激活值的梯度计算所述实数型中间向量的梯度和所述标准处理参数的梯度;
二值化权值梯度计算单元,用于计算所述实数型中间向量的置换矩阵与上一网络层的二值化权值的乘积作为所述网络层的二值化权值的梯度。
可选地,所述反向传播子模块包括:
乘积计算单元,用于计算所述预设学习率与所述二值化权值的梯度的乘积;
新权值计算单元,用于计算所述二值化权值与所述乘积的差值作为新的权值,所述新的权值大于等于-1,小于等于1。
本发明实施例所提供的心电异常检测网络训练装置可执行本发明实施例一、实施例二所提供的心电异常检测网络训练方法,具备执行方法相应的功能和有益效果。
实施例五
图5是本发明实施例五提供的一种心电异常预警装置的结构框图,如图5所示,本发明实施例的心电异常预警装置具体可以包括如下模块:
心电图信号获取模块501,用于获取被监测人员的心电图信号;
心拍信号提取模块502,用于从所述心电图信号中提取心拍信号;
采样模块503,用于对所述心拍信号采样获得采样数据;
网络预测模块504,用于将所述采样数据输入预先训练好的心电异常检测网络中获得所述被监测人员心电异常的概率;
预警模块505,用于根据所述心电异常的概率生成预警信息;
其中,心电异常检测网络通过实施例一或实施例二所述的心电异常检测网络训练方法所训练。
本发明实施例所提供的心电异常预警装置可执行本发明实施例三所提供的心电异常预警方法,具备执行方法相应的功能和有益效果。
实施例六
参照图6,示出了本发明一个示例中的一种电子设备的结构示意图。如图6所示,该电子设备具体可以包括:处理器601、存储器602、具有触摸功能的显示屏603、输入装置604、输出装置605以及通信装置606。该电子设备中处理器601的数量可以是一个或者多个,图6中以一个处理器601为例。该电子设备中存储器602的数量可以是一个或者多个,图6中以一个存储器602为例。该设备的处理器601、存储器602、显示屏603、输入装置604、输出装置605以及通信装置606可以通过总线或者其他方式连接,图6中以通过总线连接为例。
存储器602作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本发明任意实施例所述的心电异常检测网络训练方法对应的程序指令/模块(例如,上述心电异常检测网络训练装置中的心电图信号获取模块401、训练数据提取模块402和训练模块403),或如本发明任意实施例所述的心电异常预警方法对应的程序指令/模块(例如,上述心电异常检测装置中的心电图信号获取模块501、心拍信号提取模块502、采样模块503、网络预测模块504和预警模块505)存储器602可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作装置、至少一个功能所需的应用程序;存储数据区可存储根据设备的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器602可进一步包括相对于处理器601远程设置的存储器,这些 远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
显示屏603为具有触摸功能的显示屏603,其可以是电容屏、电磁屏或者红外屏。一般而言,显示屏603用于根据处理器601的指示显示数据,还用于接收作用于显示屏603的触摸操作,并将相应的信号发送至处理器601或其他装置。可选的,当显示屏603为红外屏时,其还包括红外触摸框,该红外触摸框设置在显示屏603的四周,其还可以用于接收红外信号,并将该红外信号发送至处理器601或者其他设备。
通信装置606,用于与其他设备建立通信连接,其可以是有线通信装置和/或无线通信装置。
输入装置604可用于接收输入的数字或者字符信息,以及产生与设备的用户设置以及功能控制有关的键信号输入。输出装置605可以包括扬声器等音频设备。需要说明的是,输入装置604和输出装置605的具体组成可以根据实际情况设定。
处理器601通过运行存储在存储器602中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述心电异常检测网络训练方法,和/或,心电异常预警方法。
具体地,实施例中,处理器601执行存储器602中存储的一个或多个程序时,具体实现本发明实施例提供的心电异常检测网络训练方法,和/或,心电异常预警方法。
实施例七
本发明实施例七还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时可实现本发明任意实施例中的心电异常检测网络训练方法,和/或,心电异常预警方法。
当然,本发明实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本发明应用于设备上任意实施例所提供的心电异常检测网络训练方法,和/或,心电异常预警方法中的相关操作。
需要说明的是,对于装置、电子设备、存储介质实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部 分说明即可。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本发明可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述心电异常检测网络训练方法,和/或,心电异常预警方法。
值得注意的是,上述心电异常检测网络训练装置和心电异常预警装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。
以上所述仅为本发明的优选实施例,并不用于限制本发明,对于本领域技术人员而言,本发明可以有各种改动和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (15)
- 一种心电异常检测网络训练方法,其特征在于,包括:获取心电异常患者的心电图信号和正常人的心电图信号;从获取到的所述心电图信号中提取训练数据;采用所述训练数据训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,其中,对于所述心电异常检测网络中的每一个网络层,所述网络层的节点的值和权值为二值数据,通过所述网络层的节点的值和权值进行二值运算来得到下一网络层的节点值。
- 根据权利要求1所述的心电异常检测网络训练方法,其特征在于,所述从获取到的所述心电图数据中提取训练数据,包括:对获取到的所述心电图信号进行去噪处理,得到去噪后的心电图信号;从所述去噪处理后的心电图信号中提取心拍信号;对所述心拍信号采样获得训练样本;对所述心拍信号标注得到样本标签,所述样本标签表示所述心拍信号为异常心电信号或者正常心电信号;将所述训练样本和所述样本标签确定为训练数据。
- 根据权利要求2所述的心电异常检测网络训练方法,其特征在于,所述对获取到的心电图信号进行去噪处理,得到去噪后的心电图信号,包括:对获取到的所述心电图信号进行消除肌电干扰噪声、消除基线漂移噪声、消除工频干扰噪声处理得到去噪后的心电图信号。
- 根据权利要求2所述的心电异常检测网络训练方法,其特征在于,所述从所述去噪处理后的心电图信号中提取心拍信号,包括:将所述去噪处理后的心电图信号输入预先训练好的心拍分割模型中提取出多个心拍信号。
- 根据权利要求2所述的心电异常检测网络训练方法,其特征在于,所述对所述心拍信号采样获得训练样本,包括:按照预设采样频率对所述心拍信号采样获得多个采样数据;判断所述采样数据的数量是否小于预设数量;若是,对所述采样数据进行扩充,使得所述采样数据的数量等于所述预设数量;将所述采样数据确定为训练数据。
- 根据权利要求1-5任一项所述的心电异常检测网络训练方法,其特征在于,所述训练数据包括一个心拍信号的采样数据和所述心拍信号的样本标签,所述采用所述训练数据训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,包括:初始化二值神经网络;随机提取一个心拍信号的采样数据输入所述二值神经网络中进行前向传播得到各个网络层的二值化激活值和实数型激活值;根据所述实数型激活值和所述样本标签代入预设损失函数中计算损失率;判断所述损失率是否小于预设阈值;若是,停止对所述二值神经网络进行训练,将训练好的二值神经网络作为心电异常检测网络;若否,采用所述损失率计算各个网络层的二值化权值的梯度;根据所述二值化权值的梯度和预设学习率调整所述二值神经网络的各个网络层的权值,返回随机提取一个心拍信号的采样数据输入所述二值神经网络中进行前向传播得到所述心拍信号的预测值的步骤。
- 根据权利要求6所述的心电异常检测网络训练方法,其特征在于,所述初始化二值神经网络,包括:初始化所述二值神经网络的输入层,所述输入层的宽度等于所述心电图信号的导联数。
- 根据权利要求6所述的心电异常检测网络训练方法,其特征在于,所述随机提取一个心拍信号的采样数据输入所述二值神经网络中进行前向传播 得到所述心拍信号的预测值,包括:针对所述二值神经网络的每层网络层,将当前网络层的实数型权值二值化得到二值化权值;将所述当前网络层的二值化权值和上一层网络层的二值化激活值作乘法得到所述当前网络层的实数型中间向量;根据所述当前网络层的标准化处理参数对所述实数型中间向量做标准化处理得到实数型激活值;判断所述当前网络层是否为输出层;若是,将所述实数型激活值作为预测值;若否,对所述实数型中间向量做二值化处理得到所述当前网络层的二值化激活值;将下一网络层作为当前网络层,返回将当前网络层的实数型权值二值化得到二值化权值的步骤。
- 根据权利要求9所述的心电异常检测网络训练方法,其特征在于,所述根据所述二值化权值的梯度和预设学习率调整所述二值神经网络的各个网络层的权值,包括:计算所述预设学习率与所述二值化权值的梯度的乘积;计算所述二值化权值与所述乘积的差值作为新的权值,所述新的权值大于或等于-1,且小于或等于1。
- 一种心电异常预警方法,其特征在于,包括:获取被监测人员的心电图信号;从所述心电图信号中提取心拍信号;对所述心拍信号采样获得采样数据;将所述采样数据输入预先训练好的心电异常检测网络中获得所述被监测人员心电异常的概率;根据所述心电异常的概率生成预警信息;其中,心电异常检测网络通过权利要求1-10任一项所述的心电异常检测网络训练方法所训练。
- 一种心电异常检测网络训练装置,其特征在于,包括:心电图信号获取模块,用于获取心电异常患者的心电图信号和正常人的心电图信号;训练数据提取模块,用于从获取到的所述心电图信号中提取训练数据;训练模块,用于采用所述训练数据训练二值神经网络,将训练好的二值神经网络作为心电异常检测网络,其中,对于所述心电异常检测网络中的每一个网络层,所述网络层的节点的值和权值为二值数据,通过所述网络层的节点的值和权值进行二值运算来得到下一网络层的节点。
- 一种心电异常预警装置,其特征在于,包括:心电图信号获取模块,用于获取被监测人员的心电图信号;心拍信号提取模块,用于从所述心电图信号中提取心拍信号;采样模块,用于对所述心拍信号采样获得采样数据;网络预测模块,用于将所述采样数据输入预先训练好的心电异常检测网络中获得所述被监测人员心电异常的概率;预警模块,用于根据所述心电异常的概率生成预警信息。
- 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10中任一项所述的心电异常检测网络训练方法,和/或,权利要求11所述的心电异常预警方法。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-10中任一项所述的心电异常检测网络训练方法,和/或,权利要求11所述的心电异常预警方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010942309.8A CN112022144B (zh) | 2020-09-09 | 2020-09-09 | 心电异常检测网络训练方法、心电异常预警方法及装置 |
CN202010942309.8 | 2020-09-09 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022052358A1 true WO2022052358A1 (zh) | 2022-03-17 |
Family
ID=73583933
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/137332 WO2022052358A1 (zh) | 2020-09-09 | 2020-12-17 | 心电异常检测网络训练方法、心电异常预警方法及装置 |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP2022045870A (zh) |
CN (1) | CN112022144B (zh) |
WO (1) | WO2022052358A1 (zh) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114764572A (zh) * | 2022-04-01 | 2022-07-19 | 江苏航运职业技术学院 | 设备运行工况变化具有强鲁棒性的稳定智能故障诊断方法 |
CN115316985A (zh) * | 2022-10-13 | 2022-11-11 | 华南师范大学 | 基于生理信号的心脏信息检测方法、装置以及设备 |
CN115607166A (zh) * | 2022-10-08 | 2023-01-17 | 中国医学科学院阜外医院 | 一种心电信号智能分析方法及系统、智能心电辅助系统 |
CN115935249A (zh) * | 2022-10-28 | 2023-04-07 | 华北理工大学 | 一种心跳异常监测方法、电子设备及存储介质 |
CN116211316A (zh) * | 2023-04-14 | 2023-06-06 | 中国医学科学院阜外医院 | 多导联心电信号的类型识别方法、系统及辅助系统 |
CN116302897A (zh) * | 2023-05-15 | 2023-06-23 | 合肥联宝信息技术有限公司 | 一种数据集的建立方法、装置、电子设备及存储介质 |
CN118177830A (zh) * | 2024-05-15 | 2024-06-14 | 济南宝林信息技术有限公司 | 基于人工智能的心脏功能实时监听数据优化处理方法 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112022144B (zh) * | 2020-09-09 | 2022-05-24 | 生物岛实验室 | 心电异常检测网络训练方法、心电异常预警方法及装置 |
CN113768516B (zh) * | 2021-09-27 | 2024-05-14 | 吉林省辰一科技有限公司 | 一种基于人工智能的心电图异常程度检测方法及系统 |
CN114219028B (zh) * | 2021-12-15 | 2024-04-12 | 东软集团股份有限公司 | 心电st段抬高识别模型的训练、st段抬高识别方法及装置 |
CN114881929A (zh) * | 2022-04-07 | 2022-08-09 | 北京医准智能科技有限公司 | 一种针对乳腺x线图像整体性质量异常的检测方法及装置 |
WO2024019575A1 (ko) * | 2022-07-22 | 2024-01-25 | 주식회사 메디컬에이아이 | 심전도를 이용한 건강 상태의 예측 방법, 프로그램 및 장치 |
CN118519785B (zh) * | 2024-07-22 | 2024-10-15 | 之江实验室 | 一种基于铁电晶体管器件的储备池计算系统 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105654176A (zh) * | 2014-11-14 | 2016-06-08 | 富士通株式会社 | 神经网络系统及神经网络系统的训练装置和方法 |
US20170286830A1 (en) * | 2016-04-04 | 2017-10-05 | Technion Research & Development Foundation Limited | Quantized neural network training and inference |
CN110379506A (zh) * | 2019-06-14 | 2019-10-25 | 杭州电子科技大学 | 针对心电图数据使用二值化神经网络的心律不齐检测方法 |
CN110956263A (zh) * | 2019-11-14 | 2020-04-03 | 深圳华侨城文化旅游科技集团有限公司 | 一种二值化神经网络的构建方法、存储介质及终端设备 |
US20200167655A1 (en) * | 2018-11-28 | 2020-05-28 | Electronics And Telecommunications Research Institute | Method and apparatus for re-configuring neural network |
CN112022144A (zh) * | 2020-09-09 | 2020-12-04 | 生物岛实验室 | 心电异常检测网络训练方法、心电异常预警方法及装置 |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3435262A1 (en) * | 2010-03-15 | 2019-01-30 | Singapore Health Services Pte. Ltd. | A system for the detection of impending acute cardiopulmonary medical events |
RU2657384C2 (ru) * | 2016-11-24 | 2018-06-13 | Александр Викторович Ежков | Способ и система неинвазивной скрининговой оценки физиологических параметров и патологий |
CN108030494B (zh) * | 2017-11-08 | 2019-11-15 | 华南理工大学 | 基于交叉验证的心电信号错误标记训练样本识别方法 |
US10307072B1 (en) * | 2017-11-15 | 2019-06-04 | Biosense Webster (Israel) Ltd. | Reducing noise levels associated with sensed ECG signals |
CN107837082B (zh) * | 2017-11-27 | 2020-04-24 | 乐普(北京)医疗器械股份有限公司 | 基于人工智能自学习的心电图自动分析方法和装置 |
CN108403111A (zh) * | 2018-02-01 | 2018-08-17 | 华中科技大学 | 一种基于卷积神经网络的癫痫脑电识别方法和系统 |
WO2020004369A1 (ja) * | 2018-06-29 | 2020-01-02 | 学校法人東京女子医科大学 | 心電図画像を用いた機械学習による心電図診断装置 |
CN109036573A (zh) * | 2018-07-06 | 2018-12-18 | 苏州大学 | 基于生成式对抗网络技术的心电图生成及分类方法 |
KR102226875B1 (ko) * | 2018-12-04 | 2021-03-11 | 건양대학교산학협력단 | 기계학습 모델을 이용한 심장질환예측 시스템, 및 방법 |
JP7297464B2 (ja) * | 2019-02-22 | 2023-06-26 | フクダ電子株式会社 | 生体信号処理装置および自動解析用データ生成方法 |
CN110393519B (zh) * | 2019-08-19 | 2022-06-24 | 广州视源电子科技股份有限公司 | 心电信号的分析方法、装置、存储介质和处理器 |
-
2020
- 2020-09-09 CN CN202010942309.8A patent/CN112022144B/zh active Active
- 2020-12-11 JP JP2020206216A patent/JP2022045870A/ja active Pending
- 2020-12-17 WO PCT/CN2020/137332 patent/WO2022052358A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105654176A (zh) * | 2014-11-14 | 2016-06-08 | 富士通株式会社 | 神经网络系统及神经网络系统的训练装置和方法 |
US20170286830A1 (en) * | 2016-04-04 | 2017-10-05 | Technion Research & Development Foundation Limited | Quantized neural network training and inference |
US20200167655A1 (en) * | 2018-11-28 | 2020-05-28 | Electronics And Telecommunications Research Institute | Method and apparatus for re-configuring neural network |
CN110379506A (zh) * | 2019-06-14 | 2019-10-25 | 杭州电子科技大学 | 针对心电图数据使用二值化神经网络的心律不齐检测方法 |
CN110956263A (zh) * | 2019-11-14 | 2020-04-03 | 深圳华侨城文化旅游科技集团有限公司 | 一种二值化神经网络的构建方法、存储介质及终端设备 |
CN112022144A (zh) * | 2020-09-09 | 2020-12-04 | 生物岛实验室 | 心电异常检测网络训练方法、心电异常预警方法及装置 |
Non-Patent Citations (1)
Title |
---|
RASHID NAFIUL; AL FARUQUE MOHAMMAD ABDULLAH: "Energy-efficient Real-time Myocardial Infarction Detection on Wearable Devices", 2020 42ND ANNUAL INTERNATIONAL CONFERENCE OF THE IEEE ENGINEERING IN MEDICINE & BIOLOGY SOCIETY (EMBC), 20 July 2020 (2020-07-20), pages 4648 - 4651, XP033815293, DOI: 10.1109/EMBC44109.2020.9175232 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114764572A (zh) * | 2022-04-01 | 2022-07-19 | 江苏航运职业技术学院 | 设备运行工况变化具有强鲁棒性的稳定智能故障诊断方法 |
CN115607166A (zh) * | 2022-10-08 | 2023-01-17 | 中国医学科学院阜外医院 | 一种心电信号智能分析方法及系统、智能心电辅助系统 |
CN115607166B (zh) * | 2022-10-08 | 2023-08-22 | 中国医学科学院阜外医院 | 一种心电信号智能分析方法及系统、智能心电辅助系统 |
CN115316985A (zh) * | 2022-10-13 | 2022-11-11 | 华南师范大学 | 基于生理信号的心脏信息检测方法、装置以及设备 |
CN115316985B (zh) * | 2022-10-13 | 2023-04-18 | 华南师范大学 | 基于生理信号的心脏信息检测方法、装置以及设备 |
CN115935249A (zh) * | 2022-10-28 | 2023-04-07 | 华北理工大学 | 一种心跳异常监测方法、电子设备及存储介质 |
CN116211316A (zh) * | 2023-04-14 | 2023-06-06 | 中国医学科学院阜外医院 | 多导联心电信号的类型识别方法、系统及辅助系统 |
CN116302897A (zh) * | 2023-05-15 | 2023-06-23 | 合肥联宝信息技术有限公司 | 一种数据集的建立方法、装置、电子设备及存储介质 |
CN116302897B (zh) * | 2023-05-15 | 2023-10-17 | 合肥联宝信息技术有限公司 | 一种数据集的建立方法、装置、电子设备及存储介质 |
CN118177830A (zh) * | 2024-05-15 | 2024-06-14 | 济南宝林信息技术有限公司 | 基于人工智能的心脏功能实时监听数据优化处理方法 |
Also Published As
Publication number | Publication date |
---|---|
JP2022045870A (ja) | 2022-03-22 |
CN112022144A (zh) | 2020-12-04 |
CN112022144B (zh) | 2022-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022052358A1 (zh) | 心电异常检测网络训练方法、心电异常预警方法及装置 | |
Kumari et al. | An automated detection of heart arrhythmias using machine learning technique: SVM | |
Sangaiah et al. | An intelligent learning approach for improving ECG signal classification and arrhythmia analysis | |
Raeiatibanadkooki et al. | Compression and encryption of ECG signal using wavelet and chaotically Huffman code in telemedicine application | |
Venkataramanaiah et al. | ECG signal processing and KNN classifier-based abnormality detection by VH-doctor for remote cardiac healthcare monitoring | |
Sowmya et al. | Contemplate on ECG signals and classification of arrhythmia signals using CNN-LSTM deep learning model | |
Rashid et al. | Energy-efficient real-time myocardial infarction detection on wearable devices | |
Chen et al. | Algorithm for heart rate extraction in a novel wearable acoustic sensor | |
Chen et al. | Edge2Analysis: a novel AIoT platform for atrial fibrillation recognition and detection | |
CN110491506A (zh) | 心房颤动预测模型及其预测系统 | |
Rujoie et al. | Classification and evaluation of the severity of tricuspid regurgitation using phonocardiogram | |
Mahendran et al. | An efficient priority‐based convolutional auto‐encoder approach for electrocardiogram signal compression in Internet of Things based healthcare system | |
Shukla et al. | An efficient heart sound segmentation approach using kurtosis and zero frequency filter features | |
CN113436726A (zh) | 一种基于多任务分类的肺部病理音自动化分析方法 | |
CN113469218A (zh) | 基于深度学习的心电信号危急值处理方法、系统及介质 | |
JP2023104885A (ja) | グラフ畳み込みに基づく心電図心拍数マルチタイプの予測方法 | |
Ajitkumar Singh et al. | Heart abnormality classification using PCG and ECG recordings | |
Raeiatibanadkooki et al. | Real time processing and transferring ECG signal by a mobile phone | |
Hossain et al. | Wavelet and spectral analysis of normal and abnormal heart sound for diagnosing cardiac disorders | |
Hu et al. | A lightweight U-Net model for denoising and noise localization of ECG signals | |
Aruna et al. | Accelerating deep convolutional neural network on FPGA for ECG signal classification | |
Liu et al. | Semantic segmentation of qrs complex in single channel ecg with bidirectional lstm networks | |
Altaf et al. | Systematic review for phonocardiography classification based on machine learning | |
CN115624333B (zh) | 一种人体电阻抗信号的采集系统及其工作方法 | |
Jusak et al. | A semi-automatic heart sounds identification model and its implementation in internet of things devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20953143 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 19.07.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20953143 Country of ref document: EP Kind code of ref document: A1 |