Electrocardiosignal key point identification method and device, electronic equipment and storage medium

By performing label conversion and data fusion on multiple ECG data sets, the target ECG data set is generated and the key point identification model is trained, which solves the problem of artificial intelligence labeling errors in ECG detection and improves detection accuracy.

CN118614934APending Publication Date: 2024-09-10SHENYANG NEUSOFT INTELLIGENT MEDICAL TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410544252.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Artificial intelligence requires a large amount of labeled data in electrocardiogram detection, leading to labeling errors and deviations in detection results.

Method used

By obtaining multiple ECG data sets with different key point annotation granularities, perform label conversion and data fusion processing, generate a target ECG data set, train the key point identification model, and output a heat map to determine the key point identification results.

Benefits of technology

It simplifies the waveform key point labeling process, reduces the labeling workload, avoids data labeling errors, and improves the recognition accuracy of the key point identification model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118614934A
    Figure CN118614934A
Patent Text Reader

Abstract

The invention provides an electrocardiosignal key point recognition method and device, electronic equipment and a storage medium, and relates to the technical field of electrocardiosignal processing.The electrocardiosignal key point recognition method comprises the steps that multiple electrocardiosignal data sets are obtained, label conversion and data fusion processing are conducted on the multiple electrocardiosignal data sets, and a target electrocardiosignal data set containing multiple preset key points is obtained, the plurality of electrocardiogram data sets correspond to different key point labeling granularities; a key point recognition model is trained through the target electrocardio data set, the key point recognition model is used for recognizing waveform features of different preset key points in each hop of electrocardio signals, and heat maps corresponding to the different preset key points are output based on the waveform features; inputting the target electrocardiosignal into the trained key point recognition model to obtain a target heat map of different preset key points corresponding to the target electrocardiosignal; and determining a key point identification result of the target electrocardiosignal based on the target heat map. According to the method, the waveform key point labeling process can be simplified, and data labeling errors are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electrocardiogram signal processing, and in particular to a method, device, electronic device and storage medium for identifying key points of electrocardiogram signals. Background Art

[0002] ECG signal analysis is one of the important screening tools for cardiovascular diseases. ECG signals are relatively complex. By corresponding to the time domain signal changes and the physiological electrical activity of the heart, each ECG signal can be divided into different characteristic waveforms such as P wave, QRS wave, T wave, U wave, etc. The order and signal strength of these waveforms follow specific electrophysiological laws. In clinical disease diagnosis, doctors make accurate diagnoses of cardiovascular diseases by identifying the duration, amplitude, morphology of specific waveforms and the duration and morphology of different waveform intervals.

[0003] With the widespread application of artificial intelligence, the use of artificial intelligence models for waveform detection such as P wave, QRS wave, T wave, etc. can improve the accuracy of electrocardiogram detection. However, artificial intelligence such as deep learning requires a large amount of labeled data. This labeled data needs to be labeled for each band at the heartbeat level. The starting point and end point of each band such as P wave, QRS wave, T wave, etc. need to be marked. The labeling workload is large, which can easily cause errors in the labeled data, and then lead to deviations in the artificial intelligence detection results. Summary of the invention

[0004] The present invention provides a method, device, electronic equipment and storage medium for identifying key points of an electrocardiogram signal, which can simplify the waveform key point marking process and avoid data marking errors.

[0005] In a first aspect, a method for identifying key points of an electrocardiogram signal is provided, comprising:

[0006] Acquire multiple ECG data sets, perform annotation conversion and data fusion processing on the multiple ECG data sets, and obtain a target ECG data set containing multiple preset key points, wherein the multiple ECG data sets correspond to different key point annotation granularities;

[0007] The target ECG data set is used to train a key point recognition model, which is used to recognize the waveform features of different preset key points in each ECG signal, and output heat maps corresponding to different preset key points based on the waveform features;

[0008] Input the target ECG signal into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points;

[0009] Determine the key point recognition results of the target ECG signal based on the target heat map.

[0010] In a second aspect, a device for identifying key points of an electrocardiogram signal is provided, comprising:

[0011] A processing module is used to obtain multiple ECG data sets, perform annotation conversion and data fusion processing on the multiple ECG data sets, and obtain a target ECG data set containing multiple preset key points, wherein the multiple ECG data sets correspond to different key point annotation granularities;

[0012] A training module is used to train a key point recognition model using a target ECG data set. The key point recognition model is used to recognize waveform features of different preset key points in each ECG signal and output heat maps corresponding to different preset key points based on the waveform features.

[0013] An input module is used to input the target ECG signal into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points;

[0014] The determination module is used to determine the key point recognition result of the target ECG signal based on the target heat map.

[0015] According to a third aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or its various implementations.

