CN113180687B - Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium - Google Patents
Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113180687B CN113180687B CN202110476791.5A CN202110476791A CN113180687B CN 113180687 B CN113180687 B CN 113180687B CN 202110476791 A CN202110476791 A CN 202110476791A CN 113180687 B CN113180687 B CN 113180687B
- Authority
- CN
- China
- Prior art keywords
- template
- heart beat
- classified
- target
- type
- 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.)
- Active
Links
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; 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-guide dynamic heart beat real-time classification method, device, equipment and storage medium, which are used for judging the size between i and a preset learning heart beat number threshold value, preventing inaccurate heart beat type classification caused by insufficient heart beat template accumulation, determining a target heart beat template to be classified as a first heart beat template or a second heart beat template according to i and a preset heart beat template selection condition to be classified, reducing the pressure of classifying the heart beat template every i times, ensuring continuous and effective update of the template type, avoiding the problem that the heart beat type is determined to be wrong due to the fact that the heart beat type cannot be corrected correctly after the template type is classified to be wrong, and improving the heart beat type classification precision; the heart beat classification is performed by acquiring the multi-lead electrocardiosignal segments, so that multidimensional judgment of the heart beat classification can be realized, and the accuracy of judging the heart beat type is improved.
Description
Technical Field
The invention relates to the technical field of electrocardiogram processing, in particular to a multi-guide dynamic heart beat real-time classification method, device and equipment and a storage medium.
Background
Electrocardiogram and heart beat classification is defined as the type recognition of heart beats. Electrocardiogram software automatically identifies the type of heart beat by adopting different algorithms, provides the doctor with the member heart beat states contained in various templates, and improves the diagnosis efficiency of the doctor. The implementation methods of the current electrocardiographic heart beat classification can be roughly divided into the following two types:
1. the manual extraction characteristic method comprises the following steps: and constructing relevant characteristic parameters of the heart beat type through expert knowledge, and comprehensively calculating corresponding heart beat type marks by using the relevant characteristic parameters through machine learning. However, the method needs to use the clinical experience of a professional doctor, and has large calculation amount and inaccurate heart beat classification result when acquiring various characteristic parameters;
2. neural network method: taking the original heart beat signal as the input of the neural network, taking the heart beat artificial mark as the output, and training the neural network model by using a back propagation algorithm. However, the method needs to collect a large amount of clinical data, so that a training database conforming to the specification is constructed, the time consumption is generally long, the accuracy of sample collection is depended, the heart beat classification result is influenced by the sample, and the classification efficiency is low.
Therefore, a scheme of heartbeat classification with strong applicability is not seen at present, and the accuracy and the classification efficiency of heartbeat classification can be improved.
Disclosure of Invention
The invention mainly aims to provide a multi-guide dynamic heartbeat real-time classification method, a device, computer equipment and a storage medium, which can solve the problems of inaccurate heartbeat classification and low classification efficiency in the prior art of heartbeat classification and can be performed in real-time and dynamic detection of heartbeat.
To achieve the above object, a first aspect of the present invention provides a multi-guide dynamic heartbeat real-time classification method, the method including:
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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of the i is 1;
if i is greater than or equal to a preset learning heart beat number threshold value and the heart beat information of the i-th heart beat to be classified contains the first identifier, determining a target heart beat template to be classified, wherein if i does not meet a preset heart beat template selection condition to be classified, the target heart beat template is a first heart beat template corresponding to the i-th heart beat to be classified, and 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 i-th 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 forms;
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 the heart beat member 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 enabling i=i+1 to return to the step of acquiring the heart beat information of the ith heart beat to be classified.
In a possible implementation manner, the determining the target heartbeat template to be classified further includes:
if the target heart beat template to be classified is the first heart beat template, acquiring the heart beat numbers of the Q heart beat members detected recently in the first heart beat template and the premature beat escape state variables corresponding to each heart beat number to obtain a target premature beat escape state variable array, wherein Q is a positive integer;
if the target premature beat escape state variable array meets a preset continuous stable rhythm condition or meets a preset rhythm state condition, continuing to execute the steps of determining the target template type of the target to-be-classified heart beat template based on the template information of the target to-be-classified heart beat template, the heart beat information of the heart beat member and the template type of the existing leading template, wherein the preset continuous stable rhythm condition is a beat rule of heart beat conforming to the continuous stable rhythm, and the rhythm state condition comprises a first rhythm state condition conforming to a bigeminal rhythm beat rule and/or a second rhythm state condition conforming to a trigeminal rhythm beat rule.
In a possible implementation manner, the determining the target heartbeat template to be classified further includes:
if the target heart beat template to be classified is the second heart beat template, acquiring a template type of the second heart beat template and/or a template capacity level of the second heart beat template, wherein the template capacity level is the template capacity level determined based on a preset template capacity level interval;
if the template type of the second heartbeat template is the template type of the dominant template and/or the template capacity level of the second heartbeat template is not improved, continuing to execute the step of enabling i=i+1 to return to execute the step of acquiring the heartbeat information of the i-th heartbeat to be classified.
In a possible implementation manner, the template information further includes a template number, a template capacity, an RR interval of a template, a waveform width of the template, and a P-wave identifier of the template, and determining, based on template information of a target to-be-classified heartbeat template, heartbeat information of the heartbeat member, and a template type of an existing dominant template, a target template type of the target to-be-classified heartbeat template, which further includes:
when the i is equal to a preset learning heart beat number threshold value, obtaining 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;
Sorting the heart beat templates according to the template capacity from large to small, and determining a sorting result;
when any one of the heart beat templates of the front A-bit in the sorting 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, updating the template number of the dominant template as 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 larger than the template capacity of a double reference template, the RR interval of the target heart beat template is larger than the RR interval of the reference template, the waveform width of the target heart beat template is smaller than the waveform width of the reference template, the P wave mark of the target heart beat template is a presence mark, the reference template is the heart beat template with the largest template capacity in the heart beat templates of the front A-bit in the sorting result, and the A is a positive integer;
and when any heart beat template in the heart beat templates of the front A position in the sequencing result does not meet the preset dominant template selection condition, determining the reference template as the dominant template, and updating the template number of the dominant template to 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 contains the first identifier, determining that the heart beat type is a learning heart beat type, and enabling i=i+1 to return to the step of executing the heart beat information of the ith heart beat to be classified;
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 contains the second identifier, determining that the heart beat type is an unknown heart beat type, and enabling i=i+1 to return to the step of executing the heart beat information of the ith heart beat to be classified.
In a possible 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 continuous and stable flag and a template P-wave flag, and 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 interval values of Z heart beat members closest to the ith heart beat 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, RR interval average values of the RR interval values of the Z heart beat members and a preset RR interval standard deviation calculation formula;
if the continuous and stable heart beat 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 presence mark, the standard deviation of the target RR interval is smaller than the number of heart beat sample points with preset first time length, the average value of the RR intervals of the Z heart beat members is larger than the number of heart beat sample points with preset second time length, the target template type of the target template to be classified is determined to be the template type of the leading template, the first mark is the continuous and stable heart beat of the heart beat member representing the target template to be classified, the preset first time length is smaller than the preset second time length, and Z is a positive integer.
In a possible implementation manner, the template information further includes a rhythm status identifier, and determining, 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, a target template type of the target heartbeat template to be classified includes:
Acquiring a rhythm state identifier of the target template to be classified, wherein the rhythm state identifier comprises a normal heart beat identifier or a rhythm heart beat identifier, and the rhythm heart beat identifier comprises a bigeminal rhythm identifier or a trigeminal rhythm identifier or an insertion heart beat rhythm identifier;
and if the rhythm state identifier is any one of rhythm heartbeat identifiers, determining that the target template type of the target template to be classified is the template type of the dominant template.
In one possible implementation manner, 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 further includes:
if the continuous stable heart beat mark of the target template to be classified is a second mark, if the template P wave mark of the target template to be classified is a non-existence mark, if the standard deviation of the target RR interval is larger than or equal to the number of heart beat sample points in a preset first duration, if the average value of the RR intervals of the Z detection heart beats is smaller than or equal to the number of heart beat sample points in a preset second duration, 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, and if the second mark is intermittent and/or unstable representing the heart beat member of the target template to be classified.
To achieve the above object, a second aspect of the present invention provides a real-time classifying device for multi-lead dynamic heart beat, the device comprising:
the heart beat detection module to be classified: the method comprises the steps of 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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of i is 1;
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 i-th heart beat to be classified contains the first identifier, 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 i-th heart beat to be classified, and if the 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 i-th 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 forms;
The template type determining module: the method comprises the steps of 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 template types of existing dominant templates;
a heart beat type updating 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=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 comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps as described 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 described 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-guide dynamic heartbeat 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 carrying out equal-length division by taking R waves as the center in a multi-lead electrocardiosignal, and the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of i is 0; if i is greater than or equal to a preset learning heart beat number threshold value, and the heart beat information of the i-th heart beat to be classified comprises a first mark, 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 i-th heart beat to be classified, and if i meets the preset condition, the target heart beat template to be classified is a second heart beat template corresponding to the i-th 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 forms; determining a target template type of the 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 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=i+1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified. The heart beat type classification inaccuracy caused by insufficient accumulation of heart beat templates is prevented by judging the size between the i and the preset learning heart beat number threshold value, the target heart beat template to be classified is determined to be the first heart beat template or the second heart beat template according to the i and the preset heart beat template selection conditions, the pressure of 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 is determined to be wrong due to the fact that the template type cannot be corrected correctly after the classification is wrong is avoided, and the heart beat type classification precision is improved; the heart beat classification is performed by acquiring the multi-lead electrocardiosignal segments, so that multidimensional judgment of the heart beat classification can be realized, and the accuracy of judging the heart beat type is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is a flow chart of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the invention;
FIG. 2 is another flow chart of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the invention;
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;
FIG. 4 is a schematic diagram of a bigeminal rhythm electrocardiosignal segment of a multi-lead dynamic heart beat real-time classification method in an embodiment of the invention;
FIG. 5 is a block diagram of a multi-lead dynamic heart beat real-time classification device according to an embodiment of the invention;
fig. 6 is a block diagram of a computer device in an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 invention, where the multi-lead dynamic heartbeat real-time classification method specifically includes the following steps:
step 101, 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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of i is 1;
it should be noted that i represents a detected heart beat sequence number, which can be understood as a corresponding detection number when detecting a heart beat to be classified, and an initial value of i is 1.
Wherein, the heart beat is an electrocardio signal (ECG) segment, and the ith heart beat to be classified is a multi-lead electrocardio signal segment detected for the ith time.
It will be appreciated that a complete heart beat is typically made up of P-waves, QRS complexes and T-waves. Wherein in a complete heart beat, the QRS complex is the main part of the heart beat, and the R wave is dominant in the QRS complex. Therefore, in the heart beat detection process, the marking position of the heart beat is generally based on the R wave, and the heart beat can be obtained by dividing the length of the electrocardiosignal by taking the R wave position as the center.
The multi-lead electrocardiosignal segments are to acquire electrocardiosignals at different lead positions on the body surface of a user by using an electrocardiosignal acquisition box to obtain multi-lead electrocardiosignals, and then to perform R wave detection on the multi-lead electrocardiosignals, and then to perform 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 heart beat information includes information about marks for distinguishing different heart beats, physiological information indicating a heart beat state, and the like.
102, 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 contains the first identifier, determining a target heart beat template to be classified;
the target heart beat template to be classified is a heart beat template corresponding to heart beats to be classified, and the heart beat template refers to a heart beat set formed by a plurality of heart beat members with similar waveform morphology.
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 an ith heart beat to be classified, and can also be called a matching template corresponding to a new detected heart beat; when i is greater than or equal to the preset learning heart beat number threshold, if 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 heart beat to be classified before i, and can also be called as all matching templates corresponding to all detected heart beats, and it can be understood that the detected heart beats comprise new detected heart beats and historical detected heart beats. In this way, it may be determined that the target cardiac template to be classified may be the first cardiac template or the second cardiac template.
Note that, the preset learning heart beat number threshold represents the detected heart beat number, that is, the heart beat detection times, the preset learning heart beat number threshold may be represented by M, where M is a positive integer, and the value of M may be 12, 16, 18, or the like, which is not limited herein by way of example.
For example, the preset heart beat template selection condition to be classified may be that the preset detection frequency threshold value X is utilized, where X is a positive integer, and the preset heart beat template selection condition to be classified may be that:
i%X==0&&i!=0;
wherein i represents the number of detected heart beats,% is the remainder operator, X is the preset detection times threshold value, & is the logical AND operator, +! Is a logical not operator.
Where i% x= =0 represents i divided by X, and the remainder is equal to 0, then the equation is described as i immediately satisfying i% x= =0, whereas the equation is not described as i immediately not satisfying i% x= =0; i-! When the value of i is not 0, the equation is described as i satisfying i% x= 0 immediately, whereas the equation is not described as i not satisfying i% x= 0 immediately.
Further, if the judging conditions on both sides of the logical AND operator representing the operator are all met, i meets the preset heart beat template selecting condition to be classified.
In one possible implementation, when i is greater than or equal to a preset learning heart beat number threshold value m=16 and the i-th heart beat information to be classified includes a first mark that the heart beat is valid and i satisfies i% 100= =0 ≡ ≡i ≡! When the heart beat template is=0, the heart beat template to be classified is a first heart beat template, namely a matching template corresponding to the newly detected heart beat; when i is greater than or equal to a preset learning heart beat number threshold value m=16 and the heart beat information of the i-th heart beat to be classified contains a first mark that the heart beat is valid and i does not satisfy i% 100= 0 ≡ ≡i ≡! When=0, it indicates that the target heart beat template to be classified is the second heart beat template, i.e. all the matching templates corresponding to all detected heart beats.
In this way, it may be determined that the target cardiac template to be classified may be the first cardiac template or the second cardiac template. The classification pressure of each algorithm can be reduced, and the template type can be continuously and effectively updated.
Before the heart beat template classification is executed, the relation between i and a preset learning heart beat number threshold M is utilized to determine the target template to be classified, so that the pressure of heart beat template classification each time can be effectively relieved, and efficient classification efficiency and classification precision are realized.
Step 103, determining a target template type of the target heart beat template to be classified based on template information of the target heart beat template to be classified, heart beat information of the heart beat members and template types of existing leading templates;
the template information includes information about, for example, marker information for distinguishing different heart beat templates, physiological information indicating the state of the heart beat template, and composition information of heart beat members of the heart beat template.
The dominant template is a reference template, and 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 as the distinguishing dominant template can be expressed as a DomiId, and the template number of the target template to be classified can be expressed as a Match Id.
Illustratively, as a distinguishing template type, a template type may be expressed as a TempType, wherein the template type of the dominant template defaults to a first type, and may be expressed as a TempType [ DomiId ] =0; the target template type may be expressed as TempType [ MatchId ].
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 i=i+1 to the step of acquiring the heart beat information of the ith heart beat to be classified.
For example, as the differential heart beat type may be expressed as BeatType.
It should be noted that, according to the update of the type of the target template, the type of the heart beat member of the target template to be classified may be the type of the heart beat which is equal to the type of the template, that is, beattype=temptype [ MatchId ], so that a plurality of heart beat members in the same heart beat template may be updated uniformly, and so that the type classification of a plurality of heart beats may be continuously and efficiently classified through the template type of the corresponding heart beat template, thereby improving the efficiency of heart beat classification.
The embodiment of the invention discloses a multi-guide dynamic heart beat real-time classification method, which is used for judging the size between i and a preset learning heart beat number threshold value, preventing inaccurate heart beat type classification caused by insufficient accumulation of heart beat templates, determining that a target heart beat template to be classified is a first heart beat template or a second heart beat template according to i and a preset heart beat template selection condition to be classified, reducing the pressure of classifying the heart beat template every i times, ensuring continuous and effective update of the template type, avoiding the problem that the heart beat type is determined to be wrong due to incorrect correction after the template type is classified, and improving the heart beat type classification precision; the heart beat classification is performed by acquiring the multi-lead electrocardiosignal segments, so that multidimensional judgment of the heart beat classification can be realized, and the accuracy of judging the heart beat type is improved.
Referring to fig. 2, fig. 2 is another flowchart of a multi-guide dynamic heartbeat real-time classification method according to an embodiment of the invention, the method includes:
it can be understood that the execution body of the embodiment of the invention can be a heart beat detection box, and the heart beat detection box is utilized for detecting electrocardiosignals, matching templates and providing relevant information.
In one possible implementation manner, before the heart beat detection starts, the heart beat detection box may be initialized, relevant information of the detection sequence number, the heart beat and the heart beat template may be 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 by the example here, and the initialization step is not repeated.
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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of the i is 1;
in one possible implementation, after the ECG segments with equal length centered on the R-wave position are acquired, the same heart beat waveforms are combined by a template matching technique, so that a plurality of ECG segments can be divided into a plurality of heart beat templates with different waveform shapes.
In one possible implementation, the cardiac information includes, but is not limited to, a cardiac template number, a cardiac RR interval, cardiac P-wave information, a cardiac type, a first identification that the cardiac activity is valid, and a second identification that the cardiac activity is invalid.
In the embodiment of the invention, the template waveform is formed by multi-lead electrocardiosignal waveforms, and compared with the traditional template waveform formed by single-lead electrocardiosignal waveforms, the template mixing condition in the template matching process is reduced, so that the template clustering result is more reliable and has more reference significance.
202. If i is greater than or equal to a preset learning heart beat number threshold value, and the heart beat information of the i-th heart beat to be classified contains the first identifier, determining a target heart beat template to be classified, wherein if i does not meet a preset heart beat template selection condition to be classified, the target heart beat template is a first heart beat template corresponding to the i-th heart beat to be classified, and 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 i-th 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 forms.
It should be noted that, in the steps 201 and 202, some of the contents are the same as those in the steps 101 and 102, and for avoiding repetition, reference may be made to the examples of the 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 m=16 and the heart beat information of the i-th heart beat to be classified contains the first identifier, determining that the heart beat type is a learning heart beat type, and returning the i=i+1 to execute step 201; if the i is smaller than the preset learning heart beat number threshold m=16 and the heart beat information of the i-th heart beat to be classified includes the second identifier, determining that the heart beat type is an unknown heart beat type, and returning the i=i+1 to execute step 201.
Note that, the learning heart beat type is a heart beat type set for the purpose of distinguishing, and may be expressed as beattype=3 as distinguishing the learning heart beat type, in the early stage of heart beat detection, that is, when i is smaller than a preset learning heart beat number threshold value and the heart beat information includes a first flag that the heart beat is effective.
The unknown heart beat type is a heart beat type set for the purpose of distinguishing when i is smaller than a preset learning heart beat number threshold value and the heart beat information contains a second mark of heart beat invalidity, and can be expressed as beattype=2 as distinguishing the unknown heart beat type.
In one possible implementation, if the heart beat information of the ith heart beat to be classified contains a first mark that the heart beat is valid, acquiring an RR interval value of the ith heart beat to be classified; obtaining the target heart beat advance of the ith heart beat to be classified by utilizing the RR interval value and the heart beat advance 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 value and a target heart beat advance, and updating the premature beat escape number of a first heart beat template of the ith heart beat to be classified by utilizing the target heart beat state, wherein the heart beat state comprises normal heart beat, premature beat or escape heart beat.
For example, the heart beat advance algorithm may be expressed as:
wherein, advance is the target heart beat advance, beatRR is the RR interval value of the ith heart beat to be classified, RRmean is the average RR interval of preset F new detected heart beats, wherein F can be 8;
further, the preset threshold includes a premature beat threshold of Thre 1 Escape threshold value is Thre 2 ;
In one possible implementation, if advanced>0&&advance>Thre 1 The target heart beat state is the premature beat, and the first heart beat template of the ith heart beat to be classified, namely the premature of the matching template of the newly detected heart beat, is updatedNumber of beats TempNSE [ MatchId ]][1]++ =1; if advance<0&&|advance|>Thre 2 The target heart beat state is the escape heart beat, and the first heart beat template of the ith heart beat to be classified, namely the escape number TempNSE [ MatchId ] of the matching template of the newly detected heart beat is updated][2]++ =1; if the advance does not meet the advance>0&&advance>Thre 1 And does not satisfy the advance<0&&|advance|>Thre 2 The target heart beat state is normal heart beat, and the first heart beat template of the ith heart beat to be classified, namely the normal heart beat number TempNSE (MatchId) of the matching template of the newly detected heart beat, is updated][0]+=1。
Note that, [0] in TempNSE [ MatchId ] [0] +=1 represents a normal heart beat representative symbol in the heart beat state of the heart beat template; [1] in TempNSE [ MatchId ] [1] + = 1 represents the premature beat representative symbol in the beat state of the beat template; the escape heart beat in the heart beat state of the heart beat template is represented by [2] in TempNSE [ MatchId ] [2] + =1, and the above values and symbol settings are merely for distinction and are not particularly 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 through updating the premature beat escape information and is used for classifying the heart beat type by utilizing the target template to be classified, so that the heart beat classification referential property is enhanced, and the classification precision is improved.
It should be noted that, the contents of the steps 201 and 202 are the same as those of the steps 101 and 102 shown in fig. 1, and specific reference is made to the foregoing, so that no further description is given here for avoiding repetition.
203. If the target heart beat template to be classified is the first heart beat template, acquiring the heart beat numbers of the Q heart beat members detected recently in the first heart beat template and the premature beat escape state variables corresponding to each heart beat number to obtain a target premature beat escape state variable array, wherein Q is a positive integer;
it is understood that the first heartbeat template is a heartbeat template corresponding to the i-th heartbeat to be classified, and may also be called a matching template corresponding to the new detected heartbeat.
The heart beat number may be denoted Idx for distinguishing individual heart beats.
The premature beat escape state represents the beat state of the heart beat and may be expressed as a reccentnsetype, wherein reccentnsetype=0 represents the normal beat state and reccentnsetype=1 represents the premature beat escape state, and the above setting may be set according to the actual setting without any limitation.
203a, if the target premature beat escape state variable array meets a preset continuous stable rhythm condition or meets a preset rhythm state condition, continuing to execute step 205;
the preset continuous stable rhythm condition is a pulse rule conforming to the heart beat of the continuous stable rhythm, and the rhythm state condition comprises a first rhythm state condition conforming to the bigeminal rhythm pulse rule and/or a second rhythm state condition conforming to the trigeminal rhythm pulse rule.
For example, if the target heartbeat template to be classified is the first heartbeat template, i.e. the matching template corresponding to the newly detected heartbeat, steps 203 and 203a are executed to determine the classification necessity of the target heartbeat template to be classified, and the specific determining process is as follows:
wherein the target premature beat escape state variable array comprises a heart beat number set Idx and a premature beat escape state variable set ReccentNSEType corresponding to the number, wherein the array set comprises Idx= { Idx, x epsilon Q-1, Q is a positive integer }, and the premature beat escape state variable set ReccentNSEType x ={NSE x X ε Q-1, Q is a positive integer.
The preset continuous stable rhythm condition is that the difference value of adjacent elements of the target premature beat escape state variable array central beat number set Idx is 1 and the premature beat escape state variable set ReccentNSEType x All elements are 0.
The preset rhythm state conditions comprise a first rhythm state condition, namely that the value of an odd term element in a premature beat escape state variable set in a target premature beat escape state variable array is 0, and the value of an even term element is 1, and/or a second rhythm state condition, namely that the interval between any two terms with the value of 1 in the premature beat escape state variable set in the target premature beat escape state variable array is two terms, and the value of a term element is 0.
In one possible implementation, if the Q value is 8, the heart beat number Idx of the heart beats of the last 8 detection members contained in the template is obtained 8 = { Id0, id1, id2, id3, id4, id5, id6, id7} and the most recently 8 premature escape state variables ReccentNSEType for detecting heart beats 8 ={NSE0,NSE1,NSE2,NSE3,NSE4,NSE5,NSE6,NSE7};
If the element difference between adjacent items of the heart beat number Idx is 1 and all elements of the premature beat escape state variable set ReccentNSEType 8 are 0, the target premature beat escape state variable array accords with the beat rule of the heart beat of the continuous stable heart rhythm, wherein 0 represents the normal beat heart beat, a heart beat continuous stable mark is set as a first mark of ContStabLabel=true, namely the heart beat continuous stable mark, wherein True represents the heart beat continuous stable, and if classification is judged to be necessary, the steps 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 dominant template are continuously executed.
In one possible implementation, if the Q value is 9, the heart beat numbers Idx of the heart beats of the last 9 detection members contained in the template are obtained 9 = { Id0, id1, id2, id3, id4, id5, id6, id7, id8} and the premature beat escape state variable ReccentNSEType for the last 9 detected heart beats 9 ={NSE0,NSE1,NSE2,NSE3,NSE4,NSE5,NSE6,NSE7,NSE8};
If NSE 0= = NSE 2= NSE 4= NSE 6= NSE 8= 0= and NSE 1= NSE 3= NSE 5= NSE 7= 1, that is, the value of an odd term element is 0 and the value of an even term element is 1 in the premature beat escape state variable set in the target premature beat escape state variable array, the target premature beat escape state variable array is explained to conform to the first rhythm state condition of the biggest beat rule, the biggest condition is possibly the biggest condition, a biggest flag = True is set, and classification is judged to be necessary, wherein 0 represents normal beat heart beat and 1 represents advanced beat heart beat; or (b)
If the reccentnsetype 9= {0,0,1,0,0,1,0,0,1} or {0,1,0,0,1,0,0,1,0} is that the interval between any two items with 1 element value in the premature beat escape state variable set in the target premature beat escape state variable array is two items and the item element value is 0, which indicates that the target premature beat escape state variable array meets the second rhythm state condition of the trigeminal beat rule, it is possible to be a trigeminal rhythm condition, and trigeminal rhythm identifier trigeminal label=true is set, and if it is determined that classification is necessary, step 205 is continued.
Optionally, after determining that classification is necessary, the above steps may be performed: acquiring an RR interval value of an ith heart beat to be classified; obtaining the target heart beat advance of the ith heart beat to be classified by utilizing the RR interval value and the heart beat advance 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 value and a target heart beat advance, and updating the premature beat escape number of the first heart beat template of the ith heart beat to be classified by utilizing the target heart beat state, and updating the premature beat escape state of the first heart beat template to update the premature beat escape information at the moment.
204. If the target heart beat template to be classified is the second heart beat template, acquiring a template type of the second heart beat template and/or a template capacity level of the second heart beat 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 e [ i, j), level1 e [ j, k), ….
The template capacity level comprises a first level of a first template capacity TempCapOld of a second heartbeat template before the new detection heartbeat template is matched and a second level of a second template capacity TempCapNew of the second heartbeat template after the new detection heartbeat template is matched.
204a, if the template type of the second heartbeat template is the template type of the dominant template and/or the template capacity level of the second heartbeat template is not improved, continuing to execute the step of making i=i+1 return to execute the step of acquiring the heartbeat information of the i-th heartbeat to be classified;
optionally, specific implementations of steps 204, 204a are as follows:
if the template type of the second heartbeat template is the template type of the dominant template, and/or
The preset template capacity Level interval is TempCapList= {0,1,3,10,30,100,300,1000}, the corresponding template capacity Level is Level0 epsilon [0, 1), level1 epsilon [1, 3), …;
then when the first template capacity is tempcapold=99 and the second template capacity is tempcapnew=100, the corresponding Level is Level old=level 4 and Level new=level 5;
where Level4< Level5, i.e., level old < Level new, the Level of template capacity increases, it is determined that it is necessary to classify the second heart beat template, and step 205 is continued.
Then when the first template capacity is tempcapold=101 and the second template capacity is tempcapnew=103, the corresponding Level is Level old=level 6 and Level new=level 6;
wherein, level 6=level 6, i.e. Level old=level new, the Level of the template capacity is not increased, so it is determined that the classification of the second heartbeat template is not necessary, and the step of returning i=i+1 to perform the step of acquiring heartbeat information of the ith heartbeat to be classified is further performed.
In the embodiment of the invention, the necessity of classification is judged for the first heart beat template or the second heart beat template as the target heart beat template to be classified, so that in the subsequent classification of heart beat types by using the target heart beat template to be classified, the heart beat classification referential property is further enhanced, the classification precision is improved, and the problem that the heart beat types cannot be updated correctly when the heart beat types are updated by using the template types 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 the heart beat member and the template type of the existing dominant template;
in one possible implementation, the template information includes, but is not limited to, template number, template capacity, template representative waveform, template waveform width, template RR interval, template premature beat number, template P-wave presence flag, template rhythm status, and template type.
In the embodiment of the present invention, step 205 further includes:
when the i is equal to a preset learning heart beat number threshold value, obtaining 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 heart beat templates according to the template capacity from large to small, and determining a sequencing result.
When any heart beat template in the heart beat templates of the front A position in the sequencing result meets the 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 as the template number corresponding to the target heart beat template.
And when any heart beat template in the heart beat templates of the front A position in the sequencing result does not meet the preset dominant template selection condition, determining the reference template as the dominant template, and updating the template number of the dominant template to the template number corresponding to the reference template.
The preset dominant template selection condition is that the template capacity of the target heartbeat template is larger than the template capacity of a double reference template, the RR interval of the target heartbeat template is larger than the RR interval of the reference template, the waveform width of the target heartbeat template is smaller than the waveform width of the reference template, and the P wave mark of the target heartbeat template is a presence mark; the reference template is the heart beat template with the largest template capacity in the heart beat templates of the first A bits in the sequencing result, and A is a positive integer.
The RR interval of the template represents the average RR interval of the heart beats of members of different templates, wherein the RR interval represents the interval value of two adjacent heart beats. Template waveform width represents the width of the QRS complex of the different templates representative waveform.
For example, if i= M, the algorithm enters a preprocessing link of heart beat classification, i.e. determines a heart beat template corresponding to the dominant template.
Optionally, if A is 3, the first three template numbers { T0, T1, T2} with the largest template capacity and the corresponding template capacities { C0, C1, C2}, template RR intervals { RR0, RR1, RR2}, template waveform widths { W0, W1, W2} and P wave identifications { P0, P1, P2} of the templates are obtained, wherein 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 satisfies 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 +=true, the heartbeat template corresponding to the template number T2 satisfies the preset dominant template selection condition, and the template number domid=t2 of the dominant template is updated;
if neither C1 nor C2 satisfies the above condition, setting the template number domiid=t0 of the dominant template, and after determining the dominant template number, updating the template type of the dominant template 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, wherein a waveform diagram of a template No. 0 is a second representative waveform of a dominant template, a waveform diagram of a template No. 1 is a first representative waveform of a target template to be classified, and each of the waveform diagrams includes representative waveforms (dual leads in fig. 3) corresponding to the respective leads on the different analysis lead channels.
In an embodiment of the present invention, step 205 includes:
a. determining the target waveform relative error of the first representative waveform and the second representative waveform by using the first representative waveform of the target template to be classified, the second representative waveform of the existing dominant 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 one possible implementation, the preset waveform relative error algorithm may be the following formula:
wherein RE represents the relative error of the target waveform, abs (-) represents absolute value, ppv (-) represents peak-to-peak value, i.e. maximum value-minimum value, TW0 is the second representative waveform of the dominant template, TW1 is the first representative waveform of the target template to be classified.
Exemplary, the preset waveform error threshold is RE Thre If RE<RE Thre If 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 leading template, namely the first type, such as normal sinus heart beat is also called N type, and the target template type TempType is updated]=0, updating the heartbeat type of the heartbeat member of the target template to be classified, i.e. beattype=temptype [ MatchId]And returning i=i+1 to the step of acquiring the heart beat information of the ith heart beat to be classified.
Wherein if RE>=RE Thre Representing that the second representative waveform is dissimilar to the waveform of the first representative waveform, and continuing to perform the step of classifying the target template to be classified using waveform continuity and/or rhythm status.
In the embodiment of the invention, the waveform similarity of the target template to be classified and the leading template is judged through the steps a and b, the template type of the target template to be classified is classified, the target template to be classified which does not meet the waveform similarity judgment is further classified continuously by using the rest template type judgment rules, the template type of the target template to be classified can be accurately judged from multiple dimensions, and further, the heartbeat type is updated more accurately when the heartbeat type is updated in batches.
In the embodiment of the present invention, the heartbeat information of the heartbeat member further includes an RR interval value of the heartbeat member, the template information further includes a heartbeat continuous and stable flag and a template P-wave flag, and step 205 further includes:
A. acquiring RR interval values of Z heart beat 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, RR interval average values of the RR interval values of the Z heart beat members and a preset RR interval standard deviation calculation formula;
C. if the continuous and stable heart beat 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 presence mark, the standard deviation of the target RR interval is smaller than the number of heart beat sample points with preset first duration, and the average value of RR intervals of the RR interval values of the Z heart beat members is larger than the number of heart beat sample points with preset second duration, determining that the target template type of the target template to be classified is the template type of the leading template.
The first mark is continuous and stable in pulse representing a heart beat member of the target template to be classified, the preset first time length is smaller than the preset second time length, and Z is a positive integer.
In a possible implementation manner, if the value of Z is 8, the preset calculation formula of the standard deviation of the RR interval is as follows:
wherein RRStd represents the standard deviation of the target RR interval, RR i Each RR interval value, RR, representing 8 heart beat members mean RR interval averages representing RR interval values for 8 heart beat members.
If ContStabLabel= True +. & RRStd < MS30 +. & nRRmean > MS500 +. & TempPExist [ MatchId ] = True, it indicates that the heart beat is continuously steady, and the target template type TempType [ MatchId ] = 0 of the target template to be classified is updated, then step 206 is continued.
Wherein, contStabLabel= True represents the continuous stable heart beat mark of the target template to be classified as a first mark, tempPExist [ MatchId ] = True represents the template P wave mark of the target template to be classified as a presence mark, MS30 is the corresponding sample point number of 30MS in the first time period, MS500 represents the corresponding sample point number of 500MS in the second time period, and the following comparison process is similar.
If any one of ContStabLabel= True +. & RRStd < MS30 +. & nRRmean > MS500 +.TempPExist [ MatchId ] = True is not satisfied, the heart beat discontinuity is indicated to be stable, and the step of classifying the target template to be classified by using the rhythm state identification is continuously performed.
In the embodiment of the invention, the step A, B is used for judging the continuity of the target template to be classified and the waveform, classifying the template type of the target template to be classified, further carrying out the rest template type judgment rules on the target template to be classified which is not satisfied with the similarity judgment, and continuing classification, so that the accurate judgment of the template type of the target template to be classified can be carried out from a plurality of dimensions, and further, the heart beat type is updated accurately when the heart beat type is updated in batches.
In the embodiment of the present invention, the template information further includes a rhythm status identifier, and step 205 further includes:
I. acquiring a rhythm state identifier of the target template to be classified, wherein the rhythm state identifier comprises a normal heart beat identifier or a rhythm heart beat identifier, and the rhythm heart beat identifier comprises a bigeminal rhythm identifier or a trigeminal rhythm identifier or an insertion heart beat rhythm identifier;
illustratively, the continuous plateau of heart beat flag ContStabLabel; bigeminal identification bigebellel; trigeminal identifies triglabel.
II. And if the rhythm state identifier is any one of rhythm heartbeat identifiers, 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, checking the rhythm state temprhyhm [ MatchId ] of the target template to be classified, namely, obtaining the rhythm state identifier temprhyhm [ MatchId ] of the target template to be classified, and if any element is True, indicating that the template member heart beat has a bigeminal rhythm or trigeminal rhythm or inserting the rhythm state identifier of the heart beat heart rhythm as a rhythm heart beat identifier: determining that the template type of the target template to be classified is the dominant template type if any one of the bivariate identifier or the trigeminate identifier or the inserted heart rhythm identifier is used, updating the target template type of the target template to be classified [ MatchId ] =0, and continuing to execute step 206;
if all elements in the rhythm state identifier TempRhythm [ MatchId ] are false, the template member is represented that the heart beat has no bigeminal or trigeminal rhythm or the inserted heart beat rhythm state, namely, the rhythm state identifier is a normal heart beat identifier;
in the embodiment of the invention, the rhythm information, namely the rhythm state, of the target template to be classified is judged through the step I, II, the template type of the target template to be classified is classified, the target template to be classified which is judged by unsatisfied rhythm information is further classified according to the rest template type judgment rules, the template type of the target template to be classified can be accurately judged from multiple dimensions, and further, the heart beat type is accurately updated when the heart beat type is updated in batches.
In one possible implementation, if the rhythm status identifier temprhythmhm [ MatchId ], if all the elements are false, which indicates that the template member is a heart beat, there is no bigeminal or trigeminal or an inserted heart beat rhythm status, that is, the rhythm status identifier is a normal heart beat identifier, then the bigeminal, trigeminal and inserted heart beat rhythm status of the target template to be classified, for which there is no bigeminal or trigeminal or an inserted heart beat rhythm status, that is, the rhythm status identifier is a normal heart beat identifier, may be checked respectively.
Referring to fig. 4, fig. 4 is a schematic diagram of a bi-rhythmic cardiac signal segment of a multi-lead dynamic heart beat real-time classification method according to an embodiment of the present invention, where V2 and V5 leads are shown to collect bi-rhythmic heart beat waveforms, where the heart beat of the V2 lead may be represented as {0,1,0,1,0,1,0} (V2 lead represents the position of the mid-line of the body surface clavicle to the 5 th intercostal intersection), the heart beat of the V5 lead may be represented as {1,0, 1} (V5 lead represents the position of the front line of the body surface axilla and the same level as the V4 (mid-line of the clavicle to the 4 th intercostal intersection)), and nRR represents the heart beat RR interval.
Illustratively, the bivalrate, trigeminal rate and inserted heart rhythm states of the target to-be-classified templates, for which there is a bivalrate or trigeminal rate or inserted heart rhythm state, are checked as follows:
(1) Judging the state of the bigeminal rhythm: acquiring 6 recently detected heart beats of a target to-be-classified template with a rhythm state identifier being a normal heart beat identifier, and calculating RR interval ratio between adjacent heart beats in the 6 recently detected heart beats; calculating by using an average value algorithm of RR interval ratios and RR interval ratios between adjacent heartbeats respectively, and determining an average value of target RR interval ratios between each adjacent heart beat; calculating the average value of the target RR interval ratio by utilizing 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 templates to be classified have a bigram state according to the relative value of the RR interval ratio of each target, the waveform width of the template, the RR interval of the template and the corresponding threshold value.
In one possible implementation, the RR interval ratio of the 6 recently detected neighboring heart beats of the target template to be classified is calculated to be hrratio= { r0, r1, r2} = { nRR0/nRR1, nRR2/nRR3, nRR4/nRR }.
The average value hrratio of RR interval ratio can be calculated by the following formula:
where ri is the RR interval ratio.
The relative value hrratio of RR interval ratio can be calculated by the following formula:
HRRatioRE(i)=abs(r i -HRRatioMean)/HRRatioMean,
Where abs () represents an absolute value calculator.
If bigebilk= True +.5 & all (HRRatioRE) <0.05 +.7 & TempRR [ matchId ] > bpm100 +.TempWidth [ matchId ] <=ms 110, judging that the new detected heart beat is in a duplex state, updating the matching template type TempType [ matchId ] = 0, updating the matching template rhythm state TempRhythhm [ matchId ] [0] = True, and continuing to execute step 206, wherein all (HRRatioRE) <0.05, i.e. all elements in HRRatio RE are smaller than 0.05, bpm100 represents the number of sample points corresponding to heart rhythm 100bpm, ms110 is the number of sample points corresponding to 110ms, and bigebilk= True is the duplex mark.
If the BigeLabel= True +. all (HRRatioRE) <0.05 +.TempRR [ matchId ] > bpm100 +.TempWidth [ matchId ] < = ms110 is not satisfied, continuing the subsequent steps to judge whether the target template to be classified has a triple rhythm and an inserted heart rhythm state.
(2) And judging the state of the tri-rhythm or the inserted heart beat rhythm: acquiring an early-beat escape state variable array of the latest 9 detected heart beats in a target heart beat template to be classified; if the element value in the premature beat escape state variable array meets the interval of two items between any two items with the element value of 1 and the element value of the item is 0, recording an RR interval value array corresponding to the premature beat 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 utilizing the RR interval value array and a preset average value algorithm; and determining whether the target template to be classified has a triple law or is inserted into the heart rhythm according to the target RR interval average value and the RR interval stability judging condition.
The first recording rule is that when two item times are separated between any two item times with the element value of 1 and the element value of the item time is 0, and the element value of the last item time is 1, the array is RR1 list= { nRR2, nRR5, nRR }, RR2 list= { nRR0+ nRR1, nRR3+ nRR4, nRR6+ nRR7}.
The second recording rule is that when any two item times with element value of 1 are separated by two item times and the element value of the item time is 0, and the element value of the last item time is 0, the array is RR1 list= { nRR0, nRR3, nRR }, RR2 list= { nRR1+ nRR2, nRR4+ nRR5, nRR7+ nRR8}.
The calculation of the average value may refer to the calculation manner of the foregoing embodiment, and will not be described herein.
The RR interval stability judgment conditions include: [1] calculating the Ratio RR1Ratio of each RR interval element to the mean value in the RR1 List=RR1List/RR1, and if the Ratio RR1Ratio of each RR interval element to the mean value meets 0.9< RR1Ratio [ j ] <1.1, indicating that the expiration of the RR interval is enough to meet the first Stable condition, namely RR1 stable=true; [2] calculating the Ratio RR2Ratio of each RR interval element to the mean value in the RR2 List=RR2List/RR2, and if the Ratio RR2Ratio of each RR interval element to the mean value satisfies 0.9< RR2Ratio [ j ] <1.1, indicating that the RR interval satisfies a second Stable condition, namely RR1 stable=true RR2stable=true; [3] if 0.9< (2×rr1/RR 2) <1.1, it indicates that the inter-RR expiration is sufficient for the third Stable condition, i.e., rr3stable=true; [4] if 0.9< (RR 1/RR 2) <1.1, it means 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 new detected heart beat of the target template to be classified satisfies the triple law rhythm, the matching template type TempType [ MatchId ] =0 is updated, the matching template rhythm state temprhyhm [ MatchId ] [1] = =true is updated, and step 206 is continuously executed.
If the RR interval of the target template to be classified satisfies the first stable condition, the second stable condition, and the fourth stable condition and the TempWidth [ MatchId ] < Ms130, the new detected heart beat of the target template to be classified satisfies the insertion rhythm, the matching template type TempType [ MatchId ] =0 is updated, the matching template rhythm state temprhyhm [ MatchId ] [2] = =true is updated, and step 206 is continued.
It should be noted that, the template waveform width of the target template to be classified is represented by template [ MatchId ].
Exemplary, the steps for determining the state of the triple rhythm or the interposed heart rhythm are as follows:
if the triple law mark TrigeLabel= True exists, the premature escape state variable ReccentNSEType 9 ε R of the last 9 detected heart beats is obtained 9 。
(a) If the reccentnsetype 9= = {0,0,1,0,0,1,0,0,1}, the inter-RR expiration of the target template to be classified is enough to the first recording rule, and thus, two types of RR interval values are recorded: RR1 list= { nRR2, nRR, nRR8}, and RR2 list= { nRR0+ nRR1, nRR3+ nRR4, nRR6+ nRR7}, and RR interval average value rr1=mean (RR 1 List), rr2=mean (RR 2 List), where mean (·) represents the calculation average operation.
(b) If the reccentnsetype 9= = {0,1,0,0,1,0,0,1,0}, the inter-RR expiration of the target template to be classified is enough to the second recording rule, and thus, two types of RR interval values are recorded: RR1 list= { nRR0, nRR3, nRR6}, and RR2 list= { nRR1+ nRR2, nRR4+ nRR5, nRR7+ nRR8}, and RR interval average value rr1=mean (RR 1 List), rr2=mean (RR 2 List), where mean () represents the calculation average value operation.
Wherein, determining that the RR interval satisfies the first stability condition may be determining that the N-N heart beat average RR interval stability: initializing an N-N heartbeat average RR interval stability flag rr1stable=false; calculating a Ratio RR1 ratio=RR1List/RR1 of each element in the RR1List to the average value; if each element of RR1Ratio satisfies 0.9< RR1R atio [ j ] <1.1, setting RR1 Stable=true, indicating that the inter-RR expiration of the target template to be classified is enough to the first Stable condition.
Judging that the RR interval meets a second stable condition, namely judging the average RR interval stability of the N-V-N heart beat: initializing an N-V-N heartbeat average RR interval stability flag RR2 stable=false; calculating a Ratio RR2 ratio=RR2List/RR2 of each element in the RR2List to the average value; if each element of RR2Ratio satisfies 0.9< RR2Ratio [ j ] <1.1, setting RR2 stable=true, indicating that the RR interval of the target template to be classified satisfies the second Stable condition.
Judging whether the inter-RR expiration is enough to meet the third stable condition, namely judging whether the heart beat meets the complete compensation intermittent condition: initializing a complete compensation intermittent condition flag rr3stable=false; if 0.9< (2 x RR1/RR 2) <1.1; and setting RR3 Stable=true, and indicating that the inter-RR expiration of the target template to be classified is enough to the third Stable condition.
Judging whether the RR interval meets the fourth stable condition, namely judging whether a heart beat condition is inserted: initializing an inserted heart beat condition flag rr4stable=false; if 0.9< (RR 1/RR 2) <1.1, setting rr4stable=true, and indicating that the RR interval of the target template to be classified satisfies the fourth Stable condition.
Then, based on the analysis of the above stable condition, the following judgment can be made on the tri-rhythm and the interposed heart rhythm states:
if it is
RR1 stable= True +=true +=rr 2Stable +=true +=rr 3Stable +=true +=sample with [ MatchId ] < Ms130, that is, the inter-RR expiration of the target template to be classified is enough to the first, second and third Stable conditions, and the template waveform width is less than the number of heart beat sample points corresponding to 130Ms, then it is determined that the newly detected heart beat satisfies the triple-law rhythm, the matching template type TempType [ MatchId ] =0 is updated, the matching template rhythm state tempythhm [ MatchId ] [1] = =true is updated, and step 206 is continued;
If it is
RR1 stable= True +=true +=rr 2Stable +=true +=rr 4Stable +=true +=sample with [ MatchId ] < Ms130, that is, the inter-RR expiration of the target template to be classified is sufficient for the first Stable condition, the second Stable condition, and the fourth Stable condition, and the template waveform width is less than the number of heart beat sample points corresponding to 130Ms, then it is determined that the newly detected heart beat satisfies the inserted heart beat rhythm, the matching template type template [ MatchId ] =0 is updated, the matching template rhythm state template rhythmhm [ MatchId ] [2] = =true is updated, and step 206 is continued.
In the embodiment of the present invention, step 205 further includes:
if the continuous stable heart beat mark of the target template to be classified is a second mark, if the template P wave mark of the target template to be classified is a non-existence mark, if the standard deviation of the target RR interval is larger than or equal to the number of heart beat sample points in a preset first duration, if the average value of the RR intervals of the Z detection heart beats is smaller than or equal to the number of heart beat sample points in a preset second duration, 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, and if the second mark is intermittent and/or unstable representing the heart beat member of the target template to be classified.
In one possible implementation manner, if the second representative waveform of the target template to be classified is dissimilar to the waveform of the first representative waveform, and if the continuous stable heart beat mark of the target template to be classified is the second mark, if the P-wave mark of the target template to be classified is the nonexistent mark, if the standard deviation of the target RR intervals is greater than or equal to the number of heart beat sample points in the preset first duration, if the average value of the RR intervals of the Z detected heart beats is less than or equal to the number of heart beat sample points in the preset second duration, and the rhythm state mark of the target template to be classified is the normal heart beat mark, determining that the target template type of the target template to be classified is the preset template type, and the second mark is the intermittent and/or unstable heart beat mark representing the heart beat member of the target template to be classified.
It should be noted that, when none of the heart beats to be classified meets the waveform similarity judging condition, the waveform continuity judging condition, and the heart beat rhythm judging condition, the target template type of the target template to be classified is determined to be a preset template type, wherein the preset template type may be a second type, and the ventricular arrhythmia heart beat is 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 enabling i=i+1 to return to the step of acquiring the heart beat information of the ith heart beat to be classified.
It should be noted that, in some parts of the contents of steps 205 and 206, the same as those of steps 103 and 104 shown in fig. 1, reference may be specifically made to the foregoing, and for avoiding repetition, a detailed description is omitted here.
In one possible implementation, step 206 further includes: and outputting the heart beat type, and outputting the heart beat type to a calling end of the classification module so as to continue the subsequent heart beat analysis process.
In order to more clearly understand the multi-guide dynamic heartbeat real-time classification method in the embodiment of the present invention, the following describes the whole classification flow by using the specific embodiments:
firstly, a user wears a portable electrocardiograph acquisition box and initializes electrocardiograph acquisition box data, and the electrocardiograph acquisition box acquires electrocardiograph signals of a patient and then analyzes the electrocardiograph signals into 12-lead Holter real-time data. 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. After the heart beat clustering is completed, acquiring the heart beat data information and the clustered heart beat template information for heart beat type identification. The implementation of the classification method is described below.
In a certain electrocardiograph measurement process, after the electrocardiograph acquisition box detects the R wave position and completes heart beat clustering, heart beat information and clustered heart beat template information are firstly obtained. The number of learning heartbeats m=16 is preset, and when the number of accumulated detected heartbeats is smaller than 16, the heart beats are not classified by the heart beat template, and the heart beat type is set as the learning heart beat type (the corresponding type number is 3, i.e. beattype=3). During learning, the algorithm only completes the template accumulation process.
When learning is finished, i.e. i=m, the algorithm first determines the dominant template, presets the template type of the dominant template to be N type, and sets the dominant N type template number domid=0 because the number of templates is only 1.
The following begins formally entering the heart beat classification phase. According to the classification flow introduced in fig. 1 and fig. 2 in the embodiment of the present invention, different classification judgment conditions are adopted to identify the type of the newly detected heart beat according to the newly detected heart beat information and the template information. The following description will be made taking, as an example, the execution of the classification judgment condition based on the waveform similarity and the bivariate rhythm.
Waveform similarity: when the 202 nd heart beat is detected and i=202, the clustering module generates the 2 nd new template (template number 1) with the heart beat waveform as a representative waveform. Then in the single matching template classification link, the classification algorithm first determines that the matching template needs to be updated (the matching template has a capacity of 1, and the new template has a capacity level greater than the old template by 0, so that it is determined that the template needs to be classified and/or updated). Then in the template classification link, the algorithm first compares the waveform similarity of the matching template and the dominant N-type template. Fig. 3 shows representative waveforms on different analysis lead channels of a dominant N-type template (template No. 0) and a matching template (template No. 1). And calculating a waveform relative error of 0.0919 which is smaller than a preset threshold REThre=0.15 by using a preset waveform relative error algorithm, indicating 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=TempType [1] =0. The heart beat type is output and this heart beat classification procedure is ended.
Bigeminal rhythms: when the 22965 th heart beat is detected, the classification algorithm acquires the premature beat escape state variable ReccentNSEType 6 = {0,1,0,1,0,1} of the latest 6 detected heart beats, triggers a third classification necessity condition, namely, meets a preset rhythm state condition at the moment, and judges that a bigeminal rhythm condition is likely to exist. In the template classification link, the algorithm enters a bigeminal rhythm judgment condition. The algorithm first obtains the template pre-RR interval TempRR [ MatchId ] = 183.75 and the template waveform width TempWidth [ MatchId ] =25.25 corresponding to the new detected heartbeat, and knows bpm100=153, ms110=28. The RR interval ratio hrratio= {1.770,1.801,1.823} of the nearest 6 neighboring heartbeats is then calculated, as well as the average HRRatio mean=1.80 and the relative value hrratio= {0.016,0.002,0.014} of the corresponding RR interval ratios. Since hrratio all elements are smaller than 0.05 and TempRR [ MatchId ] > bpm100 and TempWidth [ MatchId ] <=ms 110, it is determined that the current newly detected heart beat is in a bivariate rhythm state, and a matching template type beattype=temptype [1] =0 is set. The heart beat type is output and this heart beat classification procedure is ended.
The embodiment of the invention provides a multi-guide dynamic heartbeat real-time classification method. The heart beat type classification inaccuracy caused by insufficient accumulation of heart beat templates is prevented by judging the size between the i and the preset learning heart beat number threshold value, the target heart beat template to be classified is determined to be the first heart beat template or the second heart beat template according to the i and the preset heart beat template selection condition to be classified, the classification necessity judgment is carried out on the target heart beat template to be classified, the pressure of classifying the heart beat template every i times is reduced, the continuous effective update of the template type is ensured, the problem that the heart beat type is determined to be incorrect due to the fact that the template type cannot be corrected correctly after the classification is incorrect is avoided, and the classification precision of the heart beat type is improved; the heart beat classification is performed by acquiring the multi-lead electrocardiosignal segments, so that multidimensional judgment of the heart beat classification can be realized, and the accuracy of judging the heart beat type is improved. In the further heart beat classification, the template type is judged in an auxiliary mode by utilizing the bigeminal rhythm, the trigeminal rhythm and the inserted heart beat rhythm, so that the accuracy of heart beat classification is further improved.
Referring to fig. 5, fig. 5 is a block diagram of a multi-guide dynamic heartbeat real-time classification device according to an embodiment of the invention, where the device includes:
heart beat detection module 501 to be classified: the method comprises the steps of 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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of i is 1;
the target to-be-classified template determination 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 i-th heart beat to be classified contains the first identifier, 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 i-th heart beat to be classified, and if the i meets the preset condition, the target heart beat template to be classified is a second heart beat template corresponding to the i-th 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 forms;
template type determination module 503: the method comprises the steps of 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 template types of existing dominant templates;
Heart beat 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=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 of each module in the above apparatus is the same as the steps shown in fig. 1, and specific reference may be made to the foregoing content, and in order to avoid repetition, a detailed description is omitted herein.
The embodiment of the invention discloses a multi-guide dynamic heartbeat real-time classification device, which comprises: the heart beat detection module to be classified: the method comprises the steps of 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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid 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 i-th heart beat to be classified contains the first identifier, 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 i-th heart beat to be classified, and if the i meets the preset condition, the target heart beat template to be classified is a second heart beat template corresponding to the i-th 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 forms; the template type determining module: the method comprises the steps of 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 template types of existing dominant templates; a heart beat type updating 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=i+1 to execute the step of acquiring the heart beat information of the ith heart beat to be classified. The heart beat type classification inaccuracy caused by insufficient accumulation of heart beat templates is prevented by judging the size between the i and the preset learning heart beat number threshold value, the target heart beat template to be classified is determined to be the first heart beat template or the second heart beat template according to the i and the preset heart beat template selection conditions, the pressure of 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 is determined to be wrong due to the fact that the template type cannot be corrected correctly after the classification is wrong is avoided, and the heart beat type classification precision is improved; the heart beat classification is performed by acquiring the multi-lead electrocardiosignal segments, so that multidimensional judgment of the heart beat classification can be realized, and the accuracy of judging the heart beat type is improved.
FIG. 6 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 6, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile 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 a processor, causes the processor to implement the steps of the method embodiments described above. The internal memory may also have stored therein a computer program which, when executed by a processor, causes the processor to perform the steps of the method embodiments described above. It will be appreciated by those skilled in the art that the structures shown in FIG. X are block diagrams of only some of the structures that are relevant to the present application and are not intended to limit the computer device on which the present application may be implemented, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps as shown in any one of fig. 1, 2 and 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 one of fig. 1, 2 and possible embodiments.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (10)
1. A method for real-time classification of multi-lead dynamic heart beat, 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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of the i is 1;
If i is greater than or equal to a preset learning heart beat number threshold value, and the heart beat information of the i-th heart beat to be classified contains the first identifier, determining a target heart beat template to be classified, wherein if 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 i-th heart beat to be classified, and 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-th 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 forms;
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 the heart beat member and the template type of the existing dominant template;
updating the heart beat type of the heart beat member of the target template to be classified according to the target template type, and enabling i=i+1 to return to the step of executing the heart beat information of the ith heart beat to be classified;
wherein, the preset heart beat template to be classified is selected according to the following conditions:
i%X==0&&i!=0;
wherein i represents the number of detected heart beats,% is the remainder operator, X is the preset detection frequency threshold, X is a positive integer, & is the logical AND operator, +.! Is a logical not operator.
2. The method of claim 1, wherein the determining the target heart beat template to be classified further comprises thereafter:
if the target heart beat template to be classified is the first heart beat template, acquiring the heart beat numbers of the Q heart beat members detected recently in the first heart beat template and the premature beat escape state variables corresponding to each heart beat number to obtain a target premature beat escape state variable array, wherein Q is a positive integer;
if the target premature beat escape state variable array meets a preset continuous stable rhythm condition or meets a preset rhythm state condition, continuing to execute the steps of determining the target template type of the target to-be-classified heart beat template based on the template information of the target to-be-classified heart beat template, the heart beat information of the heart beat member and the template type of the existing leading template, wherein the preset continuous stable rhythm condition is a beat rule of heart beat conforming to the continuous stable rhythm, and the rhythm state condition comprises a first rhythm state condition conforming to a bigeminal rhythm beat rule and/or a second rhythm state condition conforming to a trigeminal rhythm beat rule.
3. The method of claim 1, wherein the determining the target heart beat template to be classified further comprises thereafter:
If the target heart beat template to be classified is the second heart beat template, acquiring a template type of the second heart beat template and/or a template capacity level of the second heart beat template, wherein the template capacity level is the template capacity level determined based on a preset template capacity level interval;
if the template type of the second heartbeat template is the template type of the dominant template and/or the template capacity level of the second heartbeat template is not improved, continuing to execute the step of enabling i=i+1 to return to execute the step of acquiring the heartbeat information of the i-th heartbeat to be classified.
4. The method according to 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 identification of a template, and 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, heartbeat information of the heartbeat member, and a template type of an existing dominant template, further comprising:
when the i is equal to a preset learning heart beat number threshold value, obtaining 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;
Sorting the heart beat templates according to the template capacity from large to small, and determining a sorting result;
when any one of the heart beat templates of the front A-bit in the sorting 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, updating the template number of the dominant template as 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 larger than the template capacity of a double reference template, the RR interval of the target heart beat template is larger than the RR interval of the reference template, the waveform width of the target heart beat template is smaller than the waveform width of the reference template, the P wave mark of the target heart beat template is a presence mark, the reference template is the heart beat template with the largest template capacity in the heart beat templates of the front A-bit in the sorting result, and the A is a positive integer;
and when any heart beat template in the heart beat templates of the front A position in the sequencing result does not meet the preset dominant template selection condition, determining the reference template as the dominant template, and updating the template number of the dominant template to the template number corresponding to the reference template.
5. The method according to claim 1, wherein the method further comprises:
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 contains the first identifier, determining that the heart beat type is a learning heart beat type, and enabling i=i+1 to return to the step of executing the heart beat information of the ith heart beat to be classified;
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 contains the second identifier, determining that the heart beat type is an unknown heart beat type, and enabling i=i+1 to return to the step of executing the heart beat information of the ith heart beat to be classified.
6. The method according to claim 1, wherein the heartbeat information of the heartbeat member further includes RR interval values of the heartbeat member, the template information further includes a heartbeat continuous and stable flag and a template P-wave flag, 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 interval values of Z heart beat members closest to the ith heart beat 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, RR interval average values of the RR interval values of the Z heart beat members and a preset RR interval standard deviation calculation formula;
if the continuous and stable heart beat 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 presence mark, the standard deviation of the target RR interval is smaller than the number of heart beat sample points with preset first time length, the average value of the RR intervals of the Z heart beat members is larger than the number of heart beat sample points with preset second time length, the target template type of the target template to be classified is determined to be the template type of the leading template, the first mark is the continuous and stable heart beat of the heart beat member representing the target template to be classified, the preset first time length is smaller than the preset second time length, and Z is a positive integer.
7. The method according to claim 1, wherein the template information further includes a rhythm status identifier, and 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 a rhythm state identifier of the target template to be classified, wherein the rhythm state identifier comprises a normal heart beat identifier or a rhythm heart beat identifier, and the rhythm heart beat identifier comprises a bigeminal rhythm identifier or a trigeminal rhythm identifier or an insertion heart beat rhythm identifier;
and if the rhythm state identifier is any one of rhythm heartbeat identifiers, 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 the 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 the continuous stable heart beat mark of the target template to be classified is a second mark, if the template P wave mark of the target template to be classified is a non-existence mark, if the standard deviation of the target RR interval is larger than or equal to the number of heart beat sample points in a preset first duration, if the average value of the RR intervals of the Z detection heart beats is smaller than or equal to the number of heart beat sample points in a preset second duration, 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, and if the second mark is intermittent and/or unstable representing the heart beat member of the target template to be classified.
9. A real-time classifying device for multi-lead dynamic heart beat, the device comprising:
the heart beat detection module to be classified: the method comprises the steps of 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 dividing a multi-lead electrocardiosignal in equal length by taking an R wave as a center, the heart beat information at least comprises a first mark with valid heart beat or a second mark with invalid heart beat, and the initial value of i is 1;
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 i-th heart beat to be classified contains the first identifier, 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 i-th heart beat to be classified, and if the 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-th 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 forms; wherein, the preset heart beat template to be classified is selected according to the following conditions: i% x= 0 ≡i ≡! =0; wherein i represents the number of detected heart beats,% is the remainder operator, X is the preset detection frequency threshold, X is a positive integer, & is the logical AND operator, +.! Is a logical not operator;
The template type determining module: the method comprises the steps of 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 template types of existing dominant templates;
a heart beat type updating 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=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, wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 8.
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 CN113180687A (en) | 2021-07-30 |
| CN113180687B true 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) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115089192B (en) * | 2022-05-27 | 2024-09-17 | 深圳邦健生物医疗设备股份有限公司 | Sinus and junctional ectopic heart beat clustering method, device, equipment and medium |
| CN118044821B (en) * | 2024-02-19 | 2024-10-11 | 北京信心相联科技有限公司 | Multi-lead electrocardiograph data classification method, device and equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102835954A (en) * | 2012-09-07 | 2012-12-26 | 深圳市邦健电子有限公司 | Method for generating heart beating waveform template and treating ventricular premature beat detection and device |
| CN106725450A (en) * | 2017-02-20 | 2017-05-31 | 武汉中旗生物医疗电子有限公司 | QRS complex detection method |
| 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 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6708058B2 (en) * | 2001-04-30 | 2004-03-16 | Cardiac Pacemakers, Inc. | Normal cardiac rhythm template generation system and method |
| US7184818B2 (en) * | 2002-03-25 | 2007-02-27 | Cardiac Pacemakers, Inc. | Method and system for characterizing a representative cardiac beat using multiple templates |
| US8428697B2 (en) * | 2009-01-22 | 2013-04-23 | Medtronic, Inc. | “Blurred template” approach for arrhythmia detection |
| US8909332B2 (en) * | 2010-01-26 | 2014-12-09 | Stmicroelectronics S.R.L. | Method and device for estimating morphological features of heart beats |
| WO2016205993A1 (en) * | 2015-06-23 | 2016-12-29 | 中国科学院深圳先进技术研究院 | Gpu-based parallel electrocardiosignal analysis method |
| US11389116B2 (en) * | 2018-01-19 | 2022-07-19 | Biosense Webster (Israel) Ltd. | Apparatus and method for heartbeat classification based on time sequence and morphology of intracardiac and body surface electrocardiogram (ECG) signals |
| US11534099B2 (en) * | 2018-04-27 | 2022-12-27 | Vita-Course Technologies Co., Ltd. | Systems and methods for determining an arrhythmia type |
-
2021
- 2021-04-29 CN CN202110476791.5A patent/CN113180687B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102835954A (en) * | 2012-09-07 | 2012-12-26 | 深圳市邦健电子有限公司 | Method for generating heart beating waveform template and treating ventricular premature beat detection and device |
| CN106725450A (en) * | 2017-02-20 | 2017-05-31 | 武汉中旗生物医疗电子有限公司 | QRS complex detection method |
| 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)
| Title |
|---|
| 基于改进K均值聚类生成匹配模板的心搏分类方法;陈永波等;传感器与微系统;第37卷(第4期);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113180687A (en) | 2021-07-30 |
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 | |
| CN113180687B (en) | Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium | |
| CN110464333B (en) | Method and device for storing electrocardiogram data | |
| US6119035A (en) | Method and system for synthesizing the 12-lead electrocardiogram | |
| US10506939B2 (en) | Matching and tracking time sequences of heart activation | |
| US11890103B2 (en) | Identifying ECG signals having the same morphology | |
| CN112528783B (en) | Electrocardiogram and heart beat data clustering method, device, electronic equipment and medium | |
| CN113876335A (en) | Electrocardiogram heart beat classification method, electrocardiogram heart beat classification device, electronic equipment and medium | |
| CN115486855B (en) | Electrocardiogram and heart beat classification method based on QRS complex indefinite cycle superposition | |
| CN110226928A (en) | Atrial fibrillation is early with room and atrial fibrillation is with the poor recognition methods passed and device | |
| CN107184200A (en) | The complete intelligent pre-analysis methods of lead | |
| US11452485B2 (en) | Electroanatomical map re-annotation | |
| WO2019119814A1 (en) | Catheter tip positioning method and system | |
| US8880352B2 (en) | System and method for analyzing an electrophysiological signal | |
| CN110464339B (en) | Electrocardiogram analysis method and device | |
| CN113812962B (en) | Electrocardiogram rhythm classification neural network construction method, system and storage medium | |
| CN114680901B (en) | Electronic device and method for selecting features of electrocardiogram | |
| CN110811597B (en) | Electrocardiogram recording method, electrocardiogram recorder, electrocardiogram recording device and electrocardiogram recording medium | |
| JP7490339B2 (en) | Identifying excitation in atrial fibrillation electrograms | |
| CN113191249B (en) | Electrocardiosignal template matching method, device, equipment and medium | |
| CN113940682B (en) | Atrial fibrillation recognition method based on statistical characteristics | |
| CN117547237A (en) | Method, device, medium and equipment for detecting premature beat based on PPG waveform area characteristics | |
| CN114219028A (en) | Training of electrocardio ST-segment elevation recognition model, ST-segment elevation recognition method and device | |
| CN116807490A (en) | Electrocardiogram processing method, electrocardiogram processing device, medical equipment and storage medium | |
| CN113749665B (en) | Method, device, equipment and medium for capturing abnormal index |
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 |