Heartbeat reference point detection method, device, equipment and storage medium

By extracting the characteristic map and characteristic wave type of the ECG signal, combined with the convolutional neural network, the problem of low accuracy of heartbeat reference point detection caused by the complexity and low amplitude of the ECG signal is solved, achieving higher detection accuracy and robustness.

CN115474941BActive Publication Date: 2024-09-06GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110669610.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2024-09-06
Estimated Expiration
2041-06-16

AI Technical Summary

Technical Problem

In the existing technology, the complex waveform and low amplitude of the ECG signal make it difficult to accurately detect the heartbeat reference point, especially when the signal processing method is single and the expression ability is limited.

Method used

By obtaining the lead ECG signal, extract the ECG feature map, and generate a heartbeat probability map based on these feature maps. Combined with the characteristic wave type to which the feature point belongs, the location of the heartbeat reference point is determined, and a convolutional neural network is used for feature extraction and location. Determine and improve detection accuracy and robustness.

Benefits of technology

It improves the accuracy and robustness of heartbeat reference point detection, can accurately detect heartbeat reference points when the ECG signal is complex and has low amplitude, optimizes the difficulty of deep learning network locating feature waves, and enhances signal processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115474941B
    Figure CN115474941B
Patent Text Reader

Abstract

The embodiment of the present application discloses a heartbeat reference point detection method, device, equipment and storage medium, which includes: obtaining at least one lead ECG signal; extracting the ECG features of the lead ECG signal to obtain an ECG feature graph, and obtaining multiple ECG feature graphs for one lead ECG signal; obtaining a heartbeat probability graph based on each ECG feature graph, and the heartbeat probability graph shows the first detection position of the QRS wave in the lead ECG signal; determining the second detection position of the heartbeat reference point in the target ECG feature graph based on the first detection position and determining the characteristic wave type to which each characteristic point belongs in the target ECG feature graph, and the target ECG feature graph is the ECG feature graph corresponding to the first detection position; determining the third detection position of the heartbeat reference point in the lead ECG signal based on the characteristic wave type to which each characteristic point belongs and the second detection position. The above method can solve the technical problem in the related art that it is difficult to accurately detect the heartbeat reference point due to the complex waveform of the ECG signal, the low amplitude and the susceptibility to interference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of electrocardiogram signal detection, and in particular, to a heartbeat reference point detection method, device, equipment and storage medium. Background Art

[0002] ECG signals can reflect the electrophysiological process of cardiac activity. ECG signal detection equipment is widely used in the inspection and diagnosis of cardiovascular diseases due to its low detection cost and ease of use. ECG signal detection equipment such as electrocardiographs and ECG monitors are widely used. ECG analysis is an important component of ECG signal detection equipment. ECG analysis refers to the analysis of collected ECG signals to screen out various abnormalities of ECG signals and provide timely warnings. In the ECG analysis process, accurately detecting the heartbeat reference point in the ECG signal is a very important step.

[0003] Figure 1 This is a typical schematic diagram of ECG signals in related technologies. Figure 1 The ECG waveforms included in the ECG signal include P wave, QRS wave and T wave, and P wave, QRS wave and T wave constitute a typical heartbeat, among which P wave represents the electrical activity of atrial polarization, QRS wave and T wave represent the electrical activity of ventricular polarization and repolarization respectively. Sometimes, the heartbeat also contains U wave, which is a wide and low wave that appears 0.02s to 0.04s after T wave. For the heartbeat, the commonly used heartbeat reference points include the P wave starting point, P wave end point, QRS wave starting point, QRS wave end point and T wave end point.

[0004] In some technologies, a signal processing detection method can be used to detect the heartbeat reference point. For example, the QRS wave position in the ECG signal is first obtained, and then the ECG signal is subjected to noise reduction filtering and Hilbert transform operations to obtain an enhanced ECG signal. Then, a search area is set based on the QRS wave position in the enhanced ECG signal, and the sample points that meet the heartbeat reference point conditions in the search area are used as the starting point and end point of the corresponding characteristic wave to achieve the detection of the heartbeat reference point. However, the above signal processing process is relatively simple, and the processing method is relatively single, which makes the expression ability of the signal processing method limited. Since the waveform of the ECG signal is relatively complex, the amplitude is low and it is easily interfered, so after the ECG signal is processed as above, the accuracy of the heartbeat reference point obtained is low, which is not conducive to subsequent ECG analysis. Summary of the invention

[0005] The embodiments of the present application provide a heartbeat reference point detection method, device, equipment and storage medium to solve the technical problem in the related art that it is difficult to accurately detect the heartbeat reference point because the waveform of the electrocardiogram signal is complex, the amplitude is low and it is easy to be interfered.

[0006] In a first aspect, an embodiment of the present application provides a heartbeat reference point detection method, comprising:

[0007] Acquire at least one lead ECG signal;

[0008] Extracting the ECG features of the lead ECG signal to obtain an ECG feature graph, wherein a plurality of ECG feature graphs are obtained from one lead ECG signal, and each of the ECG feature graphs has a different length;

[0009] Obtaining a heartbeat probability map according to each of the electrocardiogram characteristic maps, wherein the heartbeat probability map shows a first detection position of a QRS wave in the lead electrocardiogram signal, and each of the first detection positions is determined by a corresponding electrocardiogram characteristic map;

[0010] Determine a second detection position of a heartbeat reference point in a target ECG characteristic graph according to the first detection position, and determine a characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, the target ECG characteristic graph being the ECG characteristic graph corresponding to the first detection position;

[0011] The third detection position of the heartbeat reference point in the lead electrocardiogram signal is determined according to the characteristic wave type to which each characteristic point belongs and the second detection position.

[0012] In a second aspect, the embodiment of the present application further provides a heartbeat reference point detection device, comprising:

[0013] A signal acquisition module, used to acquire at least one lead ECG signal;

[0014] A feature extraction module is used to extract the ECG features of the lead ECG signal to obtain an ECG feature graph, wherein a plurality of ECG feature graphs are obtained from one lead ECG signal, and each ECG feature graph has a different length;

[0015] A probability determination module, used for obtaining a heartbeat probability map according to each of the electrocardiogram characteristic maps, wherein the heartbeat probability map shows a first detection position of a QRS wave in the lead electrocardiogram signal, and each of the first detection positions is determined by a corresponding electrocardiogram characteristic map;

[0016] a heartbeat determination module, configured to determine a second detection position of a heartbeat reference point in a target ECG characteristic graph according to the first detection position, and to determine a characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, wherein the target ECG characteristic graph is an ECG characteristic graph corresponding to the first detection position;

[0017] A position determination module is used to determine a third detection position of the heartbeat reference point in the lead ECG signal according to the characteristic wave type to which each characteristic point belongs and the second detection position.

[0018] In a third aspect, the embodiment of the present application further provides a heartbeat reference point detection device, including:

[0019] one or more processors;

[0020] A memory for storing one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the heartbeat reference point detection method as described in the first aspect.

[0022] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the heartbeat reference point detection method as described in the first aspect.

[0023] The above-mentioned heart beat reference point detection method, device, equipment and storage medium obtain at least one lead ECG signal and extract the ECG characteristic graph corresponding to the lead ECG signal, obtain the heart beat probability graph representing the first detection position of the QRS wave according to each ECG characteristic graph, and then obtain the second detection position of the heart beat reference point and the characteristic wave type to which each feature point in the target ECG characteristic graph belongs according to the first detection position, and then obtain the third detection position of the heart beat reference point in combination with the characteristic wave type to which each feature point belongs and the second detection position. The technical solution can solve the technical problem in the related art that the heart beat reference point is difficult to accurately detect because the ECG signal has a complex waveform, a low amplitude and is susceptible to interference. ECG features are extracted based on the lead ECG signal, and the heart beat reference point is detected in combination with the ECG features, rather than only referring to the amplitude of the ECG signal, thereby improving the detection accuracy of the heart beat reference point, and when the third detection position of the heart beat reference point is obtained in combination with the second detection position and the characteristic wave type to which each feature point belongs, the detection accuracy of the heart beat reference point is further improved, and at the same time, the detection robustness is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A typical schematic diagram of an electrocardiogram signal in the related art;

[0025] Figure 2 A flowchart of a heartbeat reference point detection method provided in an embodiment of the present application;

[0026] Figure 3 A flowchart of another heartbeat reference point detection method provided in an embodiment of the present application;

[0027] Figure 4 A schematic diagram of a process for detecting heartbeat reference points provided in an embodiment of the present application;

[0028] Figure 5 A first schematic diagram of a lead ECG signal provided in an embodiment of the present application;

[0029] Figure 6 A second schematic diagram of a lead ECG signal provided in an embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of the fourth convolution module provided in an embodiment of the present application;

[0031] Figure 8 for Figure 7 Schematic diagram of the structure of the C0 submodule;

[0032] Fig. 9 for Figure 7 Schematic diagram of the structure of the C1 submodule;

[0033] Fig.10 A schematic diagram of the process of heartbeat positioning provided in an embodiment of the present application;

[0034] Fig.11 A third schematic diagram of a lead ECG signal provided in an embodiment of the present application;

[0035] Fig.12 A fourth schematic diagram of a lead ECG signal provided in an embodiment of the present application;

[0036] Fig.13 A heart rate probability map provided in an embodiment of the present application;

[0037] Fig.14 A schematic diagram of the structure of the second convolution module provided in an embodiment of the present application;

[0038] Fig.15 A schematic diagram of a second detection position provided in an embodiment of the present application;

[0039] Fig.16 A schematic diagram of the processing flow of the third convolution module provided in an embodiment of the present application;

[0040] Fig.17 A schematic diagram of characteristic wave type identification provided in an embodiment of the present application;

[0041] Fig.18 A schematic diagram of a first characteristic wave provided in an embodiment of the present application;

[0042] Fig.19 A schematic diagram of a second characteristic wave provided in an embodiment of the present application;

[0043] Fig. 20 A first schematic diagram of a heartbeat reference point detection result provided in an embodiment of the present application;

[0044] Fig.21 A second schematic diagram of a heartbeat reference point detection result provided in an embodiment of the present application;

[0045] Fig. 22 A schematic diagram of the structure of a heartbeat reference point detection device provided in an embodiment of the present application;

[0046] Fig.23 A schematic diagram of the structure of a heartbeat reference point detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0048] In some related technologies, in order to solve the problem that the signal processing method is relatively simple during the ECG signal processing process, when the ECG signal is relatively complex, the amplitude is low and it is easily interfered, it is difficult to accurately detect the heartbeat reference point, and a deep learning method is used to detect the heartbeat reference point. At this time, it is necessary to construct a more complex deep learning network to perform convolution filtering on the ECG signal, and use an end-to-end training method to train the deep learning network, so that the deep learning network can better enhance the ECG signal and extract the ECG signal features, and then obtain the heartbeat reference point. This method has a faster processing speed, but the deep learning network in the above method needs to accurately locate the characteristic waves of the ECG signal (such as P wave, T wave and QRS wave) to obtain an accurate heartbeat reference point. However, for the deep learning network, it is difficult to accurately locate the characteristic waves of the ECG signal, which leads to a large detection error of the P wave starting point and the T wave end point in the heartbeat reference point, reducing the accuracy of the heartbeat reference point detection.

[0049] Therefore, a heart beat reference point detection method is provided in an embodiment of the present application, so that during the detection process, when the ECG signal is relatively complex, has a low amplitude and is susceptible to interference, the heart beat reference point can be accurately detected, and the problem of inaccurate ECG reference point detection caused by the difficulty of locating characteristic waves by the deep learning network is optimized.

[0050] The heartbeat reference point detection method provided in the embodiment of the present application can be performed by a heartbeat reference point detection device, which can be implemented by software and / or hardware. The heartbeat reference point detection device can be composed of two or more physical entities, or it can be composed of one physical entity, and the embodiment does not limit this. In one embodiment, the heartbeat reference point detection device can be a desktop computer, a laptop computer, an interactive smart tablet, a server, an electrocardiograph, an electrocardiograph monitor, and other electronic devices with data processing and analysis capabilities.

[0051] In an embodiment, the heart beat reference points detected by the heart beat reference point detection device include the P wave starting point, the P wave end point, the QRS wave starting point, the QRS wave end point and the T wave end point. The heart beat reference point detection refers to detecting the positions of the P wave starting point, the P wave end point, the QRS wave starting point, the QRS wave end point and the T wave end point in the electrocardiogram signal.

[0052] For example, Figure 2 A flowchart of a heartbeat reference point detection method provided in an embodiment of the present application. Figure 2 , the heartbeat reference point detection method specifically includes:

[0053] Step 110: Obtain at least one lead ECG signal.

[0054] In the professional terminology of electrocardiogram, the placement of electrodes on the human body surface and the connection method between electrodes and amplifiers when recording electrocardiograms are called electrocardiogram leads. The electrocardiogram signals collected through leads can be recorded as lead electrocardiogram signals. Among them, according to the number of lead channels, lead electrocardiogram signals can be divided into single-lead electrocardiogram signals (i.e., lead electrocardiogram signals collected through one lead) and multi-lead electrocardiogram signals (i.e., lead electrocardiogram signals collected through multiple leads). Among them, multi-lead electrocardiogram signals can be considered to be composed of multiple single-lead electrocardiogram signals. The more common number of leads of multi-lead electrocardiogram signals is three leads, six leads, twelve leads, and eighteen leads, etc.