[0016] According to a fourth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method according to the first aspect or its various implementations.

[0017] Through the technical solution provided by the present invention, a plurality of ECG data sets with different key point annotation granularities can be first obtained, and a target ECG data set containing a plurality of preset key points can be obtained by performing annotation conversion and data fusion processing on the plurality of ECG data sets; and then the target ECG data set can be used to train the key point recognition model. After obtaining the trained key point recognition model, when performing the key point recognition task for the target ECG signal, the target ECG signal can be input into the trained key point recognition model to obtain a target heat map corresponding to different preset key points of the target ECG signal; and then the key point recognition result corresponding to the target ECG signal can be determined based on the target heat map. The technical solution of the present invention obtains a target ECG data set corresponding to a plurality of preset key points by performing annotation conversion and data fusion processing on the plurality of existing ECG data sets. The waveform key point annotation process can be simplified, the annotation workload can be reduced, and data annotation errors can be avoided. The key point recognition model is trained on the basis of the target ECG data set. This training scheme can be compatible with more data set forms, can avoid the influence of incomplete annotation of existing public data sets on model training, and improve the recognition accuracy of the key point recognition model.

[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory and cannot limit the present invention. Other features and advantages of the present invention will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 An application scenario diagram provided for an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a flow chart of a key point identification method of an electrocardiogram signal provided by an embodiment of the present invention;

[0022] Figure 3 A schematic flow chart of a key point identification method of an electrocardiogram signal provided by another embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of a key point identification device for an electrocardiogram signal provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of a key point identification device for an electrocardiogram signal provided by another embodiment of the present invention;

[0025] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] With the widespread application of artificial intelligence, the use of artificial intelligence models for waveform detection such as P wave, QRS wave, T wave, etc. can improve the accuracy of electrocardiogram detection. However, artificial intelligence such as deep learning requires a large amount of labeled data. This labeled data needs to be labeled for each band at the heartbeat level. The starting point and end point of each band such as P wave, QRS wave, T wave, etc. need to be marked. The labeling workload is large, which can easily cause errors in the labeled data, and then lead to deviations in the artificial intelligence detection results.

[0029] In order to solve the above technical problems, the inventive concept of the present invention is: by performing annotation conversion and data fusion processing on multiple existing ECG data sets, a target ECG data set corresponding to multiple preset key points is obtained. The waveform key point annotation process can be simplified, and a large annotation workload is not required, thereby avoiding data annotation errors. After that, a key point recognition model is trained on the basis of the target ECG data set. After the trained key point recognition model is obtained, the target ECG signal can be input into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points; then, the key point recognition result corresponding to the target ECG signal can be determined based on the target heat map.

[0030] It should be understood that the technical solution of the present invention can be applied to the following scenarios, but is not limited to:

[0031] In some possible implementations, Figure 1 An application scenario diagram provided by an embodiment of the present invention, such as Figure 1 As shown, the application scenario may include an electronic device 110 and a network device 120. The electronic device 110 may establish a connection with the network device 120 via a wired network or a wireless network.

[0032] Exemplarily, the electronic device 110 may be a desktop computer, a laptop computer, a tablet computer, etc., but is not limited thereto. The network device 120 may be a terminal device or a server, but is not limited thereto. In one embodiment of the present invention, the electronic device 110 may send a request message to the network device 120, and the request message may be used to request to obtain the key point recognition result corresponding to the target ECG signal. Further, the electronic device 110 may receive a response message sent by the network device 120, and the response message includes the key point recognition result corresponding to the target ECG signal.

[0033] also, Figure 1 An electronic device 110 and a network device 120 are provided as an example, but other numbers of electronic devices and network devices may be included in practice, and the present invention is not limited thereto.

[0034] In some other possible implementations, the technical solution of the present invention may also be executed by the above-mentioned electronic device 110, or the technical solution of the present invention may also be executed by the above-mentioned network device 120, and the present invention does not limit this.

[0035] After introducing the application scenarios of the embodiments of the present invention, the technical solutions of the present invention will be described in detail below:

[0036] Figure 2 A flowchart of a key point identification method of an electrocardiogram signal provided by an embodiment of the present invention. The method can be performed as follows: Figure 1 The electronic device 110 shown in the figure performs, but is not limited to this. Figure 2 As shown, the method may include the following steps:

[0037] Step 210 , obtaining multiple ECG data sets, performing annotation conversion and data fusion processing on the multiple ECG data sets, and obtaining a target ECG data set containing multiple preset key points, wherein the multiple ECG data sets correspond to different key point annotation granularities.

