Electrocardio data R-wave detection method and device, electronic equipment and storage medium

By calculating the noise coefficient of R waves in the electrocardiogram data and combining with multi-channel data verification, the problem of low accuracy of R wave position detection in the prior art is solved, and higher detection accuracy is achieved.

CN120131030AActive Publication Date: 2025-06-13WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311706148.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2025-06-13
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

The prior art detects the R-wave position in the electrocardiogram data with low accuracy and is susceptible to interference from external factors such as instruments and body movements.

Method used

By obtaining multi-channel ECG data at multiple sampling points, the noise coefficient of each R wave is calculated, the R wave with a greater degree of interference is eliminated, and the R wave position is verified in combination with multi-channel data to determine whether there is an R wave at the sampling point.

Benefits of technology

The accuracy of R-wave position detection is improved and false detection caused by external interference is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120131030A_ABST
    Figure CN120131030A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and provides an R-wave detection method and device for electrocardiogram data, electronic equipment and a storage medium. The method comprises the following steps: acquiring original electrocardio data, wherein the original electrocardio data comprises electrocardio data of a plurality of channels corresponding to each sampling point acquired under a plurality of sampling points; respectively calculating a noise coefficient of each R wave in the electrocardiogram data of the plurality of channels; aiming at each sampling point, if the electrocardiogram data of at least one channel in the electrocardiogram data of the plurality of channels corresponding to the sampling point has R waves with noise coefficients meeting preset conditions; if the at least one channel exists in the plurality of channels and the ratio of the number of target channels in other channels except the at least one channel to the number of the plurality of channels is greater than a first threshold value, determining that R waves exist in the position of the sampling point; wherein the electrocardiogram data of the target channel has an R wave with a noise coefficient meeting a preset condition in a time range determined according to the sampling point. By adopting the method, the accuracy of R-wave position detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and particularly to a method, apparatus, electronic device, and storage medium for detecting R waves in electrocardiogram data. Background Art

[0002] In the field of electrocardiogram data analysis, the QRS complex is the main feature of the signal, which reflects the depolarization process of the left and right ventricles. In the detection of the QRS complex, the detection of the R wave position is the key to calculating parameters such as heart rate and ST segment. Therefore, accurately detecting the R wave position is of great significance. The R wave is the wave with the largest peak in the QRS complex, and it has characteristics such as large amplitude, fast change, and short waveform duration. Currently, the differential threshold method is usually used to detect the positions of each R wave in the electrocardiogram data. However, since the electrocardiogram signal is a weak biological signal and is easily interfered by external factors such as instruments and body movements during acquisition, this will lead to a decrease in the accuracy of the obtained R wave position detection results. Summary of the Invention

[0003] In view of this, the embodiments of this application provide a method, apparatus, electronic device, and storage medium for detecting R waves in electrocardiogram data, which can improve the accuracy of R wave position detection.

[0004] The first aspect of the embodiments of this application provides a method for detecting R waves in electrocardiogram data, including:

[0005] Obtain original electrocardiogram data, where the original electrocardiogram data includes electrocardiogram data of multiple channels corresponding to each sampling point collected at multiple sampling points;

[0006] Calculate the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, and the noise coefficient is used to represent the degree of signal interference received by the corresponding R wave;

[0007] For each sampling point, if there is at least one channel of electrocardiogram data among the electrocardiogram data of multiple channels corresponding to this sampling point that has an R wave with a noise coefficient satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel in the multiple channels to the number of the multiple channels is greater than a first threshold, then determine that there is an R wave at the position of this sampling point; where the electrocardiogram data of the target channel has an R wave with a noise coefficient satisfying the preset condition within the time range determined according to this sampling point.

[0008] In the embodiment of the present application, first, multiple-channel electrocardiogram data corresponding to each sampling point collected at multiple sampling points are obtained. Then, the noise coefficient of each R wave in the electrocardiogram data of multiple channels is calculated respectively. This noise coefficient can reflect the degree of interference received by the R wave. Finally, each sampling point is traversed to detect whether there is an R wave at the position of each sampling point. Among them, when traversing the sampling points, if it is detected that there is at least one channel of electrocardiogram data among the electrocardiogram data of multiple channels corresponding to a certain sampling point that has an R wave with a noise coefficient satisfying a preset condition, it means that at least one channel has detected an R wave with a relatively small degree of interference. Then, it is further detected whether the electrocardiogram data of other channels in multiple channels also have an R waves with a noise coefficient satisfying the preset condition within a nearby time range determined according to this sampling point. The channels where R waves are detected are called target channels. If the ratio of the number of target channels to the number of multiple channels is greater than a first threshold, it means that a sufficient number of channels have detected R waves with a relatively small degree of interference within the time range near this sampling point. At this time, it can be determined that there is an R wave at the position of this sampling point. The above process uses the noise coefficient to eliminate the detected R waves with a relatively large degree of interference, and combines the multi-channel electrocardiogram data to verify the position of the R wave, which can improve the accuracy of R wave position detection to a certain extent.

[0009] In one implementation manner of the embodiment of the present application, calculating the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively includes:

[0010] Obtain the pre-analysis R wave position detection result; wherein, the pre-analysis R wave position detection result is obtained by detecting the R wave position of the preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0011] According to each R wave vertex in the pre-analysis R wave position detection result, respectively construct each time segment corresponding one-to-one to each R wave vertex;

[0012] For each time segment, according to the signal change characteristics of the electrocardiogram data of each channel within this time segment, calculate the noise coefficient of the R wave of the electrocardiogram data of each channel within this time segment respectively.

[0013] In one implementation manner of the embodiment of the present application, calculating the noise coefficient of the R wave of the electrocardiogram data of each channel within this time segment according to the signal change characteristics of the electrocardiogram data of each channel within this time segment respectively includes:

[0014] For each channel, calculate the absolute value obtained by performing differential processing on multiple signal values of the electrocardiogram data of this channel within this time segment; find the integral of the absolute value within this time segment and calculate the mean value of the integral as the noise coefficient of the R wave of the electrocardiogram data of this channel within this time segment.

[0015] In one implementation of the embodiment of the present application, after calculating the noise factor of each R wave in the electrocardiogram data of multiple channels respectively, for each sampling point, if there is at least one channel in the electrocardiogram data of the multiple channels corresponding to this sampling point whose R wave has a noise factor satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than a first threshold, before determining that there is an R wave at the position of this sampling point, the method further includes:

[0016] According to the noise factor of each R wave in the electrocardiogram data of multiple channels, calculate the noise level value of each channel respectively;

[0017] Remove the electrocardiogram data of a set number of channels with the highest noise level values among the multiple channels.

[0018] In one implementation of the embodiment of the present application, calculating the noise level value of each channel respectively according to the noise factor of each R wave in the electrocardiogram data of multiple channels includes:

[0019] Sort the noise factors of each R wave in the electrocardiogram data of multiple channels from small to large, and construct an initial noise factor curve based on the sorted noise factors;

[0020] Determine a second threshold according to the initial noise factor curve;

[0021] Use the second threshold as the threshold of the dividing line to perform normalization processing on the initial noise factor curve to obtain a normalized noise factor curve;

[0022] Calculate the noise level value of each channel respectively according to the normalized noise factor curve.

[0023] In one implementation of the embodiment of the present application, determining the second threshold according to the initial noise factor curve includes:

[0024] Calculate the difference between the initial noise factor curve and the translated noise factor curve to obtain a difference noise factor curve; wherein, the translated noise factor curve is obtained by translating the initial noise factor curve;

[0025] Determine the second threshold according to the peak value in the difference noise factor curve.

[0026] In one implementation of the embodiment of the present application, the abscissa of the initial noise factor curve represents each R wave in the electrocardiogram data of multiple channels, and the ordinate of the initial noise factor curve represents the noise factor of each R wave in the electrocardiogram data of multiple channels; determining the second threshold according to the peak value in the difference noise factor curve includes:

[0027] If there is a peak with an amplitude greater than the third threshold within the abscissa range of the last m% of the difference noise figure curve, select a first peak from the peaks with an amplitude greater than the third threshold, and determine the noise figure corresponding to the first peak as the second threshold;

[0028] If there is a peak with an amplitude less than or equal to the third threshold within the abscissa range of the last m% of the difference noise figure curve, select the second peak with the largest amplitude from the peaks with an amplitude less than or equal to the third threshold, and determine the noise figure corresponding to the second peak as the second threshold;

[0029] If there is no peak within the abscissa range of the last m% of the difference noise figure curve, and there is a peak within the abscissa range of the last n% of the difference noise figure curve, select the third peak with the largest amplitude from the peaks within the abscissa range of the last n%, and determine the noise figure corresponding to the third peak as the second threshold, where n > m;

[0030] If there is no peak within the abscissa range of the last n% of the difference noise figure curve, determine the noise figure corresponding to the starting point of the abscissa range of the last m% of the difference noise figure curve as the second threshold.

[0031] In an implementation manner of the embodiment of the present application, if there is at least one channel of electrocardiogram data among the electrocardiogram data of multiple channels corresponding to this sampling point that has an R wave with a noise figure satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except this at least one channel in the multiple channels to the number of the multiple channels is greater than the first threshold, it is determined that there is an R wave at the position of this sampling point, including:

[0032] If there is at least one channel of electrocardiogram data among the electrocardiogram data of multiple channels corresponding to this sampling point that has an R wave with a noise figure satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except this at least one channel in the multiple channels to the number of the multiple channels is greater than the first threshold, determine the RR interval parameter corresponding to the target R wave with a noise figure satisfying the preset condition in the electrocardiogram data of this at least one channel;

[0033] According to the RR interval parameter, determine whether the target R wave is valid;

[0034] If the target R wave is valid, it is determined that there is an R wave at the position of this sampling point.

[0035] In an implementation manner of the embodiment of the present application, the RR interval parameter includes the average RR interval, the current RR interval, the previous RR interval, and the RR interval rule condition identifier; according to the RR interval parameter, determining whether the target R wave is valid includes:

[0036] If the RR interval rule condition identifier is that the RR interval is irregular, it is determined that the target R wave is valid;

[0037] If the RR interval rule condition flag is RR interval rule and the previous RR interval is greater than or equal to the first product, determine that the target R wave is valid, where the first product is the product of the average RR interval and the first value;

[0038] If the RR interval rule condition flag is RR interval rule, the previous RR interval is less than the first product, and the average value of the previous RR interval and the current RR interval is between the first product and the second product, determine that the target R wave is valid, where the second product is the product of the average RR interval and the second value, and the second value is greater than the first value;

[0039] If the RR interval rule condition flag is RR interval rule, the previous RR interval is less than the first product, and the current RR interval is between the first product and the second product, determine that the target R wave is valid;

[0040] If the RR interval rule condition flag is RR interval rule, the previous RR interval is less than the first product, and the previous RR interval is between the third product and the fourth product, determine that the target R wave is valid, where the third product is the product of the current RR interval and the first value, and the fourth product is the product of the current RR interval and the second value.

[0041] In one implementation of the embodiments of the present application, determining the RR interval parameters corresponding to the target R wave for which the noise coefficient of the electrocardiogram data of the at least one channel satisfies a preset condition includes:

[0042] If the number of R waves that have been determined to exist currently is less than the fourth threshold, obtain the pre-analysis R wave position detection result; wherein, the pre-analysis R wave position detection result is obtained by performing R wave position detection on the preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0043] Calculate the average value of multiple RR intervals included in the pre-analysis R wave position detection result to obtain the average RR interval;

[0044] Calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval;

[0045] Calculate the interval duration between the last R wave and the penultimate R wave among the R waves that have been determined to exist as the previous RR interval;

[0046] If the difference between any two RR intervals among the multiple RR intervals included in the pre-analysis R wave position detection result is greater than the fifth threshold, determine that the RR interval rule condition flag is RR interval irregular, otherwise determine that the RR interval rule condition flag is RR interval rule.

