CN113180687A - Multi-lead dynamic heartbeat real-time classification method, device, equipment and storage medium - Google Patents

Multi-lead dynamic heartbeat real-time classification method, device, equipment and storage medium Download PDF

Info

Publication number
CN113180687A
CN113180687A CN202110476791.5A CN202110476791A CN113180687A CN 113180687 A CN113180687 A CN 113180687A CN 202110476791 A CN202110476791 A CN 202110476791A CN 113180687 A CN113180687 A CN 113180687A
Authority
CN
China
Prior art keywords
template
heart beat
classified
heartbeat
target
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.)
Granted
Application number
CN202110476791.5A
Other languages
Chinese (zh)
Other versions
CN113180687B (en
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.)
Shenzhen Biocare Bio Medical Equipment Co ltd
Original Assignee
Shenzhen Biocare Bio Medical Equipment 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 Shenzhen Biocare Bio Medical Equipment Co ltd filed Critical Shenzhen Biocare Bio Medical Equipment Co ltd
Priority to CN202110476791.5A priority Critical patent/CN113180687B/en
Publication of CN113180687A publication Critical patent/CN113180687A/en
Application granted granted Critical
Publication of CN113180687B publication Critical patent/CN113180687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Landscapes

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

Abstract

The embodiment of the invention discloses a multi-lead dynamic heartbeat real-time classification method, a device, equipment and a storage medium, wherein the size between i and a preset learning heartbeat number threshold is judged to prevent inaccurate heartbeat type classification caused by insufficient accumulation of heartbeat templates; the heart beat classification is carried out by acquiring the multi-lead electrocardiosignal fragments, so that the multi-dimensional judgment of heart beat classification can be realized, and the heart beat type judgment accuracy is improved.

Description