[0038] Among them, the ECG data set can be an open source annotated ECG signal data set, such as an ECG signal data set with detailed waveform annotation such as LUDB, QTDB, etc., or an ECG signal data set generated in previous ECG signal annotation tasks. In specific application scenarios, the traditional mathematical algorithm of ECG signals can extract more than 20 ECG key points from a heartbeat, but not every key point will be used in diagnosis or can be inferred through other feature points. Therefore, the open source data set and the ECG signal data set generated in the ECG signal annotation task are simplified to varying degrees, that is, corresponding to different key point annotation granularity. For example: in the LUDB data, only 9 key points corresponding to the coordinates of the start, end and peak of the P wave, QRS complex, and T wave are annotated for one beat of the ECG waveform; in addition to the above 9 key points, the QT DB data set also annotates the peak moments of the positive and negative bidirectional T waves, and annotates the start, end and peak time of the U wave in some heartbeats. However, due to the annotation granularity of different data sets, it is difficult for different data sets to be used for the training of algorithm models at the same time.

[0039] In view of this, in the present application, the characteristics of the key point annotation method in the key point recognition model training can be used to fuse multiple ECG data sets with different annotation granularities. Specifically, multiple ECG data sets can be annotated and converted and data fused to obtain a target ECG data set that is uniformly used in the algorithm model training process. The target ECG data set can contain annotation content of multiple preset key points, that is, each single-lead ECG data, a list of key point positions corresponding to the preset key points of each single-lead ECG data, and a weight list consisting of 0 and 1 corresponding to multiple preset key points. By generating the target ECG data set in this way, there is no need to manually search for key waveforms in complex ECG signals one by one, which can simplify the waveform key point annotation process, reduce the annotation workload, and avoid data annotation errors.

[0040] Among them, the preset key points can be waveform key points that are more common and have diagnostic significance, extracted by comparing multiple data sets, and can be specifically set according to the actual application scenario. In the following embodiment steps of the present disclosure, multiple preset key points include P wave starting position, P wave ending position, P wave positive peak position, P wave negative peak position, QRS wave starting position, QRS wave ending position, Q wave peak position, R wave positive peak position, R wave negative peak position, S wave positive peak position, S wave negative peak position, T wave starting position, T wave ending position, T wave positive peak position, T wave negative peak position, U wave starting position, U wave ending position, and 18 key points corresponding to U wave peak position are used as examples to illustrate the technical solution in the present application, but it does not constitute a specific limitation.

[0041] Step 220: Use the target ECG data set to train a key point recognition model, where the key point recognition model is used to recognize waveform features of different preset key points in each ECG signal, and output heat maps corresponding to different preset key points based on the waveform features.

[0042] Among them, the key point recognition model can be any deep learning network model trained for key point detection or key point recognition tasks, such as a BiLstm model, an Att-BiLstm model, and a U-Net model with an attention mechanism, or a network model after some network layer modifications are made based on the above network models, and no specific limitation is made here. In the following embodiments of the present disclosure, the technical solution in the present disclosure is explained by taking the key point recognition model obtained by training the U-Net model as an example, but it does not constitute a specific limitation.

[0043] The U-Net model is a convolutional neural network used for medical image segmentation. In recent years, it has also been widely used in electrocardiogram (ECG) key point recognition. When the U-Net model is trained for key point recognition tasks, the input features of the model can be single-lead beat-by-beat ECG signals, and the output features of the model can be heatmaps corresponding to different preset key points. The values ​​on the heatmap usually represent the intensity or frequency of the data points. For example, if there are 18 preset key points, a heatmap can be output for each of the 18 preset key points. The distribution of values ​​on the heatmap can be used to reflect the probability of each position of the ECG signal belonging to the preset key point. The closer the value is to 1, the greater the probability that the ECG signal position corresponding to the value belongs to the preset key point.

[0044] When pre-training the key point recognition model, the target ECG data set with multiple preset key point corresponding heat maps can be used to iteratively train the key point recognition model until the key point recognition model reaches a convergence state, that is, the corresponding loss function is less than the preset threshold, and the pre-training of the key point recognition model is judged to be completed. When iteratively training the key point recognition model using the target ECG data set, 30% of the target ECG data set can be randomly divided into a test set and 70% can be divided into a training set. The training set can be used to continuously optimize the key point recognition model, and the test set can be used to verify the training accuracy of the key point recognition model during the training process. When training the key point recognition model, the Mse Loss loss function can be used to supervise the model training to improve the accuracy of the model.

[0045] Accordingly, when pre-training the key point recognition model, the implementation steps may include: determining the annotation heat map for each preset key point in each single-lead ECG data in the target ECG data set; using each single-lead ECG data in the target ECG data set, the key point position list and weight list corresponding to each single-lead ECG data as input features, using the annotation heat map as a training label, iteratively training the key point recognition model until the loss function of the key point recognition model is less than the first preset threshold, and judging that the key point recognition model training is completed. Among them, the first preset threshold is a value between 0 and 1. When the value of the first preset threshold is closer to 1, the higher the model training accuracy of the key point recognition model is. The specific value can be set according to the actual application scenario, and no specific limitation is made here.

