CN116849676A - Electrocardiogram scoring method and device, electronic equipment and storage medium - Google Patents

Electrocardiogram scoring method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116849676A
CN116849676A CN202310884118.4A CN202310884118A CN116849676A CN 116849676 A CN116849676 A CN 116849676A CN 202310884118 A CN202310884118 A CN 202310884118A CN 116849676 A CN116849676 A CN 116849676A
Authority
CN
China
Prior art keywords
electrocardiogram
data
data set
scoring
electrocardiographic
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
Application number
CN202310884118.4A
Other languages
Chinese (zh)
Inventor
王进亮
陈力恒
王平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cardiocloud Medical Technology Beijing Co ltd
Original Assignee
Cardiocloud Medical Technology Beijing Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Cardiocloud Medical Technology Beijing Co ltd filed Critical Cardiocloud Medical Technology Beijing Co ltd
Priority to CN202310884118.4A priority Critical patent/CN116849676A/en
Publication of CN116849676A publication Critical patent/CN116849676A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7221Determining signal validity, reliability or quality
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Physics & Mathematics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Veterinary Medicine (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Signal Processing (AREA)
  • Cardiology (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The application discloses an electrocardiogram scoring method, an electrocardiogram scoring device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring target electrocardiogram data; preprocessing the target electrocardiogram data to obtain a preprocessed data set; scoring and marking the preprocessed data set to obtain a marked data set; training the constructed electrocardiogram scoring model according to the marking data set to obtain a trained electrocardiogram scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network; and acquiring electrocardiogram data to be calculated, and inputting the electrocardiogram data to be calculated into the electrocardiogram grading model to carry out electrocardiogram grading processing to obtain grading results. The embodiment of the application improves the accuracy and the robustness of the electrocardiographic health score by constructing the electrocardiographic scoring model, and can be applied to the technical field of electrocardiographic signal processing.

Description

Electrocardiogram scoring method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of electrocardiosignal processing, in particular to an electrocardiograph scoring method, an electrocardiograph scoring device, electronic equipment and a storage medium.
Background
Electrocardiographic health scoring is a method for quantitatively evaluating heart conditions of users, and has wide application fields. With the improvement of the living standard of substances, people pay more attention to the health condition of the people, and hope to be able to carry out heart diagnosis and treatment evaluation and rehabilitation monitoring in a home scene. However, due to the professionality of electrocardiograms, it is difficult for users lacking relevant expertise to compare relevant parameters and to derive a correct diagnostic report. In the related art, the collected massive wearable electrocardiograph data are uploaded to the cloud for analysis by cardiologists, but the method is time-consuming and labor-consuming, has high cost and greatly increases the workload. In view of the foregoing, there is a need for solving the technical problems in the related art.
Disclosure of Invention
In view of the above, the embodiments of the present application provide an electrocardiogram scoring method, an electrocardiogram scoring device, an electronic device and a storage medium, so as to achieve the above-mentioned advantages.
In one aspect, the present application provides an electrocardiographic scoring method, the method comprising:
acquiring target electrocardiogram data;
preprocessing the target electrocardiogram data to obtain a preprocessed data set;
scoring and marking the preprocessed data set to obtain a marked data set;
training the constructed electrocardiogram scoring model according to the marking data set to obtain a trained electrocardiogram scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network;
and acquiring electrocardiogram data to be calculated, and inputting the electrocardiogram data to be calculated into the electrocardiogram grading model to carry out electrocardiogram grading processing to obtain grading results.
Optionally, the preprocessing the target electrocardiogram data to obtain a preprocessed data set includes:
screening the target electrocardiogram data according to an electrocardiogram health score standard to obtain screening data;
filtering and denoising the screened data, and carrying out standardization processing on the filtered and denoised data to obtain standard data;
and carrying out data amplification processing on the standard data to obtain a preprocessed data set.
Optionally, the performing data amplification processing on the standard data to obtain a preprocessed data set includes:
performing translation, scaling and random clipping processing on the standard data on a time domain and a frequency domain to obtain an amplification data set;
and performing tensor conversion processing on the amplified data set to obtain a preprocessed data set.
Optionally, the scoring and marking the preprocessed data set to obtain a marked data set includes:
marking and grading the preprocessed data set to obtain a data set grade;
and taking the data set score as a label of the preprocessing data set to obtain a marked data set.
Optionally, before the training process is performed on the constructed electrocardiogram scoring model according to the marking data set, the method further includes constructing an electrocardiogram scoring model, which specifically includes the steps of:
connecting a convolution layer module through a Gaussian error linear unit activation function and a normalization layer to obtain the CNN feature extractor, wherein the convolution layer module comprises a multi-scale convolution unit;
and carrying out residual structure cross-layer connection processing on the CNN feature extractor and the transducer neural network, and constructing to obtain an electrocardiogram scoring model.
Optionally, the training process for the electrocardiographic scoring model according to the marking data set includes:
inputting the marked data set into the electrocardiogram grading model to obtain an electrocardiogram grading prediction result;
determining a trained loss value according to the electrocardiogram score prediction result and the label of the marked data set;
and updating parameters of the electrocardiographic scoring model according to the loss value.
Optionally, inputting the electrocardiographic data to be calculated into the electrocardiographic scoring model for electrocardiographic scoring processing to obtain scoring results, including:
downsampling and feature extraction processing are carried out on the electrocardiogram data to be calculated through the CNN feature extractor, so that data features are obtained;
and carrying out position coding, multi-head self-attention calculation and multi-layer perceptron operation processing on the data characteristics through the transducer neural network to obtain a grading result.
In another aspect, an embodiment of the present application further provides an electrocardiographic scoring device, including:
a first module for acquiring target electrocardiographic data;
the second module is used for preprocessing the target electrocardiogram data to obtain a preprocessed data set;
the third module is used for carrying out scoring and marking processing on the preprocessed data set to obtain a marked data set;
a fourth module, configured to perform training processing on the constructed electrocardiographic scoring model according to the marker dataset, so as to obtain a trained electrocardiographic scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network;
and a fifth module, configured to obtain electrocardiographic data to be calculated, input the electrocardiographic data to be calculated into the electrocardiographic scoring model for electrocardiographic scoring processing, and obtain a scoring result.
On the other hand, the embodiment of the application also discloses electronic equipment, which comprises a processor and a memory;
the memory is used for storing programs;
the processor executes the program to implement the method as described above.
In another aspect, embodiments of the present application also disclose a computer readable storage medium storing a program for execution by a processor to implement a method as described above.
In another aspect, embodiments of the present application also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the foregoing method.
Compared with the prior art, the technical scheme provided by the application has the following technical effects: according to the embodiment of the application, the depth features of the electrocardiogram data are effectively extracted through the CNN feature extractor in the electrocardiogram scoring model, and the long-time signal modeling is performed by using the transducer neural network, so that the understanding and evaluation capability of the model on the heart condition are further improved, and the accuracy and the robustness of the electrocardiogram health scoring are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an electrocardiogram scoring method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an electrocardiogram scoring model according to an embodiment of the present application;
FIG. 3 is a flowchart of an embodiment of an electrocardiogram scoring implementation;
fig. 4 is a schematic structural diagram of an electrocardiographic scoring device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. 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 application.
First, several nouns involved in the present application are parsed:
electrocardiography is widely used in diagnosing cardiovascular diseases and is considered a gold standard for many cardiovascular diseases. It can accurately identify the pathogenesis and nature of various arrhythmias. Electrocardiographic health scoring is a method for quantitatively evaluating heart conditions of users, and has wide application fields. Wherein the electrocardiogram health score may aid in diagnosis, suggesting the discovery of potential cardiovascular problems and early intervention. In addition, the electrocardiogram health score may provide an early warning that urges the user to take certain therapeutic measures when necessary, thereby reducing the risk of a malignant cardiovascular event. In addition, the health score can be used as a comprehensive index to comprehensively reflect the cardiovascular condition of the user, and can be applied to various examinations such as physical examination.
In the related technology, the remote health monitoring system technology for carrying out heart diagnosis and treatment evaluation and rehabilitation monitoring in a home scene generally utilizes a simple and easy wearable sensor device to track and record physiological parameters of a human body, a user does not need to receive professional medical training, the operation is simple and convenient, and the implementation cost is greatly reduced. However, due to the professionality of electrocardiograms, it is difficult for users lacking relevant expertise to compare relevant parameters and to derive a correct diagnostic report. The acquired mass wearable electrocardiograph data can be uploaded to the cloud for analysis by cardiologists to obtain reliable medical advice and health guidance, but the method is time-consuming and labor-consuming, has high cost and greatly increases the workload. In addition, understanding the terminology in diagnostic reports presents a certain difficulty threshold, so users still cannot obtain sufficiently effective medical guidance.
In view of this, an embodiment of the present application provides an electrocardiographic scoring method, where the scoring method in the embodiment of the present application may be applied to a terminal, or may be applied to a server, or may be software running in the terminal or the server. The terminal may be, but is not limited to, a tablet computer, a notebook computer, a desktop computer, etc. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligent platforms.
Referring to fig. 1, an embodiment of the present application provides an electrocardiographic scoring method, including:
s101, acquiring target electrocardiogram data;
s102, preprocessing the target electrocardiogram data to obtain a preprocessed data set;
s103, scoring and marking the preprocessed data set to obtain a marked data set;
s104, training the constructed electrocardiogram scoring model according to the marking data set to obtain a trained electrocardiogram scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network;
s105, acquiring electrocardiogram data to be calculated, and inputting the electrocardiogram data to be calculated into the electrocardiogram grading model to carry out electrocardiogram grading processing to obtain grading results.
In the embodiment of the application, the target electrocardiographic data is obtained by collecting the original wearable electrocardiographic data uploaded to the cloud by the target object, and the target electrocardiographic data can construct a large-scale database. Wherein, the sampling frequency of the signal of the target electrocardiogram data is 500Hz, and the duration of each data is 10s-60 s. In the embodiment of the present application, in order to unify the lengths of signals input into the network and reduce the amount of calculation, the data is downsampled to 250Hz, the unified signal length is [12,2560],12 is the number of input channels, that is, 12-lead signals, and 2560 is the number of signal points. Then, after the target electrocardiogram data is obtained, the target electrocardiogram data is preprocessed to generate more training samples, so that the model can learn the characteristics and modes of the electrocardiogram better. A part of electrocardiogram construction database can be selected according to the electrocardiogram health scoring standard rule, so that health electrocardiogram scores of different individuals can reach a uniform horizontal baseline. And then cleaning and desensitizing the data, including filtering, denoising, standardization and the like, and performing data amplification to enlarge the data scale so as to obtain a preprocessed data set. And then, evaluating and scoring the preprocessed data set in the database by an expert, and taking the evaluation score as a real grading mark to obtain a marked data set. Training the constructed electrocardiogram scoring model through the marking data set to obtain a trained electrocardiogram scoring model, wherein the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network. And finally, acquiring the electrocardiographic data to be calculated, inputting the electrocardiographic data to be calculated into an electrocardiographic scoring model, acquiring the prediction score of the data, and obtaining a corresponding conclusion.
In the embodiment of the application, the acquired target electrocardiogram data is from a 12-lead electrocardiogram acquired by wearable equipment in a home scene. The wearable electrocardiograph data is derived from actual use scenes and real users, so that the daily heart health condition of the users can be reflected better. These data may include various cardiac conditions, arrhythmias, and other relevant physiological parameters, making the model more adaptable to real-world variations and complexities. Compared with a data set acquired by a hospital, the wearable electrocardiograph data model training method is more suitable for a remote health monitoring system. It should be noted that, in each specific embodiment of the present application, when related processing is required to be performed according to data related to the identity or characteristics of the target object, such as information of the target object, behavior data of the target object, history data of the target object, and position information of the target object, permission or consent of the target object is obtained first, and the collection, use, processing, etc. of the data complies with related laws and regulations and standards. In addition, when the embodiment of the application needs to acquire the sensitive information of the target object, the independent permission or independent consent of the target object is acquired through a popup window or a jump to a confirmation page or the like, and after the independent permission or independent consent of the target object is explicitly acquired, the necessary target object related data for enabling the embodiment of the application to normally operate is acquired.
Further optionally, in step S102, the preprocessing the target electrocardiogram data to obtain a preprocessed data set includes:
screening the target electrocardiogram data according to an electrocardiogram health score standard to obtain screening data;
filtering and denoising the screened data, and carrying out standardization processing on the filtered and denoised data to obtain standard data;
and carrying out data amplification processing on the standard data to obtain a preprocessed data set.
In the embodiment of the application, firstly, screening processing is carried out on the target electrocardiogram data according to an electrocardiogram health score standard to obtain screening data. When the electrocardiogram health score standard is prepared, limiting the age of an individual in consideration of the physical factors of the individual; secondly, considering the influence of the electrocardiogram to parameter indexes, and limiting the age of the individual; to overcome subjectivity, only the critical value standard is used as a common electrocardiographic sample. In one possible embodiment, the electrocardiogram health score reference setting rule is as follows: (1) selecting an age range between 18 years and 85 years. The age of an individual can have an impact on the structure and function of the heart. (2) selecting heart rate range between 45-100 times/second. The heart rate range can be used as an important reference for the user to acquire whether the condition is stable and quiet and whether the heart is healthy; (3) selecting critical value as common electrocardiogram sample. The critical value is an objective standard reflecting the health condition of the electrocardiogram, and is classified into ordinary, early warning and critical according to the severity, so that a sample marked as ordinary is selected, which indicates that the electrocardiogram is in a normal and steady state at this time. Then, the data is cleaned and desensitized, including pretreatment such as filtering, denoising, standardization and the like, and data amplification is performed to enlarge the data size. Because of the complexity of the data acquisition scenario, users may have problems with improper operation, and therefore, filtering and denoising of the data is required to eliminate possible baseline drift, myoelectric interference, and power frequency interference, and standardized processing of the data is performed. And finally, carrying out data amplification processing on the standard data to obtain a preprocessed data set, and generating more training samples, so that the model can learn the characteristics and modes of an electrocardiogram better, and the accuracy of the scoring model is improved.
Further as an optional implementation manner, the performing data amplification processing on the standard data to obtain a preprocessed data set includes:
performing translation, scaling and random clipping processing on the standard data on a time domain and a frequency domain to obtain an amplification data set;
and performing tensor conversion processing on the amplified data set to obtain a preprocessed data set.
In the embodiment of the application, the standard data is also required to be subjected to data amplification operation, such as translation, scaling, random clipping and the like on the time domain and the frequency domain, so as to simulate different electrocardio waveform changes, thereby expanding the data scale. And finally, packaging the amplified data set into tensors required by the input neural network to obtain a preprocessed data set. The embodiment of the application simulates different electrocardio waveform changes through data amplification processing, so that the model can be better adapted to heart signals under various conditions. And more training samples are generated so that the model can learn the characteristics and patterns of the electrocardiogram better.
Further as an optional implementation manner, the scoring and marking the preprocessed data set to obtain a marked data set includes:
marking and grading the preprocessed data set to obtain a data set grade;
and taking the data set score as a label of the preprocessing data set to obtain a marked data set.
In the embodiment of the application, the scoring mark can be according to the age of the patient when the electrocardiogram is acquired, or can be the scoring given by the expert according to the comprehensive evaluation of the electrocardiogram. According to the embodiment of the application, the electrocardiogram in the database can be evaluated and scored by an expert to obtain the data set score, and the data set score is used as a real score mark of the preprocessing data set to obtain the marked data set. In the embodiment of the application, the related cardiologists provide diagnostic reports for the electrocardiographic data in the database and score the electrocardiographic data, wherein the scoring range is 0 to 100. It should be noted that, the embodiment of the application can also score according to the age when the electrocardiographic data of the target object is acquired, the numerical value of the age can be directly used as the numerical value of the score, the health degree of the heart is reflected through the age, and thus the label of the electrocardiographic data is used as a label, and the label can be applied to the training process of the follow-up model. Meanwhile, the embodiment of the application can delete the electrocardiographic data with poor quality and no diagnostic value. The embodiment of the application can also randomly extract 80% of the data set as a training set, and the remaining 20% as a verification set and a test set. The training set, the verification set and the test set are independent and non-overlapping.
Further optionally, before the training processing is performed on the constructed electrocardiographic scoring model according to the marking data set, the method further includes constructing an electrocardiographic scoring model, and the specific steps include:
connecting a convolution layer module through a Gaussian error linear unit activation function and a normalization layer to obtain the CNN feature extractor, wherein the convolution layer module comprises a multi-scale convolution unit;
and carrying out residual structure cross-layer connection processing on the CNN feature extractor and the transducer neural network, and constructing to obtain an electrocardiogram scoring model.
In the embodiment of the application, an electrocardiographic scoring model is constructed by establishing a depth CNN-transducer model, the model receives an input signal which is downsampled to 250Hz, the shape of the input signal is [12,2560], the output is normalized score, and the normalized score is scaled to [0,100] to be used as a final predicted health score; the specific architecture of the network is shown in fig. 2, and consists of a CNN feature extractor and a transducer. The CNN feature extractor comprises 4 convolutional layer modules, each module comprising two layers of multi-scale convolution, the number of output channels being [96,224,352,480] in sequence. The convolution layers are connected with the BN layer through a GELU activation function, and the convolution layers are connected with other modules in a cross-layer mode through a residual structure. The output of the CNN network is a depth feature, shape [480,64]. After the feature is subjected to dimension transformation, the feature is divided into a plurality of fragments at equal intervals, and projection data are generated. The transducer contains 8 layers, each layer performing a multi-headed self-attention calculation. Finally, the output of the network is linearly mapped through multiple layers, wherein the neuron number of the last layer of mapping is 1. The output gets a normalized score of [0,1] by Sigmoid activation function, which is then scaled to the final predicted electrocardiogram health score. The CNN feature extractor of the central electrogram scoring model provided by the embodiment of the application has translational invariance, and the transducer neural network can effectively model long-distance dependency, so that the network can capture more remote context information. In the embodiment of the application, the common fixed-size convolution kernel in the CNN is replaced by a multi-scale convolution kernel so as to realize multi-scale feature fusion. And replace the RELU activation function commonly used in CNNs with a GELU. The GELU is a smooth nonlinear function, which is helpful to solve the gradient vanishing problem and can improve the accuracy and convergence rate of the model. In the embodiment of the application, a CNN-transducer model firstly extracts depth characteristics of an original signal through CNN, and the depth characteristics are divided into a plurality of fragments at equal intervals, and each fragment is used as data to be projected; then, the data to be projected is subjected to linear transformation to generate projection data. Compared with the direct input of the original signal to the transducer, the input of the features extracted by the CNN to the transducer is beneficial to reducing the calculation amount, improving the operation speed and having more diagnostic value through the features extracted by the convolution activation layer.
Further optional embodiments, the training the electrocardiographic scoring model according to the marker dataset includes:
inputting the marked data set into the electrocardiogram grading model to obtain an electrocardiogram grading prediction result;
determining a trained loss value according to the electrocardiogram score prediction result and the label of the marked data set;
and updating parameters of the electrocardiographic scoring model according to the loss value.
In embodiments of the present application, the marker dataset may be input into an electrocardiogram scoring model for training. Specifically, after the data in the marked data set is input into the electrocardiogram scoring model, the scoring result output by the model, namely, the electrocardiogram scoring prediction result, can be obtained, and the accuracy of the electrocardiogram scoring model prediction can be evaluated according to the electrocardiogram scoring prediction result and the label, so that the parameters of the model are updated. For the electrocardiographic scoring model, the accuracy of the model prediction result can be measured by a Loss Function (Loss Function), which is defined on a single training data and is used for measuring the prediction error of one training data, specifically determining the Loss value of the training data through the label of the single training data and the prediction result of the model on the training data. According to the embodiment of the application, the marked data set is input into the CNN-transducer model to obtain the prediction score of the network, and a scoring model with excellent index is obtained through iterative training. The model trained 100 epochs using the Adam optimizer, with a learning rate set to 0.001. L1 loss function is used in the network training process:
wherein x is i Scoring the health of the real electrocardiosignals; y is i Scoring the health of the electrocardiosignals predicted by the model; m is the number of training samples.
Further as an optional implementation manner, the inputting the electrocardiographic data to be calculated into the electrocardiographic scoring model to perform electrocardiographic scoring processing to obtain scoring results includes:
downsampling and feature extraction processing are carried out on the electrocardiogram data to be calculated through the CNN feature extractor, so that data features are obtained;
and carrying out position coding, multi-head self-attention calculation and multi-layer perceptron operation processing on the data characteristics through the transducer neural network to obtain a grading result.
In the embodiment of the application, the data characteristics are obtained by carrying out downsampling and characteristic extraction processing on the electrocardiographic data to be calculated through the CNN characteristic extractor, wherein the CNN characteristic extractor mainly has the functions of downsampling and characteristic extraction on the data. For a signal of length 2560 four downsampling steps are performed, each step being [5,2,2,2], i.e. downsampling it to 40 times the original length. At the same time, the number of channels is increased to 480. Furthermore, the convolution kernels of 3*3 were replaced with 3*3, 5*5, 9*9 and 11 x 11. In the design, transient changes and tiny fluctuation possibly occurring in electrocardiosignals are considered, abnormal arrhythmia is caused, and small convolution kernels such as 3*3 and 5*5 can capture the tiny changes sharply, so that information omission is avoided; for sustained waveform changes due to long-term cardiovascular injury, larger convolution kernels such as 9*9 and 11×11 are effectively identified. The inputs of each convolution module are simultaneously passed into the residual block to achieve an inter-layer connection, which has the advantage of enhancing information flow and helping the network learn a more efficient representation of the features.
And then carrying out position coding, multi-head self-attention calculation and multi-layer perceptron operation processing on the data characteristics through a transducer neural network to obtain a grading result. Wherein, the input size of the transducer model is [480,64]]The embodiment of the application performs dimension transformation on the data to be [64,480 ]]It is then split into 64 equally sized data fragments. The transducer model includes position coding, multi-head self-attention computation, and multi-layer perceptron computation. First, position coding is used to code the input with the aim of providing the model with position information about the various positions in the input sequence. The embodiment of the application represents the input as X epsilon R N×D N corresponds to 64 and D corresponds to 480. After the above-mentioned position coding process, in the embodiment of the present application, there are 8 layers of transform encoders, each layer includes multi-head self-attention calculation, multi-layer perceptron and layer normalization. The input sequence X is mapped into the following linear mapping D m Is the linearly mapped dimension. The self-attention calculation formula is as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a scale factor that can prevent the softmax function from falling into the region with too small a gradient, making the gradient more stable. And the multi-head self-attention mechanism is composed of n self-attentions. It partitions Q, K and V into different subspaces, performing the scaled self-attention function in parallel. The outputs of each head are then stitched together and a final output of multiple heads self-attention is produced by linear projection. The calculation formula of the multi-head self-attention is as follows:
MultiHeadAtt(Q,K,V)=Concat(Head 1 ,Head 2 ....Head h )*W O
wherein W is O Trainable parameter weights representing multi-headed attention. The following is a Multi-Layer Perceptron (MLP) aimed at further processing the feature representation obtained through Multi-head self-attention computation. The MLP introduces nonlinear transformations through the fully connected layers and activation functions to better capture complex relationships between features. The specific formula is expressed as follows:
MLP(X)=FC(σ(FC(X)))
where FC represents the fully connected layer and σ () represents an activation function GELU. Following is layer normalization (Layer normalization, LN) aimed at improving the stability of the training network, to speed up training time and to increase convergence speed. The specific formula is expressed as follows:
in the above formula, γ and β are learnable parameters for scaling and translating the normalized data.Dot product operation representing element direction, μ and +.>The mean and standard deviation of the elements in x. Layer normalization enhances independence and stability between features by performing independent normalization operations on the features of each sample so that each feature has a similar distribution within the same layer. This helps to reduce the range of variation of the characteristic values.
Referring to fig. 3, the flow of the present application specifically includes: the method comprises the steps of obtaining electrocardiogram data, establishing a wearable 12-lead electrocardiogram database, carrying out filtering denoising, standardization and data amplification treatment on the data in the database, inputting the treated data into a CNN-transducer scoring model for training to obtain a trained CNN-transducer scoring model, inputting the electrocardiogram data to be calculated into the CNN-transducer scoring model for processing, and outputting to obtain an electrocardiogram score.
In another aspect, referring to fig. 4, an embodiment of the present application further provides an electrocardiographic scoring device, including:
a first module 401 for acquiring target electrocardiographic data;
a second module 402, configured to perform preprocessing on the target electrocardiographic data to obtain a preprocessed data set;
a third module 403, configured to score and mark the preprocessed data set to obtain a marked data set;
a fourth module 404, configured to perform training processing on the constructed electrocardiographic scoring model according to the marker dataset, so as to obtain a trained electrocardiographic scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network;
and a fifth module 405, configured to obtain electrocardiographic data to be calculated, input the electrocardiographic data to be calculated into the electrocardiographic scoring model to perform electrocardiographic scoring processing, and obtain a scoring result.
Referring to fig. 5, an embodiment of the present application further provides an electronic device, including a processor 502 and a memory 501; the memory is used for storing programs; the processor executes the program to implement the method as described above.
Corresponding to the method of fig. 1, an embodiment of the present application also provides a computer-readable storage medium storing a program to be executed by a processor to implement the method as described above.
Embodiments of the present application also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the method shown in fig. 1.
In summary, the embodiment of the application has the following advantages:
(1) The CNN-transducer deep neural network designed by the embodiment of the application firstly effectively extracts the depth characteristics of electrocardiographic signals through the CNN convolutional neural network, and secondly utilizes the transducer module to perform long-term signal modeling, thereby further improving the understanding and evaluation ability of the model on heart conditions. The architecture of the mixed CNN and the transducer can fully exert the advantages of the CNN and the transducer, and improves the accuracy and the robustness of the electrocardiogram health score.
(2) The electrocardiogram health score reference rule provided by the embodiment of the application fully considers the individual difference and subjective factor influence of diagnosis, and the accuracy and consistency of the diagnosis result can be ensured by screening the data according to the rule.
(3) The electrocardiogram health scoring method can be applied to a remote health monitoring system. The heart health monitoring system can be used as a key component in a remote health monitoring system to provide accurate and timely heart health assessment for users.
In some alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flowcharts of the present application are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed, and in which sub-operations described as part of a larger operation are performed independently.
Furthermore, while the application is described in the context of functional modules, it should be appreciated that, unless otherwise indicated, one or more of the described functions and/or features may be integrated in a single physical device and/or software module or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to an understanding of the present application. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be apparent to those skilled in the art from consideration of their attributes, functions and internal relationships. Accordingly, one of ordinary skill in the art can implement the application as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative and are not intended to be limiting upon the scope of the application, which is to be defined in the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the application, the scope of which is defined by the claims and their equivalents.
While the preferred embodiment of the present application has been described in detail, the present application is not limited to the embodiments described above, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and these equivalent modifications or substitutions are included in the scope of the present application as defined in the appended claims.