Multi-lead dynamic heartbeat real-time classification method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of electrocardiogram processing, in particular to a multi-lead dynamic heart beat real-time classification method, a device, equipment and a storage medium.
Background
Electrocardiographic heart beat classification is defined as the type recognition of heart beats. The electrocardiogram software automatically identifies the heart beat type by adopting different algorithms, provides the member heart beat states contained in various templates for doctors, and improves the diagnosis efficiency of the doctors. The implementation methods of the current-stage electrocardiogram heart beat classification can be roughly divided into the following two types:
1. and (3) an artificial feature extraction method: relevant characteristic parameters of the heart beat type are constructed through expert knowledge, and a corresponding heart beat type mark is obtained through comprehensive calculation of the relevant characteristic parameters through machine learning. However, the method needs the help of the clinical experience of a professional doctor, and the calculation amount is large when various characteristic parameters are obtained, and the heart beat classification result is inaccurate;
2. a neural network method: the original heart beat signal is used as the input of the neural network, the artificial heart beat mark is used as the output, and the back propagation algorithm is used for training the neural network model. However, the method needs to acquire a large amount of clinical data, so that a training database meeting the specification is constructed, the time consumption is generally long, the accuracy of sample acquisition is depended on, the heart beat classification result is influenced by the sample, and the classification efficiency is low.
Therefore, a scheme for heart beat classification with strong applicability is not available at present, and the accuracy and the classification efficiency of heart beat classification can be improved.
Disclosure of Invention
The invention mainly aims to provide a multi-lead dynamic heart beat real-time classification method, a multi-lead dynamic heart beat real-time classification device, a computer device and a storage medium, which can solve the problems of inaccurate heart beat classification and low classification efficiency of heart beat classification in the prior art and can be carried out in dynamic heart beat detection in real time.
To achieve the above object, a first aspect of the present invention provides a method for real-time classification of multi-lead dynamic heart beats, comprising:
acquiring heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 1;
if the i is greater than or equal to a preset learning heart beat number threshold value, and the heart beat information of the ith heart beat to be classified comprises the first identification, determining a target heart beat template to be classified, wherein if the i does not meet a preset heart beat template selection condition to be classified, the target heart beat template to be classified is a first heart beat template corresponding to the ith heart beat to be classified, if the i meets the preset heart beat template selection condition to be classified, the target heart beat template to be classified is a second heart beat template corresponding to the previous i heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of similar heart beat members in waveform morphology;
determining a target template type of a target heart beat template to be classified based on template information of the target heart beat template to be classified, heart beat information of heart beat members and a template type of an existing dominant template;
and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
In one possible implementation, the determining a target heartbeat template to be classified further includes:
if the target heartbeat template to be classified is the first heartbeat template, acquiring heartbeat numbers of Q heartbeat members which are detected recently in the first heartbeat template and a premature escape state variable corresponding to each heartbeat number to obtain a target premature escape state variable array, wherein Q is a positive integer;
and if the target premature beat escape state variable array meets a preset continuous stable heart rhythm condition or a preset rhythm state condition, continuously executing the step of determining the target template type of the target heart beat template to be classified based on the template information of the target heart beat template to be classified, the heart beat information of the heart beat members and the template type of the existing master template, wherein the preset continuous stable heart rhythm condition is the beat rule of the heart beat conforming to the continuous stable heart rhythm, and the rhythm state condition comprises a first rhythm state condition conforming to the bigeminal beat rule and/or a second rhythm state condition conforming to the triple-rhythm beat rule.
In one possible implementation, the determining a target heartbeat template to be classified further includes:
if the target heartbeat template to be classified is the second heartbeat template, acquiring the template type of the second heartbeat template and/or the template capacity level of the second heartbeat template, wherein the template capacity level is the template capacity level determined based on a preset template capacity level interval;
and if the template type of the second heart beat template is the template type of the leading template and/or the template capacity level of the second heart beat template is not improved, continuously executing the step of returning to the step of acquiring the heart beat information of the ith heart beat to be classified by i + 1.
In a feasible implementation manner, the template information further includes a template number, a template capacity, an RR interval of the template, a waveform width of the template, and a P-wave identifier of the template, and then the target template type of the target heartbeat template to be classified is determined based on the template information of the target heartbeat template to be classified, the heartbeat information of the heartbeat member, and the template type of the existing dominant template, before further including:
when the i is equal to a preset learning heart beat number threshold value, acquiring the template capacity of each heart beat template of the second heart beat template, wherein the template capacity is the number of heart beat members in the heart beat template;
sequencing the heartbeat templates according to the size of the templates from large to small, and determining a sequencing result;
when any one of the heart beat templates of the front A position in the sequencing result meets a preset dominant template selection condition, determining that a target heart beat template meeting the preset dominant template selection condition is the dominant template, and updating the template number of the dominant template to the template number corresponding to the target heart beat template, wherein the preset dominant template selection condition is that the template capacity of the target heart beat template is greater than twice that of a reference template, the RR interval of the target heart beat template is greater than that of the reference template, the waveform width of the target heart beat template is less than that of the reference template, the P wave identifier of the target heart beat template is an existence identifier, and the reference template is the heart beat template with the maximum template capacity in the heart beat templates of the front A position in the sequencing result, a is a positive integer;
and when any one heartbeat template in the heartbeat templates at the front A position in the sequencing result does not meet the preset leading template selection condition, determining the reference template as the leading template, and updating the template number of the leading template as the template number corresponding to the reference template.
In one possible implementation, the method further includes:
if the i is smaller than the preset learning heart beat number threshold value and the heart beat information of the ith heart beat to be classified comprises the first identifier, determining that the heart beat type is the learning heart beat type, and returning to the step of acquiring the heart beat information of the ith heart beat to be classified by setting i as i + 1;
and if the i is smaller than the preset learning heart beat number threshold value and the heart beat information of the ith heart beat to be classified comprises the second identification, determining that the heart beat type is an unknown heart beat type, and returning to the step of acquiring the heart beat information of the ith heart beat to be classified by setting i as i + 1.
In a feasible implementation manner, the heartbeat information of the heartbeat member further includes an RR interval value of the heartbeat member, the template information further includes a heartbeat continuation stability flag and a template P-wave identifier, and then the determining the target template type of the target heartbeat template to be classified based on the template information of the target heartbeat template to be classified, the heartbeat information of the heartbeat member, and the template type of the existing dominant template includes:
acquiring RR interim values of Z heartbeat members closest to the ith heartbeat to be classified in the target template to be classified, wherein Z is a positive integer;
obtaining a target RR interval standard deviation of the target template to be classified by using the RR interval values of the Z heart beat members, the RR interval average value of the RR interval values of the Z heart beat members and a preset RR interval standard deviation calculation formula;
if the heart beat continuous and stable mark of the target template to be classified is a first mark, the template P wave mark of the target template to be classified is a heart beat sample point number with a mark, the target RR interval standard deviation is smaller than a preset first time length, and the RR interval average value of the RR interval values of Z heart beat members is larger than the heart beat sample point number with a preset second time length, determining that the target template type of the target template to be classified is the template type of the master template, the first mark represents that the heart beat members of the target template to be classified are continuous and stable, the preset first time length is smaller than the preset second time length, and Z is a positive integer.
In a feasible implementation manner, the template information further includes a rhythm state identifier, and determining a target template type of the target heartbeat template to be classified based on the template information of the target heartbeat template to be classified, the heartbeat information of heartbeat members, and the template type of the existing dominant template includes:
acquiring rhythm state identification of the target template to be classified, wherein the rhythm state identification comprises normal heart beat identification or rhythm heart beat identification, and the rhythm heart beat identification comprises bigeminal identification or triple-geminal identification or insertion heart beat and heart rhythm identification;
and if the rhythm state identification is any one of rhythm heart beat identifications, determining that the target template type of the target template to be classified is the template type of the dominant template.
In a feasible implementation manner, the determining a target template type of a target heartbeat template to be classified based on template information of the target heartbeat template to be classified, heartbeat information of the heartbeat member, and a template type of an existing dominant template further includes:
if at least one of the conditions that the heart beat continuous and stable mark of the target template to be classified is a second mark, the template P wave mark of the target template to be classified is a non-existing mark, the conditions that the target RR interval standard deviation is greater than or equal to the number of heart beat sample points within the preset first duration and the RR interval average value of the RR interval values of the Z detected heart beats is less than or equal to the number of heart beat sample points within the preset second duration are satisfied, and the rhythm state mark of the target template to be classified is a normal heart beat mark, determining that the target template type of the target template to be classified is a preset template type, wherein the second mark represents the intermittent and/or unstable beats of the heart beat members of the target template to be classified.
To achieve the above object, a second aspect of the present invention provides a device for real-time classification of multi-lead dynamic heart beats, the device comprising:
the heart beat detection module to be classified: the heart beat classifying method comprises the steps of obtaining heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 1;
the target template to be classified determining module: the heartbeat template to be classified is determined if the i is greater than or equal to a preset learning heartbeat number threshold value and heartbeat information of the ith heartbeat to be classified comprises the first identification, wherein if the i does not meet a preset heartbeat template to be classified selection condition, the target heartbeat template to be classified is a first heartbeat template corresponding to the ith heartbeat to be classified, if the i meets the preset heartbeat template to be classified selection condition, the target heartbeat template to be classified is a second heartbeat template corresponding to the previous i heartbeat to be classified, and the heartbeat template is a heartbeat set formed by a plurality of waveform shape similar heartbeat members;
a template type determination module: the method comprises the steps of determining a target template type of a target heartbeat template to be classified based on template information of the target heartbeat template to be classified, heartbeat information of heartbeat members and a template type of an existing dominant template;
heartbeat type update module: and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
To achieve the above object, a third aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps as shown in the first aspect and any possible implementation manner.
To achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps as shown in the first aspect and any possible implementation manner.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention discloses a multi-lead dynamic heart beat real-time classification method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark with effective heart beat or a second mark with ineffective heart beat, and the initial value of i is 0; if i is larger than or equal to a preset learning heart beat number threshold value and heart beat information of the ith heart beat to be classified contains a first identifier, determining a target heart beat template to be classified, wherein if i does not meet a preset condition, the target heart beat template to be classified is a first heart beat template corresponding to the ith heart beat to be classified, if i meets the preset condition, the target heart beat template to be classified is a second heart beat template corresponding to the previous i heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of similar waveform shape members; determining the target template type of the target heartbeat template to be classified based on the template information of the target heartbeat template to be classified, the heartbeat information of heartbeat members and the template type of the existing dominant template; and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified. The size between i and a preset learning heart beat number threshold is judged, so that the heart beat type classification is prevented from being inaccurate due to insufficient accumulation of heart beat templates, a target heart beat template to be classified is determined to be a first heart beat template or a second heart beat template according to the selection conditions of i and the preset heart beat template to be classified, the pressure for classifying the heart beat templates every i times is reduced, the template types can be continuously and effectively updated, the problem that the heart beat types are determined incorrectly due to the fact that the template types cannot be correctly corrected after being incorrectly classified is solved, and the heart beat type classification precision is improved; the heart beat classification is carried out by acquiring the multi-lead electrocardiosignal fragments, so that the multi-dimensional judgment of heart beat classification can be realized, and the heart beat type judgment accuracy is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a flow chart of a method for real-time classification of multi-lead dynamic heart beats according to an embodiment of the invention;
FIG. 2 is another flow chart of a method for real-time classification of multi-lead dynamic heart beats in an embodiment of the invention;
FIG. 3 is a schematic representation of waveforms on different analysis lead channels of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a birhythmic cardiac electrical signal segment of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the present invention;
FIG. 5 is a block diagram of a multi-lead dynamic heartbeat real-time classifier according to an embodiment of the present invention;
fig. 6 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a multi-lead dynamic heartbeat real-time classification method according to an embodiment of the present invention, which specifically includes the following steps:
101, acquiring heartbeat information of an ith heartbeat to be classified, wherein the heartbeat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heartbeat information at least comprises a first mark for heartbeat effectiveness or a second mark for heartbeat ineffectiveness, and the initial value of i is 1;
it should be noted that i represents a detected heartbeat number, and is understood as a corresponding number of detections when a heartbeat to be classified is detected, and the initial value of i is 1.
The heartbeat is an Electrocardiogram (ECG) segment, and the ith heartbeat to be classified is an ith multi-lead ECG segment detected at the ith time.
It will be appreciated that a complete heart beat, typically consisting of a P-wave, a QRS complex and a T-wave. In which the QRS complex is the major part of the heart beat and the R wave is dominant in the QRS complex over a complete heart beat. Therefore, in the heart beat detection process, the heart beat is generally obtained by dividing the length of the cardiac electrical signal with the R-wave position as the center, based on the marker position of the heart beat.
The multi-lead electrocardiosignal segment is obtained by collecting electrocardiosignals at different lead positions on the body surface of a user by using an electrocardiosignal collecting box, then carrying out R wave detection on the multi-lead electrocardiosignals, and carrying out equal-length division on the multi-lead electrocardiosignals by taking the R wave as the center to obtain a plurality of electrocardiosignal segments, namely heart beats to be classified.
The heartbeat information includes marker information for distinguishing different heartbeats, physiological information indicating the status of heartbeats, and other related information.
Step 102, if the i is larger than or equal to a preset learning heart beat number threshold value, and the heart beat information of the ith heart beat to be classified comprises the first identification, determining a target heart beat template to be classified;
the heart beat template to be classified is a heart beat template corresponding to the heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of heart beat members with similar waveform shapes.
When i is greater than or equal to a preset learning heart beat number threshold value, if i does not meet a preset heart beat template selection condition to be classified, the target classification heart beat template is a first heart beat template corresponding to the ith heart beat to be classified, and can also be called a matching template corresponding to a newly detected heart beat; when i is greater than or equal to a preset learning heart beat number threshold value, if i meets a preset heart beat template selection condition to be classified, the target heart beat template to be classified is a second heart beat template corresponding to the previous i heart beats to be classified, which can also be called all matching templates corresponding to all detected heart beats, and the detected heart beats can be understood to include newly detected heart beats and historical detected heart beats. In the above manner, it can be determined that the target heartbeat template to be classified can be the first heartbeat template or the second heartbeat template.
It should be noted that the preset learning heartbeat number threshold represents the detected heartbeat number, that is, the heartbeat detection frequency, and the preset learning heartbeat number threshold may be represented as M, where M is a positive integer, and a value of M may be 12, 16, or 18, which is not limited herein.
For example, the preset heart beat template to be classified may be selected by using a preset detection time threshold value X, where X is a positive integer, and the preset heart beat template to be classified may be selected by:
i%X==0&&i!=0;
wherein i represents the detected heart beat serial number,% is the remainder operator, X is the preset detection times threshold, & & is the logical AND operator! Is a logical not operator.
Wherein, i% X ═ 0 represents that i is divided by X to get the remainder, and the remainder is equal to 0, then the equation is stated that i satisfies that i% X ═ 0 immediately, otherwise, i does not satisfy that i% X ═ 0; i! If 0 is used to determine the numerical relationship between i and 0 and i is not 0, the equation is stated such that i satisfies i% X0, whereas i does not satisfy i% X0.
Further, if the judgment conditions on the two sides of the operator represented by the logical and operator are both satisfied, i satisfies the selection condition of the preset heart beat template to be classified.
In a feasible implementation manner, M takes a value of 16, X takes a value of 100, and when i is greater than or equal to a preset learning heart beat number threshold value M ═ 16, and heart beat information of the ith heart beat to be classified contains a first identifier with which the heart beat is valid, and i satisfies i% 100 ═ 0& & i! When the value is equal to 0, the target heartbeat template to be classified is the first heartbeat template, namely the matching template corresponding to the newly detected heartbeat; when i is larger than or equal to a preset learning heart beat number threshold value M ═ 16, and heart beat information of the ith heart beat to be classified comprises a first identification with valid heart beats and i does not satisfy that i% 100 ═ 0& & i! And when the value is 0, the target heartbeat template to be classified is the second heartbeat template, namely all the matching templates corresponding to all detected heartbeats.
In the above manner, it can be determined that the target heartbeat template to be classified can be the first heartbeat template or the second heartbeat template. The algorithm classification pressure can be reduced every time, and the template type can be ensured to be continuously and effectively updated.
Before heart beat template classification is executed, the relation between i and a preset learning heart beat number threshold value M is utilized to determine a target template to be classified, so that the pressure of heart beat template classification at each time can be effectively relieved, and high-efficiency classification efficiency and classification precision are realized.
103, determining a target template type of a target heartbeat template to be classified based on template information of the target heartbeat template to be classified, heartbeat information of heartbeat members and a template type of an existing master template;
the template information includes information on markers for distinguishing different heartbeat templates, physiological information indicating the status of the heartbeat template, and composition information of heartbeat members of the heartbeat template.
The leading template is a reference template, which is used as one of the classification reference standards in the classification process to determine the type of the target template, the template number used for distinguishing the leading template can be represented as domid, and the template number of the target template to be classified can be represented as Match Id.
Illustratively, the distinguishing template type may be denoted as TempType, where the template type of the leading template defaults to the first type, and may be denoted as TempType [ domid ] ═ 0; the target template type may be denoted TempType [ MatchId ].
And step 104, updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning to the step of acquiring the heart beat information of the ith heart beat to be classified by i + 1.
Illustratively, the differentiated heart beat type may be denoted BeatType.
It should be noted that, the heartbeat type of the heartbeat member of the target template to be classified is updated according to the target template type, the heartbeat type may be equal to the template type, that is, BeatType ═ TempType [ MatchId ], so that a plurality of heartbeat members in the same heartbeat template may be updated uniformly, and the type classification of several heartbeats may be continuously and efficiently classified according to the template type of the corresponding heartbeat template, thereby improving the efficiency of heartbeat classification.
The embodiment of the invention discloses a multi-lead dynamic heartbeat real-time classification method, which is characterized in that the inaccurate classification of heartbeat types caused by insufficient accumulation of heartbeat templates is prevented by judging the size between i and a preset learning heartbeat number threshold value, and a target heartbeat template to be classified is determined to be a first heartbeat template or a second heartbeat template according to the selection conditions of i and the preset heartbeat template to be classified, so that the pressure for classifying the heartbeat templates at each time is reduced, the template types can be continuously and effectively updated, the problem that the heartbeat types cannot be correctly corrected after the template types are wrongly classified is solved, and the precision of the heartbeat type classification is improved; the heart beat classification is carried out by acquiring the multi-lead electrocardiosignal fragments, so that the multi-dimensional judgment of heart beat classification can be realized, and the heart beat type judgment accuracy is improved.
Referring to fig. 2, fig. 2 is another flowchart of a method for real-time classification of multi-lead dynamic heart beats according to an embodiment of the present invention, the method including:
it can be understood that the execution main body of the embodiment of the invention can be a heart beat detection box, and the heart beat detection box is used for detecting electrocardiosignals and matching templates and providing relevant information.
In a feasible implementation manner, before the heart beat detection starts, the heart beat detection box may be initialized, the detection serial number, the heart beat, and the related information of the heart beat template are initialized, and after the initialization, the representative value of the corresponding parameter may be restored to 0 or other invalid values to mark the initialization state, which is not limited in this example, and the initialization step is not described again.
201. Acquiring heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 1;
in one possible embodiment, after obtaining ECG segments of equal length centered on the R-wave position, the merging of identical heartbeat waveforms is achieved by a template matching technique, so that a large number of ECG segments can be divided into heartbeat templates of different waveform shapes.
In one possible implementation, the heart beat information includes, but is not limited to, heart beat template number, heart beat RR interval, heart beat P-wave information, heart beat type, first identification of heart beat being valid, and second identification of heart beat being invalid.
In the embodiment of the invention, the template waveform is composed of multi-lead electrocardiosignal waveforms, and compared with the traditional template waveform which is composed of single-lead electrocardiosignal waveforms, the template matching method reduces the condition of template mixing in the template matching process, so that the template clustering result is more reliable and has more reference significance.
202. If the i is larger than or equal to a preset learning heart beat number threshold value, and the heart beat information of the ith heart beat to be classified comprises the first identification, determining a target heart beat template to be classified, wherein if the i does not meet a preset heart beat template selection condition to be classified, the target heart beat template to be classified is a first heart beat template corresponding to the ith heart beat to be classified, if the i meets the preset heart beat template selection condition to be classified, the target heart beat template to be classified is a second heart beat template corresponding to the first i heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of waveform shape similar heart beat members.
It should be noted that, part of the contents in steps 201 and 202 are the same as those in steps 101 and 102, and for avoiding repetition, detailed description is not repeated herein, and reference may be made to the examples of steps 101 and 102.
In an embodiment of the present invention, the method further includes: if the i is smaller than the preset learning heart beat number threshold value M, which is equal to 16, and the heart beat information of the ith heart beat to be classified contains the first identifier, determining that the heart beat type is the learning heart beat type, and returning to execute the step 201 if i is equal to i + 1; if the i is smaller than the preset learning heart beat number threshold M ═ 16, and the heart beat information of the ith heart beat to be classified includes the second identifier, determining that the heart beat type is an unknown heart beat type, and returning to execute the step 201 if i ═ i + 1.
Note that the learning heartbeat type is a heartbeat type set for the purpose of distinguishing when i is smaller than a preset learning heartbeat number threshold value and heartbeat information includes a first flag indicating that a heartbeat is valid in an initial heartbeat detection period, and may be represented as BeatType 3 as the distinguishing learning heartbeat type.
The unknown heartbeat type is a heartbeat type set for the purpose of distinguishing when i is smaller than a preset learning heartbeat number threshold value and heartbeat information contains a second identification that heartbeat is invalid, and can be expressed as BeatType 2 when the unknown heartbeat type is distinguished.
In a feasible implementation mode, if heart beat information of an ith heart beat to be classified contains a first identification of effective heart beats, an RR interval value of the ith heart beat to be classified is obtained; obtaining a target heart beat lead of the ith heart beat to be classified by utilizing an RR interval value and a heart beat lead algorithm of the ith heart beat to be classified; determining a target heart beat state of the ith heart beat to be classified according to a preset threshold and the target heart beat lead, and updating the premature beat escape number of the first heart beat template of the ith heart beat to be classified by using the target heart beat state, wherein the heart beat state comprises a normal heart beat, or a premature heart beat or an escape heart beat.
For example, the lead algorithm may be expressed as:
Figure BDA0003047334230000081
in the formula, advance is a target heart beat lead, BeatRR is an RR interval value of the ith heart beat to be classified, RRmean is an average RR interval of preset latest F newly detected heart beats, wherein F can be 8;
further, the predetermined threshold includes a premature beat threshold Thre1The escape threshold is Thre2
Then in one possible implementation, if advance>0&&advance>Thre1If the target heartbeat state is the premature heartbeat, updating the first heartbeat template of the ith heartbeat to be classified, namely the premature heartbeat number TempNSE [ MatchId ] of the matched template of the newly detected heartbeat][1]1; if advance<0&&|advance|>Thre2If the target heartbeat state is the escape heartbeat, updating the first heartbeat template of the ith heartbeat to be classified, namely the escape number TempNSE [ MatchId ] of the matched template of the newly detected heartbeat][2]1; if the advance does not satisfy the advance>0&&advance>Thre1And does not satisfy advance<0&&|advance|>Thre2If the target heart beat state is normal heart beat, updating the first heart beat template of the ith heart beat to be classified, namely the matching template of the newly detected heart beat, namely the number TempNSE [ MatchId ] of the normal heart beats][0]+=1。
Note that [0] in TempNSE [ MatchId ] [0] + ═ 1 represents a normal heartbeat representative symbol in the heartbeat state of the heartbeat template; TempNSE [ MatchId ] [1] + ═ 1 [1] represents the premature heart beat in heart beat state of the heart beat template; the escape heartbeat representing symbol in the heartbeat state of the heartbeat template is represented by [2] in TempNSE [ MatchId ] [2] + ═ 1, and the above values and symbol settings are only used for distinction and are not specifically limited.
In the embodiment of the invention, in the heart beat detection process, the premature beat escape information of the heart beat is judged, the premature beat escape information of the matched template corresponding to the heart beat is synchronously updated, and the premature beat escape state data is obtained by updating the premature beat escape information and is used for classifying the heart beat types by utilizing the template to be classified, so that the heart beat classification reference is enhanced, and the classification precision is improved.
It should be noted that, part of the contents in steps 201 and 202 are the same as those in steps 101 and 102 shown in fig. 1, and the foregoing contents may be referred to specifically, and are not repeated herein to avoid repetition.
203. If the target heartbeat template to be classified is the first heartbeat template, acquiring heartbeat numbers of Q heartbeat members which are detected recently in the first heartbeat template and a premature escape state variable corresponding to each heartbeat number to obtain a target premature escape state variable array, wherein Q is a positive integer;
it is understood that the first heart beat template is a heart beat template corresponding to the ith heart beat to be classified, and can also be called a matching template corresponding to the newly detected heart beat.
The heart beat number may be denoted Idx for distinguishing individual heart beats.
The premature escape state represents a beat state of a heartbeat and may be represented as RecentNSEType, where RecentNSEType ═ 0 represents a normal beat state, and RecentNSEType ═ 1 represents a premature escape state, and the setting may be set according to actual settings, and is not limited at all.
203a, if the target premature escape state variable array meets the preset continuous stable heart rhythm condition or the preset rhythm state condition, continuing to execute the step 205;
the preset continuous stable heart rhythm condition is a beating rule of heart beat meeting the continuous stable heart rhythm, and the rhythm state condition comprises a first rhythm state condition meeting a double-rhythm beating rule and/or a second rhythm state condition meeting a triple-rhythm beating rule.
Illustratively, if the target heartbeat template to be classified is the first heartbeat template, that is, the matching template corresponding to the newly detected heartbeat, the step 203, 203a is executed to determine the necessity of classifying the target heartbeat template to be classified, and the specific determination process is as follows:
the target premature escape state variable array comprises a heartbeat number set Idx and a premature escape state variable set RecentrNSEType corresponding to the number, wherein the array set comprises Idx ═ { Idx, x ∈ Q-1, Q is a positive integer }, and the premature escape state variable set RecentrNSETypex={NSExX belongs to Q-1, and Q is a positive integer }.
The preset continuous stable heart rhythm condition is that the difference value of adjacent elements of a heart beat number set Idx in a target premature escape state variable array is 1 and a premature escape state variable set ReccentNSETypexAll elements are 0.
The preset rhythm state conditions comprise a first rhythm state condition, namely a first rhythm state condition that the odd term element value in the premature escape state variable set in the target premature escape state variable array is 0 and the even term element value is 1, and/or a second rhythm state condition that the interval between any two term times that the element values in the premature escape state variable set in the target premature escape state variable array are 1 is two term times and the term element value is 0.
In a feasible implementation mode, if the value of Q is 8, the heart beat number Idx of the heart beats of the latest 8 detected members contained in the template is acquired8{ Id0, Id1, Id2, Id3, Id4, Id5, Id6, Id7} and the premature escape state variable ReccentNSEType of the last 8 detected beats8={NSE0,NSE1,NSE2,NSE3,NSE4,NSE5,NSE6,NSE7};
If the element difference value of adjacent terms of the heart beat number Idx is 1 and all elements of the premature escape state variable set RecentrNSEType 8 are 0, the target premature escape state variable array conforms to the beat rule of the heart beat of the continuous and stable heart rhythm, wherein 0 represents the normal beat heart beat, and the heart beat continuous and stable mark is set to ContStabLabel ═ True, namely the first mark of the heart beat continuous and stable mark, wherein True represents the heart beat continuous and stable state, and classification is necessary, the step of determining the target template type of the target heart beat template to be classified based on the template information of the target heart beat template to be classified, the heart beat information of the heart beat members and the template type of the existing master template is continuously executed.
In a feasible implementation mode, if the value of Q is 9, the heart beat number Idx of the heart beats of the latest 9 detection members contained in the template is acquired9{ Id0, Id1, Id2, Id3, Id4, Id5, Id6, Id7, Id8} and the premature escape state variable RecentrNSEType of the last 9 detected heartbeats9={NSE0,NSE1,NSE2,NSE3,NSE4,NSE5,NSE6,NSE7,NSE8};
If NSE0 ═ NSE2 ═ NSE4 ═ NSE6 ═ NSE8 ═ 0& & NSE1 ═ NSE3 ═ NSE5 ═ NSE7 ═ 1 ═ i i.e. the value of the singular item element in the premature beat state variable set in the target premature beat state variable array is 0 and the value of the even item element is 1, it is described that the target premature beat state variable array meets the first rhythm state condition of the bigeminal beat rule, and a bigemelael flag True is set, it is determined that classification is necessary, where 0 represents normal beat and 1 represents premature beat; or
If the RecentNSEType9 is {0,0,1,0,0,1,0,0,1} or {0,1,0,0,1,0,0,1,0}, i.e. the interval between any two terms with 1 element value in the premature escape state variable set in the target premature escape state variable array is two terms and the term element value is 0, it means that the target premature escape state variable array conforms to the second rhythm state condition of the triple rule beat rule, which may be a triple rule condition, and sets a triple rule identifier TrigeLabel True, and if it is determined that classification is necessary, the process continues to step 205.
Optionally, after determining that classification is necessary, the following steps may be performed: acquiring an RR interval value of the ith heart beat to be classified; obtaining a target heart beat lead of the ith heart beat to be classified by utilizing an RR interval value and a heart beat lead algorithm of the ith heart beat to be classified; determining a target heartbeat state of the ith heartbeat to be classified according to a preset threshold value and the target heartbeat lead, updating the premature escape number of the first heartbeat template of the ith heartbeat to be classified by using the target heartbeat state, updating the premature escape state of the first heartbeat template, and updating the premature escape information at the moment.
204. If the target heartbeat template to be classified is the second heartbeat template, acquiring the template type of the second heartbeat template and/or the template capacity level of the second heartbeat template, wherein the template capacity level is the template capacity level determined based on a preset template capacity level interval;
the preset template capacity Level interval may be expressed as TempCapList ═ { i, j, k, m, … …, i < j < k < m < … … }, and further, the template capacity Level may be expressed as Level0 ∈ [ i, j), Level1 ∈ [ j, k), ….
The template capacity level comprises a first level Levelold of a first template capacity TempCapOld of a second heart rate template before the matching of the newly detected heart rate template and a second level LevelNew of a second template capacity TempCapNew of the second heart rate template after the matching of the newly detected heart rate template.
204a, if the template type of the second heart beat template is the template type of the leading template and/or the template capacity level of the second heart beat template is not improved, continuing to execute the step of returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified;
optionally, specific implementation manners of steps 204 and 204a are as follows:
if the template type of the second heart beat template is the template type of the leading template, and/or
The preset template capacity Level interval is TempCapList {0,1,3,10,30,100,300,1000}, and then the corresponding template capacity Level is Level0 e [0, 1], Level1 e [1, 3], …;
when the first template capacity is TempCapOld ═ 99, the second template capacity is TempCapNew ═ 100, and the corresponding horizontal levels are LevelOld ═ Level4 and LevelNew ═ Level 5;
if the Level4< Level5, i.e. Level old < Level new, is higher than the Level of the template capacity, it is determined that it is necessary to classify the second heartbeat template, and the step 205 is continuously executed.
When the first template capacity is TempCapOld 101, the second template capacity is TempCapNew 103, and the corresponding horizontal levels are LevelOld 6 and LevelNew 6;
if the Level6 is Level6, that is, Level old is Level new, the Level of the template capacity is not increased, so it is determined that it is not necessary to classify the second heart beat template, and the step of returning i +1 to obtain the heart beat information of the ith heart beat to be classified is continuously performed.
In the embodiment of the invention, the heart beat template to be classified is the first heart beat template or the second heart beat template, so that the heart beat classification referential is further enhanced, the classification precision is improved and the problem that the heart beat type cannot be correctly updated when the heart beat type is updated according to the template type is solved.
205. Determining a target template type of a target heart beat template to be classified based on template information of the target heart beat template to be classified, heart beat information of heart beat members and a template type of an existing dominant template;
in one possible implementation, the template information includes, but is not limited to, the number of templates, the template capacity, the template representative waveform, the template waveform width, the template RR interval, the number of template premature escape, the template P-wave present flag, the template rhythm status, and the template type.
In this embodiment of the present invention, step 205 further includes:
when the i is equal to a preset learning heart beat number threshold value, acquiring the template capacity of each heart beat template of the second heart beat template, wherein the template capacity is the number of heart beat members in the heart beat template;
and sequencing the heartbeat templates according to the size of the templates from large to small, and determining a sequencing result.
And when any one of the heart beat templates at the front A position in the sequencing result meets a preset dominant template selection condition, determining a target heart beat template meeting the preset dominant template selection condition as the dominant template, and updating the template number of the dominant template to the template number corresponding to the target heart beat template.
And when any one heartbeat template in the heartbeat templates at the front A position in the sequencing result does not meet the preset leading template selection condition, determining the reference template as the leading template, and updating the template number of the leading template as the template number corresponding to the reference template.
The preset leading template selection condition is that the template capacity of the target heartbeat template is more than twice that of a reference template, the RR interval of the target heartbeat template is more than that of the reference template, the waveform width of the target heartbeat template is less than that of the reference template, and the P wave identifier of the target heartbeat template is a presence identifier; the reference template is the heart beat template with the largest template capacity in the heart beat templates at the front A position in the sequencing result, and A is a positive integer.
It should be noted that the RR intervals of the templates represent average RR intervals of member heartbeats of different templates, where the RR intervals represent interval values of two adjacent heartbeats. The template waveform width indicates the width of the QRS complex of the waveform represented by different templates.
Illustratively, if i ═ M, the algorithm enters a heart beat classification preprocessing link, that is, a heart beat template corresponding to the dominant template is determined.
Optionally, if a is 3, obtaining the first three template numbers { T0, T1, T2} with the largest template capacity and corresponding template capacities { C0, C1, C2}, template RR intervals { RR0, RR1, RR2}, template waveform widths { W0, W1, W2}, and P-wave identifiers { P0, P1, P2} of the templates, where C0 is greater than or equal to C1 and greater than or equal to C2;
if C1>2C0& & RR1> RR0& & W1< W0& & P1 ═ True, the heartbeat template corresponding to the template number T1 meets the preset dominant template selection condition, and the template number DomiId ═ T1 of the dominant template is updated;
if C2>2C0& & RR2> RR0& & W2< W0& & P2 ═ True, that the heartbeat template corresponding to the template number T2 meets the preset dominant template selection condition, updating the template number DomiId ═ T2 of the dominant template;
if neither C1 nor C2 satisfies the above condition, the template number DomiId of the leading template is set to T0, and after the leading template number is determined, the template type of the leading template is updated to TempType [ DomiId ] ═ 0.
Referring to fig. 3, fig. 3 is a schematic diagram of representative waveforms on different analysis lead channels of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the present invention, in which a waveform diagram of a template No. 0 is a second representative waveform of a leading template, a waveform diagram of a template No. 1 is a first representative waveform of a target template to be classified, and each template waveform diagram includes representative waveforms corresponding to leads on different analysis lead channels (dual leads in fig. 3).
In the embodiment of the present invention, step 205 includes:
a. determining a target waveform relative error of the first representative waveform and the second representative waveform by utilizing a first representative waveform of a target template to be classified, a second representative waveform of an existing leading template and a preset waveform relative error algorithm;
b. and determining the target template type of the target template to be classified according to the target relative error and a preset waveform error threshold.
In a possible embodiment, the preset waveform relative error algorithm may be the following formula:
Figure BDA0003047334230000131
in the formula, RE represents the relative error of the target waveform, abs (-) represents the absolute value, ppv (-) represents the peak-to-peak value, i.e., the maximum value-to-minimum value, TW0 is the second representative waveform of the dominant template, and TW1 is the first representative waveform of the target template to be classified.
Illustratively, the predetermined waveform error threshold is REThreIf RE is present<REThreIf the second representative waveform is similar to the first representative waveform, the target template type of the target template to be classified is the template type of the dominant template, i.e. the first type, such as normal sinus heartbeat, also called N type, and the target template type TempType [ MatchId ] is updated]Updating the heartbeat type BeatType of the heartbeat member of the target template to be classified, namely TempType [ MatchId ] according to the target template type]And returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
Wherein, if RE>=REThreIt means that the second representative waveform is not similar to the waveform of the first representative waveform, and the step of classifying the target template to be classified using waveform continuity and/or rhythm state is continuously performed.
In the embodiment of the invention, the waveform similarity between the target template to be classified and the leading template is judged through the steps a and b, the template types of the target template to be classified are classified, the target template to be classified which does not meet the judgment of the waveform similarity is further classified continuously by using other template type judgment rules, the template types of the target template to be classified can be accurately judged from multiple dimensions, and further, when the heartbeat types are updated in batches, the heartbeat types are updated more accurately.
In this embodiment of the present invention, the heartbeat information of the heartbeat member further includes an RR interval value of the heartbeat member, and the template information further includes a heartbeat continuation stationary flag and a template P-wave flag, then step 205 further includes:
A. acquiring RR interim values of Z heartbeat members closest to the i in the target template to be classified, wherein Z is a positive integer;
B. obtaining a target RR interval standard deviation of the target template to be classified by using the RR interval values of the Z heart beat members, the RR interval average value of the RR interval values of the Z heart beat members and a preset RR interval standard deviation calculation formula;
C. and if the heart beat continuous and stable mark of the target template to be classified is a first mark, the template P wave mark of the target template to be classified is a heart beat sample point number with the mark, the target RR interval standard deviation being less than a preset first duration, and the RR interval average value of the RR interval values of the Z heart beat members being more than the heart beat sample point number with a preset second duration, determining that the target template type of the target template to be classified is the template type of the dominant template.
The first mark represents that the beats of the heart beat members of the target template to be classified are continuous and stable, the preset first time length is less than the preset second time length, and Z is a positive integer.
In a feasible implementation manner, when Z is 8, the preset RR interval standard deviation calculation formula is as follows:
Figure BDA0003047334230000132
wherein RRStd represents the target RR interval standard deviation, RRiRepresenting 8 heart beat member correspondencesEach inter-RR phase value of (RR)meanRR interval mean representing RR interval values of 8 heart beat members.
If constablabel ═ True & & RRStd < MS30& & nrmean > MS500& & TempPExist [ MatchId ] ═ True, it means that the heartbeat continues to be smooth, and the target template type TempType [ MatchId ]' of the target template to be classified is updated to 0, then the process proceeds to step 206.
The continuous and stable heartbeat mark representing the target template to be classified is a first mark, the template P wave mark representing the target template to be classified is a presence mark, MS30 is the number of sample points corresponding to the first time length of 30MS, MS500 represents the number of sample points corresponding to the second time length of 500MS, and the following comparison process is analogized.
If any one of contestblabel ═ True & & RRStd < MS30& & nRRmean > MS500& & TempPExist [ MatchId ] ═ True is not satisfied, it indicates that the heart beat is discontinuous and smooth, and continues to perform the step of classifying the target template to be classified using the rhythm state identification.
In the embodiment of the present invention, the continuity of the target template to be classified and the waveform is judged through step A, B, the template types of the target template to be classified are classified, and further the other template type judgment rules of the target template to be classified which is not judged with sufficient similarity are continuously classified, so that the template types of the target template to be classified can be accurately judged from multiple dimensions, and further, when the heartbeat types are updated in batch, the heartbeat types are accurately updated.
In this embodiment of the present invention, if the template information further includes a rhythm state identifier, step 205 further includes:
I. acquiring rhythm state identification of the target template to be classified, wherein the rhythm state identification comprises normal heart beat identification or rhythm heart beat identification, and the rhythm heart beat identification comprises bigeminal identification or triple-geminal identification or insertion heart beat and heart rhythm identification;
illustratively, the heart beat continuation plateau flag ContStabLabel; bigeminal identification BigeLabel; triple laws identify TrigeLabel.
II. And if the rhythm state identification is any one of rhythm heart beat identifications, determining that the target template type of the target template to be classified is the template type of the dominant template.
In a possible implementation manner, firstly, the rhythm state temprythm [ MatchId ] of the target template to be classified is checked, that is, the rhythm state identifier temprythm [ MatchId ] of the target template to be classified is obtained, if any element is True, the template member heart beat is represented by bigeminal or triple rhythm, or the rhythm state identifier of an intervening heart beat is represented by the rhythm heart beat identifier: if any one of the bigeminal identifier, the triple-geminal identifier or the insertion cardiac rhythm identifier is selected, determining that the template type of the target template to be classified is the dominant template type, updating the target template type TempType [ MatchId ] of the target template to be classified to 0, and continuing to execute step 206;
if all elements in the rhythm state identifier TempRhythm [ MatchId ] are false, the condition that the heart rhythm state of the template member does not have bigeminal or triple rhythm or the heart rhythm state of the inserted heart is the normal heart rhythm identifier is shown;
in the embodiment of the present invention, the rhythm information, i.e., the rhythm state, of the target template to be classified is judged through step I, II, the template types of the target template to be classified are classified, and further, the target template to be classified judged by the unsatisfactory rhythm information is further classified continuously by using the rest template type judgment rules, so that the template types of the target template to be classified can be accurately judged from multiple dimensions, and further, when the heartbeat types are updated in batch, the heartbeat types are accurately updated.
In a possible implementation, if the rhythm state identifier temprythm [ MatchId ], if all elements are false, indicating that the template member heart beat does not have bigeminal or triple rhythm or the inserted heart beat rhythm state, i.e., the rhythm state identifier is the normal heart beat identifier, the bigeminal, triple rhythm and inserted heart beat rhythm states of the target template to be classified, which does not have bigeminal or triple rhythm or the inserted heart beat rhythm state, i.e., the rhythm state identifier is the normal heart beat identifier, may be respectively checked.
Referring to fig. 4, fig. 4 is a schematic diagram of a dual rhythm cardiac electrical signal segment of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the present invention, which shows two rhythm heart beat waveforms collected by V2 and V5 leads, wherein the heart beat of the V2 lead can be represented as {0,1,0,1,0,1, 0}, (V2 lead represents the body surface clavicle midline to the 5 th intercostal intersection point position), the heart beat of the V5 lead can be represented as {1, 0,1,0,1}, (V5 lead represents the body surface axillary anterior line and the same level position as the V4 (clavicle midline to the 4 th intercostal intersection point)) lead, and nRR represents the heart beat RR interval.
Illustratively, the dual, triple and intervening heartbeat rhythm states of the target to-be-classified template for which there is a dual or triple rhythm or intervening heartbeat rhythm state are examined as follows:
(1) judging the state of the bigeminal rhythm: acquiring the latest detected 6 heartbeats of a target to-be-classified template with the rhythm state identified as the normal heart beat identification, and calculating the RR interval ratio between adjacent heartbeats in the 6 latest detected heartbeats; respectively calculating by using an average algorithm of RR interval ratios and RR interval ratios between adjacent heart beats, and determining the average value of target RR interval ratios between each two adjacent heart beats; calculating the average value of the target RR interval ratio by using a relative value algorithm of the RR interval ratio to obtain a relative value of the target RR interval ratio; and determining whether the target template to be classified has a bigeminal state or not according to the relative value of the ratio of each target RR interval, the width of the template waveform, the RR interval of the template and the corresponding threshold.
In one possible implementation, the RR interval ratio of the most recently detected 6 adjacent heart beats of the target template to be classified is calculated as HRRatio ═ { r0, r1, r2} ═ nRR0/nRR1, nRR2/nRR3, nRR4/nRR5 }.
The average value HRRatiomean of the RR interval ratio can be calculated by the following formula:
Figure BDA0003047334230000151
in the formula, ri is an RR interval ratio.
Wherein, the relative value HRRatioRE of RR interval ratio can be calculated by the following formula:
HRRatioRE(i)=abs(ri-HRRatioMean)/HRRatioMean,
in the formula, abs () represents an absolute value operator.
If BigeLabel & & all (hrratiorer) <0.05& & TempRR [ MatchId ] > bpm100& & TempWidth [ MatchId ] < ═ ms110, it is determined that the newly detected heartbeat is in the bigeminal state, the matching template type TempType [ MatchId ] > 0 is updated, the matching template rhythm state TempRhythm [ MatchId ] [0] ═ True is updated, and the process continues to step 206, where all of the elements in hrratiorer) <0.05 are less than 0.05, bpm100 represents the number of sample points corresponding to the rhythm bpm100 bpm, ms110 is the number of sample points corresponding to 110ms, and BigeLabel ═ is the bigeminal identity.
If the BigeLabel ═ True & & all (HRRatio RE) <0.05& & TempRR [ MatchId ] > bpm100& & TempWidth [ MatchId ] < ═ ms110 is not satisfied, the subsequent steps are continued to judge whether the triple rule and the inserted heart beat rhythm state exist in the target template to be classified.
(2) And (3) judging the triple rhythm or insertion heart rhythm state: acquiring a premature beat escape state variable array of the last 9 detected heartbeats in a target heart beat template to be classified; if the element values in the premature escape state variable array satisfy the interval of two item times between any two item times with the element value of 1 and the item time element value of 0, recording the RR interval value array corresponding to the premature escape state variable array by using a preset RR interval value recording rule, wherein the preset RR interval value recording rule comprises a first recording rule and a second recording rule; determining a target RR interval average value corresponding to the RR interval value array by using the RR interval value array and a preset average algorithm; and determining whether triple rhythm exists or rhythm is inserted in the target template to be classified according to the target RR interval average value and RR interval stability judgment conditions.
The first record rule is that when any two item orders with element value of 1 are separated by two item orders and the item order element value is 0, and the last item order element value is 1, the array is RR1List ═ { nRR2, nRR5, nRR8}, RR2List ═ nRR0+ nRR1, nRR3+ nRR4, nRR6+ nRR7 }.
The second recording rule is that when any two item times having an element value of 1 are separated by two item times and the item time element value is 0, and the element value of the last item time is 0, the array is RR1List ═ { nRR0, nRR3, nRR6}, RR2List ═ { nRR1+ nRR2, nRR4+ nRR5, nRR7+ nRR8 }.
The calculation of the average value can refer to the calculation method of the foregoing embodiment, and is not described herein.
The RR interval stability judging conditions comprise: [1] calculating the Ratio RR1Ratio of each RR interval element to the mean value in the RR1List to RR1List/RR1, and if the Ratio RR1Ratio of each RR interval element to the mean value all meets 0.9< RR1Ratio [ j ] <1.1, indicating that the RR interval meets a first Stable condition, namely RR1Stable is True; [2] calculating the Ratio RR2Ratio of each RR interval element to the mean value in the RR2List to RR2List/RR2, and if the Ratio RR2Ratio of each RR interval element to the mean value all meets 0.9< RR2Ratio [ j ] <1.1, indicating that the RR interval meets the second Stable condition, namely RR1Stable is Truer 2 Stable; [3] if 0.9< (2 × RR1/RR2) <1.1, it indicates that the RR interval satisfies the third Stable condition, i.e., RR3Stable ═ True; [4] if 0.9< (RR1/RR2) <1.1, it indicates that the RR interval satisfies the fourth Stable condition RR4Stable ═ True.
If the RR interval of the target template to be classified satisfies the first stable condition, the second stable condition, and the third stable condition and the TempWidth [ MatchId ] < Ms130, the newly detected heartbeat of the target template to be classified satisfies the triple rule rhythm, updates the matching template type TempType [ MatchId ] <0, updates the matching template rhythm state temprythm [ MatchId ] [1] < tr, and continues to execute step 206.
If the RR interval of the target template to be classified satisfies the first and second stable conditions and the fourth stable condition and TempWidth [ MatchId ] < Ms130, the newly detected heartbeat of the target template to be classified satisfies the insertion rhythm, updates the matching template type TempType [ MatchId ] <0, updates the matching template rhythm state temprythm [ MatchId ] [2] < True, and continues to execute step 206.
It should be noted that TempWidth [ MatchId ] represents the template waveform width of the target template to be classified.
Illustratively, the steps of the triple rhythm or insertion heart rhythm state judgment are as follows:
if the triple rule identifier TrigeLabel ═ True exists, acquiring the premature escape state variable RecentrNSEType 9 ∈ R of the last 9 detected heart beats9
(a) If the RecentNSEType9 ═ {0,0,1,0,0,1,0,0,1}, it indicates that the RR interval of the target template to be classified satisfies the first recording rule, and therefore, two types of RR interval values are recorded: RR1List { nRR2, nRR5, nRR8}, and RR2List { nRR0+ nRR1, nRR3+ nRR4, nRR6+ nRR7}, and RR interval average value RR1 ═ mean (RR1List), RR2 ═ mean (RR2List), where mean () denotes the mean calculation operation.
(b) If the RecentNSEType9 ═ {0,1,0,0,1,0,0,1,0}, it indicates that the RR interval of the target template to be classified satisfies the second recording rule, and therefore, two types of RR interval values are recorded: RR1List { nRR0, nRR3, nRR6}, and RR2List { nRR1+ nRR2, nRR4+ nRR5, nRR7+ nRR8}, and RR interval average value RR1 ═ mean (RR1List), RR2 ═ mean (RR2List), where mean () represents the mean operation.
Wherein, the determination that the RR interval satisfies the first stable condition may be determination of N-N heart beat average RR interval stability: initializing an average RR interval stability flag RR1Stable of the N-N heartbeats as False; calculating the Ratio RR1Ratio of each element in RR1List to the mean value RR1List/RR 1; if each element of the RR1Ratio satisfies 0.9< RR1Ratio [ j ] <1.1, and RR1Stable is set to True, it indicates that the RR interval of the target template to be classified satisfies the first Stable condition.
Judging the RR interval to meet a second stable condition, namely judging the stability of the average RR interval of the N-V-N heart beats: initializing an average RR interval stability flag RR2Stable of the N-V-N heart beats as False; calculating the Ratio RR2Ratio of each element in RR2List to the mean value RR2List/RR 2; if each element of the RR2Ratio satisfies 0.9< RR2Ratio [ j ] <1.1, and RR2Stable is set to True, it indicates that the RR interval of the target template to be classified satisfies the second Stable condition.
Judging whether the RR interval meets a third stable condition, namely judging whether the heartbeat meets a complete compensation intermission condition: initializing a complete compensation intermittent condition flag RR3Stable ═ False; if 0.9< (2 × RR1/RR2) < 1.1; and setting RR3Stable to True, which means that the RR interval of the target template to be classified meets a third Stable condition.
Judging whether the RR interval meets a fourth stable condition, namely judging whether a heart beat condition is inserted: initializing an insertion heartbeat condition flag RR4Stable ═ False; if 0.9< (RR1/RR2) <1.1, RR4Stable is set to True, which means that the RR interval of the target template to be classified satisfies the fourth Stable condition.
Then, based on the analysis of the above-described stable conditions, the triple rhythm and intervening heart beat rhythm states can be judged as follows:
if it is
RR1 stage & & RR2 stage ═ True & & RR3 stage ═ True & & TempWidth [ MatchId ] < Ms130, that is, the RR interval of the target template to be classified satisfies the first, second and third stabilization conditions, and the template waveform width is less than the number of heartbeat sample points corresponding to 130Ms, it is judged that the newly detected heartbeat satisfies the triple rhythm, the matching template type TempType [ MatchId ] <0 is updated, the matching template rhythm state temprythm [ MatchId ] [1] < True, and the process continues to step 206;
if it is
RR1Stable & & RR2Stable ═ True & & RR4Stable & & True & & TempWidth [ MatchId ] < Ms130, that is, the RR interval of the target template to be classified satisfies the first, second and fourth stabilization conditions, and the template waveform width is less than the number of heart beat points corresponding to 130Ms, it is judged that the newly detected heart beat satisfies the insertion heart beat, the matching template type TempType [ MatchId ] <0 is updated, the matching template rhythm state temprythm [ MatchId ] [2] < True, and the process proceeds to step 206.
In this embodiment of the present invention, step 205 further includes:
if at least one of the conditions that the heart beat continuous and stable mark of the target template to be classified is a second mark, the template P wave mark of the target template to be classified is a non-existing mark, the conditions that the target RR interval standard deviation is greater than or equal to the number of heart beat sample points within the preset first duration and the RR interval average value of the RR interval values of the Z detected heart beats is less than or equal to the number of heart beat sample points within the preset second duration are satisfied, and the rhythm state mark of the target template to be classified is a normal heart beat mark, determining that the target template type of the target template to be classified is a preset template type, wherein the second mark represents the intermittent and/or unstable beats of the heart beat members of the target template to be classified.
In a feasible implementation manner, if the second representative waveform of the target template to be classified is not similar to the waveform of the first representative waveform, and if the heartbeat continuity and stability flag of the target template to be classified is the second flag, if the template P wave flag of the target template to be classified is the non-existing flag, if at least one of the number of heartbeat sample points in the preset first duration and the number of heartbeat sample points in the preset second duration of the target RR interval standard deviation is greater than or equal to the target RR interval standard deviation, and if the RR interval average value of the RR interval values of the Z detected heartbeats is less than or equal to the preset second duration is satisfied, and the rhythm state flag of the target template to be classified is the normal heartbeat flag, the target template type of the target template to be classified is determined to be the preset template type, and the second flag is the beat interruption and/or instability of the heartbeat member of the target template to be classified.
It should be noted that when none of the target cardiac beats to be classified satisfies the waveform similarity determination condition, the waveform continuity determination condition, and the cardiac rhythm determination condition, the target template type of the target template to be classified is determined to be a preset template type, where the preset template type may be a second type, and ventricular arrhythmia cardiac beats are also referred to as a V type. And proceeds to step 206.
206. And updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
It should be noted that, part of the contents in steps 205 and 206 are the same as steps 103 and 104 shown in fig. 1, and reference may be made to the foregoing contents specifically, and for avoiding repetition, detailed description is not repeated here.
In one possible implementation, step 206 further includes: and outputting the heart beat type to a calling end of the classification module so as to continue a subsequent heart beat analysis process.
In order to make the multi-lead dynamic heart beat real-time classification method more clear in the embodiment of the present invention, the following description is made of the whole classification process by using a specific embodiment:
firstly, a user wears a portable electrocardio collecting box and initializes the data of the electrocardio collecting box, and the collecting box collects electrocardiosignals of a patient and then analyzes the electrocardiosignals into 12-lead Holter real-time data. And after the 12-lead Holter real-time data is subjected to real-time R wave detection, newly detected heart beat data information is obtained, and then the 12-lead Holter data and the heart beat data information are transmitted to an electrocardiosignal real-time clustering module for heart beat clustering. And after heart beat clustering is finished, heart beat data information and clustered heart beat template information are obtained and used for identifying heart beat types. The implementation of the classification method is described below.
In a certain electrocardiogram measuring process, after an electrocardiogram collecting box detects the position of an R wave and finishes heart beat clustering, heart beat information and clustered heart beat template information are firstly obtained. When the number of the accumulated detected heartbeats is less than 16, heart beat template classification is not performed on the heart beats, and the heart beat type is set as the learning heart beat type (the corresponding type number is 3, namely, BeatType is 3). During learning, the algorithm only completes the template accumulation process.
When learning is finished, namely i is equal to M, the algorithm firstly determines a leading template, the template type of the leading template is preset to be N type, and at the moment, the number of the templates is only 1, so that the leading N type template number DomiId is set to be 0.
The heart beat classification phase is formally entered. According to the classification process described in fig. 1 and 2 in the embodiment of the present invention, different classification judgment conditions are adopted to identify the type of the newly detected heartbeat according to the information of the newly detected heartbeat and the template information. The following description will be given taking as an example the case of judging the execution of the condition according to the waveform similarity and the classification of bigeminal rhythms.
Waveform similarity: when the 202 nd heart beat is detected and i equals 202, the clustering module generates a 2 nd new template (the template number is 1) by taking the heart beat waveform as a representative waveform. Then in the single matching template classification step, the classification algorithm first judges that the matching template needs to be updated (the capacity of the matching template is 1, and the capacity level of the new template is greater than the capacity level of the old template by 0, so that the template needs to be classified and/or updated). Then in a template classification link, the algorithm firstly compares the waveform similarity of the matching template and the dominant N-type template. Fig. 3 shows representative waveforms on different analysis lead channels for the dominant N-type template (template No. 0) and the matching template (template No. 1). And calculating by using a preset waveform relative error algorithm to obtain a waveform relative error of 0.0919, wherein the waveform relative error is smaller than a preset threshold REThre which is 0.15, which indicates that the waveforms of the two templates are similar, updating the template type TempType [1] ═ 0, and setting the newly detected heartbeat type as the template type BeatType which is TempType [1] ═ 0. The heart beat type is output and the heart beat classification process is ended.
Bigeminal rhythm: when the 22965 th heartbeat is detected, the classification algorithm acquires the premature escape state variable RecentNSEType6 of the last 6 detected heartbeats as {0,1,0,1,0,1}, triggers a third classification necessity condition, namely the preset rhythm state condition is met, and judges that the bigeminal condition possibly exists. In the step of template classification, the algorithm enters bigeminal rhythm judgment conditions. The algorithm first obtains the pre-template RR interval TempRR [ MatchId ] ═ 183.75 and the template waveform width TempWidth [ MatchId ] ═ 25.25 corresponding to the newly detected heartbeat, and knows bpm100 ═ 153 and ms110 ═ 28. Then, RR interval ratio HRRatio {1.770,1.801,1.823} of the latest 6 adjacent heart beats is calculated, as well as average hrratiometric mean ═ 1.80 and relative hrratiometric re ═ 0.016,0.002,0.014} of the corresponding RR interval ratios. Since hrratioreall elements are less than 0.05 and TempRR [ MatchId ] > bpm100 and TempWidth [ MatchId ] < ═ ms110, the current newly detected heartbeat is judged to be in the bigeminal rhythm state, and the matching template type, BeatType ═ TempType [1] < ═ 0 is set. The heart beat type is output and the heart beat classification process is ended.
The embodiment of the invention provides a multi-lead dynamic heart beat real-time classification method. The method has the advantages that the inaccurate heart beat type classification caused by insufficient accumulation of heart beat templates is prevented by judging the size between i and a preset learning heart beat number threshold value, the target heart beat template to be classified is determined to be a first heart beat template or a second heart beat template according to the selection condition of the i and the preset heart beat template to be classified, the classification necessity judgment is carried out on the target heart beat template to be classified, the pressure for classifying the heart beat template every i times is reduced, the continuous and effective updating of the template type can be ensured, the problem that the heart beat type cannot be determined wrongly due to the fact that the template type cannot be corrected correctly after being classified wrongly is solved, and the heart beat type classification precision is improved; the heart beat classification is carried out by acquiring the multi-lead electrocardiosignal fragments, so that the multi-dimensional judgment of heart beat classification can be realized, and the heart beat type judgment accuracy is improved. In the further heart beat classification, the template type is judged by utilizing bigeminy, trigeminy and insertion heart beat rhythm assistance, so that the heart beat classification precision is further improved.
Referring to fig. 5, fig. 5 is a block diagram of a multi-lead dynamic heart beat real-time classification apparatus according to an embodiment of the present invention, the apparatus includes:
to-be-classified heart beat detection module 501: the heart beat classifying method comprises the steps of obtaining heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 1;
the target template to be classified determining module 502: if the i is greater than or equal to a preset learning heart beat number threshold value and the heart beat information of the ith heart beat to be classified comprises the first identification, determining a target heart beat template to be classified, wherein if the i does not meet a preset condition, the target heart beat template to be classified is a first heart beat template corresponding to the ith heart beat to be classified, if the i meets a preset condition, the target heart beat template to be classified is a second heart beat template corresponding to the previous i heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of heart beat members with similar waveform morphology;
the template type determination module 503: the method comprises the steps of determining a target template type of a target heartbeat template to be classified based on template information of the target heartbeat template to be classified, heartbeat information of heartbeat members and a template type of an existing dominant template;
heartbeat type update module 504: and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
It should be noted that the content shown in each module in the above apparatus is the same as the step shown in fig. 1, and reference may be specifically made to the above content, and in order to avoid repetition, the description is not repeated here.
The embodiment of the invention discloses a multi-lead dynamic heart beat real-time classification device, which comprises: the heart beat detection module to be classified: the heart beat classifying method comprises the steps of obtaining heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 0; the target template to be classified determining module: if the i is greater than or equal to a preset learning heart beat number threshold value and the heart beat information of the ith heart beat to be classified comprises the first identification, determining a target heart beat template to be classified, wherein if the i does not meet a preset condition, the target heart beat template to be classified is a first heart beat template corresponding to the ith heart beat to be classified, if the i meets a preset condition, the target heart beat template to be classified is a second heart beat template corresponding to the previous i heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of heart beat members with similar waveform morphology; a template type determination module: the method comprises the steps of determining a target template type of a target heartbeat template to be classified based on template information of the target heartbeat template to be classified, heartbeat information of heartbeat members and a template type of an existing dominant template; heartbeat type update module: and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified. The size between i and a preset learning heart beat number threshold is judged, so that the heart beat type classification is prevented from being inaccurate due to insufficient accumulation of heart beat templates, a target heart beat template to be classified is determined to be a first heart beat template or a second heart beat template according to the selection conditions of i and the preset heart beat template to be classified, the pressure for classifying the heart beat templates every i times is reduced, the template types can be continuously and effectively updated, the problem that the heart beat types are determined incorrectly due to the fact that the template types cannot be correctly corrected after being incorrectly classified is solved, and the heart beat type classification precision is improved; the heart beat classification is carried out by acquiring the multi-lead electrocardiosignal fragments, so that the multi-dimensional judgment of heart beat classification can be realized, and the heart beat type judgment accuracy is improved.
FIG. 6 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a terminal, and may also be a server. As shown in fig. 6, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, causes the processor to carry out the steps of the above-described method embodiments. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the steps of the above-described method embodiments. Those skilled in the art will appreciate that the architecture shown in figure X is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps as shown in any of fig. 1, fig. 2 and the possible embodiments.
In one embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, causes the processor to perform the steps as shown in any of fig. 1, fig. 2 and the possible embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for real-time classification of a multi-lead dynamic heartbeat, the method comprising:
acquiring heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 1;
if the i is greater than or equal to a preset learning heart beat number threshold value, and the heart beat information of the ith heart beat to be classified comprises the first identification, determining a target heart beat template to be classified, wherein if the i does not meet a preset heart beat template selection condition to be classified, the target heart beat template to be classified is a first heart beat template corresponding to the ith heart beat to be classified, if the i meets the preset heart beat template selection condition to be classified, the target heart beat template to be classified is a second heart beat template corresponding to the previous i heart beat to be classified, and the heart beat template is a heart beat set formed by a plurality of similar heart beat members in waveform morphology;
determining a target template type of a target heart beat template to be classified based on template information of the target heart beat template to be classified, heart beat information of heart beat members and a template type of an existing dominant template;
and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
2. The method of claim 1, wherein the determining the target heartbeat template to be classified further comprises:
if the target heartbeat template to be classified is the first heartbeat template, acquiring heartbeat numbers of Q heartbeat members which are detected recently in the first heartbeat template and a premature escape state variable corresponding to each heartbeat number to obtain a target premature escape state variable array, wherein Q is a positive integer;
and if the target premature beat escape state variable array meets a preset continuous stable heart rhythm condition or a preset rhythm state condition, continuously executing the step of determining the target template type of the target heart beat template to be classified based on the template information of the target heart beat template to be classified, the heart beat information of the heart beat members and the template type of the existing master template, wherein the preset continuous stable heart rhythm condition is the beat rule of the heart beat conforming to the continuous stable heart rhythm, and the rhythm state condition comprises a first rhythm state condition conforming to the bigeminal beat rule and/or a second rhythm state condition conforming to the triple-rhythm beat rule.
3. The method of claim 1, wherein the determining the target heartbeat template to be classified further comprises:
if the target heartbeat template to be classified is the second heartbeat template, acquiring the template type of the second heartbeat template and/or the template capacity level of the second heartbeat template, wherein the template capacity level is the template capacity level determined based on a preset template capacity level interval;
and if the template type of the second heart beat template is the template type of the leading template and/or the template capacity level of the second heart beat template is not improved, continuously executing the step of returning to the step of acquiring the heart beat information of the ith heart beat to be classified by i + 1.
4. The method of claim 1, wherein the template information further includes a template number, a template capacity, an RR interval of a template, a waveform width of a template, and a P-wave identifier of a template, and determining a target template type of a target heartbeat template to be classified based on the template information of the target heartbeat template to be classified and heartbeat information of the heartbeat members, and a template type of an existing dominant template, and before further comprising:
when the i is equal to a preset learning heart beat number threshold value, acquiring the template capacity of each heart beat template of the second heart beat template, wherein the template capacity is the number of heart beat members in the heart beat template;
sequencing the heartbeat templates according to the size of the templates from large to small, and determining a sequencing result;
when any one of the heart beat templates of the front A position in the sequencing result meets a preset dominant template selection condition, determining that a target heart beat template meeting the preset dominant template selection condition is the dominant template, and updating the template number of the dominant template to the template number corresponding to the target heart beat template, wherein the preset dominant template selection condition is that the template capacity of the target heart beat template is greater than twice that of a reference template, the RR interval of the target heart beat template is greater than that of the reference template, the waveform width of the target heart beat template is less than that of the reference template, the P wave identifier of the target heart beat template is an existence identifier, and the reference template is the heart beat template with the maximum template capacity in the heart beat templates of the front A position in the sequencing result, a is a positive integer;
and when any one heartbeat template in the heartbeat templates at the front A position in the sequencing result does not meet the preset leading template selection condition, determining the reference template as the leading template, and updating the template number of the leading template as the template number corresponding to the reference template.
5. The method of claim 1, further comprising:
if the i is smaller than the preset learning heart beat number threshold value and the heart beat information of the ith heart beat to be classified comprises the first identifier, determining that the heart beat type is the learning heart beat type, and returning to the step of acquiring the heart beat information of the ith heart beat to be classified by setting i as i + 1;
and if the i is smaller than the preset learning heart beat number threshold value and the heart beat information of the ith heart beat to be classified comprises the second identification, determining that the heart beat type is an unknown heart beat type, and returning to the step of acquiring the heart beat information of the ith heart beat to be classified by setting i as i + 1.
6. The method according to claim 1, wherein the heartbeat information of the heartbeat member further includes RR inter-period values of the heartbeat member, the template information further includes a heartbeat continuation smoothness flag and a template P-wave identifier, and the determining the target template type of the target heartbeat template to be classified based on the template information of the target heartbeat template to be classified and the heartbeat information of the heartbeat member and the template type of the existing dominant template includes:
acquiring RR interim values of Z heartbeat members closest to the ith heartbeat to be classified in the target template to be classified, wherein Z is a positive integer;
obtaining a target RR interval standard deviation of the target template to be classified by using the RR interval values of the Z heart beat members, the RR interval average value of the RR interval values of the Z heart beat members and a preset RR interval standard deviation calculation formula;
if the heart beat continuous and stable mark of the target template to be classified is a first mark, the template P wave mark of the target template to be classified is a heart beat sample point number with a mark, the target RR interval standard deviation is smaller than a preset first time length, and the RR interval average value of the RR interval values of Z heart beat members is larger than the heart beat sample point number with a preset second time length, determining that the target template type of the target template to be classified is the template type of the master template, the first mark represents that the heart beat members of the target template to be classified are continuous and stable, the preset first time length is smaller than the preset second time length, and Z is a positive integer.
7. The method of claim 1, wherein the template information further includes a rhythm state identifier, and the determining a target template type of the target heartbeat template to be classified based on the template information of the target heartbeat template to be classified, the heartbeat information of the heartbeat member, and the template types of the existing master templates comprises:
acquiring rhythm state identification of the target template to be classified, wherein the rhythm state identification comprises normal heart beat identification or rhythm heart beat identification, and the rhythm heart beat identification comprises bigeminal identification or triple-geminal identification or insertion heart beat and heart rhythm identification;
and if the rhythm state identification is any one of rhythm heart beat identifications, determining that the target template type of the target template to be classified is the template type of the dominant template.
8. The method according to any one of claims 6-7, wherein the determining a target template type of the target heartbeat template to be classified based on template information of the target heartbeat template to be classified and heartbeat information of the heartbeat member and template types of existing dominant templates further comprises:
if at least one of the conditions that the heart beat continuous and stable mark of the target template to be classified is a second mark, the template P wave mark of the target template to be classified is a non-existing mark, the conditions that the target RR interval standard deviation is greater than or equal to the number of heart beat sample points within the preset first duration and the RR interval average value of the RR interval values of the Z detected heart beats is less than or equal to the number of heart beat sample points within the preset second duration are satisfied, and the rhythm state mark of the target template to be classified is a normal heart beat mark, determining that the target template type of the target template to be classified is a preset template type, wherein the second mark represents the intermittent and/or unstable beats of the heart beat members of the target template to be classified.
9. An apparatus for real-time classification of multi-lead dynamic heart beats, the apparatus comprising:
the heart beat detection module to be classified: the heart beat classifying method comprises the steps of obtaining heart beat information of an ith heart beat to be classified, wherein the heart beat to be classified is a multi-lead electrocardiosignal segment obtained by performing equal-length division by taking an R wave as a center in the multi-lead electrocardiosignal, the heart beat information at least comprises a first mark for effective heart beat or a second mark for ineffective heart beat, and the initial value of i is 1;
the target template to be classified determining module: the heartbeat template to be classified is determined if the i is greater than or equal to a preset learning heartbeat number threshold value and heartbeat information of the ith heartbeat to be classified comprises the first identification, wherein if the i does not meet a preset heartbeat template to be classified selection condition, the target heartbeat template to be classified is a first heartbeat template corresponding to the ith heartbeat to be classified, if the i meets the preset heartbeat template to be classified selection condition, the target heartbeat template to be classified is a second heartbeat template corresponding to the previous i heartbeat to be classified, and the heartbeat template is a heartbeat set formed by a plurality of waveform shape similar heartbeat members;
a template type determination module: the method comprises the steps of determining a target template type of a target heartbeat template to be classified based on template information of the target heartbeat template to be classified, heartbeat information of heartbeat members and a template type of an existing dominant template;
heartbeat type update module: and updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and returning i to i +1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified.
10. A computer device comprising a memory and a processor, characterized in that the memory stores a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 8.
CN202110476791.5A 2021-04-29 2021-04-29 Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium Active CN113180687B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110476791.5A CN113180687B (en) 2021-04-29 2021-04-29 Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110476791.5A CN113180687B (en) 2021-04-29 2021-04-29 Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113180687A true CN113180687A (en) 2021-07-30
CN113180687B CN113180687B (en) 2024-02-09