[0046] Step 230: Input the target ECG signal into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points.

[0047] The target ECG signal is a single-lead ECG signal for which key points are to be identified.

[0048] In a specific application scenario, after obtaining the trained key point recognition model, the target ECG signal can be input into the trained key point recognition model, and the key point recognition model will output 18 target heat maps of the target ECG signal corresponding to 18 preset key points.

[0049] Step 240: Determine the key point recognition result of the target ECG signal based on the target heat map.

[0050] For the disclosed embodiment, after obtaining the target heat map corresponding to the 18 preset key points, the key point recognition result corresponding to the preset key point can be determined by analyzing the data on the target heat map. The key point recognition result can specifically be the position of each preset key point in the target ECG signal.

[0051] In summary, according to the key point recognition method of the ECG signal provided by the present invention, a plurality of ECG data sets with different key point annotation granularities can be first obtained, and a target ECG data set containing a plurality of preset key points can be obtained by performing annotation conversion and data fusion processing on the plurality of ECG data sets; then the target ECG data set can be used to train the key point recognition model. After obtaining the trained key point recognition model, when performing the key point recognition task for the target ECG signal, the target ECG signal can be input into the trained key point recognition model to obtain a target heat map corresponding to different preset key points of the target ECG signal; then the key point recognition result corresponding to the target ECG signal can be determined based on the target heat map. The technical scheme of the present invention obtains a target ECG data set corresponding to a plurality of preset key points by performing annotation conversion and data fusion processing on the plurality of existing ECG data sets. The waveform key point annotation process can be simplified, the annotation workload can be reduced, and data annotation errors can be avoided. The key point recognition model is trained on the basis of the target ECG data set. This training scheme can be compatible with more data set forms, can avoid the influence of incomplete annotation of existing public data sets on model training, and improve the recognition accuracy of the key point recognition model.

[0052] based on Figure 2 The embodiment shown is a refinement and extension of the above embodiment. In order to fully illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 3 The specific method shown. Figure 3 based on Figure 2 In the embodiment shown, step 210 is further defined. Figure 3 In the illustrated embodiment, step 210 includes steps 310 to 330. As shown in Figure 3, the method includes the following steps:

[0053] Step 310 : For each of the multiple ECG data sets, extract a complete single-lead ECG data set respectively, and the multiple ECG data sets correspond to different key point annotation granularities.

[0054] Accordingly, when extracting a complete single-lead ECG data set from each of the multiple ECG data sets, the 230 sampling points before the QRS wave R peak and the 281 sampling points after the QRS wave R peak, a total of 512 sampling points, can be taken to form a single-lead ECG data set. Usually, the R peak position is marked in the ECG data set, but if its position is not marked in the ECG data set, the QRS recognition algorithm in wfdb can be used to capture the R peak beat by beat, and then the same operation can be performed based on the captured R peak to obtain the single-lead ECG data.

[0055] Accordingly, for the embodiment of the present disclosure, the embodiment steps may include: identifying the first R peak position for each ECG data set in multiple ECG data sets; extracting 230 sampling points before the first R peak position and 281 sampling points after the first R peak position as a complete single-lead ECG data.

[0056] Step 320: assign key point weights to each single-lead ECG data according to a preset annotation conversion method to obtain multiple initial ECG data sets, which include single-lead ECG data, a key point position list corresponding to multiple preset key points, and a weight list consisting of 0 and 1 corresponding to multiple preset key points.

[0057] Among them, the preset annotation conversion method is: determine the preset key points included in the single-lead ECG data as the first preset key points, and determine the preset key points not included as the second preset key points; if it is judged that there is a position annotation of the first preset key point in the single-lead ECG data, assign a weight of 1 to the first preset key point; if it is judged that there is no position annotation of the first preset key point in the single-lead ECG data, assign a weight of 0 to the first preset key point; if it is judged that there is no position annotation of the first preset key point in the single-lead ECG data, assign a weight of 1 to the second preset key point.

[0058] Correspondingly, the annotation conversion is divided into the following cases: there is a key point in the ECG data of this beat and the key point position is annotated, there is a key point and the key point position is not annotated, and there is no such key point and the key point position is not annotated. The corresponding weights are assigned according to the following Table 1, which mainly affects the calculation of Loss in subsequent model training. Assigning corresponding weights to unlabeled or non-existent key points can avoid the impact of incomplete annotation of existing public data sets on model training.