[0055] In the embodiment, a lead ECG signal refers to a single lead ECG signal, which can be a single lead ECG signal directly collected, or a single lead ECG signal selected from multiple lead ECG signals. Exemplarily, the heartbeat reference point detection device can obtain at least one lead ECG signal collected by at least one lead. Among them, the number of lead channels, the sampling duration and the sampling frequency can be set according to actual conditions. When multiple lead ECG signals are obtained, each lead ECG signal is an ECG signal collected at the same time. In the embodiment, the lead ECG signal is composed of each sample point obtained by sampling, wherein each sample point represents the ECG signal collected at the corresponding sampling time. For the lead ECG signal, the horizontal axis is the time axis, which is used to record the sampling time of the sample point in units of time. At this time, the position of the sample point in the lead ECG signal refers to the sampling time of the sample point, and the vertical axis is the intensity of the ECG signal, which is often characterized by voltage. Optionally, the characteristic waves in the lead ECG signal include at least P wave, QRS wave and T wave, and the number of each characteristic wave is not limited in the embodiment. Among them, an adjacent and continuous P wave, a QRS wave and a T wave constitute a heart beat, and multiple heart beats constitute a lead ECG signal.

[0056] In one embodiment, an exemplary description is given by acquiring two lead ECG signals. At this time, if a single lead ECG signal is acquired, the single lead ECG signal is copied to obtain two lead ECG signals. If a multi-lead ECG signal is acquired, two lead ECG signals are selected from them.

[0057] In one embodiment, when acquiring at least one lead ECG signal, the lead ECG signal is first subjected to noise reduction filtering to reduce the influence of noise on the detection of heart beat reference points. The implementation process of noise reduction filtering can be set according to actual conditions, such as noise reduction filtering including at least one of slope suppression, baseline drift filtering, and high-frequency noise filtering. Slope suppression can avoid step noise (the slope between two adjacent sample points is large), baseline drift filtering can avoid the lead ECG signal from deviating from the normal baseline position, and high-frequency noise filtering can avoid the influence of high-frequency noise on detection. In one embodiment, after the lead ECG signal is subjected to noise reduction filtering, it is standardized to obtain a more regular lead ECG signal, wherein the implementation process of standardization is not limited in the embodiment.

[0058] In one embodiment, a lead ECG signal with higher quality is obtained to ensure the accuracy of detecting the heartbeat reference point. For example, when the energy ratio between the energy of the QRS wave in the lead ECG signal in the frequency domain and the total energy of the lead ECG signal in the frequency domain exceeds a certain ratio (such as 50%), the quality of the lead ECG signal is considered to be high. Therefore, in the embodiment, the lead ECG signal obtained refers to an ECG signal in which the energy ratio between the energy of the QRS wave in the frequency domain contained therein and the total energy of the lead ECG signal in the frequency domain exceeds a certain ratio. Optionally, for multi-lead ECG signals, if the quality of multiple single-lead ECG signals is relatively high, a lead ECG signal with higher quality can be randomly selected, or a lead ECG signal with higher quality can be selected from multiple single-lead ECG signals according to a pre-set lead priority.

[0059] Step 120: extract the ECG features of the lead ECG signal to obtain an ECG feature graph. One lead ECG signal can obtain multiple ECG feature graphs, and each ECG feature graph has a different length.

[0060] The ECG feature map is used to describe the ECG features of the lead ECG signal. For the field of heartbeat reference point detection, the ECG feature map needs to show the ECG features related to the heartbeat reference point and the characteristic wave, such as the features of the QRS wave, the P wave, and the T wave. The extracted ECG features can be reflected by the characteristic points in the ECG feature map. For example, the amplitude of the characteristic points related to the characteristic wave is higher in the ECG feature map.

[0061] It can be understood that, for the lead ECG signal, the position of each heartbeat reference point can be mapped to the ECG characteristic graph, so that the heartbeat reference point has a corresponding position in the ECG characteristic graph.

[0062] When extracting ECG features, it is necessary to enhance the ECG features related to the characteristic wave and its heartbeat reference point, and suppress the ECG features unrelated to the characteristic wave and its heartbeat reference point, so as to ensure the accuracy of the detection of the heartbeat reference point when the heartbeat reference point is detected based on the ECG features in the future. In one embodiment, a convolutional neural network is used to extract ECG features and output an ECG feature map. The convolutional neural network is a trained convolutional neural network, and the specific training process embodiment is not limited. The network structure and network parameter embodiments of the convolutional neural network are not limited. It can be understood that in order to enrich the ECG features, the convolutional neural network outputs multiple ECG feature maps, that is, multiple ECG feature maps can be obtained based on one lead ECG signal. In one embodiment, multiple ECG characteristic graphs corresponding to the same lead ECG signal have different lengths. For example, the length of the lead ECG signal is 10s, and the lengths of the ECG characteristic graphs are 10s, 5s, and 2.5s, respectively. At this time, the ECG characteristic graphs of three lengths are used to respectively show the ECG characteristics in the 10s lead ECG signal. It can be understood that when there are multiple lead ECG signals, each 10s lead ECG signal can obtain three ECG characteristic graphs with lengths of 10s, 5s, and 2.5s, respectively. It should be noted that the length of each ECG characteristic graph can be set according to actual conditions, and the use of ECG characteristic graphs of different lengths can play a role in enriching ECG characteristics.

[0063] Exemplarily, when obtaining an ECG characteristic graph, a lead ECG signal of a fixed length (such as 10s) is first intercepted and input into a convolutional neural network, so that the convolutional neural network outputs multiple ECG characteristic graphs (such as obtaining three ECG characteristic graphs, and the lengths of the three ECG characteristic graphs are 10s, 5s and 2.5s respectively). When there are multiple lead ECG signals, each lead ECG signal is sequentially input into the convolutional neural network to obtain multiple corresponding ECG characteristic graphs. In the embodiment, the lead ECG signals described subsequently are all lead ECG signals of this fixed length.

[0064] Step 130: Obtain a heartbeat probability map according to each ECG characteristic map, wherein the heartbeat probability map shows a first detection position of a QRS wave in a lead ECG signal, and each first detection position is determined by a corresponding ECG characteristic map.

[0065] For a heartbeat, the order of characteristic waves is P wave, QRS wave and T wave, and QRS wave is easier to detect. By locating the position of the QRS wave, the positions of the P wave and T wave and the position of the heartbeat reference point can be inferred based on the position of the QRS wave. Therefore, in one embodiment, after obtaining the ECG characteristic graph, the position of the QRS wave in the lead ECG signal is detected according to the ECG characteristic graph, and the position of the QRS wave obtained according to the ECG characteristic graph is recorded as the first detection position. Optionally, when there are multiple lead ECG signals, the QRS waves belonging to the same heartbeat should have the same first detection position in the multiple lead ECG signals.

[0066] In one embodiment, a heartbeat probability diagram is used to illustrate the first detection position of each QRS wave and the probability that each first detection position belongs to a QRS wave. Optionally, the length of the heartbeat probability diagram is the same as the length of the lead ECG signal. For example, if the length of the lead ECG signal is 10s, then the length of the heartbeat probability diagram is also 10s. The first detection position of the QRS wave shown in the heartbeat probability diagram can be directly used as the first detection position of the QRS wave in the lead ECG signal. Each first detection position shown in the heartbeat probability diagram can be obtained based on each ECG characteristic diagram.

[0067] In one embodiment, a pre-built convolutional neural network is used to identify each feature point in the electrocardiogram characteristic graph to determine the probability that each feature point belongs to the QRS wave, and a heartbeat probability graph is output, which shows the probability value of each feature point belonging to the QRS wave. That is, the heartbeat probability graph contains multiple probability points, each probability point represents the probability value of the corresponding feature point in the electrocardiogram characteristic graph belonging to the QRS wave. At this time, for each probability point, the corresponding feature point can be found in the electrocardiogram characteristic graph, and the corresponding sample point can be found in the lead electrocardiogram signal. It should be noted that the convolutional neural network currently used is a trained convolutional neural network, and its specific training process embodiment is not limited. The network structure and network parameter embodiments of the convolutional neural network are not limited. In general, the size of the convolutional neural network is much smaller than the size of the convolutional neural network used when identifying the electrocardiogram characteristic graph. After obtaining the heartbeat probability graph corresponding to each electrocardiogram characteristic graph, the probability points in each heartbeat probability graph are integrated according to their positions to summarize them into a heartbeat probability graph. Afterwards, a candidate probability point belonging to the QRS wave is selected in the heartbeat probability map, wherein the probability value corresponding to the candidate probability point is higher than the set probability threshold. The candidate probability point can be understood as the probability that the sample point corresponding to the probability point is a QRS wave. Afterwards, non-maximum suppression is performed on each candidate probability point, wherein non-maximum suppression can be understood as determining the candidate probability point with the largest probability value in each local area (the length of the area can be set according to the actual situation) as the maximum value of the local area in the heartbeat probability map, and then determining other candidate probability points in the local area as non-maximum values, and then deleting the candidate probability points belonging to the non-maximum value in the heartbeat probability map. At this time, the sample point corresponding to the candidate probability point retained in the heartbeat probability map can be considered as a sample point belonging to the QRS wave, and then the position of the sample point corresponding to the candidate probability point is determined as the first detection position of the QRS wave. It should be noted that the QRS wave is composed of multiple continuous sample points in the lead ECG signal, and the first detection position can be understood as the position of a sample point in the QRS wave, and different first detection positions correspond to different QRS waves.

[0068] It can be understood that the probability point corresponding to each first detection position is detected in the corresponding ECG characteristic map, that is, each first detection position in the heartbeat probability map corresponds to an ECG characteristic map. After selecting a first detection position in the heartbeat probability map, it can be clear that it is the first detection position obtained after identifying which feature point in which ECG characteristic map.

[0069] Step 140, determining a second detection position of the heartbeat reference point in the target ECG characteristic graph according to the first detection position, and determining the characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, the target ECG characteristic graph being the ECG characteristic graph corresponding to the first detection position.

[0070] Exemplarily, based on the first detection position of the QRS wave, the area where the QRS wave is located in the lead ECG signal and the areas where the P wave and T wave connected to the QRS wave are located can be inferred, and then the position of the heartbeat reference point can be obtained, that is, the position of the P wave starting point, the P wave end point, the QRS wave starting point and the QRS wave end point, and the T wave end point. It can be understood that the position of the corresponding heartbeat reference point can be obtained according to each first detection position in the heartbeat probability map. In the embodiment, the position of each heartbeat reference point obtained according to the first detection position is recorded as the second detection position.

[0071] In one embodiment, the second detection position of each heartbeat reference point is obtained through the electrocardiogram corresponding to the first detection position. For the convenience of description, the electrocardiogram corresponding to the first detection position is recorded as the target electrocardiogram, and the processing of a first detection position is used as an example to describe how to obtain the second detection position. Exemplarily, after obtaining the target electrocardiogram corresponding to the first detection position in the heartbeat probability map, the characteristic points representing each heartbeat reference point are determined in the target electrocardiogram, and the position corresponding to each characteristic point in the lead electrocardiogram signal is determined as the obtained second detection position. In one embodiment, when determining the characteristic points representing each heartbeat reference point in the target ECG characteristic diagram, the implementation process may be: in the target ECG characteristic diagram, two detection areas are determined with the first detection position as the center, wherein one detection area is an area that is speculated to represent the QRS wave. In the embodiment, the detection area is recorded as the QRS wave detection area, and the other detection area is an area that is speculated to represent the P wave and the T wave. Since the QRS wave is located between the P wave and the T wave, the detection area also includes an area representing the QRS wave, that is, the detection area can be considered as an area that is speculated to contain a heartbeat. In the embodiment, the detection area is recorded as the heartbeat detection area, and the heartbeat detection area covers the QRS wave detection area. Optionally, the width of the QRS wave detection area and the width of the heartbeat detection area are determined based on the conventional width of the QRS wave and the conventional width of the heartbeat. It can be understood that in the heartbeat reference point, the QRS wave starting point and the QRS wave end point correspond to the starting point and end point of the area where the QRS wave is located, respectively, and the P wave starting point and the T wave end point correspond to the starting point and end point of the area where the heartbeat is located, respectively. Therefore, in the embodiment, after obtaining the QRS wave detection area and the heartbeat detection area, the pre-constructed convolutional neural network is used to process the QRS wave detection area and the heartbeat detection area respectively, wherein the convolutional neural network can identify the feature points of the area when processing the QRS wave detection area, so as to clarify the difference between the midpoint of the area where the QRS wave is actually located and the first detection position based on each feature point, as well as the area width of the area where the QRS wave is actually located, and output the difference and area width. Similarly, after the convolutional neural network processes the heartbeat detection area, it outputs the difference between the midpoint of the area where the heartbeat is actually located and the first detection position, as well as the area width of the area where the heartbeat is actually located.Afterwards, according to the difference value and the area width corresponding to the QRS wave and the first detection position, the starting point (the first characteristic point in the area) and the end point (the last characteristic point in the area) of the area where the QRS wave in the target ECG characteristic graph is actually located are determined, and the starting point is used as the second detection position of the QRS wave starting point, and the end point is used as the second detection position of the QRS wave end point. Similarly, according to the difference value and the area width corresponding to the heartbeat and the first detection position, the starting point (the first characteristic point in the area) and the end point (the last characteristic point in the area) of the area where the heartbeat is actually located in the target ECG characteristic graph can be determined, and the starting point is used as the second detection position of the P wave starting point, and the end point is used as the second detection position of the T wave end point. Afterwards, according to the conventional positional relationship between the characteristic waves in the heartbeat, the second detection position of the P wave starting point and the second detection position of the QRS wave starting point are added to obtain the sum of the positions, and half of the sum is used as the second detection position of the P wave end point. The above-mentioned convolutional neural network is a trained convolutional neural network, and its specific training process embodiment is not limited. The network structure and network parameter embodiments of the convolutional neural network are not limited. Generally speaking, the size of this convolutional neural network is much smaller than the size of the convolutional neural network used to recognize ECG feature graphs.