Family

ID=76980668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110476791.5A Active CN113180687B (en) 2021-04-29 2021-04-29 Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113180687B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020183637A1 (en) * 2001-04-30 2002-12-05 Cardiac Pacemakers, Inc. Normal cardiac rhythm template generation system and method
US20030181818A1 (en) * 2002-03-25 2003-09-25 Jaeho Kim Method and system for characterizing a representative cardiac beat using multiple templates
US20100185109A1 (en) * 2009-01-22 2010-07-22 Medtronic, Inc. "blurred template" approach for arrhythmia detection
US20110184297A1 (en) * 2010-01-26 2011-07-28 Stmicroelectronics S.R.L. Method and device for estimating morphological features of heart beats
CN102835954A (en) * 2012-09-07 2012-12-26 深圳市邦健电子有限公司 Method for generating heart beating waveform template and treating ventricular premature beat detection and device
US20170105643A1 (en) * 2015-06-23 2017-04-20 Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences Gpu-based parallel electrocardiogram signal analysis method, computer readable storage medium and device
CN106725450A (en) * 2017-02-20 2017-05-31 武汉中旗生物医疗电子有限公司 QRS complex detection method
US20190223808A1 (en) * 2018-01-19 2019-07-25 Biosense Webster (Israel) Ltd. Apparatus and method for heartbeat classification based on time sequence and morphology of intracardiac and body surface electrocardiogram (ECG) Signals
CN110693483A (en) * 2019-09-02 2020-01-17 乐普智芯(天津)医疗器械有限公司 Method for automatically analyzing dynamic electrocardiogram
CN111150387A (en) * 2020-01-15 2020-05-15 深圳市邦健科技有限公司 Electrocardiogram template matching method and device, computer equipment and storage medium
US20210022633A1 (en) * 2018-04-27 2021-01-28 Vita-Course Technologies Co., Ltd. Systems and methods for determining an arrhythmia type
CN112528783A (en) * 2020-11-30 2021-03-19 深圳邦健生物医疗设备股份有限公司 Electrocardiogram heartbeat data clustering method and device, electronic equipment and medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020183637A1 (en) * 2001-04-30 2002-12-05 Cardiac Pacemakers, Inc. Normal cardiac rhythm template generation system and method
US20030181818A1 (en) * 2002-03-25 2003-09-25 Jaeho Kim Method and system for characterizing a representative cardiac beat using multiple templates
US20100185109A1 (en) * 2009-01-22 2010-07-22 Medtronic, Inc. "blurred template" approach for arrhythmia detection
US20110184297A1 (en) * 2010-01-26 2011-07-28 Stmicroelectronics S.R.L. Method and device for estimating morphological features of heart beats
CN102835954A (en) * 2012-09-07 2012-12-26 深圳市邦健电子有限公司 Method for generating heart beating waveform template and treating ventricular premature beat detection and device
US20170105643A1 (en) * 2015-06-23 2017-04-20 Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences Gpu-based parallel electrocardiogram signal analysis method, computer readable storage medium and device
CN106725450A (en) * 2017-02-20 2017-05-31 武汉中旗生物医疗电子有限公司 QRS complex detection method
US20190223808A1 (en) * 2018-01-19 2019-07-25 Biosense Webster (Israel) Ltd. Apparatus and method for heartbeat classification based on time sequence and morphology of intracardiac and body surface electrocardiogram (ECG) Signals
US20210022633A1 (en) * 2018-04-27 2021-01-28 Vita-Course Technologies Co., Ltd. Systems and methods for determining an arrhythmia type
CN110693483A (en) * 2019-09-02 2020-01-17 乐普智芯(天津)医疗器械有限公司 Method for automatically analyzing dynamic electrocardiogram
CN111150387A (en) * 2020-01-15 2020-05-15 深圳市邦健科技有限公司 Electrocardiogram template matching method and device, computer equipment and storage medium
CN112528783A (en) * 2020-11-30 2021-03-19 深圳邦健生物医疗设备股份有限公司 Electrocardiogram heartbeat data clustering method and device, electronic equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈永波等: "基于改进K均值聚类生成匹配模板的心搏分类方法", 传感器与微系统, vol. 37, no. 4 *