[0059] Table 1:

[0060] There are key points with annotations 1 There are key points without labels 0 No key points are present and no annotations are given 1

[0061] The corresponding weights of all preset key points are assigned according to the above rules. For each single-lead ECG data, we can get 1*512 signal data, a key point position list consisting of 18 positions, and a weight list consisting of 0 and 1. This completes the construction of the new data set, that is, the initial ECG data set.

[0062] Step 330: fuse multiple initial ECG data sets to obtain a target ECG data set containing multiple preset key points.

[0063] In a specific application scenario, after multiple ECG data sets are annotated and transformed according to a preset annotation conversion method to obtain multiple initial ECG data sets with a unified annotation method, data fusion processing can be performed on the multiple initial ECG data sets to obtain a target ECG data set containing multiple preset key points. The target ECG data set can contain all the annotation information of 18 preset key points, which can facilitate the key point recognition model to learn and recognize the features of each preset key point.

[0064] Step 340: Use the target ECG data set to train a key point recognition model, where the key point recognition model is used to recognize waveform features of different preset key points in each ECG signal, and output heat maps corresponding to different preset key points based on the waveform features.

[0065] For the embodiment of the present disclosure, the specific implementation process can refer to the relevant description in step 220 of the embodiment, which will not be repeated here.

[0066] Step 350: Input the target ECG signal into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points.

[0067] In a specific application scenario, before executing the steps of this embodiment, in order to eliminate the interference of noisy ECG signals on key point identification, the accuracy of key point identification is ensured. After obtaining the initial input ECG signal, the input ECG signal can be filtered first, such as using a 0.9-40Hz bandpass filter to process power frequency interference, high-frequency noise such as electromyography and baseline drift. Then wfdb is used to capture the QRS wave peak in the ECG signal. Because the cardiac signal features a shorter P wave time before QRS and a longer T wave after QRS, the same approach is used to extract a complete single-lead ECG data from each ECG data set. 230 sampling points before the QRS wave R peak and 281 sampling points after the peak are selected, a total of 512 sampling points are selected to form a cardiac waveform data, i.e., a target ECG signal, and then the target ECG signal is input as an input feature into the key point recognition model to obtain 18 target heat maps for 18 preset key points.

[0068] Correspondingly, the steps of the embodiment also include: filtering the first ECG signal with a bandpass filter to obtain a second ECG signal, where the first ECG signal is the input ECG signal for key point identification; identifying the second R peak position in the second ECG signal; extracting 230 sampling points before the second R peak position and 281 sampling points after the second R peak position as the target ECG signal.

[0069] Step 360: Determine the key point recognition result corresponding to the target ECG signal based on the target heat map.

[0070] For the disclosed embodiment, after obtaining the target heat map corresponding to the 18 preset key points, the key point recognition result corresponding to the preset key point can be determined by analyzing the data on the target heat map. The key point recognition result can be specifically the position of each preset key point in the target ECG signal. Specifically, the coordinates corresponding to the maximum value and the second largest value can be selected for each target heat map, and if the value is greater than the second preset threshold, it is included in the next step. Correspondingly, two, one or zero corresponding coordinates will be obtained. If there is a second largest value coordinate, move a certain distance to the second largest value coordinate, otherwise output the coordinate corresponding to the maximum value. Finally, a key point recognition result of a specific position or no key point (i.e., the key point recognition position is empty) is output. For the target heat map of 18 preset key points, the above processing is performed respectively, and the one-dimensional coordinate position corresponding to the 18 feature points (i.e., the preset key points) can be obtained. By identifying the position of the key points one by one, it is convenient to calculate and measure the subsequent quantitative indicators such as the PR interval, QT interval, ST segment value, P wave height, T wave height, ECG baseline, and ECG axis, and promote the diagnosis and quantitative analysis of specific diseases.

[0071] Correspondingly, when determining the key point positions corresponding to each preset key point, the simple pseudo code is as follows:

[0072]

[0073] For the disclosed embodiment, the embodiment steps may include: extracting the maximum value and the second largest value for each target heat map corresponding to the preset key point; judging whether the maximum value and the second largest value are greater than the second preset threshold; if the maximum value and the second largest value are both greater than the second preset threshold, determining the key point identification position corresponding to the preset key point based on the first coordinate position corresponding to the maximum value and the second coordinate position corresponding to the second largest value; if the maximum value is greater than the second preset threshold, and the second largest value is less than the second preset threshold, determining the first coordinate position corresponding to the maximum value as the key point identification position corresponding to the preset key point; if the maximum value and the second largest value are both less than the second preset threshold, determining the key point identification position corresponding to the preset key point is empty. Wherein, the second preset threshold α is a value between 0 and 1. When the second preset threshold is closer to 1, it means that the determined key point identification position is more accurate. For example, the second preset threshold can be set to 0.75.