[0072] Exemplarily, the characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs can be obtained according to the first detection position of the QRS wave, wherein the characteristic wave includes a P wave, a QRS wave and a T wave, and correspondingly, the characteristic wave type includes a P wave type, a QRS wave type and a T wave type, that is, the characteristic wave corresponding to each characteristic point in the target ECG characteristic graph can be clearly identified based on the first detection position. In the embodiment, taking a first detection position as an example, how to determine the characteristic wave type to which a characteristic point belongs is described.

[0073] In one embodiment, a segmentation area is set in the target ECG characteristic map according to the first detection position of the QRS wave, and the segmentation area should contain at least one complete heartbeat. An optional method is to select a first detection position, and then clarify the midpoint position between the first detection position and the previous first detection position, and the midpoint position between the first detection position and the next first detection position in the heartbeat probability map, and then use the area between the two midpoint positions in the target ECG characteristic map as the segmentation area. If the first detection position is the first first detection position in the heartbeat probability map, the first feature point in the target ECG characteristic map is used as the starting point of the segmentation area. If the first detection position is the last first detection position in the heartbeat probability map, the last feature point in the target ECG characteristic map is used as the end point of the segmentation area. After that, the segmentation area is processed using a pre-constructed convolution kernel to clarify the probability that each feature point in the segmentation area belongs to each feature wave type, and then select the feature wave type with the largest probability as the feature wave type to which the corresponding feature point belongs. It can be understood that the feature wave to which the corresponding sample point in the lead ECG signal belongs can also be clarified according to the feature wave type to which each feature point belongs.

[0074] Step 150: Determine the third detection position of each heartbeat reference point in the lead ECG signal according to the characteristic wave type to which each characteristic point belongs and the second detection position.

[0075] It should be noted that the position of each heartbeat reference point can also be obtained according to the characteristic wave type to which each sample point in the lead ECG signal belongs, such as obtaining each characteristic point representing the same P wave, and then determining the continuous sample points representing the P wave in the lead ECG signal according to the characteristic points, and taking the position of the first sample point as the position of the starting point of the P wave. Since the determination method of this position is different from that of the second detection position, there may be a difference between this position and the second detection position. In one embodiment, the position of the heartbeat reference point is determined using the characteristic wave type to which the characteristic point belongs, and the second detection position is fine-tuned using this position, and the position obtained after fine-tuning is recorded as the third detection position. Exemplarily, according to the characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, an area where a characteristic wave is located is found, and the area is a connected area. At this time, each connected area corresponds to a characteristic wave, and the starting point and end point of the characteristic wave can be understood as the position of the heartbeat reference point determined based on the characteristic wave type to which the characteristic point belongs, and then the third detection position is obtained according to this position and the second detection position. For example, when the characteristic wave is a P wave, the starting point of the connected area can be considered as the starting point of the P wave determined based on the characteristic wave. If the error between the position of the starting point of the P wave determined based on the characteristic wave and the second detection position of the P wave starting point determined above is within a set range (such as 0.1s), the starting point position of the connected area is used to replace the second detection position as the third detection position of the final P wave starting point. If it is not within the set range, the second detection position is used as the third detection position of the final P wave starting point. After other heartbeat reference points are processed in the same way, the final third detection position of each heartbeat reference point can be obtained. Among them, the setting range corresponding to each heartbeat reference point can be set according to actual conditions, and the setting ranges corresponding to different heartbeat reference points can be different.

[0076] It is understandable that when determining the connected area, there may be a situation where the connected area is wrong. Therefore, in one embodiment, the connected area is first screened to retain the accurate connected area. For a heartbeat, the P wave should be located in the range of 0.3s to 0.15s before the heartbeat, the QRS wave should be located in the range of 0.15s to 0.15s after the heartbeat, and the T wave should be located in the range of 0.15s to 0.5s after the heartbeat, and the length of the characteristic wave should be greater than or equal to 0.02s and less than or equal to 0.5s. Therefore, in the embodiment, it is determined whether each characteristic wave represented by the connected area is within the corresponding position range above, and whether the length of each characteristic wave represented by the connected area is greater than or equal to 0.02s and less than or equal to 0.5s. If the characteristic wave is within the corresponding position range and the characteristic wave length is greater than or equal to 0.02s and less than or equal to 0.5s, then the connected area is determined to be accurate, otherwise, the connected area is determined to be inaccurate.