[0047] In another implementation manner of the embodiment of the present application, determining the RR interval parameter corresponding to the target R wave for which the noise coefficient of the electrocardiogram data of the at least one channel satisfies a preset condition includes:

[0048] If the number of R waves that have been determined to exist currently is greater than or equal to the fourth threshold, calculate the average value of multiple RR intervals included in the R waves that have been determined to exist currently to obtain the average RR interval;

[0049] Calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval;

[0050] Calculate the interval duration between the last R wave and the second-to-last R wave among the R waves that have been determined to exist as the previous RR interval;

[0051] If the difference between any two RR intervals among the multiple RR intervals included in the R waves that have been determined to exist currently is greater than the fifth threshold, determine that the RR interval rule condition flag is RR interval irregular; otherwise, determine that the RR interval rule condition flag is RR interval regular.

[0052] In an implementation manner of the embodiment of the present application, before calculating the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, it further includes:

[0053] Obtain preprocessed electrocardiogram data, where the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0054] Determine the abnormal data time period according to the preprocessed electrocardiogram data;

[0055] Remove the electrocardiogram data in the original electrocardiogram data that is outside the abnormal data time period.

[0056] In an implementation manner of the embodiment of the present application, determining the abnormal data time period according to the preprocessed electrocardiogram data includes:

[0057] Convert the preprocessed electrocardiogram data into a corresponding scatter plot;

[0058] Identify the first abnormal heartbeat in the scatter plot based on the dilation and erosion algorithm;

[0059] Determine the signal segment corresponding to the first abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period;

[0060] Or,

[0061] Convert the preprocessed electrocardiogram data into a corresponding time scatter plot;

[0062] Identify the second abnormal heartbeat in the time scatter plot based on the sample entropy algorithm;

[0063] Determine the signal segment corresponding to the second abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period;

[0064] Or,

[0065] Convert the preprocessed electrocardiogram data into a corresponding histogram;

[0066] Identify the third abnormal heartbeat in the histogram based on the confidence interval method;

[0067] Determine the signal segment corresponding to the third abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period.

[0068] In another implementation manner of the embodiment of the present application, determining the abnormal data time period according to the preprocessed electrocardiogram data includes:

[0069] Convert the preprocessed electrocardiogram data into a corresponding electrocardiogram data display chart;

[0070] Determine the fourth abnormal heartbeat selected by the user based on the electrocardiogram data display chart;

[0071] Determine the signal segment corresponding to the fourth abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period.

[0072] The second aspect of the embodiment of the present application provides an R-wave detection device for electrocardiogram data, including:

[0073] An electrocardiogram data acquisition module, configured to acquire original electrocardiogram data, where the original electrocardiogram data includes electrocardiogram data of multiple channels corresponding to each sampling point collected at multiple sampling points;

[0074] A noise coefficient calculation module, configured to calculate the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, and the noise coefficient is used to represent the degree of signal interference received by the corresponding R wave;

[0075] An R-wave detection module, configured to, for each sampling point, if there is at least one channel of electrocardiogram data among the electrocardiogram data of multiple channels corresponding to the sampling point that has an R wave with a noise coefficient satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel in the multiple channels to the number of the multiple channels is greater than a first threshold, then determine that there is an R wave at the position of the sampling point; where the electrocardiogram data of the target channel has an R wave with a noise coefficient satisfying a preset condition within the time range determined according to the sampling point.

[0076] The third aspect of the embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, it implements the R-wave detection method for electrocardiogram data provided in the first aspect of the embodiment of the present application.

[0077] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the R-wave detection method for electrocardiogram data provided in the first aspect of the embodiments of the present application.

[0078] It can be understood that for the beneficial effects of the above second aspect to the fourth aspect, reference can be made to the relevant descriptions in the first aspect above, and details will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 is a flowchart of an R-wave detection method for electrocardiogram data provided by an embodiment of the present application;

[0080] Figure 2 is a schematic diagram of an initial noise coefficient curve provided by an embodiment of the present application;

[0081] Figure 3 is a schematic diagram of a difference noise coefficient curve provided by an embodiment of the present application;

[0082] Figure 4 is a schematic diagram of an operation flow for determining a second threshold according to the peak value in the difference noise coefficient curve provided by an embodiment of the present application;

[0083] Figure 5 is a schematic diagram of a normalized noise coefficient curve provided by an embodiment of the present application;

[0084] Figure 6 is a schematic diagram of an operation flow for determining whether a target R-wave is valid according to the RR interval parameter provided by an embodiment of the present application;

[0085] Figure 7 is a schematic diagram of a scatter plot obtained by converting preprocessed electrocardiogram data provided by an embodiment of the present application;

[0086] Figure 8 is a schematic diagram of a scatter plot after removing the scatter points in the core area provided by an embodiment of the present application;

[0087] Figure 9 is a schematic diagram of a time scatter plot obtained by converting preprocessed electrocardiogram data provided by an embodiment of the present application;

[0088] Figure 10 is a schematic diagram of an area where the RR interval changes frequently identified in the time scatter plot provided by an embodiment of the present application;

[0089] Figure 11 is a schematic diagram of a histogram obtained by converting preprocessed electrocardiogram data provided by an embodiment of the present application;

[0090] Figure 12 It is a schematic diagram of an abnormal area selected from a histogram provided by an embodiment of the present application;

[0091] Figure 13 It is a schematic diagram of an operation process for automatically identifying abnormal heartbeats based on various algorithms provided by an embodiment of the present application;

[0092] Figure 14 It is a schematic diagram of an operation process for a user to manually select abnormal heartbeats provided by an embodiment of the present application;

[0093] Figure 15 It is a schematic diagram of the structure of an R-wave detection device for electrocardiogram data provided by an embodiment of the present application;

[0094] Figure 16 It is a schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0095] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application. Additionally, in the description of the specification and the appended claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0096] In the field of electrocardiogram data analysis, the detection of the R-wave position is the key to calculating parameters such as heart rate and ST segment. Accurately detecting the R-wave position is of great significance. Currently, the differential threshold method is usually used to detect the positions of individual R-waves in electrocardiogram data. However, since electrocardiogram signals are weak biological signals and are easily interfered by external factors such as instruments and body movements during acquisition, the accuracy of the obtained R-wave position detection results is relatively low. To address this problem, the embodiments of the present application provide an R-wave detection method, device, electronic device, and storage medium for electrocardiogram data, which can improve the accuracy of R-wave position detection. For more specific technical implementation details of the embodiments of the present application, please refer to the following embodiments.

[0097] It should be understood that the execution subject of each method embodiment of this application is various types of electronic devices. For example, it can be a mobile phone, a tablet computer, a wearable device, an electrocardiogram (ECG) data acquisition device, an ECG data analysis device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a large-screen TV, etc. The specific type of the electronic device is not limited in the embodiments of this application.

[0098] Please refer to Figure 1 , which shows a method for detecting R waves of ECG data provided by an embodiment of this application, including:

[0099] 101. Obtain original ECG data, where the original ECG data includes ECG data of multiple channels corresponding to each sampling point collected at multiple sampling points;

[0100] First, obtain the original ECG data, which includes ECG data of multiple channels corresponding to each sampling point collected at multiple sampling points. For example, assume that the sampling rate of the original ECG data is 500 Hz, there are a total of 8 data acquisition channels, and the acquisition time is 24 hours. Then the total number of sampling points for a single channel is 500 Hz × 60 seconds × 60 minutes × 24 hours = 43,200,000 sampling points. For each of these 43,200,000 sampling points, there are 8-channel ECG data corresponding to it.

[0101] 102. Calculate the noise coefficient of each R wave in the ECG data of multiple channels respectively, where the noise coefficient is used to represent the degree of signal interference received by the corresponding R wave;

[0102] After obtaining the original ECG data, calculate the noise coefficient of each R wave included in the original ECG data respectively. The noise coefficient is used to represent the degree of signal interference received by the corresponding R wave. For example, assume that the original ECG data includes 8 channels, and each channel has m R waves. Then calculate the noise coefficient of each of these 8 × m R waves respectively. The higher the noise coefficient, the greater the degree of signal interference received by the corresponding R wave. In actual operation, the noise coefficient of a certain R wave can be estimated according to the waveform change characteristics of the R wave in the corresponding time segment.

[0103] In an implementation manner of the embodiment of this application, calculating the noise coefficient of each R wave in the ECG data of multiple channels respectively includes:

[0104] (1) Obtain the pre-analysis R-wave position detection result; wherein, the pre-analysis R-wave position detection result is obtained by performing R-wave position detection on the preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0105] (2) According to each R-wave peak in the pre-analysis R-wave position detection result, respectively construct each time segment corresponding one-to-one to each R-wave peak;

[0106] (3) For each time segment, according to the signal change characteristics of the electrocardiogram data of each channel within this time segment, respectively calculate the noise coefficient of the R-wave of the electrocardiogram data of each channel within this time segment.

[0107] In actual operation, certain preprocessing operations can be performed on the original electrocardiogram data to obtain the preprocessed electrocardiogram data. For example, from the electrocardiogram data of multiple channels, the electrocardiogram data of one channel with the highest data quality can be selected. After data compression of the selected electrocardiogram data of one channel, the preprocessed electrocardiogram data is obtained. After obtaining the preprocessed electrocardiogram data, perform R-wave position detection processing on the preprocessed electrocardiogram data to obtain each R-wave position in the preprocessed electrocardiogram data, that is, obtain the pre-analysis R-wave position detection result. Then, according to each R-wave peak in the pre-analysis R-wave position detection result, respectively construct each time segment corresponding one-to-one to each R-wave peak, that is, determine the boundaries of the corresponding time segments according to the R-wave peaks. Obviously, each R-wave in the pre-analysis R-wave position detection result will obtain a corresponding time segment. For example, the time segment corresponding to a certain R-wave can be expressed as [Startpos = R - 500ms, Endpos = R - 500ms], where Startpos represents the starting point of the time segment, Endpos represents the ending point of the time segment, and R represents the position of the current R-wave peak; or it can also be expressed as [Startpos = LastR + 350ms, Endpos = NextR - 200ms], where Startpos represents the starting point of the time segment, Endpos represents the ending point of the time segment, LastR represents the position of the previous R-wave peak, and NextR represents the position of the next R-wave peak. After obtaining each time segment, for each time segment, according to the signal change characteristics of the electrocardiogram data of each channel within this time segment, respectively calculate the noise coefficient of the R-wave of the electrocardiogram data of each channel within this time segment. For example, assume there are 8 channels. For time segment 1, calculate the noise coefficient of the R-wave of the electrocardiogram data of channel 1 within time segment 1, calculate the noise coefficient of the R-wave of the electrocardiogram data of channel 2 within time segment 1... calculate the noise coefficient of the R-wave of the electrocardiogram data of channel 8 within time segment 1. Perform the same operation as time segment 1 for each time segment to obtain the noise coefficient of each R-wave in the electrocardiogram data of all channels.

[0108] In an implementation manner of the embodiment of the present application, according to the signal change characteristics of the electrocardiogram data of each channel within the time segment, the noise coefficient of the R wave of the electrocardiogram data of each channel within the time segment is calculated respectively, including:

[0109] For each channel, within the time segment, multiple signal values of the electrocardiogram data of the channel are calculated for differential processing to obtain absolute values; within the time segment, the integral of the absolute values is obtained and the mean value of the integral is calculated, which is used as the noise coefficient of the R wave of the electrocardiogram data of the channel within the time segment.