[0074] Accordingly, when determining the key point identification position corresponding to the preset key point based on the first coordinate position corresponding to the maximum value and the second coordinate position corresponding to the second largest value, the embodiment steps may include: calculating the position spacing between the first coordinate position and the second coordinate position; determining the final coordinate position after the first coordinate position moves a preset distance in the direction of the second coordinate position, and determining the final coordinate position as the key point identification position corresponding to the preset key point, and the preset distance is the product of the position spacing and the preset parameter value. Among them, the preset parameter value β can be set according to the actual application scenario, such as being set to 0.25.

[0075] In summary, the technical solution in this application can first obtain multiple ECG data sets with different key point annotation granularity, and by performing annotation conversion and data fusion processing on multiple ECG data sets, a target ECG data set containing multiple preset key points can be obtained; then the target ECG data set can be used to train the key point recognition model. After obtaining the trained key point recognition model, when performing the key point recognition task for the target ECG signal, the target ECG signal can be input into the trained key point recognition model to obtain the target heat map corresponding to different preset key points of the target ECG signal; then the key point recognition result corresponding to the target ECG signal can be determined based on the target heat map. The technical solution in the present invention obtains the target ECG data set corresponding to multiple preset key points by performing annotation conversion and data fusion processing on multiple existing ECG data sets. The waveform key point annotation process can be simplified, the annotation workload can be reduced, and data annotation errors can be avoided. The key point recognition model is trained on the basis of the target ECG data set. This training scheme can be compatible with more data set forms, can avoid the influence of incomplete annotation of existing public data sets on model training, and improve the recognition accuracy of the key point recognition model.

[0076] Based on the above Figure 2 , Figure 3 The detailed description of the key point identification method of the ECG signal is provided, such as Figure 4 As shown, Figure 4 FIG. 1 is a block diagram of a device for identifying key points of an electrocardiogram signal according to an exemplary embodiment. Figure 4 As shown, the device comprises:

[0077] The processing module 41 can be used to obtain multiple ECG data sets, perform annotation conversion and data fusion processing on the multiple ECG data sets, and obtain a target ECG data set containing multiple preset key points, wherein the multiple ECG data sets correspond to different key point annotation granularities;

[0078] A training module 42, which can be used to train a key point recognition model using a target ECG data set, wherein the key point recognition model is used to recognize waveform features of different preset key points in each ECG signal, and output heat maps corresponding to different preset key points based on the waveform features;

[0079] An input module 43, which can be used to input the target ECG signal into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points;

[0080] The determination module 44 may be used to determine the key point recognition result of the target ECG signal based on the target heat map.

[0081] In some embodiments of the present application, the processing module 41 can be used to extract a complete single-lead ECG data set for each ECG data set in multiple ECG data sets; assign key point weights to each single-lead ECG data set according to a preset annotation conversion method to obtain multiple initial ECG data sets, wherein the initial ECG data sets include single-lead ECG data, a key point position list corresponding to multiple preset key points, and a weight list consisting of 0 and 1 corresponding to multiple preset key points; and fuse multiple initial ECG data sets to obtain a target ECG data set including multiple preset key points; Among them, the preset annotation conversion method is: determine the preset key points included in the single-lead ECG data as the first preset key points, and determine the preset key points not included as the second preset key points; if it is judged that there is a position annotation of the first preset key point in the single-lead ECG data, assign a weight of 1 to the first preset key point; if it is judged that there is no position annotation of the first preset key point in the single-lead ECG data, assign a weight of 0 to the first preset key point; if it is judged that there is no position annotation of the first preset key point in the single-lead ECG data, assign a weight of 1 to the second preset key point.

[0082] In some embodiments of the present application, when extracting a complete single-lead ECG data set for each of multiple ECG data sets, the processing module 41 can be used to identify the first R peak position for each of the multiple ECG data sets; extract 230 sampling points before the first R peak position and 281 sampling points after the first R peak position as a complete single-lead ECG data set.

[0083] In some embodiments of the present application, the training module 42 can be used to determine the labeled heat map for each preset key point in each single-lead ECG data in the target ECG data set; use each single-lead ECG data in the target ECG data set, the key point position list and weight list corresponding to each single-lead ECG data as input features, and use the labeled heat map as a training label to iteratively train the key point recognition model until the loss function of the key point recognition model is less than a first preset threshold, and it is judged that the training of the key point recognition model is completed.

[0084] In some embodiments of the present application, Figure 5 As shown, the device further includes: an identification module 45 and an extraction module 46;

[0085] The processing module 41 can also be used to filter the first ECG signal using a bandpass filter to obtain a second ECG signal, where the first ECG signal is an input ECG signal for key point identification;

[0086] An identification module 45, which can be used to identify a second R peak position in the second electrocardiogram signal;

[0087] The extraction module 46 can be used to extract 230 sampling points before the second R peak position and 281 sampling points after the second R peak position as the target ECG signal.

[0088] In some embodiments of the present application, the determination module 44 can be used to extract the maximum value and the second largest value for each target heat map corresponding to the preset key point, respectively; respectively determine whether the maximum value and the second largest value are greater than the second preset threshold; if it is determined that the maximum value and the second largest value are both greater than the second preset threshold, then based on the first coordinate position corresponding to the maximum value and the second coordinate position corresponding to the second largest value, determine the key point recognition position corresponding to the preset key point; if it is determined that the maximum value is greater than the second preset threshold, and the second largest value is less than the second preset threshold, then the first coordinate position corresponding to the maximum value is determined as the key point recognition position corresponding to the preset key point; if it is determined that the maximum value and the second largest value are both less than the second preset threshold, then determine that the key point recognition position corresponding to the preset key point is empty.

[0089] In some embodiments of the present application, when determining the key point identification position corresponding to a preset key point based on the first coordinate position corresponding to the maximum value and the second coordinate position corresponding to the second largest value, the determination module 44 can be used to calculate the position spacing between the first coordinate position and the second coordinate position; determine the final coordinate position after the first coordinate position moves a preset distance in the direction of the second coordinate position, and determine the final coordinate position as the key point identification position corresponding to the preset key point, where the preset distance is the product of the position spacing and the preset parameter value.

[0090] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0091] The embodiment of the present application and the technical solution disclosed in the present invention obtain a target ECG data set corresponding to multiple preset key points by performing annotation conversion and data fusion processing on multiple existing ECG data sets. The waveform key point annotation process can be simplified, the annotation workload can be reduced, and data annotation errors can be avoided. The key point recognition model is trained based on the target ECG data set. This training scheme can be compatible with more data set forms, avoid the impact of incomplete annotation of existing public data sets on model training, and improve the recognition accuracy of the key point recognition model.

[0092] In the above text, the key point identification device of the ECG signal of the embodiment of the present invention is described from the perspective of the functional module in combination with the accompanying drawings. It should be understood that the functional module can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the key point identification method of the ECG signal in the embodiment of the present invention can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the key point identification method of the ECG signal applied in combination with the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor to be executed. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above-mentioned key point identification method of the ECG signal in combination with its hardware.

[0093] Figure 6 It is a schematic block diagram of an electronic device 700 according to an embodiment of the present invention.

[0094] like Figure 6 As shown, the electronic device 700 may include:

[0095] The memory 710 and the processor 720, the memory 710 is used to store the computer program and transmit the program code to the processor 720. In other words, the processor 720 can call and run the computer program from the memory 710 to implement the method in the embodiment of the present invention.

[0096] For example, the processor 720 may be configured to execute the above method embodiments according to instructions in the computer program.

[0097] In some embodiments of the present invention, the processor 720 may include but is not limited to:

[0098] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0099] In some embodiments of the present invention, the memory 710 includes but is not limited to:

[0100] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM).

[0101] In some embodiments of the present invention, the computer program may be divided into one or more modules, which are stored in the memory 710 and executed by the processor 720 to complete the method provided by the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the controller.

[0102] like Figure 6 As shown, the electronic device 700 may further include:

[0103] The transceiver 730 may be connected to the processor 720 or the memory 710 .

[0104] The processor 720 may control the transceiver 730 to communicate with other devices, specifically, to send data or data to other devices, or to receive data or data sent by other devices. The transceiver 730 may include a transmitter and a receiver. The transceiver 730 may further include an antenna, and the number of antennas may be one or more.

[0105] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0106] The present invention also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above method embodiment. In other words, an embodiment of the present invention also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.

[0107] When software is used for implementation, 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 process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (Digital VideoDisc, DVD)), or a semiconductor medium (e.g., a solid-state drive (Solid State Disk, SSD)), etc.

[0108] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments applied herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0109] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0110] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0111] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this application, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for identifying key points of an electrocardiogram signal, characterized in that: include: Acquire multiple ECG data sets, perform annotation conversion and data fusion processing on the multiple ECG data sets to obtain a target ECG data set containing multiple preset key points, wherein the multiple ECG data sets correspond to different key point annotation granularities; Using the target ECG data set to train a key point recognition model, the key point recognition model is used to recognize waveform features of different preset key points in each ECG signal, and output heat maps corresponding to the different preset key points based on the waveform features; Inputting the target ECG signal into the trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to the different preset key points; The key point recognition result of the target electrocardiogram signal is determined based on the target heat map.