[0077] As described above, by acquiring at least one lead ECG signal, extracting the ECG characteristic graph corresponding to the lead ECG signal, and obtaining a heartbeat probability graph representing the first detection position of the QRS wave according to each ECG characteristic graph, then obtaining the second detection position of the heartbeat reference point and the characteristic wave type to which each characteristic point belongs according to the first detection position, and then combining the characteristic wave type and the second detection position to obtain the third detection position of the heartbeat reference point, the technical solution can solve the technical problem that the related technology is difficult to accurately detect the heartbeat reference point due to the complex ECG signal, low amplitude and easy to be interfered, extracting ECG features based on the lead ECG signal, and detecting the heartbeat reference point in combination with the ECG features, the heartbeat reference point can be accurately detected when the ECG signal is complex, low amplitude and easy to be interfered. Moreover, when obtaining the second detection position of each heartbeat reference point according to the first detection position of the QRS wave, although the characteristics of each characteristic wave are not lost (such as in determining the QRS wave detection area and the heartbeat detection area, the area width is determined by combining the characteristics of the characteristic wave), this method does not identify the characteristic wave type to which each characteristic point belongs one by one, so that the accuracy of the determined second detection position is not high. When the characteristic wave type to which each feature point belongs is obtained according to the first detection position of the QRS wave, the sample points belonging to the same characteristic wave can be segmented out to obtain the corresponding characteristic wave, and the position of the heartbeat reference point can be determined according to each characteristic wave. This method can identify the characteristic points one by one, so that the position accuracy of the detected heartbeat reference point is high. However, errors may occur when identifying the characteristic wave type to which the characteristic point belongs, which may lead to errors in the segmented characteristic wave, for example, an ECG waveform that does not conform to the conventional one (the conventional ECG waveform is a prior ECG waveform that can be obtained clinically, such as Figure 1 For example, when a plurality of characteristic points that should belong to the P wave are identified as belonging to the QPR wave or the T wave, a small section of the QRS wave or the T wave will appear in the segmented P wave. For another example, there is a situation where the sequence of characteristic waves is discontinuous, such as a gap between the P wave and the QRS wave. In order to avoid the above-mentioned errors, it is necessary to first perform relatively complex processing on each characteristic wave to ensure the accuracy of the characteristic wave identification shape. Based on this, in the embodiment, the third detection position is obtained by combining the characteristic wave type and the second detection position, so as to avoid the situation where complex processing of the characteristic wave is performed, and the situation where the accuracy of the second detection position is not high is avoided, thereby ensuring the detection accuracy of the ECG reference point and improving the detection robustness.

[0078] Figure 3 A flowchart of another heartbeat reference point detection method provided in an embodiment of the present application, which is concretized on the basis of the above-mentioned embodiment.

[0079] Figure 4 The flowchart of the heartbeat reference point detection provided in the embodiment of the present application shows the signal processing process of the heartbeat reference point detection method in the present embodiment. Figure 4 As shown, in this embodiment, a plurality of lead ECG signals are first acquired, and then noise reduction filtering is performed to obtain a plurality of lead ECG signals after noise reduction filtering, and then signal quality evaluation is performed to select two lead ECG signals that meet the quality conditions, and then ECG feature extraction is performed on the lead ECG signals to obtain three ECG feature graphs of different lengths ( Figure 4 Only three signals of different lengths are shown as examples. In actual applications, each lead ECG signal corresponds to three ECG characteristic graphs). After that, the ECG characteristic graphs are positioned to obtain the first detection position of the QRS wave ( Figure 4 The black area in the heartbeat positioning), then the heartbeat reference point detection is performed to obtain the second detection position of the heartbeat reference point, wherein the second detection position can be obtained by the QRS wave area ( Figure 4 The black area in the heartbeat reference point detection) and the heartbeat area ( Figure 4 The black area in the heartbeat reference point detection and the areas before and after the black area) are obtained, and the heartbeat segmentation is performed to clarify each characteristic wave ( Figure 4 In the heart beat segmentation, the black area is the QRS wave, the area before the black area is the P wave, and the area after the black area is the T wave). After that, the heart beat reference point fusion is performed, that is, the final third detection position is obtained based on the second detection position and characteristic wave of the heart beat reference point.

[0080] refer to Figure 3 , the heartbeat reference point detection method specifically includes:

[0081] Step 201: Collect at least one lead ECG signal.

[0082] Exemplarily, the lead ECG signal is collected through the lead currently in use.

[0083] Step 202: Perform noise reduction filtering on the lead ECG signals, and obtain lead ECG signals that meet quality requirements. The number of lead ECG signals that meet quality requirements is the target number.

[0084] Exemplarily, each lead ECG signal is subjected to noise reduction filtering, and the noise reduction filtering implementation process of each lead ECG signal is the same, therefore, taking one lead ECG signal as an example, the noise reduction filtering implementation process is described. In one embodiment, the noise reduction filtering includes slope suppression, filtering baseline drift, and filtering high-frequency noise, and the lead ECG signal is also standardized during the noise reduction filtering to obtain an accurate and regular lead ECG signal.

[0085] In one embodiment, performing noise reduction filtering on the lead ECG signal includes steps 2021 to 2028:

[0086] Step 2021: Calculate the slope between adjacent sample points in the lead ECG signal.

[0087] The lead ECG signal contains multiple sample points, each of which represents the ECG signal collected at that time. Exemplarily, after obtaining the lead ECG signal, the slope between each two adjacent sample points is calculated, wherein the slope is obtained by performing a differential calculation on the two adjacent sample points. It can be understood that the sample point in the middle has a slope with the previous sample point and a slope with the next sample point.

[0088] Step 2022: When the slope is higher than the slope threshold, the slope threshold is used to replace the slope to obtain a new slope.

[0089] Exemplarily, the slope threshold can be set according to actual conditions, and the slope threshold is used to identify noise steps, wherein a noise step refers to a phenomenon in which a step occurs between two adjacent sample points due to the presence of noise. Exemplarily, each slope is compared with the slope threshold. When the slope is higher than the slope threshold, it means that the slope between the two corresponding sample points is too large. Therefore, it is considered that a noise step occurs between the two sample points. At this time, in order to avoid the phenomenon of noise steps, in an embodiment, the slope threshold is used to replace the slope, that is, the slope between the two sample points is updated to the slope threshold. When the slope is not higher than the slope threshold, the slope is retained. That is, for two adjacent sample points, a smaller value is selected from the corresponding slope and the slope threshold as the new slope between the adjacent sample points. At this time, the maximum value of the new slope is the slope threshold.

[0090] Step 2023: sequentially add each sample point to each slope to obtain a lead ECG signal with a suppressed slope.

[0091] Exemplarily, starting from a sample point, the slope is sequentially added to obtain a new lead ECG signal. Since the slope used in this process is a suppressed slope, the new lead ECG signal can be understood as a lead ECG signal with a suppressed slope. The sample point and the slope are added as follows: the first sample point is added to the slope between the first sample point and the second sample point to obtain the value of the second sample point, and then the second sample point is added to the slope between the second sample point and the third sample point to obtain the value of the third sample point, and so on. For the last sample point in the lead ECG signal, it can be added to the slope between the last sample point and the previous sample point.

[0092] Step 2024: input the slope-suppressed lead ECG signal to a mean filter to obtain a baseline of the slope-suppressed lead ECG signal.

[0093] The mean filter is a common filter, which is mainly used for smoothing noise. In the embodiment, the lead ECG signal with suppressed slope is input into the mean filter, so that the mean filter filters the input signal to obtain the baseline of the signal. Among them, the parameters used by the mean filter can be set according to the actual situation. In the embodiment, the window length of the mean filter is 1s.

[0094] Step 2025: Input the baseline to a first low-pass filter to perform low-pass filtering on the baseline.

[0095] Exemplarily, the frequency of the baseline obtained by the mean filter is low and has burrs, therefore, in the embodiment, a low-pass filter is used to low-pass filter the baseline to obtain a low-frequency and burr-free baseline. Among them, the low-pass filter is an electronic filtering device that allows signals below the cut-off frequency to pass, but does not allow signals above the cut-off frequency to pass. In one embodiment, the low-pass filter used in this step is recorded as the first low-pass filter, that is, the first low-pass filter is an electronic filtering device for low-pass filtering the baseline. Optionally, the cut-off frequency used by the first low-pass filter is 0.5Hz, that is, after passing through the low-pass filter, the burrs above 0.5Hz in the baseline will be filtered out to output a smoother baseline.

[0096] Step 2026: subtract the baseline from the slope-suppressed lead ECG signal to obtain a lead ECG signal with baseline drift filtered out.

[0097] Exemplarily, the baseline (baseline after low-pass filtering) is subtracted from the slope-suppressed lead ECG signal to suppress baseline drift. In an embodiment, the lead ECG signal after removing the baseline is recorded as the lead ECG signal with baseline drift filtered out.

[0098] Step 2027: Input the lead ECG signal with baseline drift removed into a second low-pass filter to obtain a lead ECG signal with high-frequency noise removed.

[0099] Exemplarily, the lead ECG signal contains high-frequency noise, which will reduce the detection accuracy of the heartbeat reference point. Therefore, a low-pass filter is used to filter out signals above a certain frequency to filter out the high-frequency noise. In one embodiment, the low-pass filter currently in use is recorded as the second low-pass filter, that is, the second low-pass filter is a low-pass filter for filtering out high-frequency noise. Optionally, the cut-off frequency of the second low-pass filter is 35Hz, that is, the second low-pass filter filters out signals above 35Hz to filter out high-frequency noise. In one embodiment, the signal output by the second low-pass filter is recorded as the lead ECG signal from which the high-frequency noise is filtered out.

[0100] Step 2028: Calculate the average value and standard deviation of the lead ECG signal after filtering out the high-frequency noise, and standardize the lead ECG signal after filtering out the high-frequency noise according to the average value and standard deviation.

[0101] In one embodiment, the lead ECG signal with high-frequency noise filtered out is standardized to obtain a more regular lead ECG signal, which is convenient for subsequent processing and analysis. The implementation method of standardization is not limited in the embodiment. For example, the average value and standard deviation of the lead ECG signal with high-frequency noise filtered out are first calculated, and then the average value is first subtracted from the lead ECG signal with high-frequency noise filtered out and then divided by the standard deviation to achieve standardization.

[0102] For example, Figure 5 The first schematic diagram of the lead ECG signal provided in the embodiment of the present application is Figure 6 This is a second schematic diagram of a lead ECG signal provided in an embodiment of the present application. Figure 5 The lead ECG signal is the lead ECG signal collected by the current lead. After the lead ECG signal is processed through steps 2021 to 2028, a standardized lead ECG signal is obtained. The lead ECG signal is as follows: Figure 6 As shown, compared to Figure 5 , Figure 6 The ECG signals of the leads are more regular, which is convenient for subsequent processing.

[0103] It should be noted that the lead ECG signals used in the subsequent processing are all standardized lead ECG signals.

[0104] In one embodiment, after the lead ECG signals are subjected to noise reduction filtering, the lead ECG signals that meet the quality requirements are selected, and the lead ECG signals are a set number of items. In the embodiment, the set number of items is recorded as the target number of items. The target number of items can be set according to actual conditions. In the embodiment, the target number of items is two for exemplary description.

[0105] A lead ECG signal that meets the quality requirements means that the energy of the frequency band where the QRS wave is located accounts for a relatively high proportion of the total energy of the lead ECG signal, so as to facilitate accurate identification of the first detection position of the QRS wave in the lead ECG signal. At this time, when the target number is two, the lead ECG signal that meets the quality requirements may include the following solutions:

[0106] Solution 1: When the lead ECG signal is a single-lead ECG signal, obtaining the lead ECG signal that meets the quality requirements includes steps 2029 to 20210:

[0107] Step 2029, calculating the first energy of the single-lead ECG signal in the set frequency band and the second energy of all frequency bands;

[0108] Exemplarily, when the lead ECG signal is a single-lead ECG signal, it means that there is only one lead ECG signal. In this case, only the quality of the lead ECG signal is determined.

[0109] In one embodiment, a single-lead ECG signal is first subjected to a Fourier transform to convert the single-lead ECG signal into the frequency domain to obtain a frequency domain ECG signal. Afterwards, the signal energy in a set frequency band is determined based on the frequency domain ECG signal, wherein the set frequency band refers to the frequency band where the QRS wave is located. In one embodiment, the set frequency band is a frequency band of 5Hz-15Hz. The signal energy at the set frequency is recorded as the first energy, and the first energy can reflect the signal energy of the QRS wave. Similarly, the signal energy in all frequency bands is determined based on the frequency domain ECG signal, wherein all frequency bands refer to the frequency band where the single-lead ECG signal is located, and the signal energy in all frequency bands is recorded as the second energy.

[0110] Step 20210: If the first ratio between the first energy and the second energy reaches a first ratio threshold, the single-lead ECG signal is copied, and the two single-lead ECG signals are used as lead ECG signals that meet quality requirements.

[0111] In an embodiment, the ratio of the first energy to the second energy is calculated, and the ratio is recorded as the first ratio. The first ratio can reflect the proportion of the signal energy of the QRS wave in the total signal energy. It can be understood that the higher the first ratio, the greater the proportion of the signal energy of the QRS wave. In one embodiment, the first ratio is compared with the first ratio threshold, wherein the first ratio threshold can be set according to actual conditions, such as setting 50%. When the first ratio reaches (equal to or higher than) the first ratio threshold, it means that the quality of the single-lead ECG signal is high, and therefore, it is considered that the single-lead ECG signal meets the quality requirements. Afterwards, the single-lead ECG signal is copied to obtain two identical single-lead ECG signals as two lead ECG signals that meet the quality requirements. If the first ratio is less than the first ratio threshold, it means that the quality of the single-lead ECG signal is low and does not meet the quality requirements. At this time, it is not used for subsequent processing, and a prompt is issued to prompt that the current lead ECG signal does not meet the quality requirements. Afterwards, exit the current processing process.

[0112] Solution 2: When the lead ECG signal is a multi-lead ECG signal, obtaining the lead ECG signal that meets the quality requirements includes steps 20211 to 20215:

[0113] Step 20211: Calculate the third energy of each lead ECG signal in the set frequency band and the fourth energy of all frequency bands in the multi-lead ECG signal.

[0114] Exemplarily, when the lead ECG signal is a multi-lead ECG signal, that is, when the multi-lead ECG signal is obtained, two single-lead ECG signals that meet the quality requirements are selected from the multiple lead ECG signals. In the embodiment, the third energy of the set frequency band and the fourth energy of all frequency bands in each lead ECG signal (single-lead ECG signal) are first determined, wherein the set frequency band refers to the frequency band where the QRS wave in the lead ECG signal is located, the third energy refers to the signal energy of the frequency band where the QRS wave is located, the all frequency bands refer to the frequency band where the lead ECG signal is located, and the fourth energy is the signal energy of the frequency band where the lead ECG signal is located. It can be understood that the calculation method of the third energy and the fourth energy is the same as the calculation method of the first energy and the second energy, and the embodiment will not be repeated. At this time, each lead ECG signal corresponds to a third energy and a fourth energy.

[0115] Step 20212: Select a target lead ECG signal from the multi-lead ECG signals, and the second ratio of the third energy to the fourth energy of the target lead ECG signal reaches a second ratio threshold.

[0116] Exemplarily, the ratio between the third energy and the fourth energy in each lead ECG signal is calculated. In an embodiment, the ratio is recorded as the second ratio. The second ratio can reflect the proportion of the signal energy of the QRS wave in the corresponding lead ECG signal in the total signal energy. It can be understood that the higher the second ratio, the greater the proportion of the signal energy of the QRS wave. In one embodiment, the second ratios are arranged in order from large to small, and then the second ratios are compared with the second ratio threshold, wherein the second ratio threshold can be set according to actual conditions, such as 50%. When the second ratio reaches (equal to or higher than) the second ratio threshold, it means that the quality of the lead ECG signal is high and meets the quality requirements, and the lead ECG signal is retained. In an embodiment, the retained lead ECG signal is recorded as the target lead ECG signal. If the second ratio is less than the second ratio threshold, it means that the quality of the lead ECG signal is low and does not meet the quality requirements, so the lead ECG signal is abandoned.

[0117] It can be understood that after the above processing, the number of target lead ECG signals retained can be zero, one, or more. When the target lead ECG signal is zero, it means that there is no lead ECG signal that meets the quality requirements. At this time, a prompt is issued to indicate that the current lead ECG signal does not meet the quality requirements and the current processing process is exited. When the target lead ECG signal is one, step 20213 is executed. When the target lead ECG signal is multiple, step 20214 is executed.

[0118] Step 20213: If there is only one target lead ECG signal, copy the target lead ECG signal and use the two target lead ECG signals as lead ECG signals that meet quality requirements.

[0119] Exemplarily, if there is only one target lead ECG signal, the lead ECG signal is copied to obtain two identical target lead ECG signals as two lead ECG signals that meet the quality requirements.

[0120] Step 20214: If there are multiple target lead ECG signals, determine the third ratio of the third energy between two target lead ECG signals with adjacent priorities according to a preset lead priority order, and execute step 20215.

[0121] Exemplarily, when there are multiple target lead ECG signals, it is determined whether there are two or more target lead ECG signals. If there are two, the two target lead ECG signals are directly used as two lead ECG signals that meet the quality requirements. When there are more than two target lead ECG signals, two lead ECG signals that meet the quality requirements are selected according to the pre-set lead priority order and the third energy corresponding to each target lead ECG signal. In one embodiment, the order of the pre-set lead priority can be set according to the actual situation. For example, the lead priorities are from high to low: II lead, V1 lead, V5 lead, I lead, V2 lead, V3 lead, V4 lead, V6 lead, etc. Among them, the P wave in the lead ECG signals collected by II lead and V1 lead is obvious, which is the lead recommended for clinical use. Therefore, II to V1 lead has the highest priority, and the P wave in the lead ECG signal collected by V5 lead is relatively obvious. Therefore, its priority is only lower than II lead and V1 lead. The rest can be determined according to the lead name to determine the priority order of each lead ECG signal. Afterwards, the priority between the target lead ECG signals is determined according to the pre-set lead priority. The ratio of the third energy between two target lead ECG signals with adjacent priorities is calculated. In an embodiment, the ratio is recorded as the third ratio. The third ratio can be calculated by calculating the ratio of the third energy of the target lead ECG signal with a higher priority to the target lead ECG signal with a lower priority among the two target lead ECG signals with adjacent priorities.

[0122] Step 20215: According to the comparison result between the third ratio and the third ratio threshold, two target lead ECG signals are selected as lead ECG signals that meet the quality requirements.

[0123] Exemplarily, the third ratio threshold can be set according to actual conditions, for example, the third ratio threshold is 0.9. First, obtain the third ratio between the two target lead ECG signals with the highest and second highest priority. If the third ratio is greater than 0.9, it means that the third energy of the high-priority target lead ECG signal is higher than 0.9 times the third energy of the low-priority target lead ECG signal. At this time, the quality of the high-priority target lead ECG signal is better than the quality of the low-priority target lead ECG signal. Therefore, the target lead ECG signal with the highest priority is selected as the lead ECG signal that meets the quality requirements. Afterwards, determine the second highest and the second-highest target lead ECG signals. If the third ratio is greater than 0.9, select the second highest target lead ECG signal. In this way, two lead ECG signals that meet the quality requirements are selected. If the third ratio between the second highest and the second second highest target lead ECG signals is not greater than 0.9, continue to determine whether the third ratio between the second highest target lead ECG signal and the target lead ECG signal of the next highest priority is greater than the third ratio threshold, so as to find a high-quality target lead ECG signal among the target lead ECG signals.

[0124] For the two target lead ECG signals with the highest and second highest priorities, if the third ratio is less than or equal to 0.9, it means that the third energy of the target lead ECG signal with the high priority is not higher than 0.9 times the third energy of the target lead ECG signal with the low priority. At this time, the quality of the target lead ECG signal with the low priority is better than the quality of the target lead ECG signal with the high priority. At this time, the third ratios of the target lead ECG signals with the second highest priority and the second highest priority are continued to be compared to see whether they are greater than the third ratio threshold, so as to continue to find target lead ECG signals with high quality. That is, when processing in order from high to low priority, for adjacent priorities, if the quality of the high priority is high, the target lead ECG signal with the high priority is selected, and if the quality of the low priority is high, the third ratio of the target lead ECG signal with the low priority is compared with the third ratio threshold when it is the high priority, so as to find the two target lead ECG signals with the highest quality.

[0125] Step 203: input the lead ECG signal into the pre-constructed fourth convolution module, and obtain a plurality of ECG characteristic graphs output by the fourth convolution module.

[0126] In the embodiment, a convolutional neural network is used to obtain an electrocardiogram characteristic graph, and the convolutional neural network is recorded as a fourth convolution module. It can be understood that the convolutional neural network is a trained convolutional neural network.

[0127] In one embodiment, Figure 7 This is a schematic diagram of the structure of the fourth convolution module provided in the embodiment of the present application. Figure 7After the lead ECG signal is input into the fourth convolution module, it first passes through the C0 submodule and the C1 submodule. After that, the output of the C1 submodule is downsampled and passed through the C2 submodule. Then, the output of the C2 submodule is downsampled and passed through the C3 submodule. Figure 8 for Figure 7 The schematic diagram of the structure of the C0 submodule in Figure 8 ,The C0 submodule consists of a convolutional layer, a normalization layer, and an activation function layer. Fig. 9 for Figure 7 The schematic diagram of the structure of the C1 submodule is shown in Figure 2. Fig. 9 , the C1 submodule includes a convolution layer, a normalization layer, an activation function layer, a convolution layer, a normalization layer and an activation function layer, and the output of the second normalization layer is added to the input of the C1 submodule and then passes through the second activation function layer. The structures of the C2 submodule and the C3 submodule are the same as those of the C1 submodule, and the embodiments will not be repeated here. Afterwards, the output of the C3 submodule first passes through a convolution layer to obtain the output result corresponding to the C3 submodule, and the output result can be recorded as the electrocardiogram C3. The output result of the C3 submodule is upsampled to obtain the upsampled result. Afterwards, the output of the C2 submodule passes through the convolution layer and is added to the upsampled result of the C3 submodule to obtain the output result corresponding to the C2 submodule, and the output result passes through a convolution layer to obtain the electrocardiogram C2. The output result of the C2 submodule is upsampled to obtain the upsampled result. After that, the output of the C1 submodule is added to the up-sampled result of the C2 submodule after passing through the convolution layer to obtain the output result corresponding to the C1 submodule. After that, the output result is passed through a convolution layer to obtain the ECG characteristic graph C1. Among them, the parameters of each convolution layer mentioned in the fourth convolution module include c (number of channels), k (convolution kernel length), p (padding size) and s (step size). The specific values ​​of each parameter can be referred to Figure 7 The activation function layers mentioned above all use the ReLu activation function.

[0128] For example, a 10-second segment of the lead ECG signal is intercepted from two lead ECG signals that meet the quality requirements. Then, one lead ECG signal is input to Figure 7 The fourth convolution module shown in FIG. 1 is used to obtain three ECG characteristic graphs, wherein the length of ECG characteristic graph C1 is 10 seconds, the length of ECG characteristic graph C2 is 5 seconds, and the length of ECG characteristic graph C3 is 2.5 seconds. Afterwards, another lead ECG signal is input into Figure 7 The fourth convolution module shown is used to obtain three ECG characteristic images with lengths of 10s, 5s and 2.5s respectively. That is, a total of six ECG characteristic images are currently obtained.

[0129] It can be understood that when three ECG characteristic graphs are obtained based on the ECG signal of each lead, the requirements for the accuracy of heart beat reference point detection can be met. In practical applications, the structure of the fourth convolution module can be modified according to needs to obtain other numbers of ECG characteristic graphs.

[0130] It should be noted that the lead ECG signals mentioned later all refer to lead ECG signals of set length.

[0131] Step 204: input each ECG characteristic graph into the first convolution module to obtain a first candidate heart beat probability graph corresponding to each ECG characteristic graph, wherein the first candidate heart beat probability graph includes a plurality of probability points, and each probability point indicates a probability value that the corresponding position belongs to a QRS wave.

[0132] Exemplarily, the first convolution module is used to identify each feature point in the electrocardiogram to obtain the probability value of each feature point belonging to the QRS wave, and then the corresponding probability point is obtained based on the probability value, wherein the graph containing the probability points output by the first convolution module is recorded as the first candidate heartbeat probability graph. Each electrocardiogram corresponds to a first candidate heartbeat probability graph, and each probability point in the first candidate heartbeat probability graph represents the probability that the sample point at the corresponding position in the lead electrocardiogram signal (or the feature point at the corresponding position in the electrocardiogram) belongs to the QRS wave.

[0133] In one embodiment, the first convolution module is composed of a convolution layer, an activation function layer and a smoothing layer, wherein the parameters of the convolution layer are c=1, k=0.06s, and p=0.028s. The activation function layer uses a sigmoid function, and the parameters of the smoothing layer are k=0.06s and p=0.028s. Each network layer in the first convolution module has been trained.

[0134] Step 205: Summarize the probability points in each first candidate heart beat probability map to obtain a second candidate heart beat probability map.

[0135] Exemplarily, each probability point in each first candidate heartbeat probability map is combined according to its corresponding position to obtain a summary map, which is recorded as the second candidate heartbeat probability map. The length of the second candidate heartbeat probability map is the same as the length of the lead ECG signal. For example, when the length of the lead ECG signal is 10s, the length of the second candidate heartbeat probability map is also 10s. Optionally, if the probability points in the two first candidate heartbeat probability maps correspond to the same position, a probability point is selected and retained in the second candidate heartbeat probability map. The selection method of the probability point can be set according to the actual situation. It can be understood that for each probability point, it has a corresponding ECG characteristic map, that is, the probability point is obtained through the characteristic point in the corresponding ECG characteristic map.

[0136] Step 206: perform non-maximum suppression on each probability point in the second candidate heart beat probability map, and use the second candidate heart beat probability map after non-maximum suppression as the heart beat probability map, and use the position corresponding to the probability point retained in the heart beat probability map as the first detection position of the QRS wave in the lead ECG signal.

[0137] Exemplarily, in the second candidate heart beat probability map, the maximum value of the probability point in the local area is determined, and the probability point of the maximum value is retained, and the probability points of other non-maximum values ​​are deleted to perform non-maximum suppression. After non-maximum suppression, the position corresponding to the probability point retained in the second candidate heart beat probability map can be considered as the first detection position of the QRS wave, and the second heart beat probability map can be considered as a heart beat probability map.

[0138] In one embodiment, performing non-maximum suppression on each probability point in the second candidate heartbeat probability map includes steps 2061 to 2066:

[0139] Step 2061: In the second candidate heart beat probability map, probability points whose probability values ​​are greater than a pre-probability threshold are retained.

[0140] Exemplarily, each probability point in the second candidate heartbeat probability map is first preliminarily filtered to obtain probability points that may represent QRS waves. At this time, the probability points retained after filtering can also be considered as candidate probability points of QRS waves. Among them, the implementation process of preliminary filtering is: compare the probability value of each probability point with the probability threshold. If it is higher than the probability threshold, the probability point is retained as a candidate probability point. Otherwise, the probability point is filtered out in the second candidate heartbeat probability map. After the probability points are preliminarily filtered, the second candidate heartbeat probability map is updated. Among them, the probability threshold can be set according to the actual situation. For example, when the quality of the lead ECG signal is high, the probability threshold can be set to 0.5. When the quality of the lead ECG signal is low (such as strong motion interference when collecting ECG signals), the probability threshold can be set to 0.05. The probability threshold can be understood as the minimum probability that needs to be referenced when judging whether the location of the probability point belongs to the QRS wave.

[0141] Step 2062: sort the retained probability points in descending order of probability value to obtain a check list.

[0142] The retained probability points (candidate probability points) are sorted according to the size of their probability values ​​to obtain a list. In an embodiment, the list is recorded as a check list. The probability value of the probability point at the front position in the check list is larger.

[0143] Step 2063: Get the first probability point in the current inspection list.

[0144] The first probability point in the check list is the probability point with the highest probability of representing the QRS wave among all the current candidate probability points. Therefore, in the embodiment, it is determined that the position corresponding to the first probability point belongs to the QRS wave, and the first probability point is selected.

[0145] Step 2064: The probability point in the second candidate heartbeat probability map whose distance from the first probability point is less than the distance threshold is taken as a non-maximum probability point.

[0146] The distance threshold can be set according to the actual situation. For example, the maximum heart rate of an adult generally does not exceed 300 bpm, so the distance threshold is set to 0.2s, and the maximum heart rate of an infant generally does not exceed 350 bpm, so the distance threshold is set to 0.15s. In the second candidate heartbeat probability map, a probability point whose distance from the first probability point is less than the distance threshold is searched. The probability point found can be considered as a non-maximum probability point in the local area during non-maximum suppression. The probability value of the first probability point is the largest, so the first probability point can be considered as a maximum probability point in the local area.

[0147] Step 2065: Delete the non-maximum probability points in the second candidate heart beat probability map, and delete the first probability point and the non-maximum probability point in the check list.

[0148] Exemplarily, the non-maximum probability points in the second candidate heart beat probability map are deleted, so that only the maximum probability points are retained in the current local area in the second candidate heart beat probability map. At the same time, since the first probability point and its corresponding non-maximum probability point have been found in the second candidate heart beat probability map, the above probability points are deleted in the inspection list to avoid repeated processing of the above probability points.

[0149] Step 2066, determine whether the detection list is empty, if it is empty, stop, if not empty, return to execute step 2063.

[0150] Exemplarily, when the detection list is empty, it means that each probability point in the detection list has been non-maximum suppressed. At this time, the position corresponding to each maximum probability point retained in the second alternative heart beat probability map is determined as the first detection position, and the second alternative heart beat probability map is used as the heart beat probability map.

[0151] When the detection list is not empty, it means that there are probability points that have not been non-maximum suppressed, and non-maximum suppression needs to be continued. Therefore, return to execute step 2063, that is, select the first probability point with the highest probability value among the probability points in the detection list, and perform non-maximum suppression based on the first probability point until the check list is empty.

[0152] It can be understood that the process of obtaining a heartbeat probability map from an electrocardiogram characteristic map can be considered as a heartbeat positioning process, which is mainly used to determine the first detection position of the QRS wave. Fig.10 A schematic diagram of the process of heartbeat positioning provided in the embodiment of the present application, see Fig.10 , the ECG characteristic graph outputs the first detection position of the QRS wave after passing through the convolution layer, activation function layer, smoothing layer, and non-maximum suppression. Fig.11 This is a third schematic diagram of lead ECG signals provided in an embodiment of the present application. Fig.12 A fourth schematic diagram of a lead ECG signal provided in an embodiment of the present application, Fig.13 A heart rate probability map provided in an embodiment of the present application. Fig.11 and Fig.12 are two lead ECG signals of equal length input to the fourth convolution module, Fig.13 The length of the center beat probability map is equal to the length of the lead ECG signal. Fig.13 is the first detection position obtained based on the two-lead ECG signal, where Fig.13 The circle “●” in the figure indicates the first detection position. Fig.11 and Fig.12 The circle in the Fig.13 After the first detection position in the lead ECG signal is mapped to the lead ECG signal, the first detection position of the QRS in the lead ECG signal. Fig.13 The plus sign “+” in indicates the probability points retained after preliminary filtering, i.e., the probability points in the check list.

[0153] Step 207, in the target ECG characteristic diagram corresponding to the first detection position, obtain a reference point detection area, the reference point detection area includes a heart beat detection area and a QRS wave detection area, and the midpoint positions of the heart beat detection area and the QRS wave detection area are both the first detection position.

[0154] Exemplarily, a first detection position of a QRS wave is selected according to the heartbeat probability map, and the target ECG characteristic map corresponding to the first detection position is clarified. Afterwards, in the target ECG characteristic map, a reference point detection area for detecting the heartbeat reference point is set with the first detection position as the midpoint. In one embodiment, the reference point detection area includes a heartbeat detection area, which is an area that may contain a heartbeat, and the starting point of the P wave and the end point of the T wave can be located through the heartbeat detection area. The area width of the heartbeat detection area can be set according to actual conditions. In one embodiment, the area width of the heartbeat detection area is set to 1s, that is, the heartbeat detection area is obtained in the target ECG characteristic map with the first detection position as the midpoint, and the signal length corresponding to the heartbeat detection area in the lead ECG signal is 1s. That is, the area width can be understood as the length of the ECG signal corresponding to each characteristic point in the area in the lead ECG signal. Since the QRS wave is located between the P wave and the T wave, the heartbeat detection area cannot accurately locate the QRS wave starting point and the QRS wave end point. Therefore, in one embodiment, the reference point detection area also includes a QRS wave detection area, which is an area that may contain a QRS wave, and the QRS wave starting point and the QRS wave end point can be located through the QRS wave detection area. The area width of the QRS wave detection area can be set according to actual conditions. In one embodiment, the area width of the QRS wave detection area is set to 0.3s.

[0155] Optionally, if the reference point detection area constructed based on the first detection position exceeds the target electrocardiogram characteristic graph, processing of the reference point detection area is abandoned.

[0156] Step 208, input the reference point detection area into the second convolution module to obtain the offset of the midpoint position of the reference point actual area relative to the first detection position and the area width of the reference point actual area, the reference point actual area includes the heart beat area corresponding to the heart beat detection area and the QRS wave area corresponding to the QRS wave detection area.

[0157] Exemplarily, the second convolution module is used to identify each feature point in the reference point detection area to output an offset and an area width. Fig.14 The schematic diagram of the structure of the second convolution module provided in the embodiment of the present application is shown in FIG. Fig.14 The second convolutional module consists of a convolutional layer and a global pooling layer, wherein the parameters of the convolutional layer are c=2, k=1, and p=1. Exemplarily, after the reference point detection area is input into the second convolutional neural network, a 2D vector [ctr offset , width], where ctr offsetis the offset, which is the absolute value of the difference between the midpoint position of the actual area of ​​the reference point and the first detection position. width is the area width of the actual area of ​​the reference point. The actual area of ​​the reference point refers to the area that should clearly contain the heartbeat reference point after identification by the second convolution module. For the heartbeat detection area, the corresponding actual area of ​​the reference point is recorded as the heartbeat area, and the heartbeat area is the area that should clearly contain a heartbeat after identification. For the QRS wave detection area, the corresponding actual area of ​​the reference point is recorded as the QRS wave area, and the QRS wave area is the area that should clearly contain the QRS wave after identification. At this time, the QRS wave detection area corresponds to an offset and an area width, and the heartbeat detection area corresponds to an offset and an area width.

[0158] Step 209: Determine a first starting point position and a first ending point position of the actual area of ​​the reference point according to the first detection position, the offset and the area width.

[0159] The starting position and the end position of the heart beat area and the QRS wave area are calculated by the first detection position, the corresponding offset and the area width. In the embodiment, the starting position of the actual area of ​​the reference point is recorded as the first starting position, and the end position is recorded as the first end position. The calculation formulas of the first starting position and the first end position are as follows:

[0160] onset=qrs loc +ctr offset -exp(width) / 2

[0161] offset=onset+exp(width) / 2

[0162] Among them, onset represents the first starting point position, offset represents the first end point position, and qrs loc Indicates the first detection position, ctr offset represents the offset, width represents the area width, and exp() is an exponential function with the natural constant e as the base.

[0163] After calculation according to the above formula, the heart beat region corresponds to a first starting position and a first end position, and the QRS wave region corresponds to a first starting position and a first end position.

[0164] Step 2010: Obtain a second detection position of the heartbeat reference point in the target electrocardiogram characteristic graph according to the first starting point position and the first end point position.

[0165] In one embodiment, this step specifically includes: using the first starting point position of the heartbeat area as the second detection position of the P wave starting point in the target ECG characteristic map, using the first ending point position of the heartbeat area as the second detection position of the T wave ending point in the target ECG characteristic map, using the first starting point position of the QRS wave area as the second detection position of the QRS wave starting point in the target ECG characteristic map, using the first ending point position of the QRS wave area as the second detection position of the QRS wave ending point in the target ECG characteristic map, and using half of the result of adding the second detection positions of the P wave starting point and the QRS wave starting point as the second detection position of the P wave ending point in the target ECG characteristic map.

[0166] Exemplarily, since the heartbeat region is a region including the P wave, QRS wave and T wave, the first starting position of the heartbeat region can be considered as the second detection position of the P wave starting point, and the first end position of the heartbeat region can be considered as the second detection position of the T wave end point. Since the QRS wave region is a region including the QRS wave, the first starting position of the QRS wave region can be considered as the second detection position of the QRS wave starting point, and the first end position of the QRS wave region can be considered as the second detection position of the QRS wave end point. Since the position of the P wave end point cannot be obtained according to the heartbeat region, in the embodiment, the second detection position of the P wave starting point and the second detection position of the QRS wave starting point are added in combination with the positional relationship of each heartbeat reference point in clinical practice, and half of the addition result is used as the second detection position of the P wave end point.

[0167] Optionally, for a non-sinus heartbeat, there is a situation where there is no normal P wave. In this case, the second detection position of the starting point of the QRS wave is used as the second detection position of the starting point of the P wave.

[0168] The above process of obtaining the second detection position from the first detection position can be considered as a heartbeat reference point detection process.

[0169] For example, Fig.15 A schematic diagram of a second detection position provided in an embodiment of the present application, referring to Fig.15 , which is a schematic diagram of mapping the detected second detection position to a lead ECG signal. Fig.15 It can be seen that the detected heart beat reference points are P wave starting point, P wave end point, QRS wave starting point, QRS wave end point and T wave end point from left to right. It can be understood that Fig.15 Only the detection result obtained based on one first detection position is shown. In actual applications, when there are multiple first detection positions, each first detection position has a corresponding detection result (ie, the second detection position of the five heartbeat reference points).

[0170] Step 2011, in the target ECG characteristic diagram corresponding to the first detection position, a segmentation area is set, the second starting point position of the segmentation area is the midpoint position of the current QRS wave and the previous QRS wave corresponding to the first detection position, and the second end point position of the segmentation area is the midpoint position of the current QRS wave and the next QRS wave.

[0171] Exemplarily, a first detection position is selected in the heartbeat probability map, and the target ECG characteristic map corresponding to the first detection position is clarified. Afterwards, in the target ECG characteristic map, a segmentation area is set, wherein the segmentation area is determined according to the first detection position. In the embodiment, the QRS wave corresponding to the currently selected first detection position is recorded as the current QRS wave, and at the same time, the QRS wave corresponding to the first detection position before the currently selected first detection position is used as the previous QRS wave, and the QRS wave corresponding to the first detection position after the currently selected first detection position is used as the next QRS wave, and then the midpoint position of the current QRS wave and the previous QRS wave is used as the starting position of the segmentation area, and the starting position is recorded as the second starting position. The midpoint position of the current QRS wave and the next QRS wave is used as the end position of the segmentation area, and the end position is recorded as the second end position. The second starting position and the second end position are calculated by the first detection position of each QRS wave. It can be understood that the segmentation area includes at least the complete current QRS wave and the P wave and T wave adjacent to the current QRS wave.

[0172] Optionally, if the segmented region constructed based on the first detection position exceeds the target electrocardiogram characteristic graph, processing of the segmented region is abandoned.

[0173] Step 2012: input the segmented area into the third convolution module to obtain the characteristic wave type to which each feature point in the segmented area belongs.

[0174] Exemplarily, the third convolution module is used to identify each feature point in the segmented area to output the probability value of each feature point belonging to each feature wave type. Optionally, the probability value of each feature point belonging to each feature wave type is shown in an image, and the image is recorded as a feature wave type probability map. In an embodiment, the third convolution module is composed of a convolution kernel with a size of 1 and a channel number of 4 (representing that the feature point belongs to a non-feature wave type, a P wave type, a QRS wave type, or a T wave type, respectively), and the convolution kernel can implement convolution and softmax functions. Fig.16 The processing flow diagram of the third convolution module provided in the embodiment of the present application is shown in FIG. Fig.16 ,The convolution kernel of the third convolution module performs convolution and softmax function on the segmented area to output the probability value of each feature point belonging to each feature wave type. After that, the feature wave type to which the maximum probability value corresponding to each feature point belongs is selected. Fig.17The characteristic wave type identification schematic diagram provided in the embodiment of the present application shows the characteristic wave type with the largest probability value of each characteristic point. In the vertical axis, 0.0 represents a non-characteristic wave, 1.0 represents a P wave, 2.0 represents a QRS wave, and 3.0 represents a T wave. The position of each characteristic wave in the lead ECG signal can be clearly determined according to the characteristic wave type to which each characteristic point belongs. For example, Fig.18 The first characteristic wave schematic diagram provided in the embodiment of the present application is based on Fig.17 The recognition result of the characteristic wave type is the characteristic wave identified in a lead ECG signal, where the characteristic waves include P wave, QRS wave, T wave, and non-characteristic waves (other waves except P wave, QRS wave and T wave). Non-characteristic waves have no analytical significance. Fig.19 A second characteristic wave schematic diagram provided in the embodiment of the present application is based on Fig.17 The recognition result of the characteristic wave type is the characteristic wave identified in another lead ECG signal, where the characteristic waves include P wave, QRS wave, T wave, and non-characteristic waves.

[0175] The process of obtaining the characteristic wave according to the first detection position can be regarded as the process of heart beat segmentation, that is, the characteristic wave of each heart beat can be segmented from the lead electrocardiogram signal.

[0176] Step 2013: According to the characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, continuous characteristic points belonging to the same characteristic wave are obtained in the target ECG characteristic graph.

[0177] Exemplarily, since the characteristic wave type to which each characteristic point belongs in the target ECG characteristic graph has been determined, in this step, continuous characteristic points belonging to the same characteristic wave can be obtained in the target ECG characteristic graph according to the characteristic wave type. It can be understood that the corresponding characteristic wave can be obtained in the lead ECG signal according to the continuous characteristic points.

[0178] Step 2014: obtain multiple connected regions based on the continuous feature points, each connected region corresponds to a feature wave.

[0179] A connected region refers to a region containing a characteristic wave, wherein the connected regions representing the P wave, QRS wave, and T wave can form a region where a heartbeat is located. Exemplarily, the continuous feature points corresponding to the P wave are taken as a connected region, the continuous feature points corresponding to the QRS wave are taken as a connected region, and the continuous feature points corresponding to the T wave are taken as a connected region. At this time, several segments of connected regions can be obtained in the target ECG characteristic graph.

[0180] Step 2015: among the connected regions, retain the connected regions that meet the screening condition, where the screening condition is that the length of the connected region meets the set length and the connected region is within the corresponding set position range.

[0181] Exemplarily, the connected regions are screened to filter out the misdetected connected regions. Among them, the misdetected connected regions are identified by setting the screening conditions. In one embodiment, the screening condition is that the length of the connected region meets the set length and the connected region is within the corresponding set position range. The set length refers to the length of the characteristic wave under normal circumstances. In the embodiment, the set length refers to the length greater than or equal to 0.02s and less than or equal to 0.5s. If the length of the connected region is less than 0.02s or greater than 0.5s, it is considered that it may be misdetected. The set position range refers to the position range where the P wave, QRS wave or T wave should appear in the heartbeat under normal circumstances, wherein the P wave, QRS wave and T wave correspond to a set position range respectively, and each set position range can be set according to the actual situation. For example, the set position range of the P wave is from the first 0.3s to the first 0.15s of the heartbeat, the set position range of the QRS wave is from the first 0.15s to the last 0.15s of the heartbeat, and the set position range of the T wave is from the last 0.15s to the last 0.5s of the heartbeat. If one or more of the connected areas constituting a heartbeat are not within the corresponding set position range, it is considered that one or more connected areas may be misdetected. In the embodiment, when the connected area is not within the set position range or does not meet the set length, it is determined to be a misdetection and the connected area is deleted, that is, the corresponding ECG signal is deleted from the lead ECG signal; otherwise, it is determined that the screening condition is met and the connected area is retained.

[0182] Step 2016: adjust the second detection position according to the retained connected area to obtain a third detection position of each heart beat reference point in the lead ECG signal.

[0183] Exemplarily, in the retained connected area, the second detection position is adjusted according to the position of each heartbeat reference point in the connected area to obtain the third detection position. At this time, this step specifically includes steps 20161 to 20164:

[0184] Step 20161: Determine a fourth detection position of the heartbeat reference point based on the third starting position and the third end position of the connected area.

[0185] It can be understood that the characteristic wave type to which each characteristic point in the connected area belongs is clear, that is, the positions of the P wave, QRS wave and T wave represented by the connected area are clear, therefore, the position of each heart beat reference point can be clearly defined in the connected area. In the embodiment, the position of the heart beat reference point defined by the connected area is recorded as the fourth detection position. For example, the position corresponding to the first characteristic point in the connected area representing the P wave is the fourth detection position of the starting point of the P wave, the position corresponding to the last characteristic point in the connected area is the fourth detection position of the end point of the P wave, and so on.

[0186] Step 20162: Determine the position error between the fourth detection position and the second detection position of the same heartbeat reference point.

[0187] Exemplarily, the absolute value of the difference between the fourth detection position and the second detection position of the same heart beat reference point is calculated and recorded as a position error, wherein the position error can reflect the position difference between the heart beat reference point obtained by heart beat reference point detection and the heart beat reference point obtained by heart beat segmentation.

[0188] Each heartbeat reference point corresponds to an error threshold, which can be set according to actual conditions, such as the error thresholds corresponding to the P wave starting point, QRS wave starting point, P wave end point, and QRS wave end point are all 0.1s, and the error threshold corresponding to the T wave end point is 0.2s. The position error of the heartbeat reference point is compared with the corresponding error threshold. If it is less than the error threshold, step 20163 is executed. If it is greater than or equal to the error threshold, step 20164 is executed.

[0189] Step 20163: If the position error is less than the corresponding error threshold, the fourth detection position is used as the third detection position of the heartbeat reference point, and each heartbeat reference point corresponds to an error threshold.

[0190] It should be noted that the fourth detection position is obtained by identifying the feature points one by one. If the feature points are accurately identified, the fourth detection position will be very close to or the same as the second detection position, and the accuracy of the fourth detection position is higher than the accuracy of the second detection position. Therefore, if the position error is less than the error threshold, it is considered that the second detection position and the fourth detection position are relatively close, and then the fourth detection position is determined to be relatively accurate. Therefore, the fourth detection position is used as the final third detection position corresponding to the heartbeat reference point.

[0191] Step 20164: If the position error is greater than or equal to the corresponding error threshold, the second detection position is used as the third detection position of the heartbeat reference point.

[0192] If the position error is greater than or equal to the error threshold, it is considered that the second detection position and the fourth detection position are not too close, and then the fourth detection position is determined to be inaccurate. Therefore, the second detection position is used as the final third detection position corresponding to the heartbeat reference point.

[0193] It can be understood that the third detection position is obtained based on the target ECG characteristic diagram, and the position of each heartbeat reference point in the lead ECG signal can be obtained according to the mapping relationship between the target ECG characteristic diagram and the ECG signal.

[0194] For example, Fig. 20The first schematic diagram of the heartbeat reference point detection result provided in the embodiment of the present application is the heartbeat reference point detection result obtained after performing the above steps on a lead ECG signal, wherein the dotted frame 11 and the dotted frame 12 are the heartbeat area and the QRS wave area identified in step 209, respectively, and the line segments 13 to 17 respectively represent the fourth detection positions of the P wave starting point, the P wave end point, the QRS wave starting point, the QRS wave end point and the T wave end point, and the triangles 18 to 22 are the third detection positions of the P wave starting point, the P wave end point, the QRS wave starting point, the QRS wave end point and the T wave end point, respectively. Fig. 20 It can be seen that the QRS wave starting point, the QRS wave end point and the T wave end point all use the fourth detection position as the third detection position, and the remaining reference points use the second detection position as the third detection position. Fig.21 A second schematic diagram of the heartbeat reference point detection result provided in an embodiment of the present application is a heartbeat reference point detection result obtained after performing the above steps on another lead ECG signal, wherein dotted frame 14 and dotted frame 15 are respectively the heartbeat region and QRS wave region identified in step 209, line segments 16 to 20 respectively represent the fourth detection positions of the P wave starting point, the P wave end point, the QRS wave starting point, the QRS wave end point and the T wave end point, and triangles 21 to 25 are respectively the third detection positions of the P wave starting point, the P wave end point, the QRS wave starting point, the QRS wave end point and the T wave end point obtained in the end, Fig.21 It can be seen that the QRS wave starting point, the QRS wave end point and the T wave end point all use the fourth detection position as the third detection position, and the remaining reference points use the second detection position as the third detection position.

[0195] As mentioned above, by collecting at least one lead ECG signal and performing noise reduction filtering on the lead ECG signal, the noise in the lead ECG signal can be reduced and the signal-to-noise ratio of the lead ECG signal can be improved. Afterwards, the lead ECG signal that meets the quality requirements can be selected, and the high-quality lead ECG signal can be used when determining the first detection position of the QRS wave, thereby ensuring the accuracy of the first detection position. Afterwards, the fourth convolution module is used to obtain multiple ECG feature maps, which can enhance the ECG features, and the fourth convolution module has a simple structure and a fast processing speed. Afterwards, the probability value of each feature point belonging to the QRS wave is determined according to the ECG feature map, and the first detection position of each QRS wave is obtained based on non-maximum suppression, which can ensure the accuracy of the first detection position, and the implementation method is simple. Afterwards, the heartbeat area and QRS wave area are obtained according to the first detection position, and then the second detection position of the heartbeat reference point is obtained, and the position of each characteristic wave in the target lead ECG signal is determined according to the first detection position, and then the fourth detection position of the heartbeat reference point is obtained based on the characteristic wave. Afterwards, the third detection position of the ECG reference point can be obtained by combining the second detection position and the fourth detection position, which can further improve the accuracy of heartbeat reference point detection and, at the same time, improve the detection robustness.

[0196] Fig. 22 A schematic diagram of a heartbeat reference point detection device provided in an embodiment of the present application is provided. Fig. 22 The heartbeat reference point detection device includes a signal acquisition module 301, a feature extraction module 302, a probability determination module 303, a heartbeat determination module 304 and a position determination module 305.

[0197] Among them, the signal acquisition module 301 is used to acquire at least one lead ECG signal; the feature extraction module 302 is used to extract the ECG features of the lead ECG signal to obtain an ECG feature graph, and one lead ECG signal obtains multiple ECG feature graphs, and the length of each ECG feature graph is different; the probability determination module 303 is used to obtain a heartbeat probability graph based on each ECG feature graph, and the heartbeat probability graph shows the first detection position of the QRS wave in the lead ECG signal, and each first detection position is determined by the corresponding ECG feature graph; the heartbeat determination module 304 is used to determine the second detection position of the heartbeat reference point in the target ECG feature graph based on the first detection position, and determine the characteristic wave type to which each characteristic point in the target ECG feature graph belongs, and the target ECG feature graph is the ECG feature graph corresponding to the first detection position; the position determination module is used to determine the third detection position of the heartbeat reference point of the lead ECG signal based on the characteristic wave type to which each characteristic point belongs and the second detection position.

[0198] On the basis of the above embodiment, the probability determination module 303 includes: a first alternative determination unit, which is used to input each ECG characteristic graph into the first convolution module respectively, so as to obtain the first alternative heart beat probability graph corresponding to each ECG characteristic graph respectively, the first alternative heart beat probability graph includes multiple probability points, and each probability point represents the probability value of the corresponding position belonging to the QRS wave; a second alternative determination unit, which is used to summarize the probability points in each first alternative heart beat probability graph to obtain the second alternative heart beat probability graph; a suppression unit, which is used to perform non-maximum suppression on each probability point in the second alternative heart beat probability graph, and use the second alternative heart beat probability graph after non-maximum suppression as the heart beat probability graph, and use the position corresponding to the probability point retained in the heart beat probability graph as the first detection position of the QRS wave in the lead ECG signal.

[0199] On the basis of the above embodiment, the suppression unit includes: a first retention subunit, which is used to retain probability points whose probability values ​​are greater than a probability threshold in the second candidate heart beat probability map; a sorting subunit, which is used to sort the retained probability points in descending order of probability values ​​to obtain a check list; a first probability point acquisition subunit, which is used to obtain the first probability point in the current check list; a non-maximum value determination subunit, which is used to use the probability point in the second candidate heart beat probability map whose distance from the first probability point is less than the distance threshold as a non-maximum value probability point; a deletion subunit, which is used to delete the non-maximum value probability point in the second candidate heart beat probability map, and delete the first probability point and the non-maximum value probability point in the check list; a return subunit, which is used to return to execute the operation of obtaining the first probability point in the current check list until the check list is empty, and use the second candidate heart beat probability map after non-maximum value suppression as the heart beat probability map, and use the position corresponding to the probability point retained in the heart beat probability map as the first detection position of the QRS wave in the lead ECG signal.

[0200] On the basis of the above-mentioned embodiment, the heartbeat determination module 304 includes: a detection area acquisition unit, which is used to acquire a reference point detection area in the target electrocardiogram corresponding to the first detection position, the reference point detection area including a heartbeat detection area and a QRS wave detection area, and the midpoint positions of the heartbeat detection area and the QRS wave detection area are both the first detection position; an offset determination unit, which is used to input the reference point detection area into the second convolution module to obtain the offset of the midpoint position of the actual area of ​​the reference point relative to the first detection position and the area width of the actual area of ​​the reference point, the actual area of ​​the reference point including a heartbeat area corresponding to the heartbeat detection area and a QRS wave area corresponding to the QRS wave detection area; a first position determination unit, which is used to determine the reference point detection area according to the first detection position; The first detection position, offset and area width determine the first starting position and the first end position of the actual area of ​​the reference point; the second position determination unit is used to obtain the second detection position of the heartbeat reference point in the target ECG characteristic map according to the first starting position and the first end position; the segmentation area setting unit is used to set the segmentation area in the target ECG characteristic map corresponding to the first detection position, the second starting position of the segmentation area is the midpoint position of the current QRS wave and the previous QRS wave corresponding to the first detection position, and the second end position of the segmentation area is the midpoint position of the current QRS wave and the next QRS wave; the waveform determination unit is used to input the segmentation area into the third convolution module to obtain the characteristic wave type to which each feature point in the segmentation area belongs.

[0201] Based on the above embodiment, the second position determination unit is specifically: using the first starting point position of the heartbeat area as the second detection position of the P wave starting point in the target ECG characteristic map, using the first end point position of the heartbeat area as the second detection position of the T wave end point in the target ECG characteristic map, using the first starting point position of the QRS wave area as the second detection position of the QRS wave starting point in the target ECG characteristic map, using the first end point position of the QRS wave area as the second detection position of the QRS wave end point in the target ECG characteristic map, and using half of the sum of the second detection positions of the P wave starting point and the QRS wave starting point as the second detection position of the P wave end point in the target ECG characteristic map.

[0202] On the basis of the above embodiment, the position determination module 305 includes: a continuous feature acquisition unit, which is used to obtain continuous feature points belonging to the same feature wave in the target ECG feature map according to the feature wave type to which each feature point in the target ECG feature map belongs; a connected area determination unit, which is used to obtain multiple connected areas based on the continuous feature points, each connected area corresponding to a feature wave; an area screening unit, which is used to retain the connected areas that meet the screening conditions in each connected area, and the screening conditions are that the length of the connected area meets the set length and the connected area is within the corresponding set position range; a position adjustment unit, which is used to adjust the second detection position according to the retained connected area to obtain the third detection position of the center beat reference point of the lead ECG signal.

[0203] On the basis of the above embodiment, the position adjustment unit includes: a third position determination subunit, used to determine the fourth detection position of the heart beat reference point according to the third starting position and the third end position of the connected area; an error determination subunit, used to determine the position error between the fourth detection position and the second detection position of the same heart beat reference point; a fourth position determination subunit, used to use the fourth detection position as the third detection position of the heart beat reference point if the position error is less than the corresponding error threshold, and each heart beat reference point corresponds to an error threshold; a fifth position determination subunit, used to use the second detection position as the third detection position of the heart beat reference point if the position error is greater than or equal to the corresponding error threshold.

[0204] On the basis of the above embodiment, the feature extraction module 302 is specifically used to: input the lead ECG signal into the pre-constructed fourth convolution module, and obtain a plurality of ECG feature graphs output by the fourth convolution module.

[0205] Based on the above embodiment, the signal acquisition module includes: an acquisition unit, which is used to acquire at least one lead ECG signal; a noise reduction unit, which is used to perform noise reduction filtering on the lead ECG signal and obtain the lead ECG signal that meets the quality requirements, and the number of lead ECG signals that meet the quality requirements is the target number.

[0206] On the basis of the above embodiment, the noise reduction unit includes: a slope calculation subunit, which is used to calculate the slope between each adjacent sample point in the lead ECG signal; a slope replacement subunit, which is used to replace the slope with the slope threshold when the slope is higher than the slope threshold to obtain a new slope; a slope addition subunit, which is used to add each sample point to each slope in turn to obtain a lead ECG signal with a suppressed slope; a baseline determination subunit, which is used to input the lead ECG signal with a suppressed slope into a mean filter to obtain a baseline of the lead ECG signal with a suppressed slope; and a first filtering subunit, which is used to input the baseline into a first low-pass filter to perform a low-pass filtering on the baseline. wave; a baseline removal subunit, used to subtract the baseline from the lead ECG signal with suppressed slope to obtain the lead ECG signal with baseline drift filtered out; a second filtering subunit, used to input the lead ECG signal with baseline drift filtered out to the second low-pass filter to obtain the lead ECG signal with high-frequency noise filtered out; a standardization subunit, used to calculate the average value and standard deviation of the lead ECG signal with high-frequency noise filtered out, and standardize the lead ECG signal with high-frequency noise filtered out according to the average value and standard deviation; a signal selection subunit, used to obtain the lead ECG signal that meets the quality requirements, and the number of lead ECG signals that meet the quality requirements is the target number.

[0207] On the basis of the above embodiment, the target number is two, the lead ECG signal is a single-lead ECG signal, and the signal selection subunit includes: a first energy calculation subunit, which is used to calculate the first energy of the single-lead ECG signal in a set frequency band and the second energy of all frequency bands; a first copy subunit, which is used to copy the single-lead ECG signal if the first ratio between the first energy and the second energy reaches a first ratio threshold, and use the two single-lead ECG signals as lead ECG signals that meet quality requirements; the lead ECG signal is a multi-lead ECG signal, and the signal selection subunit includes: a second energy calculation subunit, which is used to calculate the third energy of each lead ECG signal in the multi-lead ECG signal in the set frequency band and the fourth energy of all frequency bands; the target selection subunit, Used to select a target lead ECG signal from multiple lead ECG signals, where the second ratio of the third energy to the fourth energy of the target lead ECG signal reaches a second ratio threshold; a second copying subunit, used to copy the target lead ECG signal if there is only one target lead ECG signal, and use the two target lead ECG signals as lead ECG signals that meet quality requirements; a ratio determination subunit, used to determine the third ratio of the third energy between two target lead ECG signals with adjacent priorities according to a pre-set lead priority order if there are multiple target lead ECG signals; a selection subunit, used to select two target lead ECG signals as lead ECG signals that meet quality requirements based on a comparison result of the third ratio and the third ratio threshold.

[0208] The heartbeat reference point detection device provided above can be used to execute the heartbeat reference point detection method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0209] It is worth noting that in the embodiment of the above-mentioned heart beat reference point detection device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0210] Fig.23 A schematic diagram of the structure of a heartbeat reference point detection device provided in an embodiment of the present application. Fig.23 As shown, the heartbeat reference point detection device includes a processor 40, a memory 41, an input device 42, and an output device 43; the number of the processor 40 in the heartbeat reference point detection device can be one or more. Fig.23 A processor 40 is taken as an example. The processor 40, the memory 41, the input device 42, and the output device 43 in the heartbeat reference point detection device can be connected via a bus or other means. Fig.23 The example of connecting through bus is taken in the following.