[0110] Taking the calculation of the noise coefficient of the R wave of the electrocardiogram data of channel 1 within time segment 1 as an example for illustration. Assume that time segment 1 is [Startpos, Endpos], then within the range of [Startpos, Endpos], the differential Data_diff of multiple signal values of the electrocardiogram data of channel 1 is calculated. Here, the differential can be two-point difference, three-point difference, four-point or more-point difference. For example, assume that the signal values of 4 sampling points of the electrocardiogram data of channel 1 within the range of [Startpos, Endpos] are A1, A2, A3, and A4 respectively. Then the two-point difference can be expressed as: B1 = A2 - A1, B2 = A3 - A2, B3 = A4 - A3; the three-point difference can be expressed as: C1 = B2 - B1 = A3 - 2×A2 + A1, C2 = B3 - B2 = A4 - 2×A3 + A2; the four-point difference can be expressed as: D1 = C2 - C1 = A4 - 3×A3 + 3×A2 - A1. Then, within the range of [Startpos, Endpos], the absolute value of the differential abs(Data_diff) is calculated, and within the range of [Startpos, Endpos], the integral of abs(Data_diff) is obtained to get INT(abs(Data_diff)), and the mean value of the integral nosIndex = INT(abs(Data_diff)) / (Endpos - Startpos) is calculated. The mean value nosIndex calculated here can be used as the noise coefficient of the R wave of the electrocardiogram data of channel 1 within time segment 1. The larger the nosIndex, the greater the noise. Similarly, the noise coefficient of the R wave of each channel within each time segment can be calculated in this way. Assume that the number of R waves in the preprocessed electrocardiogram data is N, then there are N time segments, and N noise coefficients nosIndex can be calculated for each channel (corresponding to the N R waves in the channel respectively). Then 8×N noise coefficients nosIndex can be calculated for 8 channels.

[0111] In an implementation manner of the embodiment of the present application, after calculating the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, for each sampling point, if there is at least one channel's electrocardiogram data among the electrocardiogram data of the multiple channels corresponding to this sampling point that has an R wave with a noise coefficient meeting a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than a first threshold, before determining that there is an R wave at the position of this sampling point, the method further includes:

[0112] (1) Calculate the noise level value of each channel respectively according to the noise coefficient of each R wave in the electrocardiogram data of multiple channels;

[0113] (2) Remove the electrocardiogram data of the set number of channels with the highest noise level values among the multiple channels.

[0114] After calculating the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, the noise level value of each channel can be calculated respectively according to the noise coefficient of each R wave in the electrocardiogram data of each channel. If the noise level value of a certain channel is higher, it means that the electrocardiogram data of this channel is more interfered by noise. In actual operation, the noise level values of each channel can be sorted according to their magnitudes, and the electrocardiogram data of the set number of channels with the largest noise level value are removed. Since this part of the electrocardiogram data is more interfered by noise, it is removed, that is, it does not participate in the R wave fusion process described in step 103. For example, if the noise level value of channel 8 is the largest, the electrocardiogram data of channel 8 can be removed. Then, in step 103, the electrocardiogram data of the multiple channels processed only includes the electrocardiogram data of channels 1 - 7, that is, the electrocardiogram data of channel 8 does not participate in the R wave fusion process described in step 103. By setting like this, it can be avoided that the electrocardiogram data of the channels with larger noise interference participates in the R wave fusion process, thereby improving the accuracy of R wave fusion to a certain extent.

[0115] As an example, the electrocardiogram data of the channel corresponding to the largest noise level value can be removed. As for the electrocardiogram data of the channels with noise level values smaller than the largest noise level value, it can be determined whether to remove them according to the following method:

[0116] (1) Calculate the lead noise ratio according to the noise level value;

[0117] (2) If the lead noise ratio exceeds the set threshold, remove the electrocardiogram data of the channels with noise level values smaller than the largest noise level value, otherwise do not remove.

[0118] For example, assume that the channel with the second largest noise level value is Channel 4, and its noise level value is Channel4-nosIndexReSum. Then, the lead noise ratio = Channel4-nosIndexReSum / the number of R waves. Here, the number of R waves refers to the total number of all R waves contained in the electrocardiogram data of Channel 4. If the lead noise ratio exceeds a set threshold, such as 15%, it indicates that the electrocardiogram data of Channel 4 is overly interfered by noise and should be removed; if the lead noise ratio does not exceed the set threshold, it means that the noise interference on the electrocardiogram data of Channel 4 is within an acceptable range, so it can be retained. Additionally, the lead noise ratio can also be calculated using the total duration of the corresponding electrocardiogram data. For example, the lead noise ratio = Channel4-nosIndexReSum / the total duration of the electrocardiogram data of Channel 4.

[0119] In an implementation manner of the embodiment of the present application, according to the noise coefficients of each R wave in the electrocardiogram data of multiple channels, the noise level value of each channel is calculated respectively, including:

[0120] (1) Sort the noise coefficients of each R wave in the electrocardiogram data of multiple channels from small to large, and construct an initial noise coefficient curve based on the sorted noise coefficients;

[0121] (2) Determine a second threshold according to the initial noise coefficient curve;

[0122] (3) Use the second threshold as the threshold of the dividing line to perform normalization processing on the initial noise coefficient curve to obtain a normalized noise coefficient curve;

[0123] (4) Calculate the noise level value of each channel according to the normalized noise coefficient curve.

[0124] When calculating the noise level value of each channel according to the noise coefficients of each R wave in the electrocardiogram data of multiple channels, the noise coefficients of each R wave in the electrocardiogram data of multiple channels can be sorted from small to large first, and an initial noise coefficient curve can be constructed based on the sorted noise coefficients. For example, as described above, assume there are 8 channels, and each channel has N R waves. Then, each channel can calculate N noise coefficients nosIndex. Summarizing the noise coefficients of each channel can obtain AllnosIndex = [nosIndex of each channel]. Obviously, AllnosIndex contains 8XN noise coefficients nosIndex. Sort the 8XN noise coefficients nosIndex in AllnosIndex from small to large, and construct an initial noise coefficient curve based on the sorted noise coefficients. As Figure 2 shown, it is a schematic diagram of an initial noise coefficient curve provided by the embodiment of the present application. InFigure 2 Among them, the abscissa represents the number of R waves in the X8 channel, which can be regarded as the numbers of 8×N R waves, and the ordinate represents the specific values of the noise factor nosIndex corresponding to each R wave. According to the constructed initial noise factor curve, a second threshold can be determined as the segmentation line threshold for normalization processing. In actual operation, a position with a large change in the noise factor can be selected from the initial noise factor curve, and the noise factor corresponding to this position is determined as the second threshold. For example, by Figure 2 it can be seen that the noise factor changes greatly at a position near the abscissa of 3000, so the noise factor corresponding to the abscissa of 3000 can be determined as the second threshold.

[0125] As an example, determining the second threshold according to the initial noise factor curve includes:

[0126] (1) Calculate the difference between the initial noise factor curve and the translated noise factor curve to obtain a difference noise factor curve; wherein, the translated noise factor curve is obtained by translating the initial noise factor curve;

[0127] (2) Determine the second threshold according to the peak value in the difference noise factor curve.

[0128] To facilitate finding the position with a large change in the noise factor, the difference between the initial noise factor curve and the translated noise factor curve can be calculated to obtain a difference noise factor curve. Specifically, assuming that the initial noise factor curve is AllnosIndex(n), the initial noise factor curve can be translated by one unit to obtain the translated noise factor curve AllnosIndex(n - 1), and then the difference between the initial noise factor curve and the translated noise factor curve AllnosIndex(n) - AllnosIndex(n - 1) is calculated to obtain the difference noise factor curve diff(nosIndex). Then, the second threshold is determined by finding the peak value in the difference noise factor curve. As Figure 3 shown, it is a schematic diagram of a difference noise factor curve provided by an embodiment of the present application. In Figure 3 it, the abscissa represents the number of R waves in the X8 channel, and the ordinate represents the value obtained by subtracting the noise factors. By Figure 3 it can be seen that the peak value in the difference noise factor curve is the position with a large change in the noise factor, so the second threshold can be determined according to these peak values.

[0129] In an implementation manner of the embodiment of the present application, the abscissa of the initial noise factor curve represents each R wave in the electrocardiogram data of multiple channels, and the ordinate of the initial noise factor curve represents the noise factor of each R wave in the electrocardiogram data of multiple channels; determining the second threshold according to the peak value in the difference noise factor curve includes:

[0130] (1) If there is a peak with an amplitude greater than the third threshold within the abscissa range of the last m% of the difference noise figure curve, select a first peak from the peaks with an amplitude greater than the third threshold, and determine the noise figure corresponding to the first peak as the second threshold;

[0131] (2) If there is a peak with an amplitude less than or equal to the third threshold within the abscissa range of the last m% of the difference noise figure curve, select the second peak with the largest amplitude from the peaks with an amplitude less than or equal to the third threshold, and determine the noise figure corresponding to the second peak as the second threshold;

[0132] (3) If there is no peak within the abscissa range of the last m% of the difference noise figure curve, and there is a peak within the abscissa range of the last n% of the difference noise figure curve, select the third peak with the largest amplitude from the peaks within the abscissa range of the last n%, and determine the noise figure corresponding to the third peak as the second threshold, where n > m;

[0133] (4) If there is no peak within the abscissa range of the last n% of the difference noise figure curve, determine the noise figure corresponding to the starting point of the abscissa range of the last m% of the difference noise figure curve as the second threshold.

[0134] After obtaining the difference noise figure curve diff(nosIndex) as shown in Figure 3 , the peaks of the difference noise figure curve diff(nosIndex) can be obtained, and these peaks are used to determine the segmentation line threshold for normalization processing, that is, the second threshold. As shown in Figure 4 , it is a schematic diagram of the operation process for determining the second threshold based on the peaks in the difference noise figure curve.

[0135] Select empirical values m and n according to the distribution pattern of the difference noise figure curve, where n > m > 0. For example, m = 5 and n = 10 can be set. Detect whether there is a peak with an amplitude greater than the third threshold (such as 4) within the abscissa range of the last m% of the difference noise figure curve. If there is, select a peak from these peaks and denote it as the first peak. If the number of these peaks is one, select it directly; if the number of these peaks is multiple, one peak can be selected from them according to a set method as the first peak, such as selecting the first peak, selecting the largest peak, randomly selecting a peak, and so on. After selecting the first peak, determine the noise figure corresponding to the first peak as the second threshold. Specifically, according to the difference noise figure curve, the abscissa where the first peak is located can be determined, and then based on this abscissa, the corresponding noise figure can be found from the initial noise figure curve as the second threshold.

[0136] If there is no peak with an amplitude greater than the third threshold within the abscissa range of the last m% of the difference noise figure curve, but there is a peak with an amplitude less than or equal to the third threshold, then select the peak with the largest amplitude from the peaks with an amplitude less than or equal to the third threshold, denote it as the second peak, and determine the noise figure corresponding to the second peak as the second threshold.

[0137] If there is no peak within the abscissa range of the last m% of the difference noise figure curve, but there is a peak within the abscissa range of the last n% of the difference noise figure curve, then select the peak with the largest amplitude from the peaks existing within the abscissa range of the last n%, denote it as the third peak, and determine the noise figure corresponding to the third peak as the second threshold.

[0138] If there are no peaks within the abscissa range of the last n% of the difference noise figure curve, then the noise figure corresponding to the starting point of the abscissa range of the last m% of the difference noise figure curve can be determined as the second threshold. For example, if m = 5, then the abscissa range of the last m% is the abscissa range of 95% - 100%, so the noise figure corresponding to the starting point, that is, the abscissa position of 95%, can be determined as the second threshold.