Also Published As

Publication number Publication date
CN113180687B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
US7289845B2 (en) Curvature based method for selecting features from an electrophysiologic signal for purpose of complex identification and classification
US7769434B2 (en) Method of physiological data analysis and measurement quality check using principal component analysis
CN110464333B (en) Method and device for storing electrocardiogram data
US6119035A (en) Method and system for synthesizing the 12-lead electrocardiogram
US20160256063A1 (en) Analyte assessment and arrhythmia risk prediction using physiological electrical data
CN113876335B (en) Electrocardiogram and heart beat classification method, device, electronic equipment and medium
CN110226928B (en) Method and device for identifying atrioventricular premature atrial fibrillation and atrial fibrillation with poor atrial fibrillation transmission
EP2490587A1 (en) Method and system for detecting cardiac arrhythmia
CN112528783B (en) Electrocardiogram and heart beat data clustering method, device, electronic equipment and medium
CN110367968B (en) Right bundle branch retardation detection method, device, equipment and storage medium
CN108403107A (en) A kind of arrhythmia cordis method of discrimination and system
Soria et al. An ECG classification model based on multilead wavelet transform features
CN111832537A (en) Abnormal electrocardiosignal identification method and abnormal electrocardiosignal identification device
US8880352B2 (en) System and method for analyzing an electrophysiological signal
CN111528833B (en) Rapid identification and processing method and system for electrocardiosignals
CN113180687A (en) Multi-lead dynamic heartbeat real-time classification method, device, equipment and storage medium
Pope et al. Development and validation of an automated method of the Selvester QRS scoring system for myocardial infarct size
CN113940682A (en) Atrial fibrillation identification method based on statistical characteristics
CN113812962A (en) Method and system for constructing electrocardio-rhythm classification neural network and storage medium
CN114680901A (en) Electronic device and method for selecting features of an electrocardiogram
Melgarejo-Meseguer et al. QRS fragmentation index as a new discriminator for early diagnosis of heart diseases
WO2023199682A1 (en) Electrocardiographic analysis device, electrocardiographic analysis method, and program
JP7336171B1 (en) Electrocardiogram analyzer, electrocardiogram analysis method and program
CN113749665B (en) Method, device, equipment and medium for capturing abnormal index
CN112587146B (en) Heart rhythm type identification method and device based on neural network with improved loss function

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
GR01 Patent grant
GR01 Patent grant