[0211] The memory 41, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the heartbeat reference point detection method in the embodiment of the present application (for example, the signal acquisition module, feature extraction module, probability determination module, heartbeat determination module and position determination module in the heartbeat reference point detection device). The processor 40 executes various functional applications and data processing of the heartbeat reference point detection device by running the software programs, instructions and modules stored in the memory 41, that is, realizes the above-mentioned heartbeat reference point detection method.

[0212] The memory 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the heart beat reference point detection device, etc. In addition, the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the heart beat reference point detection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0213] The input device 42 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the heartbeat reference point detection device, and can also include devices required by each lead when collecting ECG. The output device 43 can include display devices such as a display screen.

[0214] The above-mentioned heart beat reference point detection device includes a heart beat reference point detection device, which can be used to execute any heart beat reference point detection method and has corresponding functions and beneficial effects.

[0215] In addition, an embodiment of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform relevant operations in the heart beat reference point detection method provided in any embodiment of the present application, and have corresponding functions and beneficial effects.

[0216] Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products.

[0217] Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0218] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0219] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0220] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0221] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A heartbeat reference point detection method, characterized in that: include: Acquire at least one lead ECG signal; Extracting the ECG features of the lead ECG signal to obtain an ECG feature graph, wherein a plurality of ECG feature graphs are obtained from one lead ECG signal, and each of the ECG feature graphs has a different length; Obtaining a heartbeat probability map according to each of the electrocardiogram characteristic maps, wherein the heartbeat probability map shows a first detection position of a QRS wave in the lead electrocardiogram signal, and each of the first detection positions is determined by a corresponding electrocardiogram characteristic map; Determine a second detection position of a heartbeat reference point in a target ECG characteristic graph according to the first detection position, and determine a characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, the target ECG characteristic graph being the ECG characteristic graph corresponding to the first detection position; Determine a third detection position of the heartbeat reference point in the lead ECG signal according to the characteristic wave type to which each characteristic point belongs and the second detection position; The step of determining the third detection position of the heartbeat reference point in the lead ECG signal according to the characteristic wave type to which each characteristic point belongs and the second detection position comprises: According to the characteristic wave type to which each characteristic point in the target electrocardiogram characteristic graph belongs, acquiring continuous characteristic points belonging to the same characteristic wave in the target electrocardiogram characteristic graph; Obtaining a plurality of connected regions according to the continuous feature points, each of the connected regions corresponding to a feature wave; In each of the connected areas, a connected area that meets a screening condition is retained, wherein the screening condition is that the length of the connected area meets a set length and the connected area is within a corresponding set position range; The second detection position is adjusted according to the retained connected area to obtain a third detection position of the heartbeat reference point in the lead electrocardiogram signal.

2. The heartbeat reference point detection method according to claim 1, characterized in that: The heart rate probability map obtained according to each of the electrocardiogram characteristic maps includes: Input each of the electrocardiogram characteristic graphs into the first convolution module to obtain a first candidate heartbeat probability graph corresponding to each of the electrocardiogram characteristic graphs, wherein the first candidate heartbeat probability graph comprises a plurality of probability points, and each of the probability points represents a probability value that a corresponding position belongs to a QRS wave; Summarizing the probability points in each of the first candidate heart beat probability maps to obtain a second candidate heart beat probability map; Non-maximum suppression is performed on each probability point in the second candidate heart beat probability map, and the second candidate heart beat probability map after non-maximum suppression is used as the heart beat probability map, and the position corresponding to the probability point retained in the heart beat probability map is used as the first detection position of the QRS wave in the lead ECG signal.

3. The heartbeat reference point detection method according to claim 2, characterized in that: Performing non-maximum suppression on each probability point in the second candidate heartbeat probability map includes: In the second candidate heartbeat probability map, retaining probability points whose probability values ​​are greater than the probability threshold; Sort the retained probability points in descending order of probability value to obtain a check list; Get the first probability point in the current check list; The probability point in the second candidate heartbeat probability map whose distance from the first probability point is less than a distance threshold is used as a non-maximum probability point; Deleting the non-maximum probability point in the second candidate heart beat probability map, and deleting the first probability point and the non-maximum probability point in the inspection list; Return to execute the operation of obtaining the first probability point in the current check list until the check list is empty.

