CN118924304A - Training method of electrocardiogram reconstruction model, electrocardiogram reconstruction method and system - Google Patents
Training method of electrocardiogram reconstruction model, electrocardiogram reconstruction method and system Download PDFInfo
- Publication number
- CN118924304A CN118924304A CN202310645318.4A CN202310645318A CN118924304A CN 118924304 A CN118924304 A CN 118924304A CN 202310645318 A CN202310645318 A CN 202310645318A CN 118924304 A CN118924304 A CN 118924304A
- Authority
- CN
- China
- Prior art keywords
- data
- signal
- ecg
- training
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- 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
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/02—Detecting, measuring or recording for evaluating the cardiovascular system, e.g. pulse, heart rate, blood pressure or blood flow
- A61B5/024—Measuring pulse rate or heart rate
- A61B5/02416—Measuring pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/103—Measuring devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
- A61B5/11—Measuring movement of the entire body or parts thereof, e.g. head or hand tremor or mobility of a limb
- A61B5/1102—Ballistocardiography
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7225—Details of analogue processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/725—Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7253—Details of waveform analysis characterised by using transforms
- A61B5/726—Details of waveform analysis characterised by using transforms using Wavelet transforms
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2131—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on a transform domain processing, e.g. wavelet transform
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
- G06N5/042—Backward inferencing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
- G06N5/046—Forward inferencing; Production systems
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Theoretical Computer Science (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Surgery (AREA)
- Veterinary Medicine (AREA)
- Public Health (AREA)
- Animal Behavior & Ethology (AREA)
- Heart & Thoracic Surgery (AREA)
- Pathology (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Physiology (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Mathematical Physics (AREA)
- General Physics & Mathematics (AREA)
- Cardiology (AREA)
- Psychiatry (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Fuzzy Systems (AREA)
- Power Engineering (AREA)
- Dentistry (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
The invention provides a training method of an electrocardiogram reconstruction model (the electrocardiogram reconstruction model adopts a generated Flow model), and an ECG reconstruction method and system. The training method of the electrocardiogram reconstruction model is to train the electrocardiogram reconstruction model by utilizing the reversibility of the flow model and introducing the information entropy difference of the fused sensing signal source and the ECG signal, thereby supporting the interpretability of the ECG reconstruction method in modeling principle and improving the quality of the reconstructed ECG.
Description
Technical Field
The present invention relates to the field of machine learning, and more particularly to the field of deep learning in machine learning, and more particularly to an intelligent medical technology employing deep learning, that is, a training method of an electrocardiogram reconstruction model, an electrocardiogram reconstruction method, and an electrocardiogram reconstruction system.
Background
In the field of intelligent medical treatment, an electrocardiogram is widely used as a physiological index for daily health monitoring and clinical diagnosis, for example, the electrocardiogram can be used for auxiliary diagnosis such as arrhythmia classification, heart failure monitoring and the like. Wherein, during the electrocardiographic acquisition, the multi-lead electrode needs to be stuck or fixed on the skin of a user (the user is also called user). The pasting operation of the multi-lead electrode makes the operation inconvenient experience when detecting the electrocardiogram of the user in daily health, and the electrocardiogram acquisition electrode which performs signal acquisition by pasting or fixing the multi-lead electrode and the like can cause skin allergy of the user after long-time pasting or fixing the multi-lead electrode to the skin of the user.
Aiming at the problems of the electrocardiograph in the acquisition process, a wearable device is arranged on a user to acquire physiological signals (fused sensing signals or signal sources) with fused sensing acquisition characteristics, and the physiological signals are converted into electrocardiograph signals (ECG) to realize fused sensing electrocardiograph acquisition. The method for converting physiological signals into electrocardiogram signals is an electrocardiogram reconstruction method. The electrocardiogram reconstruction method combines the characteristic of rich referential experience of medical auxiliary diagnosis of the electrocardiogram and the characteristic of easy acquisition of physiological signals with integrated sensing and acquisition characteristics. The physiological signals with the integrated sensing and collecting characteristics comprise a photoplethysmogram (PPG) signal, a Ballistocardiogram (BCG) signal and the like. Photoplethysmogram signals and ballistocardiogram signals are physiological signals that are widely used in clinical or wearable devices. The photoplethysmogram pulse wave signal is obtained by placing a photoplethysmograph on the skin of a human body and measuring the change in blood volume under the skin by using the absorption and reflection of light. Ballistocardiogram signals are signals that are converted by a sensor into electrical signals from small vibrations of the skin surface caused by heart beats. The photoelectric volume pulse wave signal and the ballistocardiogram signal can realize the characteristics of non-sticking and no sense of a user in the acquisition principle, and realize the integrated sensing electrocardiogram acquisition based on the characteristics.
In the electrocardiographic reconstruction method, the existing electrocardiographic reconstruction method is mainly divided into an electrocardiographic reconstruction method based on a PPG signal and an electrocardiographic reconstruction method based on a BCG signal according to the signal source type utilized by the ECG reconstruction. The electrocardiographic reconstruction methods are mainly classified into an electrocardiographic reconstruction method based on a non-deep learning model and an electrocardiographic reconstruction method based on a deep learning model according to main technical means adopted in the reconstruction methods. For example, reference 1 with patent publication No. US20210315470 discloses a method for reconstructing PPG to ECG based on UNet model structure, which learns the mapping relation of PPG to ECG based on deep learning strong nonlinear fitting capability, wherein model weights are adjusted in training phase, and reconstruction reasoning of PPG to ECG is performed by using trained model in application phase. Reference 2, US20220183606, discloses a method for reconstructing PPG to ECG based on DCT (Discrete Cosine Transform) (electrocardiogram reconstruction method of non-deep learning model), which is a method based on digital signal processing of DCT, expressing the mapping relationship of PPG to ECG as coefficients in DCT, fitting the coefficients in learning phase, and reconstructing PPG to ECG using the learned coefficients in application phase. Reference 3, publication No. CN114041801a, discloses a method for generating an countermeasure network based on DCGAN, which employs a network composed of a generator and a discriminator; in the training stage, the generator and the discriminator perform countermeasure training, and the similarity of the reconstructed ECG and the real ECG is iteratively improved; in the application phase, the reconstructed ECG signal is output using only the generator with the BCG signal as input. Reference 4 of patent publication CN114548365A discloses an ECG reconstruction method based on an LSTM neural network model, which performs an ECG reconstruction based on an imaging photoplethysmography pulse signal (IPPG) as an input of the LSTM network and an ECG signal as an output of the LSTM neural network model.
In summary, the ECG reconstruction method based on the fused sensing signal source can effectively alleviate the problems of tedious acquisition process and difficult deployment caused by the sticky acquisition mode of ECG, and in particular, the ECG reconstruction method based on the deep learning model can remarkably improve the characterization capability of the reconstructed mapping relationship between the source signal with the fused sensing acquisition characteristic and the ECG signal, but still cannot solve the problem of poor reconstructed ECG fidelity.
Disclosure of Invention
It is therefore an object of the present invention to overcome the above-mentioned drawbacks of the prior art and to provide a training method of an electrocardiogram reconstruction model, an electrocardiogram reconstruction method and an electrocardiogram reconstruction system.
The invention aims at realizing the following technical scheme:
according to a first aspect of the present invention, there is provided a training method of an electrocardiographic reconstruction model, the method comprising:
S1, acquiring a training data set formed by a plurality of training data pairs, wherein each training data pair comprises ECG signal conversion data and fused sensing signal data of a user at the same time, the ECG signal conversion data is obtained by carrying out channel number conversion on ECG signal data acquired by the user according to the channel number of the fused sensing signal data, so that the channel number of the ECG signal conversion data is 1 plus the channel number of the fused sensing signal data; s2, acquiring an electrocardiogram reconstruction model, which is a flow model; s3, training the electrocardiogram reconstruction model by using the training data set, wherein the training comprises a forward reasoning process and a reverse reasoning process, during the forward reasoning process, the electrocardiogram reconstruction model is used for generating synthesized fused sensing signal data and information entropy difference vectors according to the ECG signal conversion data, the information entropy difference vectors indicate information entropy differences between the ECG signal conversion data and the fused sensing signal data, during the reverse reasoning process, the electrocardiogram reconstruction model is used for generating synthesized ECG signal conversion data according to the fused sensing signal data and interpolation vectors randomly sampled from preset probability distribution of the information entropy difference information, and parameters of the electrocardiogram reconstruction model are updated by using information entropy difference losses corresponding to the information entropy difference vectors.
In some embodiments of the present invention, the information entropy difference loss is determined based on a similarity between a probability distribution of an information entropy difference vector of each training data and a preset gaussian probability distribution; or the information entropy difference loss is equal to the average value of the information entropy difference vectors obtained by each training data pair.
In some embodiments of the invention, parameters of the electrocardiographic reconstruction model are updated at training based on information entropy difference loss, reconstruction loss between synthesized ECG signal conversion data and ECG signal conversion data, total loss determined by supervisory loss between synthesized and synthesized merged sense signal data.
In some embodiments of the invention, the fused perceptual signal data comprises ballistocardiogram signal data and photoplethysmogram signal data, the total loss being determined as follows:
Where L total represents the total loss, ω 1 represents the first hyper-parameter, ω 2 represents the second hyper-parameter, ω 3 represents the third hyper-parameter, Indicating a loss of reconstruction and,Representing synthesized ECG signal conversion data, x ECG represents ECG signal conversion data, Indicating a loss of supervision of the device,A first supervision loss corresponding to the ballistocardiogram signal data is represented,Representing the composite ballistocardiogram signal data, x BCG representing the ballistocardiogram signal data,Representing a second supervised loss corresponding to the photoplethysmography signal data,Representing the synthesized photoplethysmogram signal data, x PPG representing photoplethysmogram signal data, T representing the information entropy difference loss.
In some embodiments of the present invention, the channel number conversion is performed as follows:
Performing a plurality of wavelet transforms on the ECG signal data, each wavelet transform resulting in an approximation component and a detail component; zero value interpolation is respectively carried out on the approximate component and the detail component obtained by the last wavelet transformation and the detail component of the previous wavelet transformation of the last wavelet transformation, so as to obtain ECG signal conversion data.
In some embodiments of the present invention, at least one recurrent neural network is provided in the electrocardiographic reconstruction model to perform extraction of time domain features and at least one fully connected neural network to perform extraction of space domain features.
According to a second aspect of the present invention, there is provided an electrocardiogram reconstruction method based on an electrocardiogram reconstruction model, the method comprising the steps of: c1, acquiring historical data of a user, wherein the historical data comprises ECG signal data and fused sensing signal data of the user at a plurality of times; 2, preprocessing the physiological signals obtained in the step C1 according to a preset processing mode to obtain training initial data composed of a plurality of data pairs, wherein each data pair comprises ECG signal data and fused perception signal data of a user in at least one heartbeat period; c3, adding 1 to the channel number of the integrated sensing signal data in the step C2 to serve as a conversion channel number; c4, performing channel number conversion on the ECG signal data in the data pair obtained in the step C2 to obtain ECG signal conversion data, forming a training data pair by the ECG signal conversion data and the fused sensing signal data in one data pair, and forming a training data set by a plurality of training data pairs; c5, training the electrocardiographic reconstruction model for a plurality of times by adopting the training method according to the first aspect of the invention to obtain a trained electrocardiographic reconstruction model; c6, acquiring a current fused sensing signal of the user, preprocessing the current fused sensing signal of the user according to a preset processing mode to obtain current fused sensing signal data of the user, and sampling from information entropy difference information probability distribution preset between the fused sensing signal and an ECG signal to generate an insertion vector; c7, inputting the current fused sensing signal data of the user and the insertion vector generated by sampling into a trained electrocardiogram reconstruction model to obtain current reconstruction ECG signal conversion data of the user; and C8, carrying out channel number inverse transformation on the current reconstructed ECG signal conversion data of the user to obtain reconstructed ECG signal data.
In some embodiments of the present invention, the preset processing mode includes one or more of the following methods: filtering, aligning, cutting and normalizing.
According to a third aspect of the present invention, there is provided an electrocardiogram reconstruction system, the system comprising:
The information acquisition terminal is configured to acquire physiological signals of a user, and to denoise and output the acquired physiological signals; wherein the physiological signal comprises an ECG signal and an fused-in perception signal; the data management module is configured to receive the data output by the information acquisition terminal and process the data according to a preset data structure; a database configured to store the data processed by the data management module; a reconstruction module configured to perform the method according to the second aspect of the invention, resulting in reconstructed ECG signal data.
In some embodiments of the invention, the reconstruction module includes:
A data reading unit configured to: acquiring and outputting training physiological signals of a detection target, wherein the training physiological signals are ECG signals and fused sensing signals of the detection target in a plurality of continuous heartbeat cycles; a data preprocessing unit configured to: the physiological signals output by the data reading unit are received, preprocessed according to a preset processing mode, and training initial data are formed by data pairs of the detection target in each heartbeat period, wherein each data pair is ECG signal data and fused sensing signal data of the detection target in the same heartbeat period; a signal type judgment unit configured to: adding 1 to the channel number of the integrated sensing signal data as a conversion channel number, and converting the ECG signal data into ECG signal conversion data, wherein the channel number of the ECG signal conversion data is equal to the conversion channel number; a model building unit configured to: storing an electrocardiogram reconstruction model initialized in advance; a training judgment unit configured to: determining whether an electrocardiographic reconstruction model stored by a model construction unit needs training or not, and outputting a training judgment result; a model training unit configured to: when the training judgment result output by the training judgment unit is that training is needed, executing the training method according to the first aspect of the invention to update the parameters of the model in the model construction unit; an insertion vector sampling module configured to: sampling from information entropy difference information probability distribution preset between the fused sensing signal and the ECG signal to generate an insertion vector; a reconstruction inference unit configured to: when the output result of the training judging unit is that training is not needed, the electrocardiographic reconstruction model stored by the model constructing unit is used as a trained electrocardiographic reconstruction model, the fused sensing signal in the physiological signal of the detection target is obtained and processed according to a preset processing mode to obtain fused sensing signal data, the insertion vector obtained by the insertion vector sampling module is obtained, and electrocardiographic reconstruction is carried out by adopting the trained electrocardiographic reconstruction model.
Compared with the prior art, the invention has the advantages that: in the invention, the channel number conversion is to meet the requirement that the ECG reconstruction method can adapt to different reconstruction source channel numbers, wherein the channel number of ECG signal conversion data is the channel number of the fused sensing signal data plus 1, namely, the channel number of the ECG signal conversion data is one channel more than the channel number of the fused sensing signal data, so that an ECG reconstruction model can process the introduced information entropy difference information vector randomly sampled from the information entropy difference information probability distribution function, and the ECG reconstruction model is trained by utilizing the reversibility of a flow model and introducing the information entropy difference of the fused sensing signal source and the ECG signal, thereby supporting the interpretability of the ECG reconstruction method in the modeling principle and improving the quality of reconstructed ECG.
Drawings
Embodiments of the invention are further described below with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of an electrocardiogram reconstruction system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the structure and data Flow of an electrocardiogram reconstruction model using a Flow-model architecture according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a transformation sub-network according to an embodiment of the present invention;
FIG. 4 is a flowchart of a training method of an electrocardiogram reconstruction model according to an embodiment of the present invention;
FIG. 5 is a flowchart of an electrocardiographic reconstruction method according to an embodiment of the present invention;
FIG. 6 is a flowchart of an embodiment of an electrocardiogram reconstruction method according to the present invention;
Fig. 7 is a schematic diagram of an electrocardiogram reconstruction system according to an embodiment of the present invention in combination with a specific application scenario;
Fig. 8 is a schematic diagram of a comparison of a raw ECG signal and a reconstructed ECG signal provided in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail by means of specific examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As mentioned in the background art, the ECG reconstruction method based on the fused sensing signal source can effectively alleviate the problems of tedious acquisition process and difficult deployment caused by the sticky acquisition mode of ECG, and particularly, the ECG reconstruction method based on the deep learning model can remarkably improve the characterization capability of the reconstructed mapping relationship between the source signal with the fused sensing acquisition characteristic and the ECG signal, but still cannot solve the problem of poor reconstructed ECG fidelity.
The inventors of the present application have further analyzed the prior art in order to solve the problem of poor fidelity of the reconstructed ECG. The analysis process will be explained below by taking the techniques provided in the 4 references (reference 1, reference 2, reference 3, reference 4) mentioned in the background art as examples.
The non-deep learning model-based ECG reconstruction method (as in reference 2 mentioned above) mainly uses a small amount of adjustable parameters to fit the mapping relationship between the ECG signal and the PPG signal, and then uses a well-defined calculation formula to implement ECG signal reconstruction. In this regard, the ECG reconstruction method based on the deep learning model (as mentioned in reference 1, reference 2, reference 3 above) can well solve the above-mentioned problem of large deviation. Although the ECG reconstruction method based on the deep learning model has a remarkable improvement on the representation capability of the reconstruction mapping relationship between the source signal with the characteristic of fused sensing acquisition and the ECG signal (so that the problem of larger deviation can be solved), the ECG reconstruction method based on the deep learning model carries out forced fitting on the ECG signal (namely, the source signal with the characteristic of fused sensing acquisition is mapped to the ECG signal) on the basis of neglecting the difference between the ECG signal (the ECG signal can reflect the heart activity more truly) and the source signal on the information entropy relation, so that the ECG reconstruction method has no interpretability in the modeling principle, and the problem of poor reconstruction ECG fidelity cannot be solved. In other words, the existing ECG reconstruction method cannot interpolate the difference between the ECG signal and the fused sensing source signal in the information entropy, and the modeling principle of the existing ECG reconstruction method lacks the interpretability under the perspective of the sensing principle of the reconstructed source signal and the target signal, so that the problem of poor reconstruction ECG fidelity cannot be solved. Thus, to solve the above-mentioned problems, embodiments of the present invention provide a training method of an electrocardiogram reconstruction model (the electrocardiogram reconstruction model adopts a generated Flow model), and an ECG reconstruction method and system. The training method of the electrocardiogram reconstruction model is to train the electrocardiogram reconstruction model by utilizing the reversibility of the flow model and introducing the information entropy difference of the fused sensing signal source and the ECG signal, so as to realize the information entropy difference interpolation between the reconstruction source signal (fused sensing signal source) and the target signal (ECG signal), thereby supporting the interpretability of the ECG reconstruction method in modeling principle, improving the learning capacity of the mapping relation between the reconstruction source signal and the target signal and further improving the quality of the reconstructed ECG. First, the reversibility of the downstream model is explained. The reversibility of the flow model comprises a forward reasoning process and a reverse reasoning process, wherein in the forward reasoning process, an ECG signal is taken as an input, and a cascade basic building block carries out forward calculation; reverse reasoning is the reverse calculation of the basic building blocks by taking the fused sensing signal source as input. The flow model reversibility is illustratively explained below in one basic building block.
An example forward reasoning calculation process can be expressed as:
ECG1,ECG2=split(ECG)
(BCG/PPG)′1=ECG1+F(ECG2)
(BCG/PPG)′2=ECG2·exp(H((BCG/PPG)′1))+G((BCG/PPG)′1)
(BCG/PPG)′=Concat((BCG/PPG)′1,(BCG/PPG)′2)
Wherein split represents splitting the data into two halves according to the time dimension of the signal data, concat represents merging the data according to the time dimension of the signal data, exp represents an exponential function, and ECG 1,ECG2 represents the first and second halves of the ECG signal data in the halves; (BCG/PPG) ' 1 denotes the first aliquotted data after the forward reasoning calculation, (BCG/PPG) ' 2 denotes the second aliquotted data after the forward reasoning calculation, and (BCG/PPG) ' denotes that the final output of the forward reasoning is the synthesized fused perceptual signal data. F (x) denotes a first transformation sub-network, H (x) denotes a second transformation sub-network, and G (x) denotes a third transformation sub-network.
An example of a reverse reasoning calculation process can be expressed as:
(BCG/PPG)1,(BCG/PPG)2=split((BCG/PPG))
ECG′2=((BCG/PPG)2-G((BCG/PPG)1))·exp(-H((BCG/PPG)1)),
ECG′1=(BCG/PPG)1-F(ECG′2)
ECG′=Concat(ECG′1,ECG′2)
Wherein, (BCG/PPG) 1,(BCG/PPG)2 represents the first and second halves of the fused perceptual signal data (BCG/PPG) as halved, ECG ' 1 represents the first half of the inversely inferred calculated data, ECG ' 2 represents the second half of the inversely inferred data, and ECG ' represents the final output of the inversely inferred reconstructed ECG signal data. It should be noted that, the sub-network of the base building block may be composed of the first transformation sub-network and the second transformation sub-network, or may be composed of the first transformation sub-network, the second transformation sub-network, and the third transformation sub-network, where the first transformation sub-network and the second transformation sub-network are selected only for convenience of description, and the third transformation sub-network composes the base building block to perform the explanation of reversibility. When the basic building block is formed by the first transformation sub-network and the second transformation sub-network to carry out reversible schematic, the corresponding term of G (x) in the process schematic is omitted, for example, the forward reasoning calculation process example is expressed as follows: (BCG/PPG)' 2=ECG2·exp(H((BCG/PPG)′1)).
In the embodiment of the invention, reversibility of the stream model is introduced when the ECG signal is reconstructed, and meanwhile, the actual fused sensing signal and randomly sampled difference signal distribution are mapped to the ECG signal in the reverse reasoning process of the stream model, in other words, the probability distribution of the information entropy difference information of the reconstructed source signal and the ECG signal is preset and randomly sampled, and the sampled vector is obtained. In other words, before the reverse reasoning starts, the information entropy difference information probability distribution of the reconstructed source signal (the fused sensing signal) and the ECG signal is preset and randomly sampled, the sampled vector and the fused sensing signal are combined and input into an electrocardiogram reconstruction model, the information entropy difference interpolation between the reconstructed source signal and the target signal (the ECG signal) is realized, the fidelity of the reconstructed ECG is improved, and meanwhile, the interpretability is ensured in the modeling process. When training an electrocardiogram reconstruction model, reversely mapping the fused sensing signal source and the information entropy difference signal distribution vector to an ECG signal by utilizing the reversibility of the flow model; the method has the advantages that the fused sensing signals corresponding to the ECG signals are positively output, the bidirectional mapping of the ECG signals and the fused sensing signals is realized, the information entropy difference between the fused sensing signal source and the ECG signals is interpolated in the modeling process, the physiological relationship between the reconstructed source signals and the target signals is met in the modeling process of the ECG reconstruction method (namely, the interpretability of the ECG reconstruction method in the modeling principle is met), and the quality of the reconstructed ECG is obviously improved. Continuing to explain by taking the example of the reverse reasoning calculation process as an example, before the reverse reasoning starts, randomly sampling the information entropy difference information probability distribution preset between the reconstructed source signal (the fused sensing signal) and the ECG signal, combining the interpolation vector obtained by sampling with the fused sensing signal data (BCG/PPG), inputting the combination into a stream model, realizing the information entropy difference interpolation between the reconstructed source signal and the ECG signal, improving the fidelity of the reconstructed ECG, and simultaneously ensuring the interpretability on the level of the modeling process. The invention designs a reconstruction source channel number self-adaptive method which is used for solving the problem that the channel number of an integrated sensing signal source is not fixed in the ECG signal reconstruction method, and the channel number conversion (such as a wavelet transformation level) is utilized to adjust according to the input signal channel number so as to support the input of the integrated sensing signal source of a variable channel. The ECG reconstruction method and system provided by the embodiment of the invention are to reconstruct ECG by using an electrocardiogram reconstruction model through the distribution of the fused sensing signals and the sampled difference signals. This may provide an ECG acquisition method using the fused-in sensing signal in case the ECG acquisition device is not available.
According to an embodiment of the present invention, there is provided an electrocardiogram reconstruction method based on an electrocardiogram reconstruction model, the method including the steps of: c1, acquiring historical data of a user, wherein the historical data comprises ECG signal data and fused sensing signal data of the user at a plurality of times; 2, preprocessing the physiological signals obtained in the step C1 according to a preset processing mode to obtain training initial data composed of a plurality of data pairs, wherein each data pair comprises ECG signal data and fused perception signal data of a user in at least one heartbeat period; c3, adding 1 to the channel number of the integrated sensing signal data in the step C2 to serve as a conversion channel number; c4, performing channel number conversion on the ECG signal data in the data pair obtained in the step C2 to obtain ECG signal conversion data, forming a training data pair by the ECG signal conversion data and the fused sensing signal data in one data pair, and forming a training data set by a plurality of training data pairs; c5, training the electrocardiogram reconstruction model for a plurality of times by adopting the training method of the electrocardiogram reconstruction model provided by the invention to obtain a trained electrocardiogram reconstruction model; c6, acquiring a current fused sensing signal of the user, preprocessing the current fused sensing signal of the user according to a preset processing mode to obtain current fused sensing signal data of the user, and sampling from information entropy difference information probability distribution preset between a reconstructed source signal (fused sensing signal) and an ECG signal to generate an insertion vector; c7, inputting the current fused sensing signal data of the user and the insertion vector generated by sampling into a trained electrocardiogram reconstruction model to obtain current reconstruction ECG signal conversion data of the user; and C8, carrying out channel number inverse transformation on the current reconstructed ECG signal conversion data of the user to obtain reconstructed ECG signal data.
According to one embodiment of the present invention, as shown in fig. 1, an electrocardiogram reconstruction system is provided, which includes a signal acquisition terminal 400, a data management module 406, a database 407, and an ECG reconstruction module 408. The information acquisition terminal 400 is configured to acquire physiological signals of a user, and to denoise and output the acquired physiological signals; wherein the physiological signal comprises an ECG signal and an fused-in perception signal; the data management module 406 is configured to receive the data output by the information acquisition terminal and process the data according to a preset data structure; a database 407 configured to store the data processed by the data management module; The reconstruction module (i.e., the ECG reconstruction module 408) is configured to perform an electrocardiogram reconstruction method based on an electrocardiogram reconstruction model to obtain reconstructed ECG signal data. The ECG reconstruction module 408 includes a data reading unit 4081, a data preprocessing unit 4082, a signal type judging unit 4083, a model constructing unit 4084, a training judging unit 4085, a model training unit 4086, an ECG reconstruction reasoning unit 4087, and an insertion vector sampling module 4088; wherein the data reading unit 4081 is configured to: acquiring and outputting training physiological signals of a detection target, wherein the training physiological signals are ECG signals and fused sensing signals of the detection target in a plurality of continuous heartbeat cycles; a data preprocessing unit 4082 configured to: the physiological signals output by the data reading unit are received, preprocessed according to a preset processing mode, and training initial data are formed by data pairs of the detection target in each heartbeat period, wherein each data pair is ECG signal data and fused sensing signal data of the detection target in the same heartbeat period; a signal type judgment unit 4083 configured to: adding 1 to the channel number of the integrated sensing signal data as a conversion channel number, and converting the ECG signal data into ECG signal conversion data, wherein the channel number of the ECG signal conversion data is equal to the conversion channel number; A model construction unit 4084 configured to: storing an electrocardiogram reconstruction model initialized in advance; a training judgment unit 4085 configured to: determining whether the electrocardiographic reconstruction model needs to be trained, and outputting a training judgment result; a model training unit 4086 configured to: when the training judgment result output by the training judgment unit is that training is needed, executing the training method based on the electrocardiogram reconstruction model provided by the invention to obtain a trained electrocardiogram reconstruction model and updating the parameters of the model in the model construction unit; an insertion vector sampling module 4088 configured to: sampling from the information entropy difference information probability distribution preset between the reconstructed source signal (the fused sensing signal) and the ECG signal to generate an insertion vector; An ECG reconstruction inference unit 4087 configured to: when the output result of the training judging unit is that training is not needed, the electrocardiographic reconstruction model stored by the model constructing unit is used as a trained electrocardiographic reconstruction model, the fused sensing signal in the physiological signal of the detection target is obtained and processed according to a preset processing mode to obtain fused sensing signal data, the insertion vector obtained by the insertion vector sampling module 4088 is obtained, and electrocardiographic reconstruction is carried out by adopting the trained electrocardiographic reconstruction model.
According to an embodiment of the present invention, there is provided a training method of an electrocardiographic reconstruction model, the method including: s1, acquiring a training data set formed by a plurality of training data pairs, wherein each training data pair comprises ECG signal conversion data and fused sensing signal data of a user at the same time, the ECG signal conversion data is obtained by carrying out channel number conversion on ECG signal data acquired by the user according to the channel number of the fused sensing signal data, so that the channel number of the ECG signal conversion data is 1 plus the channel number of the fused sensing signal data; s2, acquiring an electrocardiogram reconstruction model, which is a flow model; s3, training the electrocardiogram reconstruction model by using the training data set, wherein the training comprises a forward reasoning process and a reverse reasoning process, during the forward reasoning process, the electrocardiogram reconstruction model is used for generating synthesized fused sensing signal data and information entropy difference vectors according to the ECG signal conversion data, the information entropy difference vectors indicate information entropy differences between the ECG signal conversion data and the fused sensing signal data, during the reverse reasoning process, the electrocardiogram reconstruction model is used for generating synthesized ECG signal conversion data according to the fused sensing signal data and interpolation vectors randomly sampled from preset probability distribution of the information entropy difference information, and parameters of the electrocardiogram reconstruction model are updated by using information entropy difference losses corresponding to the information entropy difference vectors.
In order to better explain the invention, the following is mainly from the standpoint of electrocardiogram reconstruction, and the following is respectively from the construction of a database, an electrocardiogram reconstruction model, the processing of reconstruction data, the training of the electrocardiogram reconstruction model and the electrocardiogram reconstruction process by combining with the accompanying drawings.
1. Construction of a database
The ECG reconstruction method provided by the embodiment of the invention can realize ECG reconstruction under the condition of the fused sensing signal source with the unfixed channel number. In other words, in the implementation of the present invention, the ECG reconstruction method can satisfy the situation of different input signal channel numbers, that is, the fused sensing signal source can be multiple. According to one embodiment of the invention, the fused sensing signal comprises one or more of a ballistocardiogram signal and a photoplethysmogram signal. In order to facilitate explanation of the construction process of the explanation database in the embodiment of the invention, the history data composed of the ballistocardiogram signal and the photoplethysmogram signal are taken as the integrated sensing signal and the ECG signal required for training the electrocardiogram reconstruction model. The following explains the construction process of the database 407 in combination with the signal acquisition terminal 400 and the data management module 406.
As shown in fig. 1, the signal acquisition terminal 400 includes a data acquisition unit 4001, a data processing unit 4002, and a data transmission unit 4003. The data acquisition unit 4001 in the signal acquisition terminal 400 acquires the subject (subject is also called user) information through the physiological signal sensor at the same time to obtain an ECG signal with the same time and an original data set of the integrated sensing signal composed of the ballistocardiogram signal and the photoplethysmogram signal, and the original data set is sent to the data processing unit 4002 for further processing. The data processing unit 4002 in the signal acquisition terminal 400 may configure different filter cut-off frequencies according to the frequency bandwidth range of the original signal in the original data set, and filter the baseline wander and the high-frequency noise, and the filtered signal data is sent to the data transmission unit 4003. The data transmission unit 4003 may transmit the digitized signal to the data management module 406 through Wifi, bluetooth, or wired or the like.
As shown in fig. 1, the data management module 406 includes a data receiving unit 4061 and a data management unit 4062 according to one embodiment of the invention. The data receiving unit 4061 receives the data (data stream of the base filtered ECG signal and the integrated sensing signal) transmitted by the data transmitting unit 4003 and performs data aggregation. The data receiving unit 4061 sends the collected data to the data management unit 4062 to store and manage the normalized data. The data management unit 4062 may write the received data stream in a data format into the database 407 according to different data channels to form data for training of the ECG reconstruction model and, when implemented, reconstruct the signal data required for the ECG (the fused-in perceptual signal data required for reconstructing the ECG). The data for the training of the ECG reconstruction model is the raw signal data set in the database 407 (raw signal data set is the user's historical data including ECG signal data and fused-in perceptual signal data for the user at a plurality of times). The database 407 also stores information entropy difference information probability distribution preset between the reconstructed source signal (fused sensing signal) and the ECG signal. Specifically, the preset information entropy difference information probability distribution can be understood as setting a deviation information distribution function between the blended sensing signal and the ECG signal. According to one embodiment of the invention, the deviation information distribution function is a gaussian distribution. It should be noted that, a certain data format is understood to be a format suitable for the storage structure of the database 407, and this format is a technology known in the art according to the type of database, and is not described herein.
2. Electrocardiogram reconstruction model
Because the electrocardiogram reconstruction model provided by the embodiment of the invention adopts the generated Flow model, the learning capability of the mapping relation between the fused sensing signal and the ECG signal can be improved. According to one embodiment of the invention, the electrocardiogram reconstruction model adopts a Flow model. As shown in fig. 2, the flow model includes a plurality of cascaded flow model basic building blocks (TimeFlew basic blocks), and adjacent flow model basic building blocks are connected through a convolution layer (1×1 Conv) of 1*1; the stream model foundation building block is configured to generate output data of the stream model foundation building block based on data input thereto. Taking a first flow model basic building block formed by 3 transformation subnetworks as an example, and combining the forward reasoning process and the backward reasoning process of the explanation electrocardiogram reconstruction model of the explanation flow model of fig. 2. In fig. 2, length represents the data Length of the input first stream model basic building block, length/2 represents the data Length of the input first stream model basic building block after being split, F, H, G represents the structure of the first transformation sub-network, the structure of the second transformation sub-network, and the structure of the third transformation sub-network; ☉, et al, denote arithmetic relationships, split denotes the bisection function, concat denotes data merging.
The data flow in the transformation subnetwork of the ith flow model basic building block in forward direction is represented as
The data flow in the sub-transformation network of the l-th flow model basic building block in the reverse direction is expressed as
Wherein, Representing the first piece of data entered by the first flow model basic building block in the forward direction,The input second segment data representing the first stream model building block in forward direction,Representing the first piece of data output by the first stream model building block in forward direction,Representing the second segment of data output by the first stream model building block in the forward direction,Representing the first piece of data input by the ith flow model building block in the reverse direction,Representing the second piece of data input by the first stream model building block in the reverse direction,Representing the first piece of data output by the ith flow model basic building block in the reverse direction,And the second segment data output by the first flow model building block in the reverse direction is represented, F (x) represents the first transformation sub-network, H (x) represents the second transformation sub-network, and G (x) represents the third transformation sub-network.
According to one embodiment of the invention, at least one cyclic neural network is arranged in the electrocardiogram reconstruction model for extracting the time domain characteristics and at least one fully-connected neural network for extracting the space domain characteristics. The structure of the transformation sub-network can adopt the existing structure or the improved structure. Preferably, the model structure of the transformation sub-network F, H, G is the same, the cyclic neural network and the full-connection neural network are used as basic operators, the data stream is firstly conducted through the cyclic neural network operator, the time domain relation in the data stream is extracted, then the output of the cyclic neural network operator is used as the input of the full-connection neural network operator, the spatial domain mapping relation between the reconstructed source signal and the target ECG signal is extracted, and the quality of the reconstructed ECG can be further remarkably improved. As shown in fig. 3, a network structure diagram of the transformation sub-network is shown, where LSTM is shown as a calculation unit in the cyclic neural network for convenience in representing the cyclic neural network, X0, X1, … Xn represent data input into the cyclic neural network, and h0, h1, … hn represent data output from the cyclic neural network. Since the specific structure and function of the recurrent neural network and the fully-connected neural network are known to those skilled in the art, the structure and function of the recurrent neural network and the fully-connected neural network are not described herein in detail.
3. Processing of reconstructed data
During the ECG reconstruction, the data of the database obtained in the first part need to be further processed to adapt to the electrocardiogram reconstruction model and the ECG reconstruction. The embodiment of the present invention continues with the explanation of data processing in conjunction with fig. 1.
The data reading unit 4081 in the ECG reconstruction module 408 is configured to obtain and output a training physiological signal of the detection target, where the training physiological signal is an ECG signal and an integrated sensing signal of the detection target in a plurality of continuous heartbeat cycles, and the training physiological signal can convert signal data (training physiological signal) from a binary format into a data structure (preset data structure) that can be processed by software, and then send the data to the data preprocessing unit 108 for subsequent data preprocessing. Software-processable data structures are understood herein to be conventional in computer processing, as known to those skilled in the art, and are not described herein in detail.
The data preprocessing unit 4082 in the ECG reconstruction module 408 is configured to receive the physiological signal output by the data reading unit, perform preprocessing according to a preset processing manner, obtain and output training start data composed of data pairs of the detection target in each heartbeat cycle, where each data pair is ECG signal data and fused sensing signal data of the detection target in the same heartbeat cycle. Specifically, the data preprocessing unit 4082 is mainly configured to input data (original ECG signal data, PPG signal data, and BCG signal data) trained by the ECG reconstruction model into a required format for the ECG reconstruction model, and refer to the corresponding relationship between the original ECG signal, the PPG signal, the BCG signal waveform, and the cardiac physiological index, that is, the peak point of the R wave of the ECG signal, the trough point of the PPG signal, and the J peak point of the BCG in a time domain alignment; and then cutting the ECG, PPG and BCG signals into heartbeat level (heartbeat period) data according to the alignment points and forming data pairs, and carrying out normalization transformation on each heartbeat level data segment to obtain the data pairs in the training initial data. When performing ECG reconstruction, the source signal (blended sensing signal) PPG signal and the BCG signal are reconstructed, the trough point of the PPG signal and the J peak point of the BCG are aligned in time domain, the aligned data are segmented into heartbeat level (heartbeat period) data, and each heartbeat level data segment is subjected to normalization transformation to obtain data corresponding to the reconstructed source signal when performing ECG reconstruction.
4. Training of electrocardiographic reconstruction models
The training process of the electrocardiographic reconstruction model is explained below in conjunction with fig. 4. In training the electrocardiographic reconstruction model, preferably, the data initialized by the data preprocessing unit 4082 is converted into the channel number to obtain a training data set for training. The training process of the electrocardiographic reconstruction model is mainly explained in detail herein, and the configuration functions of other modules (a model construction unit 4084, a training judgment unit 4085, a model training unit 4086, an ECG reconstruction reasoning unit 4087, and an insertion vector sampling module 4088) of the ECG reconstruction module 408 will be explained in detail in the electrocardiographic reconstruction process below.
Specifically, the training method of the electrocardiographic reconstruction model comprises the following steps: acquiring a training data set formed by a plurality of training data pairs, wherein each training data pair comprises ECG signal conversion data and blending perception signal data of a user at the same time, the ECG signal conversion data is obtained by carrying out channel number conversion on ECG signal data acquired by the user according to the channel number of the blending perception signal data, so that the channel number of the ECG signal conversion data is 1 plus the channel number of the blending perception signal data; acquiring an electrocardiogram reconstruction model, which is a flow model; and training the electrocardiogram reconstruction model by using the training data set, wherein the training comprises a forward reasoning process and a reverse reasoning process, during the forward reasoning process, the electrocardiogram reconstruction model is used for generating synthesized fused sensing signal data and information entropy difference vectors according to the ECG signal conversion data, the information entropy difference vectors indicate information entropy differences between the ECG signal conversion data and the fused sensing signal data, during the reverse reasoning process, the electrocardiogram reconstruction model is used for generating synthesized ECG signal conversion data according to the fused sensing signal data and interpolation vectors randomly sampled from preset probability distribution of the information entropy difference information, and parameters of the electrocardiogram reconstruction model are updated by using information entropy difference losses corresponding to the information entropy difference vectors.
As shown in fig. 4, it should be noted that, the real ECG signal data (ECG signal conversion data) in the data set (i.e., training data set) is input to the Flow reconstruction model (corresponding electrocardiogram reconstruction model), the Flow reconstruction model performs forward reasoning to output a synthesized fused sensing signal and an information entropy difference information vector, the information entropy difference information vector output by the forward reasoning is one of data dimensions calculated and output by the Flow reconstruction model, and the information entropy difference information vector output by the forward reasoning is used for calculating a loss function and training of the model, so that the information entropy difference information is mapped to gaussian distribution; the method comprises the steps of inputting multi-dimensional data obtained by merging sensing signals in a data set and splicing information entropy difference information vectors randomly sampled from an information entropy difference information probability distribution function into a Flow reconstruction model, and carrying out reverse reasoning on the Flow reconstruction model to output a reconstructed ECG; and carrying out loss calculation by taking the reconstructed ECG, the synthesized fused sensing signal and the information entropy difference information vector into a loss function, and updating model weights by using an optimizer.
Each training data pair comprises ECG signal conversion data and blending type sensing signal data of a user at the same time, wherein the ECG signal conversion data is obtained by carrying out channel number conversion on ECG signal data acquired by the user according to the channel number of the blending type sensing signal data, so that the channel number of the ECG signal conversion data is the channel number of the blending type sensing signal data plus 1. According to one embodiment of the invention, the channel number conversion is performed by a reconstructed source channel number adaptive method. Firstly, determining the channel number of the integrated sensing signal data, and then satisfying the condition of different signal channel numbers in the process of reconstructing an ECG signal through a wavelet transformation method. Specifically, when the number of input channels of the integrated sensing signal source is small, shallow-level wavelet transformation is adopted for preprocessing the original ECG signal; when the number of input channels of the fused sensing signal source is increased, the preprocessing of the original ECG signal adopts deeper-level wavelet transformation, so that the number of signal channels of the ECG signal after wavelet transformation corresponds to the number of channels of the fused sensing signal source, and the condition of different input signal channels is met. Specifically, the channel number conversion is to satisfy that the present invention proposes an ECG reconstruction method capable of adapting to different reconstruction source channel numbers, wherein the channel number of the ECG signal conversion data is the channel number of the merged sensing signal data plus 1, i.e. the channel number of the ECG signal conversion data is one channel more than the channel number of the merged sensing signal data, so that the ECG reconstruction model can process the introduced information entropy difference information. In the forward direction pushing, the data after the channel number conversion is subjected to data splicing and then is input into an electrocardiogram reconstruction model for processing; in the inverse direction, interpolation vectors randomly sampled from a predetermined probability distribution of information entropy difference information and fused sensing signal data are subjected to data concatenation and then input into an electrocardiogram reconstruction model for processing (for example, C in fig. 2 represents the data after concatenation).
According to one embodiment of the present invention, the channel number conversion is performed in the following manner: performing a plurality of wavelet transforms on the ECG signal data, each wavelet transform resulting in an approximation component and a detail component; zero value interpolation is respectively carried out on the approximate component and the detail component obtained by the last wavelet transformation and the detail component of the previous wavelet transformation of the last wavelet transformation, so as to obtain ECG signal conversion data. When one kind of fused sensing signal data is selected to perform ECG reconstruction, the ECG signal data is subjected to wavelet transformation once to obtain an approximate component and a detail component, and then ECG signal conversion data is obtained.
The following explains the channel number conversion process, taking the case where the integrated sensing signal is composed of a ballistocardiogram signal and a photoplethysmogram signal. The current embodiment uses 2 fused perceptual signals, the reconstructed source channel number adaptive method performs a secondary wavelet transform on the ECG channels, The ECG signals are represented by phi a,b and phi a,b, which are the approximation function and detail function of the b5 wavelet basis function with a scale a and a translation b, N represents the length of the ECG signal, the translation of the wavelet transform is 0 (i.e. b=0), the transformed scales are 1 and 2, the original ECG signal is taken as input, the transformation with a transformation scale of 1 (i.e. a=1) is performed, the approximation component and the primary detail component are output, the approximation component is taken as input, the transformation with a transformation scale of 2 (i.e. a=2) is performed, the secondary approximation component and the secondary detail component are output, zero value interpolation is performed on the secondary approximation component, the primary detail component and the secondary detail component, the length of the ECG signal is expanded, the wavelet reconstruction is performed, and finally the ECG signal data composed of three channels of the secondary approximation component, the primary detail component and the secondary detail component is converted, and the data structure meeting the requirements of the interface format of the reconstruction model is output. The reconstructed ECG signal data is obtained in the inverse reconstruction process, and the reconstructed ECG signal data obtained by combining the channel numbers is obtained by inverse transformation of the wavelet transformation. It should be noted that the second-level approximation component corresponds to PPG signal component data in the ECG signal data, the first-level detail component corresponds to BCG signal component data in the ECG signal data, and the second-level detail component corresponds to information entropy difference information component data in the BCG signal component data in the ECG signal data. It should be noted that the reconstruction source channel number adaptive method may be configured in the signal type determining unit 4083, and the signal type determining unit 4083 is configured to: adding 1 to the channel number of the integrated sensing signal data as a conversion channel number, and converting the ECG signal data into ECG signal conversion data, wherein the channel number of the ECG signal conversion data is equal to the conversion channel number; the reconstruction source channel number adaptation method may be configured to run in the data preprocessing unit 4082. In the embodiment of the present invention, the data preprocessing unit 4082 is preferably configured to run the above-mentioned reconstruction source channel number adaptive method.
According to one embodiment of the invention, parameters of the electrocardiographic reconstruction model are updated during training based on information entropy difference loss, reconstruction loss between synthesized ECG signal conversion data and ECG signal conversion data, and total loss determined by supervision loss between synthesized and synthesized blended sensing signal data.
According to one embodiment of the invention, the fused perceptual signal data comprises ballistocardiogram signal data and photoplethysmogram signal data, the total loss being determined as follows:
Where L total represents the total loss, ω 1 represents the first hyper-parameter, ω 2 represents the second hyper-parameter, ω 3 represents the third hyper-parameter, Indicating a loss of reconstruction and,Representing synthesized ECG signal conversion data, x ECG represents ECG signal conversion data, Indicating a loss of supervision of the device,A first supervision loss corresponding to the ballistocardiogram signal data is represented,Representing the composite ballistocardiogram signal data, x BCG representing the ballistocardiogram signal data,Representing a second supervised loss corresponding to the photoplethysmography signal data,Representing the synthesized photoplethysmogram signal data, x PPG representing photoplethysmogram signal data, T representing the information entropy difference loss.
According to one embodiment of the present invention, the information entropy difference loss is determined based on a similarity between a probability distribution of an information entropy difference vector of each training data and a preset gaussian probability distribution and the information entropy difference loss is calculated by the following rule:
Wherein CrossEntropy (x) denotes the cross entropy function, p (z) is the probability distribution of the information entropy difference vector z, Represents the probability distribution of the input ECG signal data,The value of z is represented asProbability at time, the expression form of T is transformed into a variation form of cross entropy for the first timeThe expression form of T is transformed into the second time by using the forward distributionQ (ECG) represents probability distribution of input ECG signal data, and information entropy difference loss T representsSimilarity of predicted Z distribution to true Z distribution E q(ECG) represents the actual probability similarity expected of Z probability of flow model reasoning output with all ECGs observed as inputs with unknown ECG probability distribution q (ECG).
According to one embodiment of the present invention, the information entropy difference loss is equal to the average value of the information entropy difference vector obtained for each training data pair, and the information entropy difference loss is calculated by the following rule:
where M represents the number of training data pairs, k represents the kth training data pair in the training data set, N represents the length of BCG, PPG, ECG data in one data pair, And the interpolation vector which represents the forward reasoning output of the flow model.
Taking the probability distribution of the information entropy difference vector z as a one-dimensional Gaussian distribution (namely standard normal distribution) as an example, the explanation formula is as follows:
we substituting μ=0, σ=1 into the above formula, we can obtain:
p (z) is the probability distribution of the information entropy difference vector z corresponding to f (x) in formula (2), then the information entropy difference loss formula (1) is introduced:
While in the process of calculating the loss function As a constant can be ignored, z in the formula (3) is replaced byAnd deducing a subsequent loss calculation formula:
When (when) Represented in discrete form and the number of training data pairs is M,
When constructing a loss with one data to the corresponding data, according to one embodiment of the present invention, the total loss is determined as follows:
Where N represents the length of BCG, PPG, ECG data in a pair, And the interpolation vector which represents the forward reasoning output of the flow model.
5. Electrocardiogram reconstruction process
The electrocardiographic reconstruction process is described in its entirety from a method flow point of view in conjunction with fig. 5. As shown in fig. 5, the specific procedure of the electrocardiographic reconstruction method is as follows: step 201 is a starting step, where the signal acquisition terminal performs data acquisition and data filtering, and transmits the data to the data management module through the data transmission module. In step 202, the data management module receives data and stores the data in a data set. In step 203, it is determined whether the model training needs to be performed, where the indexes used for determining are the relative root mean square error (Relative Root Mean Square Error) and the pearson correlation coefficient (Pearson Correlation Coefficient), and the criterion is whether the index reaches the test result on the test set in the model convergence state, if the criterion is not reached (the training determination result is that the training needs to be performed), then step 204 is executed; if model use is required, step 211 is performed; in step 204, the system determines whether the data collected by the data management module is sufficient for training the ECG reconstruction model, if not, the system returns to step 201 to continue collecting data, if so (for example, 5 hours of data), the system proceeds to step 205 to read the collected data set, perform preprocessing processes of filtering, aligning, slicing and normalizing the data, perform wavelet transform decomposition on the ECG signal, and finally output the ECG signal to meet the input and output format requirements of the Flow-based reconstruction model. Step 206 mainly performs training set and test set division on the preprocessed ECG signal and the fused sensing signal data segment for subsequent reconstruction model training. In step 207, a Flow-based electrocardiographic reconstruction model is mainly constructed and initialized, and a base component such as an optimizer for model training is constructed. The system then uses the data set and the optimizer to adjust the weights of the reconstructed model for model training in step 208. In step 209, the system determines whether the reconstructed model converges, i.e. whether the reconstructed model can reconstruct the test set to obtain a high-quality ECG signal, if the reconstructed model does not converge, returns to step 208 to continue training the reconstructed model, and if the reconstructed model converges, proceeds to step 210 to store the model structure and model weight data. If the system selects the model usage mode, step 211 is entered. In step 211, the system reads the fused sensing signal and performs data preprocessing to construct a data set meeting the requirements of the input format of the reconstruction model, and then proceeds to step 212 to perform model reasoning. In step 212, the system reads the model structure and the weight data of the model stored in step 210, and updates the model reconstruction model by using the model weight data to obtain a trained electrocardiogram reconstruction model; the reconstruction model only needs to acquire the randomly sampled difference vector (also called interpolation vector in the case of discrete data) and the fused sensing signal source obtained in step 211 and uses the fused sensing signal source as input, and the trained electrocardiogram reconstruction model can be used for outputting high-quality reconstruction ECG.
The electrocardiographic reconstruction process is described in its entirety from a systematic point of view in conjunction with fig. 1. As shown in fig. 1: the reconstruction process of the ECG reconstruction system is as follows: the data acquisition unit 4001 of the signal acquisition terminal 400 acquires subject information through the physiological signal sensor to obtain the original data of the ECG and the integrated sensing signal, and the original data is sent to 4002 for further processing. The data processing unit 4002 in the signal acquisition terminal 400 may configure different filtering cut-off frequencies according to the frequency bandwidth range of the original signal, filter the baseline wander and the high-frequency noise, and send the filtered signal to the data transmission unit 4003. The data transmission unit 4003 may transmit the digitized signals to the data receiving unit 4061 for data summarization by Wifi, bluetooth, or wired or the like. The data receiving unit 4061 receives the data stream of the ECG signal and the integrated sensing signal subjected to the basic filtering, and sends the data stream to the data management unit 4062 for normalized data storage and management. The data management unit 4062 may write the received data stream in a data format to the database 407 according to different data channels to form a data set for training of the ECG reconstruction model. When the data amount of the database 407 is sufficient (in step 204), for example, 5 hours of data, the data is preferably fed into the data reading unit 4081 for data reading for subsequent model training. The data reading unit 4081 may read data from the data set storing the original signal and output to the data preprocessing unit 4082 for subsequent data preprocessing according to a specific data structure. The data preprocessing unit 4082 is used for realizing data filtering, aligning signals by referring to the corresponding relation between different signals and heart activities and dividing the signals into heartbeat data segments and normalized transformation of the signals mainly according to the bandwidth information of the ECG signals and the fused sensing signals; After preprocessing is completed, the signal type judging unit 4083 is invoked to execute a reconstruction source channel number adaptive method (i.e., perform a channel number conversion operation), wherein the ECG signal is converted into a plurality of channels of an approximation component and a detail component by wavelet transformation according to the channel number input by the blended sensing signal, wherein the approximation component corresponds to the blended sensing signal, i.e., the low frequency information, the detail component corresponds to the information entropy difference signal, i.e., the high frequency signal, and the wavelet channels are combined in the data dimension according to the correspondence between the wavelet components and the blended sensing signal and the information entropy difference signal, when the number of input channels of the blended sensing signal source is small, The preprocessing of the original ECG signal adopts shallow-level wavelet transformation, when the number of input channels of the fused sensing signal source is increased, the preprocessing of the original ECG signal adopts deeper-level wavelet transformation, a data structure meeting the interface format requirement of a flow model reconstruction method is generated, the input of the fused sensing signal source of a variable channel is supported, and the accuracy and the efficiency of ECG reconstruction are improved. The processed data pair is sent to a model construction unit 4084, which mainly initializes a basic operator layer and connects the operator layers of the Flow-based ECG reconstruction model, initializes a model training optimizer, defines a loss function, encapsulates the data according to the format requirement read by the reconstruction model, constructs a completed model, the optimizer and a data packet, and sends the data packet to a training judgment unit 4085, and the training judgment unit 4085 mainly judges whether the reconstruction model training is needed, if the model training is needed, packages the reconstructed model, the optimizer and the data packet to a training unit 4086 for subsequent model training. The model training unit 4086 mainly uses the formatted ECG signal and the fused perceptual signal data to perform training adjustment on the weight of the reconstructed model, so that the reconstructed model can gradually output a high-quality reconstructed ECG signal, and after the model converges, the trained reconstructed model is transferred to the ECG reconstruction reasoning unit 4087 for use in an ECG reconstruction use scene. The ECG reconstruction inference unit 4087 mainly reads the fused sensing signal and the insertion vector sampling module 4088 samples the information entropy difference information probability distribution preset between the reconstructed source signal (fused sensing signal) and the ECG signal to generate an insertion vector, and outputs a high-fidelity reconstructed ECG for health monitoring.
The electrocardiographic reconstruction process will be explained below with reference to fig. 7 and 8 from the application point of view. In this embodiment, a Flow-based ECG reconstruction method is shown by taking BCG, PPG joint acquisition, input to an ECG reconstruction model, and then output of a reconstructed ECG as an example.
As shown in fig. 7, an ECG acquisition terminal 401 is provided with a signal acquisition terminal 400 for acquiring ECG signals and responsible for signal transmission; the PPG smart watch 402 is provided with a signal acquisition terminal 400 for acquiring PPG signals and responsible for signal transmission; the BCG acquisition scale 403 is provided with a signal acquisition terminal 400 for acquiring BCG signals and responsible for signal transmission; the 404 notebook and 405 smartphones are responsible for deploying the data management module 406, storing the data set 407 (i.e. database) and running the ECG reconstruction module 408. In general scenarios, especially those involving daily health monitoring, exercise status recording, and physiological index monitoring during operation, the ECG acquisition terminal 401 does not have the characteristics of convenient, interference-free, and effective application, because the user needs to perform other activities such as exercise, running, and working while wearing the health monitoring device in these scenarios. It is desirable to acquire high quality ECG signals in these scenarios that a complete ECG reconstruction system needs to be built first, and then high quality ECG signals can be acquired in the application by wearing only the smart watch 402 and using the BCG acquisition scale 403.
The data acquisition unit in the ECG acquisition terminal 401 comprises ECG acquisition electrodes, an operational amplifier and an ADC analog-to-digital converter, acquires ECG electrocardiogram data of the current wearer, and the ECG raw data is sent to the data processing unit in the ECG acquisition terminal 401 for further processing. The data processing unit in the ECG acquisition terminal 401 filters the baseline drift generated by the wire disturbance and the high-frequency noise caused by the surrounding environment by adopting the FIR filter with the cut-off frequency of 0.3Hz to 40Hz according to the signal spectrum distribution of the ECG, and the filtered ECG signal is sent to the data transmission unit in the ECG acquisition terminal 401. The data transmission unit in the ECG acquisition terminal 401 selects bluetooth as a wireless transmission mode to transmit the digitized ECG signal to the notebook computer 404 for data summarization and subsequent use.
And the data acquisition unit in the PPG acquisition intelligent watch senses the PPG data of the current wearer by using a PPG sensor, and the PPG raw data is sent into the data processing unit in the PPG acquisition intelligent watch for further processing. And the data processing unit in the PPG acquisition intelligent watch filters baseline drift generated by wire disturbance and high-frequency noise caused by surrounding environment according to the signal spectrum distribution of the PPG by adopting a Butterworth filter with the cut-off frequency of 1Hz to 8Hz as a current filter, and the filtered PPG signal is sent to the data transmission unit in the PPG acquisition intelligent watch. The data transmission unit in the PPG acquisition smart watch preferably uses Bluetooth as a wireless transmission mode to transmit the digitized PPG signal to a 404 notebook computer for data summarization and subsequent use.
The data acquisition unit in the BCG acquisition scale senses the BCG data of the current subject by utilizing the tiny change of the load sensor, the BCG raw data is sent to the data preprocessing unit in the BCG acquisition scale, the current filter adopts an FIR filter with the cut-off frequency of 0.5Hz to 20Hz according to the signal spectrum distribution of the BCG, noise in the BCG signal is filtered, the filtered BCG signal is sent to the data transmission unit in the BCG acquisition scale, and the digitized BCG signal is transmitted to the 404 notebook computer for data summarization and subsequent use by taking Bluetooth as a wireless transmission mode.
In this embodiment, the notebook computers 404 and 405 are responsible for the deployment of the data management module 406, the storage of the data set 407, and the operation of the ECG reconstruction module 408. The data management module 406 collects ECG, PPG and BCG data from 401, 402, 403 by using a bluetooth receiver, time synchronizes the data of the three channels, then sends the data to the 4061 data management unit for normalized data storage and management, and the 407 data storage and management is performed by using a MySQL database to update the 407 data set for training the ECG reconstruction model. The ECG reconstruction module 408 includes a data reading unit 4081, a data preprocessing unit 4082, a signal type judging unit 4083, a model building unit 4084, a training judging unit 4085, a model training unit 4086, an ECG reconstruction reasoning unit 4087, wherein the data reading unit 4081 is software running in a notebook computer and used for reading ECG, PPG and BCG signal data sets from a memory, can convert signal data from a binary format into a software processable data structure, and then send the data into the data preprocessing unit 4082 for subsequent data preprocessing, wherein the data is mainly used for processing original ECG, PPG and BCG data into a format required by model input, and firstly, the corresponding relation between ECG, PPG and BCG waveforms and cardiac physiological indexes is referred to, so that R waves of the ECG, wave valley points of the PPG and J waves of the BCG are aligned in time domain; then cutting ECG, PPG and BCG signals into heart beat grade data according to the alignment points, forming data pairs, and carrying out normalization transformation according to the heart beat grade data fragments; the signal type judgment unit 4083 determines from the reconstructed source channel number adaptive method that the current embodiment uses 2 fused perceptual signals, performs a secondary wavelet transform on the ECG channel, The ECG signals are represented by phi a,b and phi a,b, which are the approximation function and detail function of the b5 wavelet basis function with a scale a and a translation b, respectively, N represents the length of the ECG signal, the translation of the wavelet transform is 0 in this embodiment, the scales of the transform are 1 and 2, the original ECG signal is input first, the transform with the transform scale 1 is performed, the approximation component and the primary detail component are output, the approximation component is input, the transform with the transform scale 2 is performed, the secondary approximation component and the secondary detail component are output, the zero value interpolation is performed on the secondary approximation component, the primary detail component and the secondary detail component, the data of the ECG is expanded, the wavelet reconstruction is performed, the data structure conforming to the interface format requirement of the reconstruction model is output, and the data structure is sent to the model construction unit 4084. The model construction unit 4084 mainly initializes and connects the basic operator layers of the Flow-based ECG reconstruction model, and the model is composed of a plurality of Flow model basic building blocks TimeFlow and 1x1conv convolution layers, let x ECG、xBCG、xPPG represent the ECG signal path, BCG signal path, and PPG signal path, respectively, let z represent the interpolation information path, where z-p (z) are preset probability distributions of the interpolation information, gaussian distribution is selected as the preset probability distribution in this embodiment, and x ECG~p(xECG|xBCG,xPPG) ECG signal is a conditional probability distribution depending on BCG signal and PPG signal. Order theRepresenting the reconstructed ECG signal, the synthesized BCG signal path and the synthesized PPG signal path, respectively. Flow-based ECG reconstruction model maps x ECG to in the forward propagation processAnd an interpolation vector z, which is randomly sampled from a preset Gaussian distribution and reconstructed with the original x BCG、xPPG in a reverse reasoning processThe forward propagation process can be expressed asThe reverse reasoning process can be expressed asIn this embodiment f θ is composed of a plurality of stacked reversible basic blocks f i, i.e. TimeFlow. The flow process of ECG data at these basic blocks can be described as: Wherein h i is the temporary output of the basic blocks of the model middle layer TimeFlow, L is the stacking number of the basic blocks of the stream model, the larger the stacking number of the basic blocks is, the stronger the characterization capability of the model is, and meanwhile, the more time is consumed in the model training and reasoning process, and the embodiment is set to 50, so that high-quality ECG reconstruction can be realized and the reasonable reasoning duration can be maintained. The reverse reasoning process of the Flow-based reconstruction model can be described as: Wherein f i -1 represents the reverse derivation of TimeFlow basic block, which ensures the reversibility of the model, builds the mapping relation of ECG and BCG, PPG in the reversibility frame, satisfies the relevance of three signals in the perception principle, the ECG signals perceive the electric activity signal of the heart, the PPG and BCG both perceive the body organ change caused by the heart beating, and the source of the change of the body organ is also the electric activity of the heart. Wherein the data flow process of TimeFlow basic blocks can be expressed as: Wherein F (), H (), G (), are three sub-neural networks with the same structure for constructing TimeFlow, and mainly comprise a cyclic neural operator and a full-connection operator, in this embodiment, the cyclic neural operator is a long-short-time memory unit (LSTM), the initial operator of the sub-neural network is a cyclic neural operator with a hidden unit dimension of 200, the follow-up is three cascaded full-connection operators, the number of units of the first-stage full-connection operator and the second-stage full-connection operator is 200, and the number of units of the last-stage full-connection operator is 125, which is consistent with the dimension of the heartbeat data end of ECG, BCG, PPG. After the model is built, the system configures an optimizer used for model training, and in the embodiment, the Adam optimizer is configured, and meanwhile, the learning rate parameter is configured to be 0.0005, and the weight attenuation parameter is configured to be 0.0001. The loss function of the Flow-based reconstruction model in this embodiment is composed of three parts: monitoring loss, namely during forward reasoning of the model, the synthesized PPG and BCG of the model are as follows: Should be approximately consistent in waveform with the original PPG and BCG; reconstruction loss to generate high quality reconstructed ECG, the Flow-based reconstruction model outputs reconstructed ECG in the reverse reasoning process, i.e. Should be consistent with the raw ECG approximation; stability loss (also referred to as information entropy difference loss), in order to enable a Flow-based reconstruction model to stably update a model gradient in a training process, a stability loss (also referred to as information entropy difference loss) is constructed by using the cross entropy of the information entropy difference vector. The total loss function used by the system is expressed as: Where ω 1,ω2,ω3 is the weight coefficient constant, q (ECG) is the distribution of the input ECG, p (z) is the probability distribution of the information entropy difference vector z, The value of z is represented asProbability at time, wherein the third term stability loss (also called information entropy difference loss) representsSimilarity of predicted z distribution to true z distribution E q(ECG) represents the actual probability similarity expected of z probability of the flow model reasoning output with all ECGs observed as inputs with unknown ECG probability distribution q (ECG). The total loss function used by the system consists of the root mean square error of the reconstructed ECG and the original ECG, the root mean square error of the synthesized PPG and the original PPG, the synthesized BCG and the original BCG and the cross entropy of the information entropy difference vector. The constructed electrocardiographic reconstruction model, the optimizer, the loss function and the data packet are transmitted to the training judgment unit 4085, and the training judgment unit 4085 judges that training is needed, and the model training unit 4086 performs subsequent model training.
The model training unit 4086 firstly divides the preprocessed ECG, BCG and PPG data sets into a training set and a testing set, and in this embodiment, the training set and the testing set are divided by a ratio of 8:2; using training data set as input, firstly carrying out forward process propagation based on Flow reconstruction model, outputting synthesized BCG and synthesized PPG and predicted interpolation vector, recording the synthesized BCG and synthesized PPG and predicted interpolation vector by the system; then taking original BCG, PPG and interpolation vector as input, carrying out reverse process propagation on the Flow-based reconstruction model, and outputting a reconstruction ECG; the system calculates a loss function by using the synthesized BCG, the synthesized PPG, the interpolation vector and the reconstructed ECG, then the system calculates the weight update gradient of the reconstructed model based on the loss, and the optimizer uses the gradient information to update and adjust the weight, namely the training process of the model. After model training is completed, the training judgment unit 4085 performs model evaluation by using the divided test set, if the model converges, the model training is stopped, and the model and the updated model weight are output to the ECG reconstruction inference unit 4087 for ECG reconstruction of the usage scenario; if the model does not converge, the model training process described above continues. In this embodiment, the ECG reconstruction inference unit 4087 mainly reads BCG and PPG signals and the interpolation vector sampling module 4088 samples based on a preset interpolation vector distribution function to obtain an interpolation vector as an input of the ECG reconstruction inference unit 4087, performs model inference, and outputs a high-fidelity reconstructed ECG for health monitoring.
As shown in fig. 6, a preferred implementation of the ECG reconstruction method is:
step 601: the ECG acquisition terminal, the PPG acquisition intelligent watch and the BCG acquisition scale respectively acquire ECG, PPG, BCG data by utilizing sensors integrated with the ECG acquisition terminal, filter the data, and then transmit the data to a data management module at a computer end.
Step 602: the data management module of the computer end receives data from the ECG acquisition terminal, the PPG acquisition intelligent watch and the BCG acquisition scale and stores the collected data into the memory of the computer end.
Step 603: it is determined whether the electrocardiographic reconstruction model needs to be trained, if so, step 604 is performed, and if not, step 611 is performed.
Step 604: judging whether the data volume of the data set stored by the computer end is enough for training of the reconstruction model, if the data volume is insufficient, returning to the step 601 to continuously acquire ECG, PPG, BCG data; if the amount of data is sufficient, then step 604 is entered for subsequent data processing.
Step 605: and the ECG reconstruction module at the computer end reads the stored data set, respectively preprocesses ECG, PPG, BCG data, and finally outputs data meeting the input format requirement of the electrocardiogram reconstruction model.
Step 606: the system divides the training set and the testing set for the data sample after preprocessing according to the proportion of 8:2.
Step 607: and constructing an electrocardiogram reconstruction model based on Flow, randomly initializing weights of the electrocardiogram reconstruction model, constructing an Adam optimizer, and setting learning rate and weight attenuation parameters.
Step 608: firstly, taking an original ECG as input by using a training set as input, carrying out forward process reasoning by using an electrocardiogram reconstruction model, and outputting synthesized PPG and BCG; then, taking the original BCG and the original PPG as inputs, carrying out reverse process reasoning on an electrocardiogram reconstruction model, and outputting a reconstructed ECG; and inputting the output and the original data into a loss function calculation formula to calculate a loss value, calculating an update gradient of the model by using the loss value, and updating the weight of the reconstructed model.
Step 609: testing whether the electrocardiographic reconstruction model is converged by using the test set, and if so, entering step 610; if not, returning to the step 608 to continue electrocardiographic reconstruction model training;
Step 610: and storing the Flow-based reconstructed model structure and updated electrocardiographic reconstructed model weight data at a computer end.
Step 611: entering a model deployment flow, firstly, transmitting an electrocardiogram reconstruction model structure and electrocardiogram reconstruction model weight data stored by a computer end to a mobile phone end, and then, after PPG and BCG data are collected, using a model to reconstruct the reasoning of the ECG by the mobile phone end.
Step 612: the PPG acquisition intelligent watch acquires PPG signals and sends the PPG signals to the mobile phone end through Bluetooth, the BCG acquisition scale acquires BCG signals and sends the BCG signals to the mobile phone end through Bluetooth, and the data management module of the mobile phone end collects PPG data and BCG data.
Step 613: and the ECG reconstruction module at the mobile phone end reads the PPG and BCG data and performs data preprocessing, and processes the PPG and BCG data into a data structure meeting the input requirement of an electrocardiogram reconstruction model.
Step 614: the mobile phone reads the Flow-based reconstruction model structure and model weight data, starts reasoning by taking PPG and BCG data as input reconstruction models, and finally outputs reconstruction ECG (see FIG 8 for details).
In summary, the present invention provides a complete ECG reconstruction system, which includes a data set acquisition process required for constructing an ECG reconstruction method, training of an ECG reconstruction model, and deployment of the model, and provides a complete and feasible ECG reconstruction process. The ECG reconstruction system provides a complete data set acquisition flow, and comprises the steps of selecting signal acquisition equipment, setting acquisition parameters, preprocessing acquired data and the like, so that the quality and the reliability of the data set are ensured. The ECG reconstruction system uses the technical framework based on the Flow model to construct the ECG reconstruction model, and the training process comprises the steps of dividing a data set, realizing a model structure, setting a loss function aiming at the Flow model, designing a super-parameter of the model and the like, so that the accuracy and generalization performance of the model can be improved. The ECG reconstruction system provides a complete model deployment flow, which comprises the steps of model issuing, data flow design of deployment environment and the like, and ensures that the model can stably run in an actual environment.
It should be noted that, although the steps are described above in a specific order, it is not meant to necessarily be performed in the specific order, and in fact, some of the steps may be performed concurrently or even in a changed order, as long as the required functions are achieved.
The present invention may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present invention.
The computer readable storage medium may be a tangible device that retains and stores instructions for use by an instruction execution device. The computer readable storage medium may include, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing.
The foregoing description of embodiments of the invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvements in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (12)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2023105154715 | 2023-05-09 | ||
| CN202310515471 | 2023-05-09 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118924304A true CN118924304A (en) | 2024-11-12 |
Family
ID=93355462
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310645318.4A Pending CN118924304A (en) | 2023-05-09 | 2023-06-02 | Training method of electrocardiogram reconstruction model, electrocardiogram reconstruction method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118924304A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120241093A (en) * | 2025-06-05 | 2025-07-04 | 福建智康云医疗科技有限公司 | An AI-based ECG diagnostic model system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101828917A (en) * | 2010-05-07 | 2010-09-15 | 深圳大学 | Method and system for extracting electrocardiosignal characteristic |
| CN108603922A (en) * | 2015-11-29 | 2018-09-28 | 阿特瑞斯公司 | Automatic cardiac volume is divided |
| US20200196897A1 (en) * | 2018-12-20 | 2020-06-25 | Imec Vzw | Method for generating a model for generating a synthetic ecg and a method and system for analysis of heart activity |
| CN111759304A (en) * | 2020-07-01 | 2020-10-13 | 杭州脉流科技有限公司 | Electrocardiogram abnormity identification method and device, computer equipment and storage medium |
| KR20220105092A (en) * | 2021-01-19 | 2022-07-26 | 금오공과대학교 산학협력단 | Continuous blood pressure measurement method by inputting the difference between electrocardiogram and the photoplethysmography signal into artificial neural network |
-
2023
- 2023-06-02 CN CN202310645318.4A patent/CN118924304A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101828917A (en) * | 2010-05-07 | 2010-09-15 | 深圳大学 | Method and system for extracting electrocardiosignal characteristic |
| CN108603922A (en) * | 2015-11-29 | 2018-09-28 | 阿特瑞斯公司 | Automatic cardiac volume is divided |
| US20200196897A1 (en) * | 2018-12-20 | 2020-06-25 | Imec Vzw | Method for generating a model for generating a synthetic ecg and a method and system for analysis of heart activity |
| CN111759304A (en) * | 2020-07-01 | 2020-10-13 | 杭州脉流科技有限公司 | Electrocardiogram abnormity identification method and device, computer equipment and storage medium |
| KR20220105092A (en) * | 2021-01-19 | 2022-07-26 | 금오공과대학교 산학협력단 | Continuous blood pressure measurement method by inputting the difference between electrocardiogram and the photoplethysmography signal into artificial neural network |
Non-Patent Citations (1)
| Title |
|---|
| PENG WANG, XI HUANG, LI CUI: "IR-ECG: INVERTIBLE RECONSTRUCTION OF ECG", ICASSP 2023-2023 IEEE INTERNATIONAL CONFERENCE ON ACOUSTICS, SPEECH AND SIGNAL PROCESSING, 5 May 2023 (2023-05-05), pages 1 - 4 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120241093A (en) * | 2025-06-05 | 2025-07-04 | 福建智康云医疗科技有限公司 | An AI-based ECG diagnostic model system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Zhou et al. | Electrocardiogram soft computing using hybrid deep learning CNN-ELM | |
| US12243624B2 (en) | Discovering novel features to use in machine learning techniques, such as machine learning techniques for diagnosing medical conditions | |
| CN110537910B (en) | Coronary heart disease noninvasive screening system based on electrocardio and heart sound signal joint analysis | |
| CN112806977B (en) | Physiological parameter measuring method based on multi-scale fusion network | |
| JP2020530933A (en) | Discovery of the genome used in machine learning methods | |
| CN113116321A (en) | Non-invasive continuous blood pressure measuring system based on PSO-GRNN neural network | |
| CN110367936B (en) | Electrocardiosignal detection method and device | |
| WO2018149147A1 (en) | Method and apparatus for extracting respiration rate | |
| CN113180684B (en) | II-lead electrocardiosignal classification method | |
| Parsaoran et al. | Study of denoising algorithms on photoplethysmograph (PPG) signals | |
| CN118924304A (en) | Training method of electrocardiogram reconstruction model, electrocardiogram reconstruction method and system | |
| Chowdhury et al. | ECG waveform generation from radar signals: A deep learning perspective | |
| Yoshizawa et al. | Investigation of data leakage in deep-learning-based blood pressure estimation using photoplethysmogram/electrocardiogram | |
| CN114391824A (en) | A heart rate estimation method based on PPG signal, electronic device and storage medium | |
| Breesha et al. | Automated extraction of fetal ECG signal features using twinned filter and integrated methodologies | |
| Sathawane et al. | Prediction and analysis of ECG signal behaviour using soft computing | |
| Fedotov et al. | Analysis of the parameters of frequency filtering of an electrocardiograph signal | |
| CN116369911B (en) | Cardiac information detection method, device and equipment based on physiological signal | |
| Nallikuzhy et al. | Spatially enhanced ECG using patient-specific dictionary learning | |
| Hassanuzzaman et al. | End to end solution for continuous monitoring and real-time analysis of vital signs from ecg signal | |
| CN115105085B (en) | Classification method of twelve-lead electrocardiogram based on automatic deep convolution learning model | |
| Gupta et al. | ECG signal analysis using emerging tools in current scenario of health informatics | |
| Chakrabarty et al. | MRFO Based LU-Net Approach and Sparsity-Assisted Signal Smoothing for ECG Signal Denoising | |
| CN111345815B (en) | Method, device, equipment and storage medium for detecting QRS wave in electrocardiosignal | |
| Wang et al. | Photoplethysmography-based heart action monitoring using a growing multilayer network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |