WO2022110524A1 - Method and device for electrocardiogram heartbeat data clustering, electronic device, and medium - Google Patents

Method and device for electrocardiogram heartbeat data clustering, electronic device, and medium Download PDF

Info

Publication number
WO2022110524A1
WO2022110524A1 PCT/CN2021/072841 CN2021072841W WO2022110524A1 WO 2022110524 A1 WO2022110524 A1 WO 2022110524A1 CN 2021072841 W CN2021072841 W CN 2021072841W WO 2022110524 A1 WO2022110524 A1 WO 2022110524A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
data
processed
heartbeat
heartbeat data
Prior art date
Application number
PCT/CN2021/072841
Other languages
French (fr)
Chinese (zh)
Inventor
刘盛捷
Original Assignee
深圳邦健生物医疗设备股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳邦健生物医疗设备股份有限公司 filed Critical 深圳邦健生物医疗设备股份有限公司
Publication of WO2022110524A1 publication Critical patent/WO2022110524A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7246Details of waveform analysis using correlation, e.g. template matching or determination of similarity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques

Definitions

  • the present invention relates to the technical field of electrocardiogram data processing, in particular to a method, device, electronic device and medium for clustering electrocardiogram heartbeat data.
  • the heartbeat clustering (or template matching) technology can divide the ECG signal into several templates according to the different morphological characteristics of the QRS wave, and each template stores the heartbeat index with the similar QRS wave shape.
  • the work is concentrated on several templates, which greatly saves the doctor's inspection time and improves the diagnosis efficiency.
  • the ECG heartbeat data clustering can use the feature parameter method. Specifically, after using signal transformation methods such as fast Fourier transform, wavelet transform, and Hilbert transform to convert the ECG signal from the time domain into a transform domain with features that are easier to distinguish, the classical clustering method is used to analyze the ECG signal. Automatic template matching. However, using the signal transformation method will significantly increase the amount of calculation, and many classical clustering methods need to set the number of templates to be matched in advance. When this method is used to perform template matching on cases with low signal-to-noise ratio and multiple sources of premature ventricular arrhythmia, different heartbeats will also be mixed in the same template, the ECG heartbeat data clustering is not accurate enough, and the processing efficiency is not high.
  • signal transformation methods such as fast Fourier transform, wavelet transform, and Hilbert transform
  • the present application provides an electrocardiogram heartbeat data clustering method, apparatus, electronic device and medium.
  • a method for clustering ECG heartbeat data including:
  • a new data template is created according to the heartbeat data to be processed, and the new data template corresponds to the new template identifier; determining the target data template that matches the heartbeat data to be processed;
  • the template matching result includes a template identifier of the target data template
  • a sorting operation is performed on the data template, and the sorting operation includes a template merging operation, a template sorting operation and/or a template deleting operation, Get the template finishing result;
  • the clustering result of the heartbeat data to be processed is obtained.
  • an ECG heartbeat data clustering device including a template matching module, a template sorting module and a clustering module, wherein:
  • the template matching module is used for:
  • a new data template is created according to the heartbeat data to be processed, and the new data template corresponds to the new template identifier; determining the target data template that matches the heartbeat data to be processed;
  • the template matching result includes a template identifier of the target data template
  • the template sorting module is configured to perform sorting operations on the data templates whenever the number of processed heartbeat data to be processed reaches a preset number threshold, and the sorting operations include template merging operations, template sorting operations operation and/or template deletion to obtain template sorting results;
  • the clustering module is configured to obtain the clustering result of the heartbeat data to be processed according to the template matching result and the template sorting result.
  • an electronic device comprising a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the first aspect and any of the above. Steps for a possible implementation.
  • a computer storage medium stores one or more instructions, the one or more instructions are adapted to be loaded and executed by a processor as described in the first aspect and any one thereof Steps of possible implementations.
  • multiple heartbeats with similar shapes can be aggregated into one template through template matching, and the templates can be integrated in time, so that real-time clustering can be realized without complex signal transformation, and the data processing efficiency is higher.
  • FIG. 1 is a schematic flowchart of a method for clustering electrocardiogram heartbeat data according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a signal quality evaluation process provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a template matching process provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a template matching result after heartbeat offset search provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a template matching result after template merging when there is a template offset provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of a template matching result after template deletion when the number of templates is too large, according to an embodiment of the present application
  • FIG. 7 is a schematic structural diagram of an apparatus for clustering electrocardiogram and heartbeat data according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the ECG signals involved in the embodiments of the present application can be obtained by converting the electrical signals received by the ECG collection box through the electrode pads connected to various parts of the human body through signal conversion.
  • a typical ECG signal consists of P wave, QRS complex and T wave, which reflects the state of human heart activity.
  • doctors can learn many aspects of a patient's heart disease.
  • the Holter signal involved in the embodiments of the present application is a long-term ECG signal, generally 24 hours or more. Because the onset time and triggering conditions of many heart diseases are relatively secret, the general static ECG cannot find its existence within a dozen seconds, which requires the acquisition of long-term Holter signals to continuously record the patient's cardiac electrical signals. However, the recording time span of the Holter signal is large, and the Holter signal with a duration of 24 hours has about 100,000 heartbeats, which makes the diagnosis method of the doctor's visual inspection of the patient's condition inefficient. Signal processing techniques are developed accordingly.
  • the heartbeat clustering (or template matching) technology can divide the ECG signal into several templates according to the different morphological characteristics of the QRS wave, and each template stores the heartbeat index with the similar QRS wave shape.
  • the work is concentrated on several templates, which greatly saves the doctor's inspection time and improves the diagnosis efficiency.
  • FIG. 1 is a schematic flowchart of a method for clustering electrocardiogram heartbeat data according to an embodiment of the present application.
  • the method may include:
  • the execution subject of the embodiment of the present application may be an electrocardiogram and heartbeat data clustering device, which may be an electronic device.
  • Other portable devices such as mobile phones, laptops, or tablet computers with sensitive surfaces (eg, touch screen displays and/or touch pads).
  • the above-described devices are not portable communication devices, but rather desktop computers with touch-sensitive surfaces (eg, touch screen displays and/or touch pads).
  • the above-mentioned method for clustering electrocardiogram and heartbeat data may be supported and run by a server in response to an operation instruction of a user.
  • the above-mentioned heartbeat data to be processed may be heartbeat signal data clipped from the collected electrocardiogram data.
  • the method before the above step 101, the method further includes:
  • the above-mentioned acquisition of the heartbeat data to be processed includes:
  • the to-be-processed heartbeat data with a preset signal length is acquired from the heartbeat segment.
  • the electrocardiogram data in this embodiment of the present application may be an electrocardiogram signal collected by an electrocardiogram acquisition device within a period of time.
  • the position of the heartbeat can be determined according to the characteristics of the electrocardiogram, and then the signal can be divided into multiple equal-length segments reflecting the characteristics of the heartbeat. .
  • the above-mentioned electrocardiogram data is divided to obtain a plurality of heart beat segments, including:
  • the ECG data is divided according to the R wave position information obtained by detection, and a plurality of heartbeat segments of equal length centered on the R wave position are obtained.
  • a complete ECG signal is usually composed of P wave, QRS complex and T wave, in which the QRS complex is the main part of the ECG, and the R wave is dominant in the QRS complex, so the marked position of the heartbeat can be marked with R. Wave prevail. Equal length ECG segments centered on the R-wave position can be acquired for template matching.
  • the method further includes:
  • Band-pass filtering is performed on the above-mentioned two-lead electrocardiogram data to obtain the above-mentioned electrocardiogram data.
  • multi-lead electrocardiogram data collected by Holter may be used for processing.
  • Holter is an ECG signal recording system, which can provide a powerful information aid for doctors to comprehensively analyze the patient's heart condition by adopting portable ECG signal acquisition and continuous measurement of the patient's cardiac activity for up to 24 hours.
  • the Holter data can be read first, and the data includes the 24-hour multi-lead Holter data segment Signals ⁇ R N*M collected by the Holter device, where N represents the number of signal leads, and M represents the signal length; it can also include related parameters, such as:
  • the R wave position (RPos, in sampling point or time) obtained by the detection of the QRS wave
  • RR interval (representing the distance between the current heartbeat and the adjacent previous heartbeat, in sampling points or time units);
  • QRS wave width width, in sampling points or time
  • Primary analysis lead number and secondary analysis lead number are Primary analysis lead number and secondary analysis lead number.
  • the above-mentioned main analysis lead number and sub-analysis lead number are the two dominant lead data numbers determined by analysis in the above-mentioned multi-lead Holter data.
  • signal preprocessing can be performed: construct dual-lead Holter data according to the above-mentioned main analysis lead number and the above-mentioned secondary analysis lead number, and then filter out low-frequency baseline drift interference and high-frequency noise through the above-mentioned band-pass filtering.
  • the specific can be as follows: according to the R wave position RPos, the Holter data is divided into ECG data fragments X ⁇ R N*2*W with length W corresponding to the R wave position in the segment center, where N represents the divided The number of ECG data, 2 means double lead, W means single lead data length.
  • the above-mentioned heartbeat data to be processed may include a signal of a preset signal length cut out from a two-lead Holter data segment, which may be used as a recent signal RecentSignals ⁇ R 2*L , where L represents a preset signal length (recent signal length).
  • the above step 101 may include:
  • the minimum error among the plurality of relative errors is obtained, and if the minimum error is smaller than a preset error threshold, it is determined that the target data template corresponding to the minimum error matches the heartbeat data to be processed.
  • each data template may correspond to a representative waveform, which may be a waveform mean value of template members or determined by other means, which is not limited in this embodiment of the present application.
  • the heartbeat data to be processed can be classified by calculating the relative error to measure the similarity between the waveform of the heartbeat data to be processed and the representative waveform of each data template.
  • the heartbeat offset search range can also be selected and set according to requirements, so as to reduce the data processing amount of template search and matching, and improve the efficiency.
  • the error calculation formula can be as follows:
  • abs( ⁇ ) means taking the absolute value
  • ppv( ⁇ ) means taking the peak value , that is, the maximum value-minimum value.
  • the obtained relative errors are searched for the minimum error RE min , and the optimal offset Shift opt corresponding to the minimum error RE min and the matching template identifier MatchId (ie, the template identifier of the template matching the data waveform to be processed).
  • An offset search mechanism is introduced in the embodiment of the present application, which can avoid the problem of excessive templates caused by heartbeat offset and template offset, and reduce template information storage overhead.
  • the above-mentioned method before the above-mentioned comparison of the above-mentioned heartbeat data to be processed with a plurality of data templates in the template library, the above-mentioned method further includes:
  • the signal quality parameter of the above-mentioned heartbeat data to be processed is determined
  • the above-mentioned establishment of a new data template according to the above-mentioned heartbeat data to be processed includes:
  • the signal quality parameter of the above-mentioned heartbeat data to be processed is the first quality threshold
  • a new data template is established according to the above-mentioned heartbeat data to be processed.
  • the signal quality of the detected heartbeat data to be processed can be evaluated. Please refer to a schematic diagram of a signal quality evaluation process shown in FIG. 2 . As shown in FIG. 2 , the signal quality evaluation process includes three steps of recording recent signals, recording recent heartbeat information, and evaluating signal quality.
  • a signal-to-noise ratio (SIGNAL-NOISE RATIO, SNR) may be used to measure the signal quality.
  • the recent signal RecentSignals ⁇ R2*L can be cropped from the two-lead Holter data segment, where L represents the length of the recent signal; and the recent heart beat information RecentBeatInfo can also be updated, including adding the newly detected R wave position , update the position of the historical heartbeat in the recent signal, and remove the historical heartbeat that exceeds the length L of the recent signal, etc.
  • Vs represents the standard deviation of the QRS waveform amplitude of the recent heartbeat
  • Vn represents the standard deviation of the signal amplitude in the recent signal excluding the area of the QRS waveform of the recent heartbeat.
  • the above-mentioned signal quality parameters can be obtained by setting different rules according to requirements and calculating the signal-to-noise ratio, which is not limited in this embodiment of the present application.
  • the template matching is successful, update the matching template information with the newly detected heartbeat information, and output the matching template identifier; if RE min ⁇ RE Thre1 . If the template matching fails, the signal quality can be further judged.
  • the information of the target data template can be updated with the information of the heartbeat data to be processed, such as the newly detected R wave position, etc.
  • the heartbeat segment of the heartbeat data to be processed is classified into a matching template, becomes a template member of the template, and can output the template identifier of the target data template.
  • the above-mentioned newly-added data template is determined as: The above-mentioned target data template matching the above-mentioned heartbeat data to be processed.
  • the target data template that matches the heartbeat data can be used to create a new data template based on the heartbeat data to be processed.
  • the new data template can use the QRS waveform of the heartbeat data to be processed as the representative waveform of the new data template, and save The RR interval and width values of the heartbeat data to be processed and output the newly added template identifier.
  • the heartbeat data to be processed is used as the newly detected heartbeat, and the specific process may include:
  • Heartbeat match If the matching is successful, update the matching template information with the newly detected heartbeat information, and output the matching template number; if the matching fails. Further judge the signal quality;
  • a new template is created with the newly detected heartbeat information, and the number of the new template is output.
  • the template matching fails, and the invalid template number represented by a negative number can be output.
  • the quantity of the above-mentioned heartbeat data to be processed reaches a preset quantity threshold, perform a sorting operation on the above-mentioned data template, and the above-mentioned sorting operation includes a template merging operation, a template sorting operation, and/or a template deletion operation, and obtains: Template collation results.
  • the data template may be sorted out while the clustering is performed.
  • the above preset number threshold is 100, that is, whenever 100 pieces of data to be processed are newly detected, the template information in the existing template library needs to be sorted out.
  • the above-mentioned performing the sorting operation on the above-mentioned data template includes:
  • the function of template merging is mainly to merge similar templates in the template library to reduce the number of templates.
  • the specific operations can be as follows:
  • the reference template identifier ReferId is set as the first parameter in the unsorted template identifier list, and the processing template identifier TargetIdx to be matched is the remaining parameters in the unsorted template identifier list.
  • the relative error RE(s,t) of the reference template and each processing template can be calculated by using the same error calculation formula above, s ⁇ ShiftLtm2, t ⁇ TargetIdx; search for the processing template satisfying RE(s,t) ⁇ RE Thre2 Identifies the list TargetIdx1.
  • These processing templates are similar to the reference template, and the information of the reference template will be updated with the information of these processing templates and the corresponding offsets.
  • Steps (2)-(4) are repeated until the TargetIdx is empty, and the template merging ends.
  • the above-mentioned performing the sorting operation on the above-mentioned data template includes:
  • the multiple templates are sorted according to the descending order of the number of template members of each template in the multiple templates.
  • the above-mentioned sorting operation includes a template deletion operation
  • the above-mentioned sorting operation for the above-mentioned data template includes:
  • the number of templates can be managed and controlled in real time.
  • the above-mentioned first number threshold T1 can be set, and when the template number M exceeds the first number threshold T1, the first round of template deletion process can be started, and the template with a larger age value can be deleted by comparing and evaluating the age value of the template and the age parameter. .
  • the first round of template deletion process may include:
  • T is the number of templates
  • the corresponding age parameters can be calculated according to different age values, which can be calculated by the following formula:
  • the first duration parameter includes a 1 and b 1 , which are fixed duration and variable duration respectively.
  • the calculation method of the above-mentioned age parameter can be set as required, such as modifying the above-mentioned first duration parameter, which is not limited here;
  • DeleteNum number of templates to be deleted (DeleteNum)
  • performing the sorting operation on the above-mentioned data template further includes:
  • the template to be searched is obtained from the above-mentioned template, and the number of template members of the above-mentioned template to be searched is less than the preset number of members threshold;
  • the above-mentioned second quantity threshold T2 is greater than the above-mentioned th a quantity threshold T1;
  • Obtain the template whose age value is greater than the age reference value determine the templates with the largest age value in the top N as templates to be deleted from the templates whose age value is greater than the age reference value, and delete the template to be deleted from the template set.
  • a second round of template deletion process may be started.
  • the template with a smaller number of template members may be deleted first.
  • the second round of template deletion process may include:
  • the age reference value calculated in this stage is a fixed age parameter, which can be as follows:
  • the second duration parameter includes a 2 and b 2 , which are fixed duration and variable duration respectively.
  • the calculation method of the above-mentioned age reference value can be set as required, such as modifying the above-mentioned second duration parameter, which is not limited here.
  • CandidateNum is the number of templates contained in CandidateIdx2;
  • DeleteNum number of templates to be deleted (DeleteNum)
  • DeleteNum number of templates-T1
  • template matching can be used to output template matching results, and at the same time, it can support the sorting of template libraries, and template merging can be introduced to merge similar templates;
  • the age value adaptively deletes templates with large age and small capacity, so as to avoid the problem that the number of templates increases too quickly in the case of large interference, and has anti-interference ability;
  • the heartbeat data can be obtained in time The real-time clustering results of the template are more standardized.
  • the embodiments of the present application can be used to remotely monitor the real-time heartbeat clustering of a patient's heart activity state.
  • the patient wears a mobile ECG collection box equipped with a remote data transmission function, and the collection box collects the patient's ECG signal and uploads it to the server.
  • the data is received and parsed into 12-lead Holter real-time data.
  • new heartbeat data information is obtained, and then the 12-lead Holter data and heartbeat data information are transmitted to the ECG signal real-time clustering module for heartbeat clustering.
  • the real-time heartbeat clustering algorithm After the real-time heartbeat clustering algorithm reads the data, it constructs a dual-lead Holter signal from the 12-lead Holter signal according to the main analysis lead number and the secondary analysis lead number, and then completes the signal preprocessing and ECG segment division. The former is obtained. Filter the Holter signal, which obtains the QRS waveform data of the newly detected heartbeat.
  • the algorithm will combine the saved recent signals and the corresponding recent heartbeat information to calculate the signal quality parameters.
  • FIG. 5 shows the template member waveforms after the template merge.
  • the three heartbeat groups in the figure represent the reference template member waveforms without offset correction and the similar target templates numbered 5 and 12 (the above-mentioned similar processing templates). ) member waveform.
  • the methods used in ECG template matching can be roughly divided into two categories, one is the template matching method, and the other is the feature parameter method.
  • the template matching method is to directly match the newly acquired ECG signal with the existing template, and then determine the similarity between the two by calculating the correlation coefficient. If the correlation coefficient is greater than a given threshold, the ECG signal is considered to be similar to a specific template, otherwise a new template is established.
  • the template matching method requires a prior determination of a known template library for comparison, and may not be adaptable when encountering rare special cases.
  • the characteristic parameter method will perform signal transformation on the ECG signal in advance before template matching, usually using wavelet transformation. The transformed signal has a good degree of discrimination in certain frequency bands or regions, so it can be used for template matching.
  • the signal transformation method adopted by the characteristic parameter method has a large amount of calculation, so the algorithm takes a long time.
  • there are some methods but they are only applicable to offline clustering scenarios and cannot be applied to real-time clustering scenarios.
  • the ECG heartbeat data clustering method in the embodiment of the present application has the following advantages:
  • the template deletion mechanism is introduced.
  • the templates with large age and small capacity will be deleted adaptively according to the age of the template, so as to avoid the problem that the number of templates increases too quickly in the case of large interference. , with anti-interference ability.
  • an embodiment of the present application further discloses a device for clustering ECG heartbeat data.
  • the electrocardiogram and heartbeat data clustering device 700 includes a template matching module 710, a template sorting module 720 and a clustering module 730, wherein:
  • the above template matching module 710 is used for:
  • a new data template is established according to the above-mentioned heartbeat data to be processed, and the above-mentioned newly-added data template corresponds to the newly-added template identifier; the above-mentioned newly-added data template is determined to be the same as the above-mentioned The above-mentioned target data template matched by the heartbeat data to be processed;
  • the above-mentioned template matching result including the template identifier of the above-mentioned target data template
  • the above-mentioned template sorting module 720 is configured to perform sorting operations on the above-mentioned data templates whenever the number of the above-mentioned heartbeat data to be processed reaches a preset number threshold, and the above-mentioned sorting operations include a template merging operation, a template sorting operation and/ Or template delete operation to obtain template sorting results;
  • the clustering module 730 is configured to obtain the clustering result of the heartbeat data to be processed according to the template matching result and the template sorting result.
  • each step involved in the method shown in FIG. 1 may be performed by each module in the apparatus 700 for clustering electrocardiogram and heartbeat data shown in FIG. 7 , which will not be repeated here.
  • the electrocardiogram heartbeat data clustering device 700 in this embodiment of the present application can acquire heartbeat data to be processed, and compare the heartbeat data to be processed with multiple data templates; matching target data template, use the information of the heartbeat data to be processed to update the information of the target data template; if there is no target data template matching the heartbeat data to be processed, according to the heartbeat data to be processed establishing a new data template, where the new data template corresponds to a new template identifier; determining the new data template as the target data template matching the to-be-processed heartbeat data; outputting the to-be-processed heartbeat
  • the template matching result of the data, the template matching result includes the template identifier of the target data template; whenever the number of the processed heartbeat data to be processed reaches a preset number threshold, the data template is sorted operation, the sorting operation includes a template merging operation, a template sorting operation and/or a template deletion operation, and a template sorting result is obtained; according to the template matching result and the template
  • the embodiments of the present application further provide an electronic device.
  • the electronic device 800 at least includes a processor 801 , an input device 802 , an output device 803 and a computer storage medium 804 .
  • the processor 801, the input device 802, the output device 803, and the computer storage medium 804 in the electronic device 800 may be connected through a bus or other means.
  • the computer storage medium 804 may be stored in the memory of the electronic device 800 .
  • the computer storage medium 804 is used for storing computer programs, and the computer program includes program instructions.
  • the processor 801 is used for executing the program instructions stored in the computer storage medium 804 .
  • the processor 801 (or called CPU (Central Processing Unit, central processing unit)) is the computing core and the control core of the electronic device 800, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to thereby Implement the corresponding method flow or corresponding function; in an embodiment, the processor 801 in the embodiment of the present application may be used to perform a series of processing, including some or all of the methods in the embodiment shown in FIG. 1 , and so on.
  • CPU Central Processing Unit, central processing unit
  • Embodiments of the present application further provide a computer storage medium (Memory), where the above-mentioned computer storage medium is a memory device in the electronic device 800 for storing programs and data.
  • the computer storage medium here may include both the built-in storage medium in the electronic device 800 , and certainly also the extended storage medium supported by the electronic device 800 .
  • the computer storage medium provides storage space in which the operating system of the electronic device 800 is stored.
  • one or more instructions suitable for being loaded and executed by the processor 801 are also stored in the storage space, and these instructions may be one or more computer programs (including program codes).
  • the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory; optionally, at least one storage medium located far away from the aforementioned processor can also be used. computer storage media.
  • one or more instructions stored in the computer storage medium can be loaded and executed by the processor 801 to implement the corresponding steps in the foregoing embodiment; in specific implementation, one or more instructions in the computer storage medium can be Any steps of the method shown in FIG. 1 are loaded and executed by the processor 801, and are not repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the division of the module is only for one logical function division, and there may be other division methods in actual implementation, for example, multiple modules or components may be combined or integrated into another system, or some features may be ignored, or not implement.
  • the shown or discussed mutual coupling, or direct coupling, or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
  • Modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted over a computer-readable storage medium.
  • the computer instructions can be sent from one website site, computer, server, or data center to another by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.)
  • wire e.g. coaxial cable, fiber optic, digital subscriber line (DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the available media may be read-only memory (ROM), or random access memory (RAM), or magnetic media, such as floppy disks, hard disks, magnetic tapes, magnetic disks, or optical media, such as, A digital versatile disc (DVD), or a semiconductor medium, for example, a solid state disk (SSD) and the like.
  • ROM read-only memory
  • RAM random access memory
  • magnetic media such as floppy disks, hard disks, magnetic tapes, magnetic disks, or optical media, such as, A digital versatile disc (DVD), or a semiconductor medium, for example, a solid state disk (SSD) and the like.

Landscapes

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

Abstract

Disclosed are a method and device for electrocardiogram heartbeat data clustering, an electronic device, and a medium. The method comprises: comparing heartbeat data to be processed with multiple data templates; if a matching target data template is present, using information of said heartbeat data to update information of the target data template; if none is present, creating, on the basis of said heartbeat data, a new data template corresponding to a new template identifier; determining the new data template as the target data template matching said heartbeat data; outputting the template matching result of said heartbeat data, the template matching result comprising the template identifier of the target data template; insofar as the volume of said heartbeat data reaches a preset volume threshold, executing an organizing operation with respect to the data templates, comprising a template merging operation, a template sorting operation, and/or a template deleting operation, to acquire a template organizing result; and acquiring a clustering result of said heartbeat data on the basis of the template matching result and of the template organizing result.

Description

心电图心搏数据聚类方法、装置、电子设备和介质Electrocardiogram heartbeat data clustering method, apparatus, electronic device and medium 技术领域technical field
本发明涉及心电图数据处理技术领域,尤其是涉及一种心电图心搏数据聚类方法、装置、电子设备和介质。The present invention relates to the technical field of electrocardiogram data processing, in particular to a method, device, electronic device and medium for clustering electrocardiogram heartbeat data.
背景技术Background technique
为了更快捷清楚地对采集的心电图数据进行分析,开发了越来越多的计算机辅助诊断心电图软件。心搏聚类(或称模板匹配)技术可将ECG信号按照QRS波的不同形态特征分为若干个模板,每个模板存放具有相似QRS波形态的心搏索引,因此便将大量心搏的检查工作集中到若干个模板上,大大节省了医生的检查时间,提高诊断效率。In order to analyze the acquired ECG data more quickly and clearly, more and more computer-aided diagnostic ECG software has been developed. The heartbeat clustering (or template matching) technology can divide the ECG signal into several templates according to the different morphological characteristics of the QRS wave, and each template stores the heartbeat index with the similar QRS wave shape. The work is concentrated on several templates, which greatly saves the doctor's inspection time and improves the diagnosis efficiency.
目前心电图心搏数据聚类可以使用特征参数法。具体是采用快速傅里叶变换、小波变换、希尔伯特变换等信号变换方法将心电信号从时域转换成特征更易于区分的变换域后,再利用经典聚类方法对心电信号进行自动模板匹配。而采用信号变换方法会显著增加计算量,且许多经典聚类方法需要事先设置待匹配的模板个数。当采用该方法对信噪比低、多源室早病例进行模板匹配时,同样会出现不同心搏混合在同一模板的情况,心电图心搏数据聚类不够准确,处理效率不高。At present, the ECG heartbeat data clustering can use the feature parameter method. Specifically, after using signal transformation methods such as fast Fourier transform, wavelet transform, and Hilbert transform to convert the ECG signal from the time domain into a transform domain with features that are easier to distinguish, the classical clustering method is used to analyze the ECG signal. Automatic template matching. However, using the signal transformation method will significantly increase the amount of calculation, and many classical clustering methods need to set the number of templates to be matched in advance. When this method is used to perform template matching on cases with low signal-to-noise ratio and multiple sources of premature ventricular arrhythmia, different heartbeats will also be mixed in the same template, the ECG heartbeat data clustering is not accurate enough, and the processing efficiency is not high.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种心电图心搏数据聚类方法、装置、电子设备和介质。The present application provides an electrocardiogram heartbeat data clustering method, apparatus, electronic device and medium.
第一方面,提供了一种心电图心搏数据聚类方法,包括:In a first aspect, a method for clustering ECG heartbeat data is provided, including:
获取待处理心搏数据,将所述待处理心搏数据与多个数据模板进行比对;Obtaining heartbeat data to be processed, and comparing the heartbeat data to be processed with multiple data templates;
若存在与所述待处理心搏数据匹配的目标数据模板,使用所述待处理心搏数据的信息更新所述目标数据模板的信息;If there is a target data template matching the heartbeat data to be processed, update the information of the target data template using the information of the heartbeat data to be processed;
若不存在与所述待处理心搏数据匹配的目标数据模板,根据所述待处理心搏数据建立新增数据模板,所述新增数据模板对应新增模板标识;将所述新增数据模板确定为与所述待处理心搏数据匹配的所述目标数据模板;If there is no target data template matching the heartbeat data to be processed, a new data template is created according to the heartbeat data to be processed, and the new data template corresponds to the new template identifier; determining the target data template that matches the heartbeat data to be processed;
输出所述待处理心搏数据的模板匹配结果,所述模板匹配结果包括所述目标数据模板的模板标识;outputting a template matching result of the heartbeat data to be processed, where the template matching result includes a template identifier of the target data template;
每当处理的所述待处理心搏数据的数量达到预设数量阈值的情况下,对所述数据模板执行整理操作,所述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果;Whenever the number of the processed heartbeat data to be processed reaches a preset number threshold, a sorting operation is performed on the data template, and the sorting operation includes a template merging operation, a template sorting operation and/or a template deleting operation, Get the template finishing result;
根据所述模板匹配结果和所述模板整理结果,获得所述待处理心搏数据的聚类结果。According to the template matching result and the template sorting result, the clustering result of the heartbeat data to be processed is obtained.
第二方面,提供了一种心电图心搏数据聚类装置,包括模板匹配模块、模板整理模块和聚类模块,其中:In a second aspect, an ECG heartbeat data clustering device is provided, including a template matching module, a template sorting module and a clustering module, wherein:
所述模板匹配模块,用于:The template matching module is used for:
获取待处理心搏数据,将所述待处理心搏数据与多个数据模板进行比对;Obtaining heartbeat data to be processed, and comparing the heartbeat data to be processed with multiple data templates;
若存在与所述待处理心搏数据匹配的目标数据模板,使用所述待处理心搏数据的信息更新所述目标数据模板的信息;If there is a target data template matching the heartbeat data to be processed, update the information of the target data template using the information of the heartbeat data to be processed;
若不存在与所述待处理心搏数据匹配的目标数据模板,根据所述待处理心搏数据建立新增数据模板,所述新增数据模板对应新增模板标识;将所述新增数据模板确定为与所述待处理心搏数据匹配的所述目标数据模板;If there is no target data template matching the heartbeat data to be processed, a new data template is created according to the heartbeat data to be processed, and the new data template corresponds to the new template identifier; determining the target data template that matches the heartbeat data to be processed;
输出所述待处理心搏数据的模板匹配结果,所述模板匹配结果包括所述目标数据模板的模板标识;outputting a template matching result of the heartbeat data to be processed, where the template matching result includes a template identifier of the target data template;
所述模板整理模块,用于每当处理的所述待处理心搏数据的数量达到预设数量阈值的情况下,对所述数据模板执行整理操作,所述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果;The template sorting module is configured to perform sorting operations on the data templates whenever the number of processed heartbeat data to be processed reaches a preset number threshold, and the sorting operations include template merging operations, template sorting operations operation and/or template deletion to obtain template sorting results;
所述聚类模块,用于根据所述模板匹配结果和所述模板整理结果,获得所述待处理心搏数据的聚类结果。The clustering module is configured to obtain the clustering result of the heartbeat data to be processed according to the template matching result and the template sorting result.
第三方面,提供了一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如第一方面及其任一种可能的实现方式的步骤。In a third aspect, an electronic device is provided, comprising a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the first aspect and any of the above. Steps for a possible implementation.
第四方面,提供了一种计算机存储介质,所述计算机存储介质存储有一条或多条指令,所述一条或多条指令适于由处理器加载并执行如上述第一方面及其任一种可能的实现方式的步骤。In a fourth aspect, a computer storage medium is provided, the computer storage medium stores one or more instructions, the one or more instructions are adapted to be loaded and executed by a processor as described in the first aspect and any one thereof Steps of possible implementations.
本申请可以通过模板匹配将多个具有相似形态的心搏聚合为一个模板,并且对模板进行及时的整合,使可以实现实时聚类,并且无需复杂的信号变换,数据处理效率更高。In the present application, multiple heartbeats with similar shapes can be aggregated into one template through template matching, and the templates can be integrated in time, so that real-time clustering can be realized without complex signal transformation, and the data processing efficiency is higher.
附图说明Description of drawings
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the accompanying drawings required in the embodiments or the background technology of the present application will be described below.
图1为本申请实施例提供的一种心电图心搏数据聚类方法的流程示意图;1 is a schematic flowchart of a method for clustering electrocardiogram heartbeat data according to an embodiment of the present application;
图2为本申请实施例提供的一种信号质量评价流程示意图;FIG. 2 is a schematic flowchart of a signal quality evaluation process provided by an embodiment of the present application;
图3为本申请实施例提供的一种模板匹配流程示意图;3 is a schematic flowchart of a template matching process provided by an embodiment of the present application;
图4为本申请实施例提供的一种经过心搏偏移搜索后的模板匹配结果示意图;4 is a schematic diagram of a template matching result after heartbeat offset search provided by an embodiment of the present application;
图5为本申请实施例提供的一种经过存在模板偏移时的模板合并后的模板匹配结果示意图;5 is a schematic diagram of a template matching result after template merging when there is a template offset provided by an embodiment of the present application;
图6为本申请实施例提供的一种经过模板数量过多时的模板删除后的模板匹配结果示意图;6 is a schematic diagram of a template matching result after template deletion when the number of templates is too large, according to an embodiment of the present application;
图7为本申请实施例提供的一种心电图心搏数据聚类装置的结构示意图;FIG. 7 is a schematic structural diagram of an apparatus for clustering electrocardiogram and heartbeat data according to an embodiment of the present application;
图8为本申请实施例提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其 它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
本申请实施例中涉及到的ECG信号,可以由心电采集盒通过连接到人体各部位上的电极片接收到的电信号经过信号转换而获得。典型的ECG信号由P波、QRS波群和T波构成,它反映了人体心脏活动的状态。通过观察ECG信号的形态(心搏波形)和节律(心跳频率),医生可以得知有关患者心脏疾病的多方面信息。The ECG signals involved in the embodiments of the present application can be obtained by converting the electrical signals received by the ECG collection box through the electrode pads connected to various parts of the human body through signal conversion. A typical ECG signal consists of P wave, QRS complex and T wave, which reflects the state of human heart activity. By observing the shape (heartbeat waveform) and rhythm (heart rate) of the ECG signal, doctors can learn many aspects of a patient's heart disease.
本申请实施例中涉及到的Holter信号是长时间ECG信号,一般长达24小时及以上。由于许多心脏疾病的发作时间和触发条件比较隐秘,一般的静态心电图无法在十几秒内发现其存在,这就需要采集长时间的Holter信号持续记录患者的心脏电信号。然而,Holter信号的记录时间跨度大,时长达24小时的Holter信号大约有10万个心搏,这就使得医生通过目视检查患者情况的诊断方式效率低下,因此许多提高医生诊断效率的心电信号处理技术被相应的开发出来。The Holter signal involved in the embodiments of the present application is a long-term ECG signal, generally 24 hours or more. Because the onset time and triggering conditions of many heart diseases are relatively secret, the general static ECG cannot find its existence within a dozen seconds, which requires the acquisition of long-term Holter signals to continuously record the patient's cardiac electrical signals. However, the recording time span of the Holter signal is large, and the Holter signal with a duration of 24 hours has about 100,000 heartbeats, which makes the diagnosis method of the doctor's visual inspection of the patient's condition inefficient. Signal processing techniques are developed accordingly.
心搏聚类(或称模板匹配)技术可将ECG信号按照QRS波的不同形态特征分为若干个模板,每个模板存放具有相似QRS波形态的心搏索引,因此便将大量心搏的检查工作集中到若干个模板上,大大节省了医生的检查时间,提高诊断效率。The heartbeat clustering (or template matching) technology can divide the ECG signal into several templates according to the different morphological characteristics of the QRS wave, and each template stores the heartbeat index with the similar QRS wave shape. The work is concentrated on several templates, which greatly saves the doctor's inspection time and improves the diagnosis efficiency.
下面结合本申请实施例中的附图对本申请实施例进行描述。The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
请参阅图1,图1是本申请实施例提供的一种心电图心搏数据聚类方法的流程示意图。该方法可包括:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a method for clustering electrocardiogram heartbeat data according to an embodiment of the present application. The method may include:
101、获取待处理心搏数据,将上述待处理心搏数据与多个数据模板进行比对。101. Obtain heartbeat data to be processed, and compare the heartbeat data to be processed with multiple data templates.
本申请实施例的执行主体可以为一种心电图心搏数据聚类装置,可以为电子设备,具体实现中,上述电子设备为一种终端,也可称为终端设备,包括但不限于诸如具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的移动电话、膝上型计算机或平板计算机之类的其它便携式设备。还应当理解的是,在某些实施例中,上述设备并非便携式通信设备,而是具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的台式计算机。在一种可选的实施方式中,上述心电图心搏数据聚类方法可以响应于用户的操作指令,由服务器支撑运行。The execution subject of the embodiment of the present application may be an electrocardiogram and heartbeat data clustering device, which may be an electronic device. Other portable devices such as mobile phones, laptops, or tablet computers with sensitive surfaces (eg, touch screen displays and/or touch pads). It should also be understood that, in some embodiments, the above-described devices are not portable communication devices, but rather desktop computers with touch-sensitive surfaces (eg, touch screen displays and/or touch pads). In an optional implementation manner, the above-mentioned method for clustering electrocardiogram and heartbeat data may be supported and run by a server in response to an operation instruction of a user.
上述待处理心搏数据可以是采集的心电图数据中裁剪的心搏信号数据。The above-mentioned heartbeat data to be processed may be heartbeat signal data clipped from the collected electrocardiogram data.
在一种可选的实施方式中,上述步骤101之前,该方法还包括:In an optional embodiment, before the above step 101, the method further includes:
获取心电图数据,对上述心电图数据进行划分,获得心搏片段;Obtain electrocardiogram data, divide the above electrocardiogram data, and obtain heart beat segments;
上述获取待处理心搏数据包括:The above-mentioned acquisition of the heartbeat data to be processed includes:
从上述心搏片段中获取预设信号长度的上述待处理心搏数据。The to-be-processed heartbeat data with a preset signal length is acquired from the heartbeat segment.
本申请实施例中的心电图数据可以是心电图采集设备所采集的一段时间内的心电图信号,一般可以根据心电图的特性确定心搏位置,进而将该信号划分为多个反应心搏特征的等长片段。The electrocardiogram data in this embodiment of the present application may be an electrocardiogram signal collected by an electrocardiogram acquisition device within a period of time. Generally, the position of the heartbeat can be determined according to the characteristics of the electrocardiogram, and then the signal can be divided into multiple equal-length segments reflecting the characteristics of the heartbeat. .
可选的,上述对上述心电图数据进行划分,获得多个心搏片段,包括:Optionally, the above-mentioned electrocardiogram data is divided to obtain a plurality of heart beat segments, including:
根据检测获得的R波位置信息对上述心电图数据进行划分,获得多个以上述R波位置为中心的等长度的心搏片段。The ECG data is divided according to the R wave position information obtained by detection, and a plurality of heartbeat segments of equal length centered on the R wave position are obtained.
一个完整的心电图信号通常由P波、QRS波群和T波构成,其中QRS波群是心电图的主体部分,而R波又在QRS波群中占主导地位,因此心搏的标记位置可以以R波为准。可以获取以R波位置为中心的等长度的ECG片段,以进行模板匹配。A complete ECG signal is usually composed of P wave, QRS complex and T wave, in which the QRS complex is the main part of the ECG, and the R wave is dominant in the QRS complex, so the marked position of the heartbeat can be marked with R. Wave prevail. Equal length ECG segments centered on the R-wave position can be acquired for template matching.
可选的,上述获取心电图数据之前,上述方法还包括:Optionally, before obtaining the electrocardiogram data, the method further includes:
获取采集的多导联心电图数据;根据上述多导联心电图数据中的主分析导联编号和次分析导联编号构建双导联心电图数据;Acquire the collected multi-lead ECG data; construct dual-lead ECG data according to the main analysis lead number and the sub-analysis lead number in the above multi-lead ECG data;
对上述双导联心电图数据进行带通滤波,获得上述心电图数据。Band-pass filtering is performed on the above-mentioned two-lead electrocardiogram data to obtain the above-mentioned electrocardiogram data.
本申请实施例中可以使用Holter采集的多导联心电图数据进行处理。Holter是一种心电信号记录系统,它可以通过采用便携心电信号采集和对患者的心脏活动进行长达24小时的持续测量,为医生全面分析患者心脏病情提供了强有力的信息辅助。In this embodiment of the present application, multi-lead electrocardiogram data collected by Holter may be used for processing. Holter is an ECG signal recording system, which can provide a powerful information aid for doctors to comprehensively analyze the patient's heart condition by adopting portable ECG signal acquisition and continuous measurement of the patient's cardiac activity for up to 24 hours.
具体的,可以首先读取Holter数据,该数据包括由Holter设备采集的24小时多导联Holter数据片段Signals∈R N*M,其中N表示信号导联个数,M表示信号长度;还可以包括相关参数,如: Specifically, the Holter data can be read first, and the data includes the 24-hour multi-lead Holter data segment Signals∈R N*M collected by the Holter device, where N represents the number of signal leads, and M represents the signal length; it can also include related parameters, such as:
经过QRS波检测得到的R波位置(RPos,以采样点或时间为单位);The R wave position (RPos, in sampling point or time) obtained by the detection of the QRS wave;
RR间期(表示当前心搏与相邻前一个心搏的间距,以采样点或时间为单位);RR interval (representing the distance between the current heartbeat and the adjacent previous heartbeat, in sampling points or time units);
QRS波宽度(width,以采样点或时间为单位);QRS wave width (width, in sampling points or time);
Holter设备采样率fs;Holter device sampling rate fs;
主分析导联编号和次分析导联编号。Primary analysis lead number and secondary analysis lead number.
其中,上述主分析导联编号和次分析导联编号是在上述多导联Holter数据 中分析确定的占主导地位的两个导联数据编号。进一步的,可以进行信号预处理:根据上述主分析导联编号和上述次分析导联编号构建双导联Holter数据,然后经过上述带通滤波,滤除低频的基线漂移干扰和高频噪声。Wherein, the above-mentioned main analysis lead number and sub-analysis lead number are the two dominant lead data numbers determined by analysis in the above-mentioned multi-lead Holter data. Further, signal preprocessing can be performed: construct dual-lead Holter data according to the above-mentioned main analysis lead number and the above-mentioned secondary analysis lead number, and then filter out low-frequency baseline drift interference and high-frequency noise through the above-mentioned band-pass filtering.
对于前述ECG划分,具体可以为:根据R波位置RPos,将Holter数据划分为片段中心对应该R波位置,长度为W的ECG数据片段X∈R N*2*W,其中N表示划分好的ECG数据个数,2表示双导联,W表示单导联数据长度。 For the aforementioned ECG division, the specific can be as follows: according to the R wave position RPos, the Holter data is divided into ECG data fragments X∈R N*2*W with length W corresponding to the R wave position in the segment center, where N represents the divided The number of ECG data, 2 means double lead, W means single lead data length.
上述待处理心搏数据可以包括从双导联Holter数据片段裁剪出的预设信号长度的信号,可以作为近期信号RecentSignals∈R 2*L,其中L表示预设信号长度(近期信号长度)。 The above-mentioned heartbeat data to be processed may include a signal of a preset signal length cut out from a two-lead Holter data segment, which may be used as a recent signal RecentSignals∈R 2*L , where L represents a preset signal length (recent signal length).
在一种实施方式中,上述步骤101可包括:In one embodiment, the above step 101 may include:
分别获取上述待处理心搏数据的波形与上述多个数据模板的代表波形的多个相对误差;respectively acquiring multiple relative errors between the waveform of the heartbeat data to be processed and the representative waveforms of the multiple data templates;
获取上述多个相对误差中的最小误差,若上述最小误差小于预设误差阈值,确定上述最小误差所对应的目标数据模板与上述待处理心搏数据匹配。The minimum error among the plurality of relative errors is obtained, and if the minimum error is smaller than a preset error threshold, it is determined that the target data template corresponding to the minimum error matches the heartbeat data to be processed.
本申请实施例中每个数据模板可以对应一个代表波形,可以是模板成员的波形均值或者通过其他方式确定,本申请实施例对此不做限制。具体的,可以通过计算相对误差衡量待处理心搏数据的波形与各个数据模板的代表波形的相似度,来对该待处理心搏数据归类。可选的,同时还可以根据需要选择设置心搏偏移搜索范围,减小模板搜索匹配的数据处理量,提高效率。In this embodiment of the present application, each data template may correspond to a representative waveform, which may be a waveform mean value of template members or determined by other means, which is not limited in this embodiment of the present application. Specifically, the heartbeat data to be processed can be classified by calculating the relative error to measure the similarity between the waveform of the heartbeat data to be processed and the representative waveform of each data template. Optionally, at the same time, the heartbeat offset search range can also be selected and set according to requirements, so as to reduce the data processing amount of template search and matching, and improve the efficiency.
具体的,装置中可以存储有上述预设误差阈值RE Thre1,模板库中的模板代表波形TW∈R T*2*W,其中T为模板个数,心搏偏移搜索范围ShiftLtm1=[-Smax1,Smax1],Smax1表示心搏最大偏移搜索范围。将心搏波形与模板库中的模板进行匹配,计算心搏在不同偏移量s∈ ShiftLtm1下与不同模板(用t表示模板标识)的相对误差RE(s,t),该误差计算公式可以如下: Specifically, the above-mentioned preset error threshold RE Thre1 may be stored in the device, the templates in the template library represent the waveform TW∈R T*2*W , where T is the number of templates, and the heartbeat offset search range ShiftLtm1=[-Smax1 , Smax1], Smax1 represents the maximum excursion search range of the heartbeat. Match the heartbeat waveform with the template in the template library, and calculate the relative error RE(s,t) between the heartbeat and different templates (represented by t) under different offsets s∈ ShiftLtm1 . The error calculation formula can be as follows:
Figure PCTCN2021072841-appb-000001
Figure PCTCN2021072841-appb-000001
其中abs(·)表示取绝对值,ppv(·)表示取峰 ,即最大值-最小值。 Among them, abs(·) means taking the absolute value, and ppv(·) means taking the peak value , that is, the maximum value-minimum value.
在获得的相对误差中搜索最小误差RE min,以及最小误差RE min对应的最优偏移量Shift opt和匹配模板标识MatchId(即与待处理数据波形匹配的模板的模板标识)。 The obtained relative errors are searched for the minimum error RE min , and the optimal offset Shift opt corresponding to the minimum error RE min and the matching template identifier MatchId (ie, the template identifier of the template matching the data waveform to be processed).
本申请实施例中引入偏移搜索机制,可以避免心搏偏移和模板偏移导致的 模板个数过多的问题,减少模板信息存储开销。An offset search mechanism is introduced in the embodiment of the present application, which can avoid the problem of excessive templates caused by heartbeat offset and template offset, and reduce template information storage overhead.
在一种实施方式中,在上述将上述待处理心搏数据与模板库中的多个数据模板进行比对之前,上述方法还包括:In one embodiment, before the above-mentioned comparison of the above-mentioned heartbeat data to be processed with a plurality of data templates in the template library, the above-mentioned method further includes:
计算上述待处理心搏数据的信噪比;Calculate the signal-to-noise ratio of the above-mentioned heartbeat data to be processed;
根据上述待处理心搏数据的信噪比,确定上述待处理心搏数据的信号质量参数;According to the signal-to-noise ratio of the above-mentioned heartbeat data to be processed, the signal quality parameter of the above-mentioned heartbeat data to be processed is determined;
上述根据上述待处理心搏数据建立新增数据模板包括:The above-mentioned establishment of a new data template according to the above-mentioned heartbeat data to be processed includes:
在上述待处理心搏数据的信号质量参数为第一质量阈值的情况下,根据上述待处理心搏数据建立新增数据模板。When the signal quality parameter of the above-mentioned heartbeat data to be processed is the first quality threshold, a new data template is established according to the above-mentioned heartbeat data to be processed.
结合R波位置和双导联Holter数据片段,可以评价所检测待处理心搏数据的信号质量。可参见图2所示的一种信号质量评价流程示意图,如图2所示,该信号质量评价流程包括记录近期信号、记录近期心搏信息、评价信号质量三个步骤。Combined with the R wave position and the two-lead Holter data segment, the signal quality of the detected heartbeat data to be processed can be evaluated. Please refer to a schematic diagram of a signal quality evaluation process shown in FIG. 2 . As shown in FIG. 2 , the signal quality evaluation process includes three steps of recording recent signals, recording recent heartbeat information, and evaluating signal quality.
本申请实施例中可以利用信噪比(SIGNAL-NOISE RATIO,SNR)来衡量信号质量。具体的,如前述所述可以从双导联Holter数据片段裁剪出近期信号RecentSignals∈R2*L,其中L表示近期信号长度;还可以更新近期心搏信息RecentBeatInfo,包括加入新检测到的R波位置、更新历史心搏在近期信号中的位置,并剔除超出近期信号长度L的历史心搏等。In this embodiment of the present application, a signal-to-noise ratio (SIGNAL-NOISE RATIO, SNR) may be used to measure the signal quality. Specifically, as mentioned above, the recent signal RecentSignals ∈ R2*L can be cropped from the two-lead Holter data segment, where L represents the length of the recent signal; and the recent heart beat information RecentBeatInfo can also be updated, including adding the newly detected R wave position , update the position of the historical heartbeat in the recent signal, and remove the historical heartbeat that exceeds the length L of the recent signal, etc.
利用近期信号和近期心搏信息评价信号质量SigQuality,可用以下公式表示的信噪比来衡量:Using the recent signal and recent heartbeat information to evaluate the signal quality SigQuality, it can be measured by the signal-to-noise ratio expressed by the following formula:
Figure PCTCN2021072841-appb-000002
Figure PCTCN2021072841-appb-000002
其中Vs表示近期心搏QRS波形幅值标准差,Vn表示近期信号中除去近期心搏QRS波区域外的信号幅值标准差。上述信号质量参数可以根据需要设置不同的规则由信噪比计算获得,本申请实施例对此不做限制。在一种实施方式中,可以预先设置信噪比阈值SNR thre,若SNR>SNR thre,输出信号质量参数SigQuality=1,表示信号质量好,否则输出SigQuality=0,表示信号质量差。 Among them, Vs represents the standard deviation of the QRS waveform amplitude of the recent heartbeat, and Vn represents the standard deviation of the signal amplitude in the recent signal excluding the area of the QRS waveform of the recent heartbeat. The above-mentioned signal quality parameters can be obtained by setting different rules according to requirements and calculating the signal-to-noise ratio, which is not limited in this embodiment of the present application. In one embodiment, the signal-to-noise ratio threshold SNR thre can be preset. If SNR>SNR thre , the output signal quality parameter SigQuality=1 indicates good signal quality; otherwise, output SigQuality=0 indicates poor signal quality.
可以预先设置上述第一质量阈值,对信号质量进行检测,信号质量满足要求才进行模板匹配,否则可以不进行模板匹配。比如1,若SigQuality=1,信号质量好,以新检测心搏信息新建模板,并输出新建模板标识。The above-mentioned first quality threshold may be preset, and the signal quality is detected, and template matching is performed only when the signal quality meets the requirements, otherwise, template matching may not be performed. For example, 1, if SigQuality=1, the signal quality is good, a new template is created based on the newly detected heartbeat information, and an identifier of the new template is output.
可选的,若RE min<RE Thre1,模板匹配成功,用新检测心搏信息更新匹配模 板信息,并输出匹配模板标识;若RE min≥RE Thre1。模板匹配失败,可以进一步判断信号质量。 Optionally, if RE min < RE Thre1 , the template matching is successful, update the matching template information with the newly detected heartbeat information, and output the matching template identifier; if RE min ≥ RE Thre1 . If the template matching fails, the signal quality can be further judged.
102、若存在与上述待处理心搏数据匹配的目标数据模板,使用上述待处理心搏数据的信息更新上述目标数据模板的信息。102. If there is a target data template matching the above-mentioned heartbeat data to be processed, update the information of the above-mentioned target data template using the above-mentioned information of the above-mentioned heartbeat data to be processed.
具体的,若匹配到与上述待处理心搏数据匹配的目标数据模板,可以用该待处理心搏数据的信息更新目标数据模板的信息,比如新检测到的R波位置等,也可以是将该待处理心搏数据的心搏片段归类到匹配的模板下,成为该模板的模板成员,并可以输出目标数据模板的模板标识。Specifically, if a target data template matching the above-mentioned heartbeat data to be processed is matched, the information of the target data template can be updated with the information of the heartbeat data to be processed, such as the newly detected R wave position, etc. The heartbeat segment of the heartbeat data to be processed is classified into a matching template, becomes a template member of the template, and can output the template identifier of the target data template.
103、若不存在与上述待处理心搏数据匹配的目标数据模板,根据上述待处理心搏数据建立新增数据模板,上述新增数据模板对应新增模板标识;将上述新增数据模板确定为与上述待处理心搏数据匹配的上述目标数据模板。103. If there is no target data template matching the above-mentioned heartbeat data to be processed, a new data template is established according to the above-mentioned heartbeat data to be processed, and the above-mentioned newly-added data template corresponds to the newly-added template identifier; the above-mentioned newly-added data template is determined as: The above-mentioned target data template matching the above-mentioned heartbeat data to be processed.
具体的,本申请实施例中可以判断新检测的待处理心搏数据是否是首个心搏类型,即是否有与上述待处理心搏数据匹配的目标数据模板,若没有匹配到与该待处理心搏数据匹配的目标数据模板,可以以该待处理心搏数据建立新增数据模板,该新增数据模板可采用该待处理心搏数据的QRS波形作为该新增数据模板的代表波形,保存该待处理心搏数据的RR间期和宽度值并输出新增模板标识。Specifically, in this embodiment of the present application, it can be determined whether the newly detected heartbeat data to be processed is the first heartbeat type, that is, whether there is a target data template that matches the above-mentioned heartbeat data to be processed, and if there is no match with the pending heartbeat data The target data template that matches the heartbeat data can be used to create a new data template based on the heartbeat data to be processed. The new data template can use the QRS waveform of the heartbeat data to be processed as the representative waveform of the new data template, and save The RR interval and width values of the heartbeat data to be processed and output the newly added template identifier.
104、输出上述待处理心搏数据的模板匹配结果,上述模板匹配结果包括上述目标数据模板的模板标识。104. Output the template matching result of the heartbeat data to be processed, where the template matching result includes the template identifier of the target data template.
为了更清楚地描述模板匹配过程,可以参考图3所示的一种模板匹配流程示意图,如图3所示,待处理心搏数据作为新检测心搏,具体流程可包括:In order to describe the template matching process more clearly, reference can be made to a schematic diagram of a template matching process shown in FIG. 3 . As shown in FIG. 3 , the heartbeat data to be processed is used as the newly detected heartbeat, and the specific process may include:
判断新检测心搏是否是首个心搏,若是,以新检测心搏信息新建模板,输出新建模板编号,结束匹配流程;否则继续下一步骤;Determine whether the newly detected heartbeat is the first heartbeat, and if so, create a new template with the newly detected heartbeat information, output the number of the new template, and end the matching process; otherwise, continue to the next step;
心搏匹配。若匹配成功,用新检测心搏信息更新匹配模板信息,并输出匹配模板编号;若匹配失败。进一步判断信号质量;Heartbeat match. If the matching is successful, update the matching template information with the newly detected heartbeat information, and output the matching template number; if the matching fails. Further judge the signal quality;
若信号质量达到需求,以新检测心搏信息新建模板,并输出新建模板编号。If the signal quality meets the requirements, a new template is created with the newly detected heartbeat information, and the number of the new template is output.
若信号质量未达到需求,模板匹配失败,可输出以负数表示的无效模板编号。If the signal quality does not meet the requirements, the template matching fails, and the invalid template number represented by a negative number can be output.
其中上述心搏匹配和判断信号质量的具体方法可以参见图1所示实施例中的相关描述,此处不再赘述。The specific method for the above-mentioned heartbeat matching and signal quality judgment can refer to the relevant description in the embodiment shown in FIG. 1 , and details are not repeated here.
105、每当处理的上述待处理心搏数据的数量达到预设数量阈值的情况下, 对上述数据模板执行整理操作,上述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果。105. Whenever the quantity of the above-mentioned heartbeat data to be processed reaches a preset quantity threshold, perform a sorting operation on the above-mentioned data template, and the above-mentioned sorting operation includes a template merging operation, a template sorting operation, and/or a template deletion operation, and obtains: Template collation results.
本申请实施例中可以在进行聚类的同时对数据模板进行整理操作。比如上述预设数量阈值为100,即每当新检测100个待处理数据时,需要对现有模板库中的模板信息进行整理。In this embodiment of the present application, the data template may be sorted out while the clustering is performed. For example, the above preset number threshold is 100, that is, whenever 100 pieces of data to be processed are newly detected, the template information in the existing template library needs to be sorted out.
在一种可选的实施方式中,上述整理操作包括模板合并操作的情况下,上述对上述数据模板执行整理操作包括:In an optional implementation manner, in the case that the above-mentioned sorting operation includes a template merging operation, the above-mentioned performing the sorting operation on the above-mentioned data template includes:
计算处理模板与参考模板的相对误差,将上述相对误差与预设匹配阈值进行比较,上述参考模板为未整理模板中的一个模板,上述处理模板为上述未整理模板中除上述参考模板以外的模板;Calculate the relative error between the processing template and the reference template, compare the relative error with the preset matching threshold, the reference template is a template in the unorganized template, and the processing template is the template other than the reference template in the unorganized template ;
获取上述相对误差小于上述预设匹配阈值的处理模板,将上述相对误差小于上述预设匹配阈值的处理模板与对应的参考模板进行合并,获得的模板记为已整理模板;Obtaining a processing template with the relative error less than the preset matching threshold, combining the processing template with the relative error less than the preset matching threshold with the corresponding reference template, and recording the obtained template as an organized template;
重复以上步骤直到上述未整理模板的数量为零。Repeat the above steps until the number of unsorted templates above is zero.
具体的,模板合并的功能主要是合并模板库中的相似模板,减少模板个数,具体操作可以如下:Specifically, the function of template merging is mainly to merge similar templates in the template library to reduce the number of templates. The specific operations can be as follows:
(1)预设匹配阈值RE Thre2,模板库中的模板的代表波形TW∈R T*2*W,其中T为模板数量,模板偏移搜索范围ShiftLtm2=[-Smax2,Smax2],Smax2表示模板最大偏移搜索范围,未整理模板标识列表UnMatchIdx={0,1,2,…,T-1}。 (1) The preset matching threshold RE Thre2 , the representative waveform TW∈R T*2*W of the template in the template library, where T is the number of templates, the template offset search range ShiftLtm2=[-Smax2, Smax2], Smax2 represents the template Maximum offset search range, unsorted template ID list UnMatchIdx={0,1,2,...,T-1}.
(2)设置参考模板标识ReferId为未整理模板标识列表中的第一个参数,待匹配的处理模板标识TargetIdx为未整理模板标识列表中的其余参数。(2) The reference template identifier ReferId is set as the first parameter in the unsorted template identifier list, and the processing template identifier TargetIdx to be matched is the remaining parameters in the unsorted template identifier list.
(3)可以利用前述相同的误差计算公式计算参考模板和各个处理模板的相对误差RE(s,t),s∈ShiftLtm2,t∈TargetIdx;搜索满足RE(s,t)<RE Thre2的处理模板标识列表TargetIdx1,这些处理模板与参考模板相似,将利用这些处理模板的信息和对应的偏移量更新参考模板的信息。 (3) The relative error RE(s,t) of the reference template and each processing template can be calculated by using the same error calculation formula above, s∈ShiftLtm2, t∈TargetIdx; search for the processing template satisfying RE(s,t)<RE Thre2 Identifies the list TargetIdx1. These processing templates are similar to the reference template, and the information of the reference template will be updated with the information of these processing templates and the corresponding offsets.
(4)从UnMatchIdx中删去ReferId和TargetIdx1。(4) Delete ReferId and TargetIdx1 from UnMatchIdx.
(5)重复(2)-(4)步骤,直至TargetIdx为空后,模板合并结束。(5) Steps (2)-(4) are repeated until the TargetIdx is empty, and the template merging ends.
在一种可选的实施方式中,在上述整理操作包括模板排序操作的情况下,上述对上述数据模板执行整理操作包括:In an optional implementation manner, when the above-mentioned sorting operation includes a template sorting operation, the above-mentioned performing the sorting operation on the above-mentioned data template includes:
根据多个模板中各个模板的模板成员数量由大到小的顺序,对上述多个模板进行排序。The multiple templates are sorted according to the descending order of the number of template members of each template in the multiple templates.
在上述整理操作包括模板删除操作的情况下,上述对上述数据模板执行整理操作包括:In the case that the above-mentioned sorting operation includes a template deletion operation, the above-mentioned sorting operation for the above-mentioned data template includes:
当模板数量M超过第一数量阈值T1的情况下,计算各个上述模板的年龄值,上述年龄值为上述模板集合中的最新加入模板与获取到上述待处理心搏数据的时间间隔数据;When the number of templates M exceeds the first number threshold T1, calculate the age value of each of the above-mentioned templates, and the above-mentioned age value is the latest added template in the above-mentioned template set and the time interval data obtained from the above-mentioned heartbeat data to be processed;
根据上述各个模板的年龄值和第一时长参数,计算上述各个模板对应的年龄参数;According to the age value and the first duration parameter of each of the above-mentioned templates, calculate the age parameter corresponding to each of the above-mentioned templates;
获取上述年龄值大于上述年龄值对应的年龄参数的模板;从上述年龄值大于上述年龄参数的模板中确定前N个年龄值最大的模板为待删除模板,从上述模板集合中删除上述待删除模板;N=M-T1。Obtain a template whose age value is greater than the age parameter corresponding to the age value; determine the templates with the largest age values in the top N from the templates whose age value is greater than the age parameter as the template to be deleted, and delete the template to be deleted from the template set ; N=M-T1.
本申请实施例中可以实时对模板数量进行管控。可以设置上述第一数量阈值T1,当模板数量M超过第一数量阈值T1时,可以启动第一轮模板删除过程,通过计算模板的年龄值和年龄参数进行比较评估,删除年龄值较大的模板。In this embodiment of the present application, the number of templates can be managed and controlled in real time. The above-mentioned first number threshold T1 can be set, and when the template number M exceeds the first number threshold T1, the first round of template deletion process can be started, and the template with a larger age value can be deleted by comparing and evaluating the age value of the template and the age parameter. .
在一种具体的实施方式中,第一轮模板删除过程可包括:In a specific embodiment, the first round of template deletion process may include:
确定待搜索模板标识CandidateIdx1∈[0,T-1],T为模板个数;Determine the template identifier to be searched CandidateIdx1∈[0,T-1], T is the number of templates;
计算不同模板的年龄值Life(t),t∈CandidateIdx1,其中该年龄值具体为模板集合中的最新加入模板与获取到上述待处理心搏数据的时间间隔数据,即模板成员心搏中的最新匹配心搏到新检测心搏的时间间隔(可以样本点表示);Calculate the age value Life(t) of different templates, t∈CandidateIdx1, where the age value is specifically the latest added template in the template set and the time interval data obtained from the above-mentioned heartbeat data to be processed, that is, the latest template member heartbeat. Time interval from matching heartbeat to newly detected heartbeat (represented by sample points);
可以根据不同年龄值计算对应的年龄参数,具体可由以下公式计算:The corresponding age parameters can be calculated according to different age values, which can be calculated by the following formula:
Figure PCTCN2021072841-appb-000003
Figure PCTCN2021072841-appb-000003
其中第一时长参数包括a 1和b 1,分别是固定时长和可变时长,可选的,可以根据需要设置上述年龄参数的计算方法,比如修改上述第一时长参数,此处不做限制; The first duration parameter includes a 1 and b 1 , which are fixed duration and variable duration respectively. Optionally, the calculation method of the above-mentioned age parameter can be set as required, such as modifying the above-mentioned first duration parameter, which is not limited here;
搜索满足Life(t)>Life Thre(t)的所有模板索引OldIdx; Search all template indexes OldIdx satisfying Life(t)>Life Thre (t);
计算待删除模板个数N(DeleteNum),DeleteNum=模板个数-T1,找出OldIdx中前DeleteNum个年龄最大的模板,从模板库中删除。Calculate the number N of templates to be deleted (DeleteNum), DeleteNum=number of templates-T1, find out the templates with the oldest age in the first DeleteNum in OldIdx, and delete them from the template library.
进一步可选的,上述对上述数据模板执行整理操作还包括:Further optionally, performing the sorting operation on the above-mentioned data template further includes:
当上述模板数量M超过第二数量阈值T2的情况下,从上述模板中获取待搜索模板,上述待搜索模板的模板成员个数小于预设成员个数阈值;上述第二数量阈值T2大于上述第一数量阈值T1;When the above-mentioned template quantity M exceeds the second quantity threshold T2, the template to be searched is obtained from the above-mentioned template, and the number of template members of the above-mentioned template to be searched is less than the preset number of members threshold; The above-mentioned second quantity threshold T2 is greater than the above-mentioned th a quantity threshold T1;
计算各个上述待搜索模板的年龄值;根据上述待搜索模板的数量和第二时长参数,计算年龄参考值;Calculate the age value of each of the above-mentioned templates to be searched; calculate the age reference value according to the number of the above-mentioned templates to be searched and the second duration parameter;
获取上述年龄值大于上述年龄参考值的模板,从上述年龄值大于上述年龄参考值的模板中确定前N个年龄值最大的模板为待删除模板,从上述模板集合中删除上述待删除模板。Obtain the template whose age value is greater than the age reference value, determine the templates with the largest age value in the top N as templates to be deleted from the templates whose age value is greater than the age reference value, and delete the template to be deleted from the template set.
具体的,当模板个数超过第二数量阈值T2(>T1)时,可启动第二轮模板删除过程,本申请实施例中可以首先考虑删除模板成员个数较小的模板。比如,以预设成员个数阈值为3举例,第二轮模板删除过程可包括:Specifically, when the number of templates exceeds the second number threshold T2 (>T1), a second round of template deletion process may be started. In this embodiment of the present application, the template with a smaller number of template members may be deleted first. For example, taking the preset number of members as 3 as an example, the second round of template deletion process may include:
确定待搜索模板标识CandidateIdx2∈{模板成员个数小于3的模板标识}。Determine the identifier of the template to be searched, CandidateIdx2∈{the identifier of the template whose number of template members is less than 3}.
计算不同模板的年龄值Life(t),t∈CandidateIdx2,与前述相同,此处不赘述;Calculate the age value Life(t) of different templates, t∈CandidateIdx2, which is the same as the previous one, and will not be repeated here;
与第一轮模板删除不同的是,该阶段计算的年龄参考值是一种固定的年龄参数,具体可以如下:Different from the first round of template deletion, the age reference value calculated in this stage is a fixed age parameter, which can be as follows:
Figure PCTCN2021072841-appb-000004
Figure PCTCN2021072841-appb-000004
其中第二时长参数包括a 2和b 2,分别是固定时长和可变时长,可选的,可以根据需要设置上述年龄参考值的计算方法,比如修改上述第二时长参数,此处不做限制;CandidateNum为CandidateIdx2包含的模板个数; The second duration parameter includes a 2 and b 2 , which are fixed duration and variable duration respectively. Optionally, the calculation method of the above-mentioned age reference value can be set as required, such as modifying the above-mentioned second duration parameter, which is not limited here. ; CandidateNum is the number of templates contained in CandidateIdx2;
搜索满足Life(t)>Life Thre的所有模板索引OldIdx; Search all template indexes OldIdx satisfying Life(t)>Life Thre ;
计算待删除模板个数N(DeleteNum),DeleteNum=模板个数-T1,找出OldIdx中前DeleteNum个年龄最大的模板索引,从模板库中删除。Calculate the number N of templates to be deleted (DeleteNum), DeleteNum=number of templates-T1, find out the template indexes of the oldest DeleteNum templates in OldIdx, and delete them from the template library.
还可以根据需要设置并执行其他的模板整理处理,本申请实施例对此不做限制。Other template sorting processing may also be set and executed as required, which is not limited in this embodiment of the present application.
106、根据上述模板匹配结果和上述模板整理结果,获得上述待处理心搏数据的聚类结果。106. Obtain the clustering result of the heartbeat data to be processed according to the template matching result and the template sorting result.
本申请实施例中通过模板匹配可以输出模板匹配结果,同时能够支持对模板库的整理,引入模板合并,能够合并相似模板;引入删除机制,当模板库中的模板个数过多时,可以根据模板年龄值自适应地删除大年龄、小容量的模板,从而避免在干扰大场合下模板个数增加过快的问题,具有抗干扰能力;根据模板匹配结果和模板整理结果,可以及时获得心搏数据的实时聚类结果,模板更标准化。In the embodiment of the present application, template matching can be used to output template matching results, and at the same time, it can support the sorting of template libraries, and template merging can be introduced to merge similar templates; The age value adaptively deletes templates with large age and small capacity, so as to avoid the problem that the number of templates increases too quickly in the case of large interference, and has anti-interference ability; according to the template matching results and template sorting results, the heartbeat data can be obtained in time The real-time clustering results of the template are more standardized.
在前述实施例的基础上,以下通过具体应用场景举例说明本申请实施例中 的心电图心搏数据聚类方法。On the basis of the foregoing embodiments, the following uses specific application scenarios to illustrate the method for clustering electrocardiogram and heartbeat data in the embodiments of the present application.
本申请实施例可以用于远程监控患者心脏活动状态的实时心搏聚类。患者佩戴搭载远程数据传输功能的移动心电采集盒,采集盒采集患者心电信号后上传至服务器端。在服务器端,数据被接收并解析为12导联Holter实时数据。12导联Holter实时数据经过实时R波检测后,获取新的心搏数据信息,然后12导联Holter数据和心搏数据信息传输到心电信号实时聚类模块进行心搏聚类。The embodiments of the present application can be used to remotely monitor the real-time heartbeat clustering of a patient's heart activity state. The patient wears a mobile ECG collection box equipped with a remote data transmission function, and the collection box collects the patient's ECG signal and uploads it to the server. On the server side, the data is received and parsed into 12-lead Holter real-time data. After the 12-lead Holter real-time data is detected by real-time R wave, new heartbeat data information is obtained, and then the 12-lead Holter data and heartbeat data information are transmitted to the ECG signal real-time clustering module for heartbeat clustering.
实时心搏聚类算法读取数据后,根据主分析导联编号和次分析导联编号从12导联Holter信号中构建双导联Holter信号,然后完成信号预处理和ECG片段划分工作,前者得到滤波Holter信号,后者得到新检测心搏的QRS波形数据。After the real-time heartbeat clustering algorithm reads the data, it constructs a dual-lead Holter signal from the 12-lead Holter signal according to the main analysis lead number and the secondary analysis lead number, and then completes the signal preprocessing and ECG segment division. The former is obtained. Filter the Holter signal, which obtains the QRS waveform data of the newly detected heartbeat.
在信号质量评价环节中,算法将结合保存的近期信号和相应的近期心搏信息,计算出信号质量参数。In the signal quality evaluation link, the algorithm will combine the saved recent signals and the corresponding recent heartbeat information to calculate the signal quality parameters.
举例来讲,以下给出三种情况,说明存在心搏偏移的实时聚类结果、存在模板偏移的模板合并结果和模板数量过多时的模板删除结果,此处仅作示意。For example, three cases are given below to describe the real-time clustering result with heartbeat offset, the template merging result with template offset, and the template deletion result when the number of templates is too large, which are only for illustration here.
(1)存在心搏偏移的实时聚类结果:(1) Real-time clustering results with heartbeat offset:
考虑采样率fs=256Hz,设置匹配阈值RE Thre1=0.1,心搏偏移搜索范围ShiftLtm1=[-30,30]。计算新检测心搏QRS波形与模板库内的所有模板在不同偏移量条件下的相对误差RE(s,t),找出其中的最小相对误差RE min=0.07,以及对应的偏移量-15,匹配模板编号10。由于RE min<RE Thre1,判断匹配成功,将经过偏移校正后的新检测心搏信息更新匹配模板信息。具体可以参见图4所示的一种经过心搏偏移搜索后的模板匹配结果示意图。图4展示了校正前的新检测心搏波形和匹配模板所包含的模板成员心搏波形。 Considering the sampling rate fs=256Hz, set the matching threshold RE Thre1 =0.1, and set the heartbeat offset search range ShiftLtm1=[-30,30]. Calculate the relative error RE(s,t) between the newly detected heartbeat QRS waveform and all templates in the template library under different offset conditions, find the minimum relative error RE min =0.07, and the corresponding offset - 15, which matches template number 10. Since RE min < RE Thre1 , it is judged that the matching is successful, and the matching template information is updated with the newly detected heartbeat information after offset correction. For details, please refer to a schematic diagram of a template matching result after heartbeat offset search shown in FIG. 4 . Figure 4 shows the newly detected heartbeat waveform before correction and the template member heartbeat waveform contained in the matching template.
(2)存在模板偏移的模板合并结果:(2) Template merging results with template offsets:
设匹配阈值RE Thre2=0.12,模板数量T=20,模板偏移搜索范围ShiftLtm2=[-10,10],未整理模板标识列表UnMatchIdx={0,1,2,…,19},参考模板编号ReferId=0,处理模板编号列表TargetIdx={1,2,…,19}。经过偏移搜索后,找到满足RE(s,t)<RE Thre2的相似处理模板编号列表TargetIdx1={5,12},则利用相似处理模板信息以及对应的偏移量更新参考模板,随后更新未整理模板标识列表UnMatchIdx={1,…,4,6,…,11,13,…,19},继续模板合并过程。具体可以参见图5所示的一种经过存在模板偏移时的模板合并后的模板匹配结果示意图。图5 展示了此次模板合并后的模板成员波形图,图中三个心搏群体分别代表了未进行偏移校正的参考模板成员波形和编号为5和12的相似目标模板(上述相似处理模板)成员波形。 Set the matching threshold RE Thre2 = 0.12, the number of templates T = 20, the template offset search range ShiftLtm2 = [-10, 10], the unsorted template identification list UnMatchIdx = {0, 1, 2, ..., 19}, the reference template number ReferId=0, processing template number list TargetIdx={1,2,...,19}. After the offset search, find a list of similar processing template numbers that satisfies RE(s,t)<RE Thre2TargetIdx1 ={5,12}, then use the similar processing template information and the corresponding offset to update the reference template, and then update the unidentified template. Arrange the template identifier list UnMatchIdx={1,...,4,6,...,11,13,...,19}, and continue the template merging process. For details, refer to a schematic diagram of a template matching result after template merging when there is a template offset shown in FIG. 5 . Figure 5 shows the template member waveforms after the template merge. The three heartbeat groups in the figure represent the reference template member waveforms without offset correction and the similar target templates numbered 5 and 12 (the above-mentioned similar processing templates). ) member waveform.
(3)模板数量过多时的模板删除结果:(3) Template deletion results when there are too many templates:
设置第一轮模板删除参数:T1=200,a1=1500,b1=1500。设置第二轮模板删除参数:T2=300,a2=34800,b2=23000。在实时聚类过程中,由于零星干扰的引入,模板库中的模板个数将持续增加。当模板个数超过T1时,开始执行第一次模板删除过程。当遇到大片干扰时,模板个数迅速增加,此时在第一次模板删除过程无法及时删除新增的模板,当模板个数超过T2时,开始执行第二次模板删除过程。具体可以参见图6所示的一种经过模板数量过多时的模板删除后的模板匹配结果示意图,图6展示了若干个被删除的模板,其中可以有不同波形的信号。Set the first round template deletion parameters: T1=200, a1=1500, b1=1500. Set the parameters for the second round of template deletion: T2=300, a2=34800, b2=23000. During the real-time clustering process, the number of templates in the template library will continue to increase due to the introduction of sporadic interference. When the number of templates exceeds T1, the first template deletion process starts. When encountering large interference, the number of templates increases rapidly. At this time, the newly added templates cannot be deleted in time during the first template deletion process. When the number of templates exceeds T2, the second template deletion process begins. For details, please refer to a schematic diagram of a template matching result after template deletion when the number of templates is too large as shown in FIG. 6 . FIG. 6 shows several deleted templates, which may have signals of different waveforms.
心电图模板匹配时所采用的方法大体可分为两类,一类是模板匹配法,另一类是特征参数法。模板匹配法是直接将新获取的心电信号与已有模板进行匹配,然后通过计算相关系数确定两者的相似性。若相关系数大于给定阈值,则认为心电信号与特定模板相似,否则建立新模板。一般而言,模板匹配法需要事先确定一个用于比较的已知模板库,当遇到少见特殊病例时可能无法适应。而特征参数法在进行模板匹配前会事先对心电信号进行信号变换,通常采用的是小波变换,变换后的信号在某些频段或区域具有较好的区分度,因此可用于模板匹配。但特征参数法所采用的信号变换方法计算量大,因此算法耗时较长。此外还有一些方法,但仅适用于离线聚类场景,无法应用在实时聚类场合中。The methods used in ECG template matching can be roughly divided into two categories, one is the template matching method, and the other is the feature parameter method. The template matching method is to directly match the newly acquired ECG signal with the existing template, and then determine the similarity between the two by calculating the correlation coefficient. If the correlation coefficient is greater than a given threshold, the ECG signal is considered to be similar to a specific template, otherwise a new template is established. In general, the template matching method requires a prior determination of a known template library for comparison, and may not be adaptable when encountering rare special cases. The characteristic parameter method will perform signal transformation on the ECG signal in advance before template matching, usually using wavelet transformation. The transformed signal has a good degree of discrimination in certain frequency bands or regions, so it can be used for template matching. However, the signal transformation method adopted by the characteristic parameter method has a large amount of calculation, so the algorithm takes a long time. In addition, there are some methods, but they are only applicable to offline clustering scenarios and cannot be applied to real-time clustering scenarios.
与一般方法相比,本申请实施例中的心电图心搏数据聚类方法,具有以下优点:Compared with general methods, the ECG heartbeat data clustering method in the embodiment of the present application has the following advantages:
(1)无需信号变换,直接在原始滤波后数据的基础上进行模板匹配,计算效率高;(1) No signal transformation is required, and template matching is performed directly on the basis of the original filtered data, with high computational efficiency;
(2)多导联联合匹配,避免采用单一导联匹配时出现模板混合的情况,匹配精度高;(2) Multi-lead joint matching, avoiding the situation of template mixing when single lead matching is used, and the matching accuracy is high;
(3)引入偏移搜索机制,避免心搏偏移和模板偏移导致的模板个数过多的问题,减少模板信息存储开销;(3) Introduce an offset search mechanism to avoid the problem of too many templates caused by heartbeat offset and template offset, and reduce template information storage overhead;
(4)引入模板删除机制,当模板库中的模板个数过多时,将根据模板年龄自适应地删除大年龄、小容量的模板,从而避免在干扰大场合下模板个数增 加过快的问题,具有抗干扰能力。(4) The template deletion mechanism is introduced. When there are too many templates in the template library, the templates with large age and small capacity will be deleted adaptively according to the age of the template, so as to avoid the problem that the number of templates increases too quickly in the case of large interference. , with anti-interference ability.
基于上述心电图心搏数据聚类方法实施例的描述,本申请实施例还公开了一种心电图心搏数据聚类装置。请参见图7所示的一种心电图心搏数据聚类装置的结构示意图,心电图心搏数据聚类装置700包括模板匹配模块710、模板整理模块720和聚类模块730,其中:Based on the description of the above embodiments of the method for clustering ECG heartbeat data, an embodiment of the present application further discloses a device for clustering ECG heartbeat data. Please refer to the schematic structural diagram of an electrocardiogram and heartbeat data clustering device shown in FIG. 7 , the electrocardiogram and heartbeat data clustering device 700 includes a template matching module 710, a template sorting module 720 and a clustering module 730, wherein:
上述模板匹配模块710,用于:The above template matching module 710 is used for:
获取待处理心搏数据,将上述待处理心搏数据与多个数据模板进行比对;Obtaining heartbeat data to be processed, and comparing the above-mentioned heartbeat data to be processed with multiple data templates;
若存在与上述待处理心搏数据匹配的目标数据模板,使用上述待处理心搏数据的信息更新上述目标数据模板的信息;If there is a target data template matching the above-mentioned heartbeat data to be processed, use the information of the above-mentioned heartbeat data to be processed to update the information of the above-mentioned target data template;
若不存在与上述待处理心搏数据匹配的目标数据模板,根据上述待处理心搏数据建立新增数据模板,上述新增数据模板对应新增模板标识;将上述新增数据模板确定为与上述待处理心搏数据匹配的上述目标数据模板;If there is no target data template matching the above-mentioned heartbeat data to be processed, a new data template is established according to the above-mentioned heartbeat data to be processed, and the above-mentioned newly-added data template corresponds to the newly-added template identifier; the above-mentioned newly-added data template is determined to be the same as the above-mentioned The above-mentioned target data template matched by the heartbeat data to be processed;
输出上述待处理心搏数据的模板匹配结果,上述模板匹配结果包括上述目标数据模板的模板标识;outputting the template matching result of the above-mentioned heartbeat data to be processed, the above-mentioned template matching result including the template identifier of the above-mentioned target data template;
上述模板整理模块720,用于每当处理的上述待处理心搏数据的数量达到预设数量阈值的情况下,对上述数据模板执行整理操作,上述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果;The above-mentioned template sorting module 720 is configured to perform sorting operations on the above-mentioned data templates whenever the number of the above-mentioned heartbeat data to be processed reaches a preset number threshold, and the above-mentioned sorting operations include a template merging operation, a template sorting operation and/ Or template delete operation to obtain template sorting results;
上述聚类模块730,用于根据上述模板匹配结果和上述模板整理结果,获得上述待处理心搏数据的聚类结果。The clustering module 730 is configured to obtain the clustering result of the heartbeat data to be processed according to the template matching result and the template sorting result.
根据本申请的一个实施例,图1所示的方法所涉及的各个步骤均可以是由图7所示的心电图心搏数据聚类装置700中的各个模块执行的,此处不再赘述。According to an embodiment of the present application, each step involved in the method shown in FIG. 1 may be performed by each module in the apparatus 700 for clustering electrocardiogram and heartbeat data shown in FIG. 7 , which will not be repeated here.
本申请实施例中的心电图心搏数据聚类装置700,可以获取待处理心搏数据,将所述待处理心搏数据与多个数据模板进行比对;若存在与所述待处理心搏数据匹配的目标数据模板,使用所述待处理心搏数据的信息更新所述目标数据模板的信息;若不存在与所述待处理心搏数据匹配的目标数据模板,根据所述待处理心搏数据建立新增数据模板,所述新增数据模板对应新增模板标识;将所述新增数据模板确定为与所述待处理心搏数据匹配的所述目标数据模板;输出所述待处理心搏数据的模板匹配结果,所述模板匹配结果包括所述目标数据模板的模板标识;每当处理的所述待处理心搏数据的数量达到预设数量阈值的情况下,对所述数据模板执行整理操作,所述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果;根据所述模板匹配结 果和所述模板整理结果,获得所述待处理心搏数据的聚类结果,可以通过模板匹配将多个具有相似形态的心搏聚合为一个模板,并且对模板进行及时的整合,使可以实现实时聚类,并且无需复杂的信号变换,数据处理效率更高。The electrocardiogram heartbeat data clustering device 700 in this embodiment of the present application can acquire heartbeat data to be processed, and compare the heartbeat data to be processed with multiple data templates; matching target data template, use the information of the heartbeat data to be processed to update the information of the target data template; if there is no target data template matching the heartbeat data to be processed, according to the heartbeat data to be processed establishing a new data template, where the new data template corresponds to a new template identifier; determining the new data template as the target data template matching the to-be-processed heartbeat data; outputting the to-be-processed heartbeat The template matching result of the data, the template matching result includes the template identifier of the target data template; whenever the number of the processed heartbeat data to be processed reaches a preset number threshold, the data template is sorted operation, the sorting operation includes a template merging operation, a template sorting operation and/or a template deletion operation, and a template sorting result is obtained; according to the template matching result and the template sorting result, the clustering of the heartbeat data to be processed is obtained As a result, multiple heartbeats with similar morphologies can be aggregated into one template through template matching, and the templates can be integrated in time, so that real-time clustering can be realized without complex signal transformation, and the data processing efficiency is higher.
基于上述方法实施例以及装置实施例的描述,本申请实施例还提供一种电子设备。请参见图8,该电子设备800至少包括处理器801、输入设备802、输出设备803以及计算机存储介质804。其中,电子设备800内的处理器801、输入设备802、输出设备803以及计算机存储介质804可通过总线或其他方式连接。Based on the descriptions of the foregoing method embodiments and apparatus embodiments, the embodiments of the present application further provide an electronic device. Referring to FIG. 8 , the electronic device 800 at least includes a processor 801 , an input device 802 , an output device 803 and a computer storage medium 804 . The processor 801, the input device 802, the output device 803, and the computer storage medium 804 in the electronic device 800 may be connected through a bus or other means.
计算机存储介质804可以存储在电子设备800的存储器中,上述计算机存储介质804用于存储计算机程序,上述计算机程序包括程序指令,上述处理器801用于执行上述计算机存储介质804存储的程序指令。处理器801(或称CPU(Central Processing Unit,中央处理器))是电子设备800的计算核心以及控制核心,其适于实现一条或多条指令,具体适于加载并执行一条或多条指令从而实现相应方法流程或相应功能;在一个实施例中,本申请实施例上述的处理器801可以用于进行一系列的处理,包括如图1所示实施例中的部分或全部方法等等。The computer storage medium 804 may be stored in the memory of the electronic device 800 . The computer storage medium 804 is used for storing computer programs, and the computer program includes program instructions. The processor 801 is used for executing the program instructions stored in the computer storage medium 804 . The processor 801 (or called CPU (Central Processing Unit, central processing unit)) is the computing core and the control core of the electronic device 800, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to thereby Implement the corresponding method flow or corresponding function; in an embodiment, the processor 801 in the embodiment of the present application may be used to perform a series of processing, including some or all of the methods in the embodiment shown in FIG. 1 , and so on.
本申请实施例还提供了一种计算机存储介质(Memory),上述计算机存储介质是电子设备800中的记忆设备,用于存放程序和数据。可以理解的是,此处的计算机存储介质既可以包括电子设备800中的内置存储介质,当然也可以包括电子设备800所支持的扩展存储介质。计算机存储介质提供存储空间,该存储空间存储了电子设备800的操作系统。并且,在该存储空间中还存放了适于被处理器801加载并执行的一条或多条的指令,这些指令可以是一个或一个以上的计算机程序(包括程序代码)。需要说明的是,此处的计算机存储介质可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器;可选的还可以是至少一个位于远离前述处理器的计算机存储介质。Embodiments of the present application further provide a computer storage medium (Memory), where the above-mentioned computer storage medium is a memory device in the electronic device 800 for storing programs and data. It can be understood that, the computer storage medium here may include both the built-in storage medium in the electronic device 800 , and certainly also the extended storage medium supported by the electronic device 800 . The computer storage medium provides storage space in which the operating system of the electronic device 800 is stored. In addition, one or more instructions suitable for being loaded and executed by the processor 801 are also stored in the storage space, and these instructions may be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory; optionally, at least one storage medium located far away from the aforementioned processor can also be used. computer storage media.
在一个实施例中,可由处理器801加载并执行计算机存储介质中存放的一条或多条指令,以实现上述实施例中的相应步骤;具体实现中,计算机存储介质中的一条或多条指令可以由处理器801加载并执行图1中所示方法的任意步骤,此处不再赘述。In one embodiment, one or more instructions stored in the computer storage medium can be loaded and executed by the processor 801 to implement the corresponding steps in the foregoing embodiment; in specific implementation, one or more instructions in the computer storage medium can be Any steps of the method shown in FIG. 1 are loaded and executed by the processor 801, and are not repeated here.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述 的装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the devices and modules described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。所显示或讨论的相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the division of the module is only for one logical function division, and there may be other division methods in actual implementation, for example, multiple modules or components may be combined or integrated into another system, or some features may be ignored, or not implement. The shown or discussed mutual coupling, or direct coupling, or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。Modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者通过该计算机可读存储介质进行传输。该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是只读存储器(read-only memory,ROM),或随机存储存储器(random access memory,RAM),或磁性介质,例如,软盘、硬盘、磁带、磁碟、或光介质,例如,数字通用光盘(digital versatile disc,DVD)、或者半导体介质,例如,固态硬盘(solid state disk,SSD)等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server, or data center to another by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) A website site, computer, server or data center for transmission. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The available media may be read-only memory (ROM), or random access memory (RAM), or magnetic media, such as floppy disks, hard disks, magnetic tapes, magnetic disks, or optical media, such as, A digital versatile disc (DVD), or a semiconductor medium, for example, a solid state disk (SSD) and the like.

Claims (12)

  1. 一种心电图心搏数据聚类方法,其特征在于,包括:A method for clustering electrocardiogram heartbeat data, comprising:
    获取待处理心搏数据,将所述待处理心搏数据与多个数据模板进行比对;Obtaining heartbeat data to be processed, and comparing the heartbeat data to be processed with multiple data templates;
    若存在与所述待处理心搏数据匹配的目标数据模板,使用所述待处理心搏数据的信息更新所述目标数据模板的信息;If there is a target data template matching the heartbeat data to be processed, update the information of the target data template using the information of the heartbeat data to be processed;
    若不存在与所述待处理心搏数据匹配的目标数据模板,根据所述待处理心搏数据建立新增数据模板,所述新增数据模板对应新增模板标识;将所述新增数据模板确定为与所述待处理心搏数据匹配的所述目标数据模板;If there is no target data template matching the heartbeat data to be processed, a new data template is created according to the heartbeat data to be processed, and the new data template corresponds to the new template identifier; determining the target data template that matches the heartbeat data to be processed;
    输出所述待处理心搏数据的模板匹配结果,所述模板匹配结果包括所述目标数据模板的模板标识;outputting a template matching result of the heartbeat data to be processed, where the template matching result includes a template identifier of the target data template;
    每当处理的所述待处理心搏数据的数量达到预设数量阈值的情况下,对所述数据模板执行整理操作,所述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果;Whenever the number of the processed heartbeat data to be processed reaches a preset number threshold, a sorting operation is performed on the data template, and the sorting operation includes a template merging operation, a template sorting operation and/or a template deleting operation, Get the template finishing result;
    根据所述模板匹配结果和所述模板整理结果,获得所述待处理心搏数据的聚类结果。According to the template matching result and the template sorting result, the clustering result of the heartbeat data to be processed is obtained.
  2. 根据权利要求1所述的心电图心搏数据聚类方法,其特征在于,所述将所述待处理心搏数据与模板库中的多个数据模板进行比对,包括:The electrocardiogram heartbeat data clustering method according to claim 1, wherein the comparing the to-be-processed heartbeat data with a plurality of data templates in a template library comprises:
    分别获取所述待处理心搏数据的波形与所述多个数据模板的代表波形的多个相对误差;respectively acquiring multiple relative errors between the waveform of the heartbeat data to be processed and the representative waveforms of the multiple data templates;
    获取所述多个相对误差中的最小误差,若所述最小误差小于预设误差阈值,确定所述最小误差所对应的目标数据模板与所述待处理心搏数据匹配。The minimum error among the plurality of relative errors is acquired, and if the minimum error is smaller than a preset error threshold, it is determined that the target data template corresponding to the minimum error matches the heartbeat data to be processed.
  3. 根据权利要求2所述的心电图心搏数据聚类方法,其特征在于,所述整理操作包括模板合并操作的情况下,所述对所述数据模板执行整理操作包括:The method for clustering ECG heartbeat data according to claim 2, wherein when the sorting operation includes a template merging operation, the sorting operation on the data template comprises:
    计算处理模板与参考模板的相对误差,将所述相对误差与预设匹配阈值进行比较,所述参考模板为未整理模板中的一个模板,所述处理模板为所述未整理模板中除所述参考模板以外的模板;Calculate the relative error between the processing template and the reference template, compare the relative error with a preset matching threshold, the reference template is one template in the unsorted template, and the processing template is the unsorted template except the Templates other than reference templates;
    获取所述相对误差小于所述预设匹配阈值的处理模板,将所述相对误差小于所述预设匹配阈值的处理模板与对应的参考模板进行合并,获得的模板记为已整理模板;acquiring a processing template with the relative error less than the preset matching threshold, combining the processing template with the relative error less than the preset matching threshold with the corresponding reference template, and recording the obtained template as an organized template;
    重复以上步骤直到所述未整理模板的数量为零。The above steps are repeated until the number of uncollated templates is zero.
  4. 根据权利要求3所述的心电图心搏数据聚类方法,其特征在于,在所述整理操作包括模板排序操作的情况下,所述对所述数据模板执行整理操作包括:The method for clustering ECG heartbeat data according to claim 3, wherein, in the case that the sorting operation includes a template sorting operation, the sorting operation on the data template comprises:
    根据多个模板中各个模板的模板成员数量由大到小的顺序,对所述多个模板进行排序。The multiple templates are sorted according to the descending order of the number of template members of each template in the multiple templates.
  5. 根据权利要求2-4任一项所述的心电图心搏数据聚类方法,其特征在于,在所述整理操作包括模板删除操作的情况下,所述对所述数据模板执行整理操作包括:The method for clustering ECG heartbeat data according to any one of claims 2-4, wherein, in the case that the sorting operation includes a template deletion operation, the sorting operation on the data template comprises:
    当模板数量M超过第一数量阈值T1的情况下,计算各个所述模板的年龄值,所述年龄值为所述模板集合中的最新加入模板与获取到所述待处理心搏数据的时间间隔数据;When the number M of templates exceeds the first number threshold T1, the age value of each template is calculated, and the age value is the time interval between the newly added template in the template set and the acquisition of the heartbeat data to be processed data;
    根据所述各个模板的年龄值和第一时长参数,计算所述各个模板对应的年龄参数;According to the age value of each template and the first duration parameter, calculate the age parameter corresponding to each template;
    获取所述年龄值大于所述年龄值对应的年龄参数的模板;从所述年龄值大于所述年龄参数的模板中确定前N个年龄值最大的模板为待删除模板,从所述模板集合中删除所述待删除模板;N=M-T1。Obtain the template whose age value is greater than the age parameter corresponding to the age value; determine from the templates whose age value is greater than the age parameter that the first N templates with the largest age value are templates to be deleted, and select the templates from the template set Delete the template to be deleted; N=M-T1.
  6. 根据权利要求5所述的心电图心搏数据聚类方法,其特征在于,在所述整理操作为模板删除操作的情况下,所述对所述数据模板执行整理操作还包括:The method for clustering electrocardiogram heartbeat data according to claim 5, wherein in the case that the sorting operation is a template deletion operation, the performing sorting operation on the data template further comprises:
    当所述模板数量M超过第二数量阈值T2的情况下,从所述模板中获取待搜索模板,所述待搜索模板的模板成员个数小于预设成员个数阈值;所述第二数量阈值T2大于所述第一数量阈值T1;When the number of templates M exceeds the second number threshold T2, the template to be searched is obtained from the template, and the number of template members of the template to be searched is less than the preset number of members threshold; the second number threshold T2 is greater than the first number threshold T1;
    计算各个所述待搜索模板的年龄值;根据所述待搜索模板的数量和第二时长参数,计算年龄参考值;Calculate the age value of each of the templates to be searched; calculate the age reference value according to the number of the templates to be searched and the second duration parameter;
    获取所述年龄值大于所述年龄参考值的模板,从所述年龄值大于所述年龄参考值的模板中确定前N个年龄值最大的模板为待删除模板,从所述模板集合中删除所述待删除模板。Obtain the template whose age value is greater than the age reference value, determine that the templates with the largest age value in the top N are templates to be deleted from the templates whose age value is greater than the age reference value, and delete all templates from the template set. Describe the template to be deleted.
  7. 根据权利要求1或6所述的心电图心搏数据聚类方法,其特征在于,所述获取待处理心搏数据之前,所述方法还包括:The method for clustering electrocardiogram heartbeat data according to claim 1 or 6, wherein before acquiring the heartbeat data to be processed, the method further comprises:
    获取心电图数据,对所述心电图数据进行划分,获得心搏片段;obtaining electrocardiogram data, dividing the electrocardiogram data, and obtaining heart beat segments;
    所述获取待处理心搏数据包括:The acquiring the heartbeat data to be processed includes:
    从所述心搏片段中获取预设信号长度的所述待处理心搏数据。The to-be-processed heartbeat data of a preset signal length is acquired from the heartbeat segment.
  8. 根据权利要求7所述的心电图心搏数据聚类方法,其特征在于,所述获取心电图数据之前,所述方法还包括:The method for clustering electrocardiogram heartbeat data according to claim 7, characterized in that, before acquiring the electrocardiogram data, the method further comprises:
    获取采集的多导联心电图数据;根据所述多导联心电图数据中的主分析导联编号和次分析导联编号构建双导联心电图数据;Acquiring the collected multi-lead ECG data; constructing dual-lead ECG data according to the main analysis lead number and the sub-analysis lead number in the multi-lead ECG data;
    对所述双导联心电图数据进行带通滤波,获得所述心电图数据;Band-pass filtering is performed on the two-lead electrocardiogram data to obtain the electrocardiogram data;
    所述对所述心电图数据进行划分,获得多个心搏片段包括:The dividing the electrocardiogram data to obtain a plurality of heart beat segments includes:
    根据检测获得的R波位置信息对所述心电图数据进行划分,获得多个以所述R波位置为中心的等长度的心搏片段。The electrocardiogram data is divided according to the R wave position information obtained by detection, and a plurality of heartbeat segments of equal length centered on the R wave position are obtained.
  9. 根据权利要求1所述的心电图心搏数据聚类方法,其特征在于,在所述将所述待处理心搏数据与模板库中的多个数据模板进行比对之前,所述方法还包括:The method for clustering electrocardiogram heartbeat data according to claim 1, wherein before said comparing the heartbeat data to be processed with a plurality of data templates in a template library, the method further comprises:
    计算所述待处理心搏数据的信噪比;calculating the signal-to-noise ratio of the heartbeat data to be processed;
    根据所述待处理心搏数据的信噪比,确定所述待处理心搏数据的信号质量参数;determining the signal quality parameter of the heartbeat data to be processed according to the signal-to-noise ratio of the heartbeat data to be processed;
    所述根据所述待处理心搏数据建立新增数据模板包括:The creating a new data template according to the heartbeat data to be processed includes:
    在所述待处理心搏数据的信号质量参数为第一质量阈值的情况下,根据所述待处理心搏数据建立新增数据模板。When the signal quality parameter of the heartbeat data to be processed is the first quality threshold, a new data template is established according to the heartbeat data to be processed.
  10. 一种心电图心搏数据聚类装置,其特征在于,包括模板匹配模块、模板整理模块和聚类模块,其中:An electrocardiogram heartbeat data clustering device, characterized in that it comprises a template matching module, a template sorting module and a clustering module, wherein:
    所述模板匹配模块,用于:The template matching module is used for:
    获取待处理心搏数据,将所述待处理心搏数据与多个数据模板进行比对;Obtaining heartbeat data to be processed, and comparing the heartbeat data to be processed with multiple data templates;
    若存在与所述待处理心搏数据匹配的目标数据模板,使用所述待处理心搏数据的信息更新所述目标数据模板的信息;If there is a target data template matching the heartbeat data to be processed, update the information of the target data template using the information of the heartbeat data to be processed;
    若不存在与所述待处理心搏数据匹配的目标数据模板,根据所述待处理心搏数据建立新增数据模板,所述新增数据模板对应新增模板标识;将所述新增数据模板确定为与所述待处理心搏数据匹配的所述目标数据模板;If there is no target data template matching the heartbeat data to be processed, a new data template is created according to the heartbeat data to be processed, and the new data template corresponds to the new template identifier; determining the target data template that matches the heartbeat data to be processed;
    输出所述待处理心搏数据的模板匹配结果,所述模板匹配结果包括所述目标数据模板的模板标识;outputting a template matching result of the heartbeat data to be processed, where the template matching result includes a template identifier of the target data template;
    所述模板整理模块,用于每当处理的所述待处理心搏数据的数量达到预设 数量阈值的情况下,对所述数据模板执行整理操作,所述整理操作包括模板合并操作、模板排序操作和/或模板删除操作,获得模板整理结果;The template sorting module is configured to perform sorting operations on the data templates whenever the number of processed heartbeat data to be processed reaches a preset number threshold, and the sorting operations include template merging operations, template sorting operations operation and/or template deletion to obtain template sorting results;
    所述聚类模块,用于根据所述模板匹配结果和所述模板整理结果,获得所述待处理心搏数据的聚类结果。The clustering module is configured to obtain the clustering result of the heartbeat data to be processed according to the template matching result and the template sorting result.
  11. 一种电子设备,其特征在于,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至9中任一项所述的心电图心搏数据聚类方法的步骤。An electronic device, characterized in that it comprises a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to execute any one of claims 1 to 9 The steps of the ECG heartbeat data clustering method described in the item.
  12. 一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如权利要求1至9中任一项所述的心电图心搏数据聚类方法的步骤。A computer-readable storage medium, characterized in that it stores a computer program, and when the computer program is executed by a processor, causes the processor to execute the electrocardiogram heartbeat data according to any one of claims 1 to 9 Steps of the clustering method.
PCT/CN2021/072841 2020-11-30 2021-01-20 Method and device for electrocardiogram heartbeat data clustering, electronic device, and medium WO2022110524A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011375952.3A CN112528783B (en) 2020-11-30 2020-11-30 Electrocardiogram and heart beat data clustering method, device, electronic equipment and medium
CN202011375952.3 2020-11-30

Publications (1)

Publication Number Publication Date
WO2022110524A1 true WO2022110524A1 (en) 2022-06-02

Family

ID=74995270

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/072841 WO2022110524A1 (en) 2020-11-30 2021-01-20 Method and device for electrocardiogram heartbeat data clustering, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN112528783B (en)
WO (1) WO2022110524A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230017546A1 (en) * 2021-07-19 2023-01-19 GE Precision Healthcare LLC Methods and systems for real-time cycle length determination in electrocardiogram signals
CN115778402A (en) * 2022-12-02 2023-03-14 深圳华清心仪医疗电子有限公司 Method and system for identifying artifact of dynamic electrocardiosignal

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528783B (en) * 2020-11-30 2024-04-16 深圳邦健生物医疗设备股份有限公司 Electrocardiogram and heart beat data clustering method, device, electronic equipment and medium
CN113191249B (en) * 2021-04-28 2022-05-24 深圳邦健生物医疗设备股份有限公司 Electrocardiosignal template matching method, device, equipment and medium
CN113180687B (en) * 2021-04-29 2024-02-09 深圳邦健生物医疗设备股份有限公司 Multi-guide dynamic heartbeat real-time classification method, device, equipment and storage medium
CN113643804A (en) * 2021-07-21 2021-11-12 深圳市千帆电子有限公司 Cardiac function detection data analysis method, device, electronic apparatus, and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107358196A (en) * 2017-07-12 2017-11-17 北京卫嘉高科信息技术有限公司 A kind of sorting technique of heart beat type, device and electrocardiogram equipment
CN107456227A (en) * 2017-08-16 2017-12-12 北京蓬阳丰业医疗设备有限公司 Full lead electrocardiogram cluster template system and method
CN110693483A (en) * 2019-09-02 2020-01-17 乐普智芯(天津)医疗器械有限公司 Method for automatically analyzing dynamic electrocardiogram
CN111053551A (en) * 2019-12-27 2020-04-24 深圳邦健生物医疗设备股份有限公司 RR interval electrocardio data distribution display method, device, computer equipment and medium
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102835954B (en) * 2012-09-07 2015-03-11 深圳邦健生物医疗设备股份有限公司 Method for generating heart beating waveform template and treating ventricular premature beat detection and device
CN104055522A (en) * 2014-07-01 2014-09-24 清华大学深圳研究生院 Electrocardiosignal identity recognition method under arrhythmia condition
CN109480825B (en) * 2018-12-13 2021-08-06 武汉中旗生物医疗电子有限公司 Electrocardio data processing method and device
CN109620213B (en) * 2019-02-25 2020-03-27 山东大学 Multi-scale difference feature-based electrocardiogram recognition method and device
CN110141218B (en) * 2019-06-17 2022-02-18 东软集团股份有限公司 Electrocardiosignal classification method, electrocardiosignal classification device, program product and storage medium
CN110909757B (en) * 2019-08-20 2023-07-14 北京北科慧识科技股份有限公司 Method for selecting and updating template of biological recognition system
CN111616696A (en) * 2020-05-20 2020-09-04 联想(北京)有限公司 Electrocardiosignal detection method and device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107358196A (en) * 2017-07-12 2017-11-17 北京卫嘉高科信息技术有限公司 A kind of sorting technique of heart beat type, device and electrocardiogram equipment
CN107456227A (en) * 2017-08-16 2017-12-12 北京蓬阳丰业医疗设备有限公司 Full lead electrocardiogram cluster template system and method
CN110693483A (en) * 2019-09-02 2020-01-17 乐普智芯(天津)医疗器械有限公司 Method for automatically analyzing dynamic electrocardiogram
CN111053551A (en) * 2019-12-27 2020-04-24 深圳邦健生物医疗设备股份有限公司 RR interval electrocardio data distribution display method, device, computer equipment and medium
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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230017546A1 (en) * 2021-07-19 2023-01-19 GE Precision Healthcare LLC Methods and systems for real-time cycle length determination in electrocardiogram signals
CN115778402A (en) * 2022-12-02 2023-03-14 深圳华清心仪医疗电子有限公司 Method and system for identifying artifact of dynamic electrocardiosignal