4. The heartbeat reference point detection method according to claim 1, characterized in that: Determining a second detection position of the heartbeat reference point on the target electrocardiogram characteristic graph according to the first detection position includes: In the target electrocardiogram corresponding to the first detection position, a reference point detection area is obtained, wherein the reference point detection area includes a heart beat detection area and a QRS wave detection area, and the midpoint positions of the heart beat detection area and the QRS wave detection area are both the first detection position; Inputting the reference point detection area into a second convolution module to obtain an offset of a midpoint position of an actual reference point area relative to the first detection position and an area width of the actual reference point area, wherein the actual reference point area includes a heart beat area corresponding to the heart beat detection area and a QRS wave area corresponding to the QRS wave detection area; Determine a first starting point position and a first ending point position of the actual area of ​​the reference point according to the first detection position, the offset and the area width; A second detection position of the heartbeat reference point in the target electrocardiogram characteristic graph is obtained according to the first starting point position and the first end point position.

5. The heartbeat reference point detection method according to claim 4, characterized in that: Obtaining a second detection position of the heartbeat reference point in the target electrocardiogram characteristic graph according to the first starting point position and the first end point position includes: The first starting point position of the heartbeat area is used as the second detection position of the P wave starting point in the target ECG characteristic map, the first ending point position of the heartbeat area is used as the second detection position of the T wave ending point in the target ECG characteristic map, the first starting point position of the QRS wave area is used as the second detection position of the QRS wave starting point in the target ECG characteristic map, the first ending point position of the QRS wave area is used as the second detection position of the QRS wave ending point in the target ECG characteristic map, and half of the sum of the P wave starting point and the second detection position of the QRS wave starting point is used as the second detection position of the P wave ending point in the target ECG characteristic map.