Claims (10)

1. An electrocardiogram scoring method, the method comprising:
acquiring target electrocardiogram data;
preprocessing the target electrocardiogram data to obtain a preprocessed data set;
scoring and marking the preprocessed data set to obtain a marked data set;
training the constructed electrocardiogram scoring model according to the marking data set to obtain a trained electrocardiogram scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network;
and acquiring electrocardiogram data to be calculated, and inputting the electrocardiogram data to be calculated into the electrocardiogram grading model to carry out electrocardiogram grading processing to obtain grading results.
2. The method of claim 1, wherein preprocessing the target electrocardiogram data to obtain a preprocessed data set comprises:
screening the target electrocardiogram data according to an electrocardiogram health score standard to obtain screening data;
filtering and denoising the screened data, and carrying out standardization processing on the filtered and denoised data to obtain standard data;
and carrying out data amplification processing on the standard data to obtain a preprocessed data set.
3. The method of claim 2, wherein the performing a data amplification process on the standard data to obtain a preprocessed data set comprises:
performing translation, scaling and random clipping processing on the standard data on a time domain and a frequency domain to obtain an amplification data set;
and performing tensor conversion processing on the amplified data set to obtain a preprocessed data set.
4. The method of claim 1, wherein scoring the preprocessed data set to obtain a marked data set comprises:
marking and grading the preprocessed data set to obtain a data set grade;
and taking the data set score as a label of the preprocessing data set to obtain a marked data set.
5. The method of claim 1, wherein prior to said training of the constructed electrocardiogram-scoring model from the marker dataset, the method further comprises constructing an electrocardiogram-scoring model, the steps comprising:
connecting a convolution layer module through a Gaussian error linear unit activation function and a normalization layer to obtain the CNN feature extractor, wherein the convolution layer module comprises a multi-scale convolution unit;
and carrying out residual structure cross-layer connection processing on the CNN feature extractor and the transducer neural network, and constructing to obtain an electrocardiogram scoring model.
6. The method according to any one of claims 1 to 5, wherein said training an electrocardiogram scoring model from said marker dataset comprises:
inputting the marked data set into the electrocardiogram grading model to obtain an electrocardiogram grading prediction result;
determining a trained loss value according to the electrocardiogram score prediction result and the label of the marked data set;
and updating parameters of the electrocardiographic scoring model according to the loss value.
7. The method according to any one of claims 1 to 5, wherein inputting the electrocardiographic data to be calculated into the electrocardiographic scoring model for electrocardiographic scoring processing, to obtain scoring results, comprises:
downsampling and feature extraction processing are carried out on the electrocardiogram data to be calculated through the CNN feature extractor, so that data features are obtained;
and carrying out position coding, multi-head self-attention calculation and multi-layer perceptron operation processing on the data characteristics through the transducer neural network to obtain a grading result.
8. An electrocardiogram scoring apparatus, the apparatus comprising:
a first module for acquiring target electrocardiographic data;
the second module is used for preprocessing the target electrocardiogram data to obtain a preprocessed data set;
the third module is used for carrying out scoring and marking processing on the preprocessed data set to obtain a marked data set;
a fourth module, configured to perform training processing on the constructed electrocardiographic scoring model according to the marker dataset, so as to obtain a trained electrocardiographic scoring model; the electrocardiogram scoring model comprises a CNN feature extractor and a transducer neural network;
and a fifth module, configured to obtain electrocardiographic data to be calculated, input the electrocardiographic data to be calculated into the electrocardiographic scoring model for electrocardiographic scoring processing, and obtain a scoring result.
9. An electronic device comprising a memory and a processor;
the memory is used for storing programs;
the processor executing the program implements the method of any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
CN202310884118.4A 2023-07-18 2023-07-18 Electrocardiogram scoring method and device, electronic equipment and storage medium Pending CN116849676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310884118.4A CN116849676A (en) 2023-07-18 2023-07-18 Electrocardiogram scoring method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310884118.4A CN116849676A (en) 2023-07-18 2023-07-18 Electrocardiogram scoring method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116849676A true CN116849676A (en) 2023-10-10