2. The method according to claim 1, characterized in that: The labeling conversion and data fusion processing of the multiple ECG data sets to obtain a target ECG data set containing multiple preset key points includes: For each of the multiple ECG data sets, extract a complete single-lead ECG data set; According to a preset annotation conversion method, key point weights are assigned to each of the single-lead ECG data to obtain a plurality of initial ECG data sets, wherein the initial ECG data sets include the single-lead ECG data, a key point position list corresponding to the plurality of preset key points, and a weight list consisting of 0 and 1 corresponding to the plurality of preset key points; fusing the multiple initial ECG data sets to obtain a target ECG data set including multiple preset key points; Among them, the preset annotation conversion method is: determine the preset key point included in the single-lead ECG data as the first preset key point, and determine the preset key point not included as the second preset key point; if it is determined that there is a position annotation of the first preset key point in the single-lead ECG data, assign a weight of 1 to the first preset key point; if it is determined that there is no position annotation of the first preset key point in the single-lead ECG data, assign a weight of 0 to the first preset key point; if it is determined that there is no position annotation of the first preset key point in the single-lead ECG data, assign a weight of 1 to the second preset key point.

3. The method according to claim 2, characterized in that The extracting a complete single-lead ECG data set from each of the multiple ECG data sets includes: for each of the plurality of ECG data sets, identifying a first R peak position respectively; 230 sampling points before the first R peak position and 281 sampling points after the first R peak position are extracted as a complete single-lead ECG data.

4. The method according to claim 2, characterized in that: The method of training a key point recognition model using the target ECG data set includes: Determine a labeling heat map for each preset key point in each single-lead ECG data in the target ECG data set; Each single-lead ECG data in the target ECG data set, the key point position list and the weight list corresponding to each single-lead ECG data are used as input features, and the annotated heat map is used as a training label. The key point recognition model is iteratively trained until the loss function of the key point recognition model is less than a first preset threshold, and it is judged that the training of the key point recognition model is completed.

5. The method according to claim 1, characterized in that Before inputting the target ECG signal into the trained key point recognition model to obtain the target heat map of the target ECG signal corresponding to the different preset key points, the method includes: Using a bandpass filter to filter the first electrocardiogram signal to obtain a second electrocardiogram signal, wherein the first electrocardiogram signal is an input electrocardiogram signal for key point recognition; identifying a second R peak position in the second electrocardiographic signal; 230 sampling points before the second R peak position and 281 sampling points after the second R peak position are extracted as target ECG signals.

6. The method according to claim 1, characterized in that The determining of the key point recognition result corresponding to the target electrocardiogram signal based on the target heat map includes: For the target heat map corresponding to each preset key point, extract the maximum value and the second largest value respectively; Determine whether the maximum value and the second maximum value are greater than a second preset threshold value respectively; If it is determined that both the maximum value and the second maximum value are greater than the second preset threshold, determining a key point recognition position corresponding to a preset key point based on a first coordinate position corresponding to the maximum value and a second coordinate position corresponding to the second maximum value; If it is determined that the maximum value is greater than the second preset threshold, and the second maximum value is less than the second preset threshold, the first coordinate position corresponding to the maximum value is determined as the key point identification position corresponding to the preset key point; If it is determined that both the maximum value and the second maximum value are smaller than the second preset threshold, it is determined that the key point recognition position corresponding to the preset key point is empty.

7. The method according to claim 6, characterized in that The determining the key point recognition position corresponding to the preset key point based on the first coordinate position corresponding to the maximum value and the second coordinate position corresponding to the second largest value includes: Calculating a position distance between the first coordinate position and the second coordinate position; Determine a final coordinate position after the first coordinate position moves a preset distance in the direction of the second coordinate position, and determine the final coordinate position as a key point recognition position corresponding to a preset key point, wherein the preset distance is the product of the position spacing and a preset parameter value.

8. A device for identifying key points of an electrocardiogram signal, characterized in that: include: A processing module, used to obtain multiple ECG data sets, perform annotation conversion and data fusion processing on the multiple ECG data sets, and obtain a target ECG data set containing multiple preset key points, wherein the multiple ECG data sets correspond to different key point annotation granularities; A training module, used to train a key point recognition model using the target ECG data set, wherein the key point recognition model is used to recognize waveform features of different preset key points in each ECG signal, and output heat maps corresponding to the different preset key points based on the waveform features; An input module, used for inputting a target ECG signal into a trained key point recognition model to obtain a target heat map of the target ECG signal corresponding to different preset key points; A determination module is used to determine the key point recognition result of the target electrocardiogram signal based on the target heat map.

9. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.