6. The heartbeat reference point detection method according to claim 1, characterized in that: Determining the characteristic wave type to which each characteristic point in the target electrocardiogram characteristic graph belongs according to the first detection position includes: In the target electrocardiogram corresponding to the first detection position, a segmentation area is set, wherein the second starting point of the segmentation area is the midpoint between the current QRS wave and the previous QRS wave corresponding to the first detection position, and the second end point of the segmentation area is the midpoint between the current QRS wave and the next QRS wave; The segmented area is input into a third convolution module to obtain the characteristic wave type to which each characteristic point in the segmented area belongs.

7. The heartbeat reference point detection method according to claim 1, characterized in that: Adjusting the second detection position according to the retained connected area to obtain a third detection position of the heartbeat reference point in the lead electrocardiogram signal includes: Determining a fourth detection position of the heartbeat reference point according to a third starting point position and a third end point position of the connected area; determining a position error between the fourth detection position and the second detection position of the same heartbeat reference point; If the position error is less than the corresponding error threshold, the fourth detection position is used as the third detection position of the heartbeat reference point, and each heartbeat reference point corresponds to an error threshold; If the position error is greater than or equal to the corresponding error threshold, the second detected position is used as the third detected position of the heartbeat reference point.

8. The heartbeat reference point detection method according to claim 1, characterized in that: Extracting the ECG features of the lead ECG signals to obtain an ECG feature graph includes: The lead ECG signal is input into a pre-constructed fourth convolution module, and a plurality of ECG characteristic graphs output by the fourth convolution module are obtained.

9. The heartbeat reference point detection method according to claim 1, characterized in that: Acquiring at least one lead ECG signal includes: Collecting at least one lead ECG signal; The lead ECG signals are subjected to noise reduction filtering to obtain lead ECG signals that meet quality requirements, wherein the number of lead ECG signals that meet quality requirements is a target number.

10. The heartbeat reference point detection method according to claim 9, characterized in that: The noise reduction filtering of the lead ECG signal includes: Calculating the slope between adjacent sample points in the lead ECG signal; When the slope is higher than a slope threshold, replacing the slope with the slope threshold to obtain a new slope; Sequentially adding each of the sample points to each of the slopes to obtain a lead ECG signal with a suppressed slope; Inputting the slope-suppressed lead ECG signal into a mean filter to obtain a baseline of the slope-suppressed lead ECG signal; Inputting the baseline into a first low-pass filter to perform low-pass filtering on the baseline; Subtracting the baseline from the slope-suppressed lead ECG signal to obtain a lead ECG signal with baseline drift filtered out; Inputting the lead ECG signal with baseline drift removed into a second low-pass filter to obtain a lead ECG signal with high-frequency noise removed; The mean value and standard deviation of the lead ECG signal from which the high-frequency noise is filtered out are calculated, and the lead ECG signal from which the high-frequency noise is filtered out is standardized according to the mean value and the standard deviation.

11. The heartbeat reference point detection method according to claim 9, characterized in that: The target number is two. The lead ECG signal is a single-lead ECG signal, and the lead ECG signal that meets the quality requirements includes: Calculate the first energy of a single-lead ECG signal in a set frequency band and the second energy of all frequency bands; If a first ratio of the first energy to the second energy reaches a first ratio threshold, duplicating the single-lead ECG signal, and using the two single-lead ECG signals as lead ECG signals that meet quality requirements; The lead ECG signal is a multi-lead ECG signal, and the lead ECG signal that meets the quality requirements includes: Calculating the third energy of each lead ECG signal in the multi-lead ECG signal in a set frequency band and the fourth energy of all frequency bands; Selecting a target lead ECG signal from the multi-lead ECG signals, wherein a second ratio of the third energy to the fourth energy of the target lead ECG signal reaches a second ratio threshold; If there is one target lead ECG signal, copy the target lead ECG signal, and use the two target lead ECG signals as lead ECG signals that meet the quality requirements; If there are multiple target lead ECG signals, determining a third ratio of the third energies between two target lead ECG signals with adjacent priorities according to a preset lead priority order; According to the comparison result between the third ratio and the third ratio threshold, two target lead ECG signals are selected as lead ECG signals that meet the quality requirement.

12. A heartbeat reference point detection device, characterized in that: include: A signal acquisition module, used to acquire at least one lead ECG signal; A feature extraction module is used to extract the ECG features of the lead ECG signal to obtain an ECG feature graph, wherein a plurality of ECG feature graphs are obtained from one lead ECG signal, and each ECG feature graph has a different length; A probability determination module, used for obtaining a heartbeat probability map according to each of the electrocardiogram characteristic maps, wherein the heartbeat probability map shows a first detection position of a QRS wave in the lead electrocardiogram signal, and each of the first detection positions is determined by a corresponding electrocardiogram characteristic map; a heartbeat determination module, configured to determine a second detection position of a heartbeat reference point in a target ECG characteristic graph according to the first detection position, and to determine a characteristic wave type to which each characteristic point in the target ECG characteristic graph belongs, wherein the target ECG characteristic graph is an ECG characteristic graph corresponding to the first detection position; a position determination module, configured to determine a third detection position of the heartbeat reference point in the lead ECG signal according to the characteristic wave type to which each characteristic point belongs and the second detection position; The position determination module includes: a continuous feature acquisition unit, which is used to acquire continuous feature points belonging to the same feature wave in the target ECG feature map according to the feature wave type to which each feature point in the target ECG feature map belongs; a connected area determination unit, which is used to obtain multiple connected areas according to the continuous feature points, each connected area corresponding to a feature wave; The area screening unit is used to retain the connected areas that meet the screening conditions in each connected area, and the screening conditions are that the length of the connected area meets the set length and the connected area is within the corresponding set position range; the position adjustment unit is used to adjust the second detection position according to the retained connected area to obtain the third detection position of the center beat reference point of the lead electrocardiogram signal.

13. A heartbeat reference point detection device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the heartbeat reference point detection method as described in any one of claims 1-11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the heartbeat reference point detection method as described in any one of claims 1-11 is implemented.