[0139] After determining the second threshold, using the second threshold as the threshold of the dividing line, perform normalization processing on the initial noise figure curve to obtain the normalized noise figure curve. As Figure 5 shown, it is a schematic diagram of a normalized noise figure curve provided by an embodiment of the present application. Using functions such as ReLU, with the second threshold as the threshold of the dividing line, for Figure 2 the initial noise figure curve shown, perform normalization processing to obtain Figure 5 the normalized noise figure curve shown. For the convenience of comparison, both the initial noise figure curve and the normalized noise figure curve are shown in Figure 5 . Assuming the initial noise figure curve is AllnosIndex and the second threshold is Thd, then perform normalization processing in the following manner:

[0140] If(AllnosIndex >= Thd), AllnosIndexRe = 1

[0141] If(AllnosIndex < Thd), AllnosIndexRe = 0

[0142] The finally obtained curve AllnosIndexRe is the normalized noise figure curve. It should be noted that here the example is normalized to (0, 1), but in fact it can be normalized to more other values. For example, multiple dividing line thresholds Thd can be obtained, and then normalized to (0, 1, 2, 3...), and the obtained normalized noise figure curve will be in a stepped shape.

[0143] After obtaining the normalized noise coefficient curve, the noise level values of each channel can be calculated according to this curve. That is, according to the normalized noise coefficient curve AllnosIndexRe, calculate the noise level value Channel1-nosIndexReSum of Channel 1, the noise level value Channel2-nosIndexReSum of Channel 2, the noise level value Channel3-nosIndexReSum of Channel 3... respectively. The specific calculation method is as follows:

[0144] Channel1-nosIndexReSum = ∑nosIndexRe(Channel1)

[0145] Channel2-nosIndexReSum = ∑nosIndexRe(Channel2)

[0146] Channel3-nosIndexReSum = ∑nosIndexRe(Channel3)

[0147] Channel4-nosIndexReSum = ∑nosIndexRe(Channel4)

[0148] ……

[0149] Among them, Channel1-nosIndexReSum = ∑nosIndexRe(Channel1) means to first find the nosIndexRe values of all R waves of the electrocardiogram data of Channel 1, and then add up these nosIndexRe values, and so on.

[0150] After that, the noise level values of each channel can be sorted according to their magnitudes. For example, sort Channel1-nosIndexReSum, Channel2-nosIndexReSum,... in ascending or descending order. After sorting, the maximum value can be removed, that is, the electrocardiogram data of the channel with the maximum noise level value does not participate in the R wave fusion process of step 103.

[0151] 103. For each sampling point, if there is at least one channel of electrocardiogram data corresponding to this sampling point whose R wave has a noise coefficient that meets the preset condition, and the ratio of the number of target channels existing in the other channels except this at least one channel to the number of these multiple channels is greater than the first threshold, then it is determined that there is an R wave at the position of this sampling point.

[0152] Step 103 can be regarded as the R-wave fusion process of the electrocardiogram data of each channel, and the R-waves of the electrocardiogram data of only those channels with relatively low noise level values can be fused. The so-called R-wave fusion here refers to comprehensively considering the R-wave position detection results of the electrocardiogram data of each channel, so as to infer whether there is a real R-wave at the position of each sampling point.

[0153] Suppose the sampling rate of the original electrocardiogram data is 500 Hz, there are a total of 8 channels, and the acquisition time is 24 hours. Then the total number of sampling points of a single channel is 500 Hz × 60 seconds × 60 minutes × 24 hours = 43,200,000 sampling points. For each of these 43,200,000 sampling points, there are electrocardiogram data of 8 channels corresponding to it.

[0154] The same processing is performed for all sampling points. In actual operation, it can start from the first sampling point and sequentially determine whether there is an R-wave at the position of each sampling point until all sampling points are processed, thus completing the R-wave detection process of the electrocardiogram data. Taking a certain sampling point P as an example for illustration, first detect whether there is an R-wave in the electrocardiogram data of at least one channel among all channels corresponding to the sampling point P, and the noise coefficient of the R-wave satisfies the preset conditions. In specific implementation, each channel can be traversed in sequence for detection. For example, it can start from channel 1 and detect whether there is an R-wave in the electrocardiogram data of channel 1 at the sampling point P. Here, it can be determined whether there is an R-wave by judging whether the signal amplitude of the sampling point P exceeds the set threshold. If there is an R-wave, then continue to judge whether the noise coefficient of this R-wave satisfies the preset conditions. Since the noise coefficients of all R-waves of multiple channels have been calculated in step 102, the noise coefficient of the currently judged R-wave can be obtained here, and it is determined whether this noise coefficient satisfies certain conditions, such as whether the noise coefficient is less than the set threshold. If so, it means that the noise coefficient satisfies the preset conditions, otherwise it means that the noise coefficient does not satisfy the preset conditions. Or, if the noise coefficient has been Figure 5For the normalization process shown, it is possible to determine whether the noise coefficient is 0. If the noise coefficient is 0, it means that the noise coefficient meets the preset condition; otherwise, it means that the noise coefficient does not meet the preset condition. If there is no R wave in the electrocardiogram data of channel 1 at sampling point P, or the noise coefficient of the R wave in the electrocardiogram data of channel 1 at sampling point P does not meet the preset condition, then continue to detect whether there is an R wave with a noise coefficient meeting the preset condition in the electrocardiogram data of channel 2 at sampling point P, and so on until all channels are traversed. It should be noted that if some channels with relatively large noise level values are excluded in the previous steps, then all the channels traversed here do not include those excluded channels. If there is no R wave with a noise coefficient meeting the preset condition in the electrocardiogram data of all channels at sampling point P, it can be determined that there is no R wave at the position of sampling point P, and then continue to detect whether there is an R wave at the position of the next sampling point in the same way. If during the process of traversing all channels, it is detected that there is at least one channel whose electrocardiogram data has an R wave with a noise coefficient meeting the preset condition at sampling point P, then search within a certain time range near sampling point P and monitor whether there is an R wave with a noise coefficient meeting the preset condition in the electrocardiogram data of other channels except the at least one channel. For example, assume that the electrocardiogram data of channel 1 has an R wave with a noise coefficient meeting the preset condition at sampling point P, then a time range [P + 2ms, P + 150ms] can be determined according to sampling point P, and then detect whether there is an R wave with a noise coefficient meeting the preset condition in the electrocardiogram data of channels 2 - 8 within this time range. If there is, it is considered that the corresponding channel has detected an R wave and is recorded as the target channel. For example, if the electrocardiogram data of channel 3 has an R wave with a noise coefficient meeting the preset condition within this time range, then channel 3 is the target channel; if the electrocardiogram data of channel 6 does not have an R wave with a noise coefficient meeting the preset condition within this time range, then channel 6 is not the target channel, and so on. After that, count the number of target channels. If the ratio of the number of target channels to the number of all channels traversed is greater than the first threshold, it is determined that there is an R wave at the position of sampling point P; otherwise, it is determined that there is no R wave at the position of sampling point P. For example, if the ratio of the number of target channels to the number of all channels traversed is greater than 50%, it means that more than half of the channels have detected R waves with noise coefficients meeting the preset conditions near sampling point P, so it can be determined that there is indeed an R wave at the position of sampling point P.

[0155] In an implementation manner of the embodiment of the present application, if there is at least one channel among the electrocardiogram data of multiple channels corresponding to the sampling point whose electrocardiogram data has an R wave with a noise coefficient meeting the preset condition, and the ratio of the number of target channels existing in other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than the first threshold, then determining that there is an R wave at the position of the sampling point includes:

[0156] (1) If there is at least one R wave in the electrocardiogram data of multiple channels corresponding to the sampling point, and the noise coefficient of the electrocardiogram data of this at least one channel satisfies the preset condition, and the ratio of the number of target channels existing in the other channels except this at least one channel among the multiple channels to the number of the multiple channels is greater than the first threshold, then determine the RR interval parameter corresponding to the target R wave whose noise coefficient in the electrocardiogram data of this at least one channel satisfies the preset condition;

[0157] (2) Determine whether the target R wave is valid according to the RR interval parameter;

[0158] (3) If the target R wave is valid, then determine that there is an R wave at the position of the sampling point.

[0159] When it is detected that there is at least one R wave in the electrocardiogram data of multiple channels corresponding to a certain sampling point, and the noise coefficient of the electrocardiogram data of this at least one channel satisfies the preset condition, and the ratio of the number of target channels existing in the other channels to the number of the multiple channels is also greater than the first threshold, it is not immediately determined that there is an R wave at the position of the sampling point. Instead, a step of RR interval verification is added. Only when the RR interval verification passes, it is determined that there is an R wave at the position of the sampling point. In this way, the accuracy of R wave position detection can be further improved. Specifically, the R wave whose noise coefficient in the electrocardiogram data of this at least one channel satisfies the preset condition can be first recorded as the target R wave, and then the RR interval parameter corresponding to the target R wave is obtained. The RR interval parameter is used to judge whether the target R wave is valid. If the target R wave is valid, it is determined that there is an R wave at the position of the sampling point. If the target R wave is invalid, it is determined that there is no R wave at the position of the sampling point. The RR interval parameter here can include the average RR interval, the current RR interval, the previous RR interval, and the RR interval rule condition identifier. The following describes how to obtain these RR interval parameters and how to specifically judge whether the target R wave is valid.

[0160] In an implementation manner of the embodiment of the present application, determining the RR interval parameter corresponding to the target R wave whose noise coefficient in the electrocardiogram data of this at least one channel satisfies the preset condition includes:

[0161] (1) If the number of R waves that have been determined to exist currently is less than the fourth threshold, then obtain the pre-analysis R wave position detection result; wherein, the pre-analysis R wave position detection result is obtained by detecting the R wave position of the preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0162] (2) Calculate the average value of multiple RR intervals included in the pre-analysis R wave position detection result to obtain the average RR interval;

[0163] (3) Calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval;

[0164] (4) Calculate the interval duration between the last R wave and the penultimate R wave among the already determined existing R waves as the previous RR interval.

[0165] (5) If the difference between any two RR intervals among the multiple RR intervals included in the pre-analysis R wave position detection result is greater than the fifth threshold, determine that the RR interval rule condition flag is RR interval irregular; otherwise, determine that the RR interval rule condition flag is RR interval regular.

[0166] In the technical solution of the embodiment of the present application, it is to sequentially detect whether there is an R wave at the position of each sampling point. Therefore, the already determined existing R waves are a continuously updated R wave sequence, which can be denoted as the fused R wave sequence. For example, assume that the current sampling point being judged is P, and there are 7 sampling points whose positions are determined to have R waves among all the sampling points before the sampling point P. Then the current fused R wave sequence can be expressed as: Y1, Y2, Y3, Y4, Y5, Y6, Y7, where Y1 - Y7 respectively represent each of the already determined existing R waves. If the number of the already determined existing R waves is small, for example, the number of R waves in the fused R wave sequence is less than 7, the accuracy of using the fused R wave sequence to determine some RR interval parameters (such as the average RR interval and the RR interval rule condition flag) is insufficient. At this time, the pre-analysis R wave position detection result can be obtained, and the pre-analysis R wave position detection result can be used to determine those RR interval parameters. The description of the pre-analysis R wave position detection result can be referred to the previous description and will not be repeated here. Each R wave position included in the pre-analysis R wave position detection result can also be regarded as an R wave sequence. However, since the pre-analysis R wave position detection process has ended, this R wave sequence is a sequence that is no longer updated, which can be denoted as the pre-analysis R wave sequence. For example, the pre-analysis R wave sequence can be expressed as: X1, X2, X3, X4, X5, X6, X7... Xn, where X1 - Xn respectively represent each of the R waves in the pre-analysis R wave position detection result.

[0167] When using the pre-analysis R wave position detection result to determine the RR interval parameters, calculate the average value of the multiple RR intervals included in the pre-analysis R wave position detection result to obtain the average RR interval. For example, calculate X2 - X1 to obtain RR interval 1, calculate X3 - X2 to obtain RR interval 2, calculate X4 - X3 to obtain RR interval 3... and so on, and calculate the average value of these RR intervals as the average RR interval. In actual operation, in order to improve the calculation accuracy of the average RR interval, the maximum value and the minimum value of these RR intervals can be removed and then the average value is calculated.

[0168] If the difference between any two RR intervals among the multiple RR intervals included in the pre-analysis R wave position detection result is greater than the fifth threshold, it can be considered that the RR intervals of the pre-analysis R wave sequence are irregular. Therefore, the RR interval rule status flag is determined to be RR interval irregular. Otherwise, the RR interval rule status flag is determined to be RR interval regular. For example, if among the 6 RR intervals from X1 to X7, the difference between any two RR intervals is greater than 100 ms, then the RR intervals can be considered irregular; otherwise, they are considered regular.

[0169] Assume that the current fused R wave sequence is: Y1, Y2, Y3, Y4, Y5, Y6, Y7. Then the target R wave to be judged currently is Y8. Calculate the interval duration between the target R wave and the last R wave among the currently determined existing R waves as the current RR interval, that is, the current RR interval = Y8 - Y7. Calculate the interval duration between the last R wave and the penultimate R wave among the determined existing R waves as the previous RR interval, that is, the previous RR interval = R7 - R6. Obviously, the current RR interval and the previous RR interval are continuously updated, and each currently detected R wave has its corresponding current RR interval and previous RR interval.

[0170] For ease of understanding, the detected R waves that have not been verified valid through RR intervals are marked as Y'. When Y' is verified as valid through RR intervals, it is denoted as Y. As an example, initially, the fused R wave sequence is empty. When the first R wave Y1' is detected, since its corresponding current RR interval and previous RR interval cannot be obtained, Y1' is directly determined to be valid, resulting in Y1. At this time, the fused R wave sequence is: Y1. When the second R wave Y2' is detected, since there is only one R wave in the fused R wave sequence, the previous RR interval corresponding to Y2' cannot be obtained either. Therefore, Y2' is directly determined to be valid, resulting in Y2. At this time, the fused R wave sequence is: Y1, Y2. When the third R wave Y3' is detected, its corresponding previous RR interval = Y2 - Y1, and the current RR interval = Y3' - Y2. At this time, it can be judged whether Y3' is valid through RR interval verification. If it is valid, the fused R wave sequence is: Y1, Y2, Y3; if it is not valid, the fused R wave sequence is: Y1, Y2. When the fourth R wave Y4' is detected, assume the fused R wave sequence is: Y1, Y2, Y3. Then its corresponding previous RR interval = Y3 - Y2, and the current RR interval = Y4' - Y3. At this time, it can be judged whether Y4' is valid through RR interval verification. Assume the fused R wave sequence is: Y1, Y2. Then its corresponding previous RR interval = Y2 - Y1, and the current RR interval = Y4' - Y2. At this time, it can be judged whether Y4' is valid through RR interval verification. If Y4' is valid, the fused R wave sequence is updated to: Y1, Y2, Y3, Y4 or Y1, Y2, Y4, and so on.

[0171] As another example, at the beginning, the fused R-wave sequence is empty. When the first R-wave Y1’ is detected, since the corresponding current RR interval and the previous RR interval cannot be obtained, Y1’ is directly determined to be valid, and Y1 is obtained. At this time, the fused R-wave sequence is: Y1. When the second R-wave Y2’ is detected, since there is only one R-wave in the fused R-wave sequence, the previous RR interval corresponding to Y2’ cannot be obtained either. At this time, no judgment is made first, and the fused R-wave sequence is: Y1, Y2’. When the third R-wave Y3’ is detected, the judgment of Y2’ starts. The previous RR interval corresponding to it = Y2’ - Y1, and the current RR interval = Y3’ - Y2’. At this time, it is possible to judge whether Y2’ is valid through the RR interval verification. If Y2’ is valid, the fused R-wave sequence is: Y1, Y2, Y3’, otherwise the fused R-wave sequence is: Y1, Y3’. When the fourth R-wave Y4’ is detected, if the fused R-wave sequence is: Y1, Y2, Y3’, then the previous RR interval corresponding to Y3’ = Y3’ - Y2, and the current RR interval = Y4’ - Y3’. If the fused R-wave sequence is: Y1, Y3’, then the previous RR interval corresponding to Y3’ = Y3’ - Y1, and the current RR interval = Y4’ - Y3’. If Y3’ is judged to be valid through the RR interval verification, the fused R-wave sequence is updated to: Y1, Y2, Y3, Y4’ or Y1, Y3, Y4’, and so on.

[0172] In another implementation manner of the embodiment of the present application, determining the RR interval parameter corresponding to the target R wave for which the noise coefficient of the electrocardiogram data of the at least one channel satisfies a preset condition includes:

[0173] (1) If the number of R waves that have been determined to exist currently is greater than or equal to the fourth threshold, calculate the average value of multiple RR intervals included in the R waves that have been determined to exist currently to obtain the average RR interval;

[0174] (2) Calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval;

[0175] (3) Calculate the interval duration between the last R wave and the penultimate R wave among the R waves that have been determined to exist as the previous RR interval;

[0176] (4) If the difference between any two RR intervals among the multiple RR intervals included in the R waves that have been determined to exist currently is greater than the fifth threshold, determine that the RR interval rule condition flag is RR interval irregular, otherwise determine that the RR interval rule condition flag is RR interval regular.

[0177] If the number of R waves that have been determined to exist currently is large, for example, the number of R waves in the fused R wave sequence is greater than or equal to 7, the accuracy of using the fused R wave sequence to determine the RR interval parameter is sufficient, and at this time, it is not necessary to use the pre-analysis R wave position detection result.

[0178] When using the R waves that have been determined to exist currently, that is, the current fused R wave sequence, to determine the RR interval parameter, calculate the average value of multiple RR intervals included in the R waves that have been determined to exist currently to obtain the average RR interval. For example, calculating Y2 - Y1 can obtain RR interval 1, calculating Y3 - Y2 can obtain RR interval 2, calculating Y4 - Y3 can obtain RR interval 3... and so on, and calculate the average value of these RR intervals as the average RR interval. In actual operation, in order to improve the calculation accuracy of the average RR interval, the maximum value and the minimum value of these RR intervals can also be removed, and then the average value is calculated.

[0179] If the difference between any two RR intervals among the multiple RR intervals included in the R waves that have been determined to exist currently is greater than the fifth threshold, it can be considered that the RR intervals of the fused R wave sequence are irregular. Therefore, determine that the RR interval rule condition flag is RR interval irregular, otherwise determine that the RR interval rule condition flag is RR interval regular. For example, if among the 6 RR intervals of Y1 - Y7, the difference between any two RR intervals is greater than 100 ms, then it can be considered that the RR intervals are irregular, otherwise it is considered that the RR intervals are regular.

[0180] Assume that the current fused R wave sequence is: Y1, Y2, Y3, Y4, Y5, Y6, Y7, then the target R wave to be judged currently is Y8, calculate the interval duration between the target R wave and the last R wave in the R waves that have been determined to exist currently as the current RR interval, that is, the current RR interval = Y8 - Y7. Calculate the interval duration between the last R wave and the penultimate R wave in the R waves that have been determined to exist currently as the previous RR interval, that is, the previous RR interval = R7 - R6. Obviously, the current RR interval and the previous RR interval are continuously updated, and for each R wave detected currently, there are their respective current RR intervals and previous RR intervals.

[0181] In an implementation manner of the embodiment of the present application, determining whether the target R wave is valid according to the RR interval parameter includes:

[0182] (1) If the RR interval rule condition flag is RR interval irregular, then determine that the target R wave is valid;

[0183] (2) If the RR interval rule condition flag is RR interval regular, and the previous RR interval is greater than or equal to the first product, then determine that the target R wave is valid, where the first product is the product of the average RR interval and the first value;

[0184] (3) If the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the average value of the previous RR interval and the current RR interval is between the first product and the second product, then determine that the target R wave is valid. The second product is the product of the average RR interval and the second value, and the second value is greater than the first value;

[0185] (4) If the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the current RR interval is between the first product and the second product, then determine that the target R wave is valid;

[0186] (5) If the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the previous RR interval is between the third product and the fourth product, then determine that the target R wave is valid. The third product is the product of the current RR interval and the first value, and the fourth product is the product of the current RR interval and the second value.

[0187] When determining whether the target R wave is valid based on the RR interval parameter, considering that many diseases will cause the RR interval of the R wave to be irregular, in order to maintain the corresponding R wave signal characteristics, when it is detected that the RR interval rule condition flag is that the RR interval is irregular, the target R wave can be directly determined to be valid.

[0188] If the RR interval rule condition flag indicates that the RR interval is regular, there are multiple branches to determine whether the target R wave is valid. In the case of a regular RR interval, if the previous RR interval is greater than or equal to the first product, the target R wave is determined to be valid, where the first product is the product of the average RR interval and the first value. For example, assuming the first value is 0.8, if the previous RR interval ≥ 0.8 × average RR interval, the target R wave is determined to be valid. If the previous RR interval is less than the first product, and the average of the previous RR interval and the current RR interval is between the first product and the second product, the target R wave is determined to be valid, where the second product is the product of the average RR interval and the second value, and the second value is greater than the first value. For example, assuming the first value is 0.8 and the second value is 1.2, if the previous RR interval < 0.8 × average RR interval, and 0.8 × average RR interval < (previous RR interval + current RR interval) / 2 < 1.2 × average RR interval, the target R wave is determined to be valid. If the previous RR interval is less than the first product, and the current RR interval is between the first product and the second product, the target R wave is determined to be valid. For example, assuming the first value is 0.8 and the second value is 1.2, if the previous RR interval < 0.8 × average RR interval, and 0.8 × average RR interval < current RR interval < 1.2 × average RR interval, the target R wave is determined to be valid. If the previous RR interval is less than the first product, and the previous RR interval is between the third product and the fourth product, the target R wave is determined to be valid, where the third product is the product of the current RR interval and the first value, and the fourth product is the product of the current RR interval and the second value. For example, assuming the first value is 0.8 and the second value is 1.2, if the previous RR interval < 0.8 × average RR interval, and 0.8 × current RR interval < previous RR interval < 1.2 × current RR interval, the target R wave is determined to be valid. In other cases other than those listed above, the target R wave is determined to be invalid. As Figure 6 shown, it is a schematic diagram of the operation process for determining whether the target R wave is valid according to the RR interval parameter as described above.

[0189] In one implementation manner of the embodiment of the present application, before calculating the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, it further includes:

[0190] (1) Obtain preprocessed electrocardiogram data, where the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0191] (2) Determine the abnormal data time period according to the preprocessed electrocardiogram data;

[0192] (3) Remove the electrocardiogram data in the original electrocardiogram data that is outside the abnormal data time period.

[0193] The R-wave fusion process of the ECG data of each channel described in step 103 can be regarded as a precise re-analysis of R-wave detection. The obtained fused R-wave sequence is used as the re-analysis result, which can be used to correct the pre-analysis R-wave position detection result. Since the amount of the original ECG data is extremely large, a complete and precise re-analysis of the original ECG data requires a large amount of time and computational effort. Considering that the parts with errors in the pre-analysis R-wave position detection result usually lie in the abnormal data time periods of the pre-processed ECG data, such as the signal segments where abnormal heartbeats are located, the abnormal data time periods can be identified first, and the ECG data outside the abnormal data time periods in the original ECG data can be removed, that is, only the part of the ECG data within the abnormal data time segments needs to be precisely re-analyzed, which can greatly reduce the computational effort and time consumed by the algorithm operation. The methods for determining the abnormal data time periods can include: identifying abnormal heartbeats in the scatter plot based on the dilation algorithm, identifying abnormal heartbeats in the time scatter plot based on the sample entropy algorithm, identifying abnormal heartbeats in the histogram based on the confidence interval method, manually selecting one or more abnormal heartbeats by the user based on the operable interface, automatically screening one or more abnormal heartbeats by certain fixed rules based on the operable interface, etc. The following will introduce these methods separately.

[0194] In an implementation manner of the embodiment of the present application, determining the abnormal data time period according to the pre-processed ECG data includes:

[0195] (1) Converting the pre-processed ECG data into a corresponding scatter plot;

[0196] (2) Identifying the first abnormal heartbeats in the scatter plot based on the dilation and erosion algorithm;

[0197] (3) Determining the signal segments corresponding to the first abnormal heartbeats in the pre-processed ECG data as the abnormal data time periods.

[0198] After converting the pre-processed ECG data into a corresponding scatter plot, the abnormal heartbeats in the scatter plot can be identified based on the dilation and erosion algorithm, denoted as the first abnormal heartbeats, and then the signal segments corresponding to the first abnormal heartbeats in the pre-processed ECG data are determined as the abnormal data time periods. Obviously, since the first abnormal heartbeats can be one or more, the determined abnormal data time periods can also be one or more. Specifically, the dilation and erosion algorithm performs dilation processing or erosion processing on the pixels of the operated image, and its principle can refer to the prior art. The dilation and erosion algorithm can be used to identify the contour of the core area of the scatter plot, remove the scatter points within the core area, and the remaining scatter points in the non-core area are the abnormal points, and the ECG signals corresponding to these abnormal points are the first abnormal heartbeats. As Figure 7 shown, it is a schematic diagram of the scatter plot converted based on the pre-processed ECG data. The dilation and erosion algorithm can be used to identify Figure 7The contour of the core region of the scatter plot shown, and then the scatter points within the core region are removed, so as to obtain the scatter plot after removing the scatter points in the core region as shown in Figure 8 In Figure 8 , the remaining black scatter points are the abnormal points, and the corresponding electrocardiogram signals of these abnormal points are obtained as the first abnormal heartbeats.

[0199] In another implementation manner of the embodiment of the present application, according to the preprocessed electrocardiogram data, an abnormal data time period is determined, including:

[0200] (1) Convert the preprocessed electrocardiogram data into a corresponding time scatter plot;

[0201] (2) Identify the second abnormal heartbeats in the time scatter plot based on the sample entropy algorithm;

[0202] (3) Determine the signal segment corresponding to the second abnormal heartbeats in the preprocessed electrocardiogram data as the abnormal data time period.

[0203] After converting the preprocessed electrocardiogram data into a corresponding time scatter plot, the abnormal heartbeats in the time scatter plot can be identified based on the sample entropy algorithm, denoted as the second abnormal heartbeats, and then the signal segment corresponding to the second abnormal heartbeats in the preprocessed electrocardiogram data is determined as the abnormal data time period. Obviously, since the second abnormal heartbeats can be one or more, the determined abnormal data time periods can also be one or more. Specifically, the sample entropy algorithm is an improved method based on approximate entropy for measuring the complexity of time series, which is very suitable for the analysis of biomedical signal sequences. Its principle can refer to the prior art. Using the sample entropy algorithm, the region with frequent RR interval changes in the time scatter plot can be identified, and the electrocardiogram signal corresponding to this region is the second abnormal heartbeat. As shown in Figure 9 , which is a schematic diagram of the time scatter plot converted from the preprocessed electrocardiogram data. Using the sample entropy algorithm, the region with frequent RR interval changes as shown in Figure 9 in the time scatter plot can be identified. As shown in Figure 10 , which is a schematic diagram of the region with frequent RR interval changes identified in the time scatter plot. The region with frequent changes is the region of the black dot part in Figure 10 , which is different from the gray dots in the non-frequent change region. The electrocardiogram signal corresponding to the region with frequent changes is the abnormal heartbeat.

[0204] In another implementation manner of the embodiment of the present application, according to the preprocessed electrocardiogram data, an abnormal data time period is determined, including:

[0205] (1) Convert the preprocessed electrocardiogram data into a corresponding histogram;

[0206] (2) Identify the third abnormal heartbeats in the histogram based on the method of confidence interval;

[0207] (3) Determine the signal segment corresponding to the third abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period.

[0208] After converting the preprocessed electrocardiogram data into the corresponding histogram, the abnormal heartbeats in the histogram can be identified based on the confidence interval method, denoted as the third abnormal heartbeats. Then, the signal segment corresponding to the third abnormal heartbeats in the preprocessed electrocardiogram data is determined as the abnormal data time period. Obviously, since the third abnormal heartbeats can be one or more, the determined abnormal data time periods can also be one or more. Specifically, based on the confidence interval method, the first 5% area and the last 5% area of the histogram distribution can be selected as the abnormal areas, and the electrocardiogram signals corresponding to the abnormal areas are used as the third abnormal heartbeats. As Figure 11 shown, it is a schematic diagram of the histogram obtained by converting the preprocessed electrocardiogram data. Using the confidence interval-based method, the first 5% area and the last 5% area of the histogram distribution can be selected as the abnormal areas. As Figure 12 shown, it is a schematic diagram of the selected abnormal areas in the histogram, and the electrocardiogram signals corresponding to these abnormal areas are the abnormal heartbeats.

[0209] As Figure 13 shown, it is a schematic diagram of the operation process for automatically identifying abnormal heartbeats based on various algorithms. After converting the preprocessed electrocardiogram data into the corresponding scatter plot, time scatter plot, and histogram respectively, for the scatter plot, the dilation and erosion algorithm is used to identify the contour of the core area of the scatter plot, thereby obtaining the abnormal heartbeats of the scatter plot; for the time scatter plot, the sample entropy is used to identify the area where the RR interval changes frequently, thereby obtaining the abnormal heartbeats of the time scatter plot; for the histogram, the confidence interval method is used to screen out the abnormal areas, thereby obtaining the abnormal heartbeats of the histogram. A segment selection switch can be set, and the user can select one or more of the abnormal heartbeats of the scatter plot, the abnormal heartbeats of the time scatter plot, and the abnormal heartbeats of the histogram by themselves, and then merge the selected abnormal heartbeats by the user. After merging the abnormal heartbeats, certain preprocessing can be performed on the merged abnormal heartbeats, which can specifically include dilation processing, duplicate segment removal processing, and erosion processing, etc. Among them, the dilation processing can expand all the R waves in the abnormal heartbeats forward and backward for a certain duration (for example, 3 minutes), the duplicate segment removal processing refers to removing the duplicate segments in the abnormal heartbeats, determining the start point and end point of the reanalysis data segment, and the erosion processing refers to reducing the start point and end point segments of the abnormal heartbeats by a certain duration (for example, 2.5 minutes). After the merged abnormal heartbeats are preprocessed, they can be used as the segments to be accurately reanalyzed, that is, the abnormal data time periods.

[0210] In another implementation manner of the embodiment of the present application, determining the abnormal data time period according to the preprocessed electrocardiogram data includes:

[0211] (1) Convert the preprocessed electrocardiogram data into a corresponding electrocardiogram data display graph;

[0212] (2) Determine the fourth abnormal heartbeat selected by the user based on the electrocardiogram data display graph;

[0213] (3) Determine the signal segment corresponding to the fourth abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period.

[0214] The preprocessed electrocardiogram data can be converted into corresponding electrocardiogram data display graphs, such as page scan graphs, scatter plots, templates, histograms, superimposed graphs, event graphs, and electrocardiograms, etc. These electrocardiogram data display graphs are output through an operable interface. After the user sees these electrocardiogram data display graphs through the operable interface, they can perform manual analysis and manually select one or more abnormal heartbeats from the operable interface, denoted as the fourth abnormal heartbeat. Then, determine the signal segment corresponding to the fourth abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period. Obviously, since the fourth abnormal heartbeat can be one or more, the determined abnormal data time period can also be one or more. As Figure 14 shown, it is a schematic diagram of the operation process for the user to manually select abnormal heartbeats. After converting the preprocessed electrocardiogram data into corresponding electrocardiogram data display graphs such as page scan graphs, scatter plots, templates, histograms, superimposed graphs, event graphs, and electrocardiograms and outputting them through the operable interface, the user can operate in the operable interface and manually select one or more abnormal heartbeats, one or more types of abnormal heartbeats, and one or more segments of abnormal heartbeats from these electrocardiogram data display graphs. Then, merge the abnormal heartbeats selected by the user. After merging the abnormal heartbeats, it is also possible to perform dilation processing, duplicate segment removal processing, and erosion processing on the merged abnormal heartbeats, so as to obtain the segment to be accurately re-analyzed, that is, the abnormal data time period.

[0215] In an embodiment of the present application, first, electrocardiogram data of multiple channels corresponding to each sampling point collected at multiple sampling points is obtained. Then, the noise coefficient of each R wave in the electrocardiogram data of multiple channels is calculated respectively. This noise coefficient can reflect the degree of interference received by the R wave. Finally, each sampling point is traversed to detect whether there is an R wave at the position of each sampling point. Among them, when traversing the sampling points, if it is detected that there is at least one channel's electrocardiogram data among the electrocardiogram data of multiple channels corresponding to a certain sampling point that has an R wave with a noise coefficient satisfying a preset condition, it means that at least one channel has detected an R wave with a relatively small degree of interference. Then, it is further detected whether the electrocardiogram data of other channels in multiple channels also has an R wave with a noise coefficient satisfying the preset condition within a nearby time range determined according to this sampling point. The channels where R waves are detected are called target channels. If the ratio of the number of target channels to the number of multiple channels is greater than a first threshold, it means that a sufficient number of channels have detected R waves with a relatively small degree of interference within the time range near this sampling point. At this time, it can be determined that there is an R wave at the position of this sampling point. The above process uses the noise coefficient to eliminate the detected R waves with a relatively large degree of interference, and combines the electrocardiogram data of multiple channels to verify the position of the R wave, which can improve the accuracy of R wave position detection to a certain extent.

[0216] In summary, the embodiment of the present application realizes precise reanalysis by using the technical means of multi-channel R wave fusion. The obtained reanalysis results can be used to correct the pre-analysis R wave position detection results. In addition, the embodiment of the present application also provides various methods for identifying abnormal data time periods, and only performs precise reanalysis on the electrocardiogram data within the abnormal data time periods, which can effectively reduce the computational amount and time consumed by the algorithm operation.

[0217] It should be understood that the magnitudes of the sequence numbers of the steps in the above respective embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0218] The above mainly describes a method for detecting R waves in electrocardiogram data. Next, a device for detecting R waves in electrocardiogram data will be described.

[0219] Please refer to Figure 15 , an embodiment of a device for detecting R waves in electrocardiogram data in an embodiment of the present application includes:

[0220] An electrocardiogram data acquisition module 1501, configured to acquire original electrocardiogram data, where the original electrocardiogram data includes electrocardiogram data of multiple channels corresponding to each sampling point collected at multiple sampling points;

[0221] A noise coefficient calculation module 1502 is configured to calculate the noise coefficient of each R wave in the electrocardiogram data of multiple channels respectively, and the noise coefficient is used to represent the degree of signal interference received by the corresponding R wave.

[0222] An R wave detection module 1503 is configured to, for each sampling point, if there is at least one R wave in the electrocardiogram data of at least one channel among the electrocardiogram data of multiple channels corresponding to the sampling point, and the noise coefficient of the R wave satisfies a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel in the multiple channels to the number of the multiple channels is greater than a first threshold, then determine that there is an R wave at the position of the sampling point; wherein, the electrocardiogram data of the target channel has an R wave with a noise coefficient satisfying the preset condition within the time range determined according to the sampling point.

[0223] In an implementation manner of the embodiment of the present application, the noise coefficient calculation module includes:

[0224] A pre-analysis result acquisition unit is configured to acquire a pre-analysis R wave position detection result; wherein, the pre-analysis R wave position detection result is obtained by performing R wave position detection on preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is electrocardiogram data obtained by preprocessing the original electrocardiogram data.

[0225] A time segment construction unit is configured to respectively construct each time segment corresponding one-to-one to each R wave vertex according to each R wave vertex in the pre-analysis R wave position detection result.

[0226] A noise coefficient calculation unit is configured to, for each time segment, calculate the noise coefficient of the R wave of the electrocardiogram data of each channel respectively according to the signal change characteristics of the electrocardiogram data of each channel within the time segment.

[0227] In an implementation manner of the embodiment of the present application, the noise coefficient calculation unit includes:

[0228] A noise coefficient calculation sub-unit is configured to, for each channel, calculate the absolute value obtained by performing differential processing on multiple signal values of the electrocardiogram data of the channel within the time segment; calculate the integral of the absolute value within the time segment and calculate the mean value of the integral as the noise coefficient of the R wave of the electrocardiogram data of the channel within the time segment.

[0229] In an implementation manner of the embodiment of the present application, the R wave detection device for electrocardiogram data further includes:

[0230] A noise level calculation module is configured to calculate the noise level value of each channel respectively according to the noise coefficient of each R wave in the electrocardiogram data of multiple channels.

[0231] A channel removal module is configured to remove the electrocardiogram data of a set number of channels with the highest noise level values among the multiple channels.

[0232] In an implementation manner of the embodiment of the present application, the noise level calculation module includes:

[0233] A noise coefficient sorting unit, configured to sort the noise coefficients of each R wave in the electrocardiogram data of multiple channels from small to large, and construct an initial noise coefficient curve based on the sorted noise coefficients;

[0234] A dividing line threshold determination unit, configured to determine a second threshold according to the initial noise coefficient curve;

[0235] A normalization processing unit, configured to perform normalization processing on the initial noise coefficient curve with the second threshold as the threshold of the dividing line to obtain a normalized noise coefficient curve;

[0236] A noise level calculation unit, configured to calculate the noise level value of each channel according to the normalized noise coefficient curve.

[0237] In an implementation manner of the embodiment of the present application, the dividing line threshold determination unit includes:

[0238] A curve difference sub-unit, configured to calculate the difference between the initial noise coefficient curve and the translated noise coefficient curve to obtain a difference noise coefficient curve; wherein, the translated noise coefficient curve is obtained by translating the initial noise coefficient curve;

[0239] A dividing line threshold determination sub-unit, configured to determine the second threshold according to the peak value in the difference noise coefficient curve.

[0240] In an implementation manner of the embodiment of the present application, the dividing line threshold determination sub-unit includes:

[0241] A first threshold determination sub-unit, configured to if there is a peak value with an amplitude greater than a third threshold within the abscissa range of the last m% of the difference noise coefficient curve, select a first peak value from the peak values with an amplitude greater than the third threshold, and determine the noise coefficient corresponding to the first peak value as the second threshold;

[0242] A second threshold determination sub-unit, configured to if there is a peak value with an amplitude less than or equal to the third threshold within the abscissa range of the last m% of the difference noise coefficient curve, select the second peak value with the largest amplitude from the peak values with an amplitude less than or equal to the third threshold, and determine the noise coefficient corresponding to the second peak value as the second threshold;

[0243] A third threshold determination sub-unit, configured to if there is no peak value within the abscissa range of the last m% of the difference noise coefficient curve and there is a peak value within the abscissa range of the last n% of the difference noise coefficient curve, select the third peak value with the largest amplitude from the peak values within the abscissa range of the last n%, and determine the noise coefficient corresponding to the third peak value as the second threshold, where n > m;

[0244] A fourth threshold determination subunit, configured to, if there is no peak within the abscissa range of the latter n% of the difference noise coefficient curve, determine the noise coefficient corresponding to the starting point of the abscissa range of the latter m% of the difference noise coefficient curve as the second threshold.

[0245] In an implementation manner of the embodiment of the present application, the R-wave detection module includes:

[0246] An RR interval parameter determination unit, configured to, if there is at least one channel of electrocardiogram data among the electrocardiogram data of multiple channels corresponding to the sampling point having an R wave with a noise coefficient satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than a first threshold, determine the RR interval parameter corresponding to the target R wave having a noise coefficient satisfying the preset condition in the electrocardiogram data of the at least one channel;

[0247] A validity detection unit, configured to determine whether the target R wave is valid according to the RR interval parameter;

[0248] An R-wave position determination unit, configured to, if the target R wave is valid, determine that there is an R wave at the position of the sampling point.

[0249] In an implementation manner of the embodiment of the present application, the RR interval parameter includes an average RR interval, a current RR interval, a previous RR interval, and an RR interval rule condition identifier; the validity detection unit includes:

[0250] A first validity detection subunit, configured to, if the RR interval rule condition identifier is that the RR interval is irregular, determine that the target R wave is valid;

[0251] A second validity detection subunit, configured to, if the RR interval rule condition identifier is that the RR interval is regular and the previous RR interval is greater than or equal to a first product, determine that the target R wave is valid, where the first product is the product of the average RR interval and a first value;

[0252] A third validity detection subunit, configured to, if the RR interval rule condition identifier is that the RR interval is regular, the previous RR interval is less than the first product, and the average value of the previous RR interval and the current RR interval is between the first product and a second product, determine that the target R wave is valid, where the second product is the product of the average RR interval and a second value, and the second value is greater than the first value;

[0253] A fourth validity detection subunit, configured to, if the RR interval rule condition identifier is that the RR interval is regular, the previous RR interval is less than the first product, and the current RR interval is between the first product and the second product, determine that the target R wave is valid;

[0254] The fifth validity detection subunit is used to determine that the target R wave is valid if the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the previous RR interval is between the third product and the fourth product, where the third product is the product of the current RR interval and the first value, and the fourth product is the product of the current RR interval and the second value.

[0255] In an implementation manner of the embodiment of the present application, the RR interval parameter determination unit includes:

[0256] The pre-analysis result acquisition subunit is used to obtain the pre-analysis R wave position detection result if the number of R waves that have been determined to exist currently is less than the fourth threshold; wherein, the pre-analysis R wave position detection result is obtained by performing R wave position detection on the pre-processed electrocardiogram data, and the pre-processed electrocardiogram data is the electrocardiogram data obtained after pre-processing the original electrocardiogram data.

[0257] The first average RR interval calculation subunit is used to calculate the average value of multiple RR intervals included in the pre-analysis R wave position detection result to obtain the average RR interval.

[0258] The first current RR interval calculation subunit is used to calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval.

[0259] The first previous RR interval calculation subunit is used to calculate the interval duration between the last R wave and the penultimate R wave among the R waves that have been determined to exist as the previous RR interval.

[0260] The first RR interval rule condition flag determination subunit is used to determine that the RR interval rule condition flag is RR interval irregular if the difference between any two RR intervals among the multiple RR intervals included in the pre-analysis R wave position detection result is greater than the fifth threshold, otherwise determine that the RR interval rule condition flag is RR interval regular.

[0261] In another implementation manner of the embodiment of the present application, the RR interval parameter determination unit includes:

[0262] The second average RR interval calculation subunit is used to calculate the average value of multiple RR intervals included in the R waves that have been determined to exist currently to obtain the average RR interval if the number of R waves that have been determined to exist currently is greater than or equal to the fourth threshold.

[0263] The second current RR interval calculation subunit is used to calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval.

[0264] The second previous RR interval calculation subunit is configured to calculate the interval duration between the last R wave and the second-to-last R wave among the already determined existing R waves as the previous RR interval;

[0265] The second RR interval rule condition identification determination subunit is configured to determine that the RR interval rule condition identification is RR interval irregular if the difference between any two RR intervals among the multiple RR intervals included in the currently determined existing R waves is greater than the fifth threshold, otherwise determine that the RR interval rule condition identification is RR interval regular.

[0266] In an implementation manner of the embodiment of the present application, the R wave detection device for electrocardiogram data further includes:

[0267] The preprocessed electrocardiogram data acquisition module is configured to acquire preprocessed electrocardiogram data, which is the electrocardiogram data obtained after preprocessing the original electrocardiogram data;

[0268] The abnormal data time period determination module is configured to determine an abnormal data time period according to the preprocessed electrocardiogram data;

[0269] The electrocardiogram data removal module is configured to remove the electrocardiogram data in the original electrocardiogram data that is outside the abnormal data time period.

[0270] In an implementation manner of the embodiment of the present application, the abnormal data time period determination module includes:

[0271] The scatter plot conversion unit is configured to convert the preprocessed electrocardiogram data into a corresponding scatter plot;

[0272] The first abnormal heartbeat recognition unit is configured to recognize the first abnormal heartbeat in the scatter plot based on the dilation and erosion algorithm;

[0273] The first abnormal data time period determination unit is configured to determine the signal segment corresponding to the first abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period;

[0274] The time scatter plot conversion unit is configured to convert the preprocessed electrocardiogram data into a corresponding time scatter plot;

[0275] The second abnormal heartbeat recognition unit is configured to recognize the second abnormal heartbeat in the time scatter plot based on the sample entropy algorithm;

[0276] The second abnormal data time period determination unit is configured to determine the signal segment corresponding to the second abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period;

[0277] The histogram conversion unit is configured to convert the preprocessed electrocardiogram data into a corresponding histogram;

[0278] A third abnormal heartbeat recognition unit, configured to recognize a third abnormal heartbeat in a histogram based on a confidence interval method;

[0279] A third abnormal data time period determination unit, configured to determine a signal segment corresponding to the third abnormal heartbeat in the preprocessed electrocardiogram data as an abnormal data time period.

[0280] In another implementation manner of the embodiment of the present application, the abnormal data time period determination module includes:

[0281] An electrocardiogram data display graph conversion unit, configured to convert the preprocessed electrocardiogram data into a corresponding electrocardiogram data display graph;

[0282] An abnormal heartbeat determination unit, configured to determine a fourth abnormal heartbeat selected by a user based on the electrocardiogram data display graph;

[0283] A fourth abnormal data time period determination unit, configured to determine a signal segment corresponding to the fourth abnormal heartbeat in the preprocessed electrocardiogram data as an abnormal data time period.

[0284] The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the R-wave detection method for electrocardiogram data as described in any of the above embodiments is implemented.

[0285] The embodiment of the present application further provides a computer program product, and when the computer program product runs on an electronic device, the electronic device is enabled to execute the R-wave detection method for electrocardiogram data as described in any of the above embodiments.

[0286] Figure 16 is a schematic diagram of an electronic device provided by an embodiment of the present application. As Figure 16 shown, the electronic device 16 in this embodiment includes: a processor 160, a memory 161, and a computer program 162 stored in the memory 161 and executable on the processor 160. When the processor 160 executes the computer program 162, the steps in the embodiments of the above various R-wave detection methods for electrocardiogram data are implemented, such as Figure 1 the steps 101 to 103 shown. Or, when the processor 160 executes the computer program 162, the functions of each module / unit in the above device embodiments are implemented, such as Figure 15 the functions of the modules 1501 to 1503 shown.

[0287] The computer program 162 can be divided into one or more modules / units, which are stored in the memory 161 and executed by the processor 160 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 162 in the electronic device 16.

[0288] The so-called processor 160 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0289] The memory 161 may be an internal storage unit of the electronic device 16, such as the hard disk or memory of the electronic device 16. The memory 161 may also be an external storage device of the electronic device 16, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 16. Further, the memory 161 may also include both the internal storage unit and the external storage device of the electronic device 16. The memory 161 is used to store the computer program and other programs and data required by the electronic device. The memory 161 may also be used to temporarily store data that has been output or is to be output.

[0290] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0291] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0292] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0293] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0294] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical functional division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical or other forms.

[0295] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.

[0296] In addition, each functional unit in the various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0297] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, all or part of the processes in the above-described embodiments of the present application can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0298] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting R waves in electrocardiogram data, characterized in that, it includes: Obtain the original electrocardiogram data, where the original electrocardiogram data includes electrocardiogram data of multiple channels corresponding to each sampling point collected at multiple sampling points; Calculate the noise coefficient of each R wave in the electrocardiogram data of the multiple channels respectively, where the noise coefficient is used to represent the degree of signal interference received by the corresponding R wave; For each sampling point, if there is at least one channel of electrocardiogram data among the electrocardiogram data of the multiple channels corresponding to the sampling point that has an R wave with a noise coefficient satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel in the multiple channels to the number of the multiple channels is greater than a first threshold, then determine that there is an R wave at the position of the sampling point; wherein, the electrocardiogram data of the target channel has an R wave with a noise coefficient satisfying a preset condition within the time range determined according to the sampling point.

2. The method according to claim 1, characterized in that, The step of calculating the noise coefficient of each R wave in the electrocardiogram data of the multiple channels respectively includes: Obtain the pre-analysis R wave position detection result; wherein, the pre-analysis R wave position detection result is obtained by detecting the R wave position of the preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data; According to each R wave vertex in the pre-analysis R wave position detection result, respectively construct each time segment corresponding one-to-one with each R wave vertex; For each time segment, according to the signal change characteristics of the electrocardiogram data of each channel within the time segment, calculate the noise coefficient of the R wave of the electrocardiogram data of each channel within the time segment respectively.

3. The method according to claim 2, characterized in that, The step of calculating the noise coefficient of the R wave of the electrocardiogram data of each channel within the time segment according to the signal change characteristics of the electrocardiogram data of each channel within the time segment respectively includes: For each channel, calculate the absolute value obtained by differentiating multiple signal values of the electrocardiogram data of the channel within the time segment; find the integral of the absolute value within the time segment and calculate the mean value of the integral as the noise coefficient of the R wave of the electrocardiogram data of the channel within the time segment.

4. The method according to claim 1, characterized in that, After calculating the noise coefficient of each R wave in the electrocardiogram data of the multiple channels respectively, and before for each sampling point, if there is at least one channel of electrocardiogram data among the electrocardiogram data of the multiple channels corresponding to the sampling point that has an R wave with a noise coefficient satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel in the multiple channels to the number of the multiple channels is greater than a first threshold, then determine that there is an R wave at the position of the sampling point, the method further includes: According to the noise coefficient of each R wave in the electrocardiogram data of the multiple channels, calculate the noise level value of each channel respectively; Remove the electrocardiogram data of a set number of channels with the highest noise level values among the multiple channels.

5. The method according to claim 4, wherein, the calculating of the noise level value of each channel according to the noise coefficient of each R wave in the electrocardiogram data of the multiple channels respectively includes: sorting the noise coefficients of each R wave in the electrocardiogram data of the multiple channels from small to large, and constructing an initial noise coefficient curve based on the sorted noise coefficients; determining a second threshold according to the initial noise coefficient curve; performing normalization processing on the initial noise coefficient curve with the second threshold as the threshold of the dividing line to obtain a normalized noise coefficient curve; calculating the noise level value of each channel according to the normalized noise coefficient curve.

6. The method according to claim 5, wherein, the determining of the second threshold according to the initial noise coefficient curve includes: calculating the difference between the initial noise coefficient curve and the translated noise coefficient curve to obtain a difference noise coefficient curve; wherein, the translated noise coefficient curve is obtained by translating the initial noise coefficient curve; determining the second threshold according to the peak value in the difference noise coefficient curve.

7. The method according to claim 6, wherein, the abscissa of the initial noise coefficient curve represents each R wave in the electrocardiogram data of the multiple channels, and the ordinate of the initial noise coefficient curve represents the noise coefficient of each R wave in the electrocardiogram data of the multiple channels; the determining of the second threshold according to the peak value in the difference noise coefficient curve includes: if there is a peak value with an amplitude greater than a third threshold within the abscissa range of the last m% of the difference noise coefficient curve, then select a first peak value from the peak values with an amplitude greater than the third threshold, and determine the noise coefficient corresponding to the first peak value as the second threshold; if there is a peak value with an amplitude less than or equal to the third threshold within the abscissa range of the last m% of the difference noise coefficient curve, then select the second peak value with the largest amplitude from the peak values with an amplitude less than or equal to the third threshold, and determine the noise coefficient corresponding to the second peak value as the second threshold; if there is no peak value within the abscissa range of the last m% of the difference noise coefficient curve, and there is a peak value within the abscissa range of the last n% of the difference noise coefficient curve, then select the third peak value with the largest amplitude from the peak values existing within the abscissa range of the last n%, and determine the noise coefficient corresponding to the third peak value as the second threshold, where n > m; if there is no peak value within the abscissa range of the last n% of the difference noise coefficient curve, then determine the noise coefficient corresponding to the starting point of the abscissa range of the last m% of the difference noise coefficient curve as the second threshold.

8. The method according to claim 1, wherein, If there is an R wave in the electrocardiogram data of at least one channel among the electrocardiogram data of the multiple channels corresponding to the sampling point, and the noise coefficient of the electrocardiogram data of the at least one channel meets the preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than the first threshold, then determining that there is an R wave at the position of the sampling point includes: If there is an R wave in the electrocardiogram data of at least one channel among the electrocardiogram data of the multiple channels corresponding to the sampling point, and the noise coefficient of the electrocardiogram data of the at least one channel meets the preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than the first threshold, then determining the RR interval parameter corresponding to the target R wave whose noise coefficient of the electrocardiogram data of the at least one channel meets the preset condition; Determining whether the target R wave is valid according to the RR interval parameter; If the target R wave is valid, then determining that there is an R wave at the position of the sampling point.

9. The method according to claim 8, wherein, the RR interval parameter includes an average RR interval, a current RR interval, a previous RR interval, and an RR interval rule condition flag; and determining whether the target R wave is valid according to the RR interval parameter includes: If the RR interval rule condition flag is that the RR interval is irregular, then determining that the target R wave is valid; If the RR interval rule condition flag is that the RR interval is regular, and the previous RR interval is greater than or equal to the first product, then determining that the target R wave is valid, where the first product is the product of the average RR interval and the first value; If the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the average of the previous RR interval and the current RR interval is between the first product and the second product, then determining that the target R wave is valid, where the second product is the product of the average RR interval and the second value, and the second value is greater than the first value; If the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the current RR interval is between the first product and the second product, then determining that the target R wave is valid; If the RR interval rule condition flag is that the RR interval is regular, the previous RR interval is less than the first product, and the previous RR interval is between the third product and the fourth product, then determining that the target R wave is valid, where the third product is the product of the current RR interval and the first value, and the fourth product is the product of the current RR interval and the second value.

10. The method according to claim 9, wherein, determining the RR interval parameter corresponding to the target R wave whose noise coefficient of the electrocardiogram data of the at least one channel meets the preset condition includes: If the number of R waves that have been determined to exist currently is less than the fourth threshold, obtain the pre-analysis R wave position detection result; wherein, the pre-analysis R wave position detection result is obtained by performing R wave position detection on the preprocessed electrocardiogram data, and the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data; Calculate the average value of multiple RR intervals included in the pre-analysis R wave position detection result to obtain the average RR interval; Calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval; Calculate the interval duration between the last R wave and the penultimate R wave among the R waves that have been determined to exist as the previous RR interval; If the difference between any two RR intervals among the multiple RR intervals included in the pre-analysis R wave position detection result is greater than the fifth threshold, determine that the RR interval rule condition flag is RR interval irregular; otherwise, determine that the RR interval rule condition flag is RR interval regular.

11. The method according to claim 9, wherein, the determining the RR interval parameters corresponding to the target R wave for which the noise coefficient of the electrocardiogram data of the at least one channel satisfies the preset condition includes: If the number of R waves that have been determined to exist currently is greater than or equal to the fourth threshold, calculate the average value of multiple RR intervals included in the R waves that have been determined to exist currently to obtain the average RR interval; Calculate the interval duration between the target R wave and the last R wave among the R waves that have been determined to exist currently as the current RR interval; Calculate the interval duration between the last R wave and the penultimate R wave among the R waves that have been determined to exist as the previous RR interval; If the difference between any two RR intervals among the multiple RR intervals included in the R waves that have been determined to exist currently is greater than the fifth threshold, determine that the RR interval rule condition flag is RR interval irregular; otherwise, determine that the RR interval rule condition flag is RR interval regular.

12. The method according to any one of claims 1 to 11, wherein, before respectively calculating the noise coefficient of each R wave in the electrocardiogram data of the multiple channels, further includes: Obtain the preprocessed electrocardiogram data, where the preprocessed electrocardiogram data is the electrocardiogram data obtained after preprocessing the original electrocardiogram data; Determine the abnormal data time period according to the preprocessed electrocardiogram data; Remove the electrocardiogram data in the original electrocardiogram data that is outside the abnormal data time period.

13. The method according to claim 12, wherein, the determining the abnormal data time period according to the preprocessed electrocardiogram data includes: Convert the preprocessed electrocardiogram data into a corresponding scatter plot; Identify the first abnormal heartbeat in the scatter plot based on the dilation and erosion algorithm; Determine the signal segment corresponding to the first abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period; Or, Convert the preprocessed electrocardiogram data into a corresponding time scatter plot; Identify the second abnormal heartbeat in the time scatter plot based on the sample entropy algorithm; Determine the signal segment corresponding to the second abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period; Or, Convert the preprocessed electrocardiogram data into a corresponding histogram; Identify the third abnormal heartbeat in the histogram based on the confidence interval method; Determine the signal segment corresponding to the third abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period.

14. The method according to claim 12, wherein, the determining the abnormal data time period according to the preprocessed electrocardiogram data includes: Convert the preprocessed electrocardiogram data into a corresponding electrocardiogram data display graph; Determine the fourth abnormal heartbeat selected by the user based on the electrocardiogram data display graph; Determine the signal segment corresponding to the fourth abnormal heartbeat in the preprocessed electrocardiogram data as the abnormal data time period.

15. An R-wave detection device for electrocardiogram data, wherein, it includes: An electrocardiogram data acquisition module, configured to acquire original electrocardiogram data, where the original electrocardiogram data includes electrocardiogram data of each of the multiple channels corresponding to each of the multiple sampling points collected; A noise coefficient calculation module, configured to calculate the noise coefficient of each R wave in the electrocardiogram data of the multiple channels respectively, and the noise coefficient is used to represent the degree of signal interference received by the corresponding R wave; An R-wave detection module, for each of the sampling points, if there is at least one channel of electrocardiogram data among the electrocardiogram data of the multiple channels corresponding to the sampling point that has an R wave with a noise coefficient satisfying a preset condition, and the ratio of the number of target channels existing in the other channels except the at least one channel among the multiple channels to the number of the multiple channels is greater than a first threshold, then determine that there is an R wave at the position of the sampling point; wherein, the electrocardiogram data of the target channel has an R wave with a noise coefficient satisfying a preset condition within the time range determined according to the sampling point.

16. An electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, when the processor executes the computer program, it implements the R-wave detection method for electrocardiogram data according to any one of claims 1 to 14.

17. A computer-readable storage medium, the computer-readable storage medium stores a computer program, wherein, when the computer program is executed by a processor, it implements the R-wave detection method for electrocardiogram data according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • QRS wave group verification method of multiple-lead electrocardiosignal, device thereof, equipment and medium

    CN109009084A

  • Electrocardiosignal R-wave detection method and system

    CN109009085A

  • R-wave detection method, device, equipment and medium

    CN113499080A

  • Method and system to detect r-waves in cardiac activity signals

    US20190380610A1

  • Single channel and dual channel noise detection systems and techniques

    US20200297233A1