Also Published As

Publication number Publication date
CN112528783B (en) 2024-04-16
CN112528783A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
WO2022110524A1 (en) Method and device for electrocardiogram heartbeat data clustering, electronic device, and medium
CN109171712B (en) Atrial fibrillation identification method, atrial fibrillation identification device, atrial fibrillation identification equipment and computer readable storage medium
Wang et al. An improved convolutional neural network based approach for automated heartbeat classification
CN109411041B (en) Electrocardio information processing method and electrocardio workstation system
US9380954B2 (en) Method for physiological signal analysis and its system and computer program product storing physiological signal analysis program
Gradl et al. Real-time ECG monitoring and arrhythmia detection using Android-based mobile devices
JP4386235B2 (en) Method and apparatus for sequential comparison of electrocardiograms
Castro et al. Heart sound segmentation of pediatric auscultations using wavelet analysis
CN109411042B (en) Electrocardio information processing method and electrocardio workstation
WO2021253709A1 (en) Electrocardiogram heartbeat classification method and apparatus, and electronic device and medium
CN108968941B (en) Arrhythmia detection method, device and terminal
WO2009091583A1 (en) Method and apparatus for predicting patient outcomes form a physiological segmentable patient signal
WO2021143215A1 (en) Electrocardiograph template matching method and apparatus, computer device and storage medium
CN110123304B (en) Dynamic electrocardio noise filtering method based on multi-template matching and correlation coefficient matrix
CN109077720B (en) Signal processing method, device, equipment and storage medium
CN111358459A (en) Arrhythmia identification method, device, equipment and storage medium
WO2018161391A1 (en) Electrocardiogram signal artifact recognition method, and electrocardiogram signal artifact recognition device
Kruger et al. Bimodal classification algorithm for atrial fibrillation detection from m-health ECG recordings
WO2022202943A1 (en) Electrocardiogram analysis assistance device, program, electrocardiogram analysis assistance method, and electrocardiogram analysis assistance system
Tu et al. A novel method for automatic identification of motion artifact beats in ECG recordings
Tseng et al. Clustering analysis of aging diseases and chronic habits with multivariate time series electrocardiogram and medical records
JP7032747B1 (en) ECG analysis support device, program, ECG analysis support method, and ECG analysis support system
US20160113541A1 (en) Systems and methods for assessing electrocardiogram reliability
CN113191249B (en) Electrocardiosignal template matching method, device, equipment and medium
TWI758039B (en) Electronic device and method for selecting feature of electrocardiogram

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21896044

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21896044

Country of ref document: EP

Kind code of ref document: A1