Family

ID=88232002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310884118.4A Pending CN116849676A (en) 2023-07-18 2023-07-18 Electrocardiogram scoring method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116849676A (en)

Similar Documents

Publication Publication Date Title
Subasi et al. Classification of EMG signals using wavelet neural network
Afshar et al. A combinatorial deep learning structure for precise depth of anesthesia estimation from EEG signals
Altan Diagnosis of coronary artery disease using deep belief networks
US20220093215A1 (en) Discovering genomes to use in machine learning techniques
Hravnak et al. Real alerts and artifact classification in archived multi-signal vital sign monitoring data: implications for mining big data
WO2021014150A1 (en) Deep end-to-end classification of electrocardiogram data
Vargas-Lopez et al. A new methodology based on EMD and nonlinear measurements for sudden cardiac death detection
Wang et al. Computer-aided intracranial EEG signal identification method based on a multi-branch deep learning fusion model and clinical validation
Kaya et al. A new approach for congestive heart failure and arrhythmia classification using angle transformation with LSTM
Mataczyński et al. End-to-end automatic morphological classification of intracranial pressure pulse waveforms using deep learning
Hazeri et al. Classification of normal/abnormal PCG recordings using a time–frequency approach
Liao et al. Recognizing diseases with multivariate physiological signals by a DeepCNN-LSTM network
CN108962379B (en) Mobile phone auxiliary detection system for cranial nerve system diseases
Patel et al. CNN-FEBAC: A framework for attention measurement of autistic individuals
CN116484290A (en) Depression recognition model construction method based on Stacking integration
Yun-Mei et al. The abnormal detection of electroencephalogram with three-dimensional deep convolutional neural networks
CN115736920A (en) Depression state identification method and system based on bimodal fusion
Dutta et al. A predictive method for emotional sentiment analysis by machine learning from electroencephalography of brainwave data
Rieg et al. Machine learning-based diagnosis of epilepsy in clinical routine: Lessons learned from a retrospective pilot study
Sadiq et al. Efficient novel network and index for alcoholism detection from EEGs
CN116849676A (en) Electrocardiogram scoring method and device, electronic equipment and storage medium
AlSharabi et al. EEG-based clinical decision support system for Alzheimer's disorders diagnosis using EMD and deep learning techniques
Kuila et al. ECG signal classification using DEA with LSTM for arrhythmia detection
Obayya et al. A novel automated Parkinson’s disease identification approach using deep learning and EEG
Luo et al. Exploring adaptive graph topologies and temporal graph networks for eeg-based depression detection

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