Method, device and equipment for classifying heart beat signal and storage medium

CN114617562BActive Publication Date: 2026-06-05AGRICULTURAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AGRICULTURAL BANK OF CHINA
Filing Date
2022-03-24
Publication Date
2026-06-05

Smart Images

  • Figure CN114617562B_ABST
    Figure CN114617562B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a heartbeat signal classification method, device, equipment and storage medium, the method comprises: the original electrocardiosignal is divided into each heartbeat corresponding original heartbeat signal, for each original heartbeat signal, according to the preset segmentation method original heartbeat signal is divided to obtain at least two original heartbeat segments;At least two template heartbeat segments corresponding to the original heartbeat signal are obtained and divided;For each original heartbeat segment, the template heartbeat segment corresponding to the original heartbeat segment in each preset heartbeat type template heartbeat segment is obtained as a heartbeat segment to be matched, the preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each heartbeat segment to be matched, and the preset heartbeat type to which the original heartbeat signal belongs is determined according to the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs. The effect of efficiently and accurately classifying heartbeat signals is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, and in particular to a method, apparatus, device, and storage medium for classifying heartbeat signals. Background Technology

[0002] With the development and progress of science and technology, people's living standards are constantly improving, but this has also brought about a significantly faster pace of life and more challenges to modern people's health. Among these challenges, cardiovascular disease is one of the leading causes of death worldwide. Existing methods for processing and analyzing heartbeat signals often involve training classifiers with a large number of samples and extracting features from the heartbeat signals. However, abnormal heartbeat signal waveforms are extremely complex. While the morphological features commonly used in existing classifiers have physiological significance, they can only distinguish types with significant shape differences. Faced with increasingly complex abnormal heartbeat signal waveforms, existing heartbeat signal classification and processing techniques are prone to misjudgment and are greatly affected by noise. Therefore, the inventors have discovered an urgent need for a technical solution that can process heartbeat signals with high efficiency and high accuracy. Summary of the Invention

[0003] This invention provides a method, apparatus, device, and storage medium for classifying heartbeat signals, so as to achieve accurate classification of heartbeat signals.

[0004] According to one aspect of the present invention, a method for classifying heartbeat signals is provided, comprising:

[0005] The raw electrocardiogram (ECG) signal is acquired and divided into raw heartbeat signals corresponding to each heartbeat. For each raw heartbeat signal, the raw heartbeat signal is divided into at least two raw heartbeat segments according to a preset segmentation method.

[0006] Obtain at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method.

[0007] For each original heartbeat segment, the template heartbeat segment corresponding to the original heartbeat segment in each preset heartbeat type is obtained as the heartbeat segment to be matched. The preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched.

[0008] The preset heartbeat type to which the original heartbeat signal belongs is determined based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs.

[0009] According to another aspect of the present invention, a heartbeat signal classification device is provided, comprising:

[0010] The raw heartbeat signal processing module is used to acquire raw electrocardiogram (ECG) signals, divide the raw ECG signals into raw heartbeat signals corresponding to each heartbeat, and divide each raw heartbeat signal into at least two raw heartbeat segments according to a pre-set segmentation method.

[0011] The template heartbeat signal processing module is used to acquire at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and to divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method.

[0012] The heartbeat fragment type determination module is used to, for each original heartbeat fragment, obtain the template heartbeat fragment corresponding to the original heartbeat fragment from the template heartbeat fragments of each preset heartbeat type as the heartbeat fragment to be matched, and determine the preset heartbeat type to which the original heartbeat fragment belongs based on the curve similarity between the original heartbeat fragment and each of the heartbeat fragments to be matched;

[0013] The heartbeat type determination module is used to determine the preset heartbeat type to which the original heartbeat signal belongs based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the heartbeat signal classification method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the heartbeat signal classification method according to any embodiment of the present invention.

[0019] The technical solution of this invention divides the original heartbeat signal into original heartbeat signals corresponding to each heartbeat. For each original heartbeat signal, it is divided into at least two original heartbeat segments according to a preset segmentation method. Compared with the method of identifying multiple heartbeats together in related technologies, the segmentation of a single heartbeat is more refined and helps to improve the speed of subsequent classification processing. Furthermore, the original heartbeat signal is segmented to achieve refined processing of the heartbeat signal, making it easier to capture more detailed information. Then, the template heartbeat signal is divided using the same preset segmentation method to facilitate comparison between the original heartbeat signal segments and the template heartbeat signal. Then, the preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each template heartbeat segment and the preset heartbeat type to which each template heartbeat segment belongs, thus realizing the classification of each original heartbeat segment in the original heartbeat signal. Finally, the preset heartbeat type to which the original heartbeat signal belongs is determined by combining the preset heartbeat type to which each original heartbeat segment belongs in the original heartbeat signal. By employing a refined processing method that segments and classifies heartbeat signals, the technical problems of inaccurate and inefficient heartbeat signal classification in existing technologies have been solved, achieving a high-efficiency and high-precision classification effect for heartbeat signals.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart of a method for classifying electrocardiogram signals according to Embodiment 1 of the present invention;

[0023] Figure 2 This is a schematic diagram of segmenting raw electrocardiogram signals according to an embodiment of the present invention;

[0024] Figure 3 This is a schematic diagram of a method for segmenting raw electrocardiogram signals according to an embodiment of the present invention;

[0025] Figure 4 This is a schematic diagram of a raw electrocardiogram signal type provided according to an embodiment of the present invention;

[0026] Figure 5This is a flowchart of another electrocardiogram signal classification method provided according to Embodiment 2 of the present invention;

[0027] Figure 6 This is a schematic diagram of raw electrocardiogram signal classification and matching according to an embodiment of the present invention;

[0028] Figure 7 This is a schematic diagram of electrocardiogram signal fitting according to an embodiment of the present invention;

[0029] Figure 8 This is a schematic diagram of a classification stage of an electrocardiogram signal according to an embodiment of the present invention;

[0030] Figure 9 This is a flowchart illustrating an electrocardiogram (ECG) signal classification device according to Embodiment 3 of the present invention.

[0031] Figure 10 This is a schematic diagram of the structure of an electronic device that implements a method for classifying electrocardiogram signals according to an embodiment of the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] Example 1

[0034] Figure 1 This is a flowchart illustrating a method for classifying heartbeat signals according to Embodiment 1 of the present invention. This embodiment is applicable to the identification and classification of abnormal heartbeat signals in electrocardiogram (ECG) diagnosis. The method can be executed by a heartbeat signal classification device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0035] S110. Obtain the original electrocardiogram (ECG) signal, divide the original ECG signal into original heartbeat signals corresponding to each heartbeat, and for each original heartbeat signal, divide the original heartbeat signal into at least two original heartbeat segments according to a preset segmentation method.

[0036] The original electrocardiogram (ECG) signal can be an ECG signal acquired by an ECG signal acquisition device, which can be any type of ECG signal acquisition device in the art; this embodiment of the invention does not impose any specific limitations. The original heartbeat signal can be the heart point signal obtained by segmenting the original ECG signal according to the heartbeat.

[0037] In this embodiment of the invention, after obtaining the original heartbeat signal, the original electrocardiogram signal is divided according to each heartbeat, thereby dividing the original electrocardiogram signal into the original heartbeat signal corresponding to each heartbeat. Then, for each original heartbeat signal, the original heartbeat signal is further divided according to a preset segmentation method to obtain two or more original heartbeat segments.

[0038] Optionally, in this embodiment of the invention, dividing the original heartbeat signal into original heartbeat signals corresponding to each heartbeat includes: determining the peak of the R wave in the original heartbeat signal, and dividing the curve segments corresponding to a first preset number of data points whose acquisition time is before the peak of the R wave and a second preset number of data points whose acquisition time is after the peak of the R wave, as the original heartbeat signal corresponding to each heartbeat.

[0039] The first preset quantity and the second preset quantity can be the same or different.

[0040] Specifically, the raw heartbeat signal can be segmented using the R wave in the ECG (Electrocardiogram) signal as the segmentation point. Optionally, during segmentation, a first preset number and a second preset number of data points can be pre-set. Using the R wave as the segmentation point, a first preset number of data points before the R wave peak and a second preset number of data points after the R wave peak are selected to segment the raw heartbeat signal into a single raw heartbeat signal. Alternatively, data points acquired at a first preset acquisition time before the R wave peak and data points acquired at a second preset acquisition time after the R wave peak can be selected to segment the raw heartbeat signal into a single raw heartbeat signal.

[0041] For example, such as Figure 2 As shown, the R-wave peak of the original ECG signal is detected in advance using a detection algorithm. Based on the detected R-wave peak, the periodically continuous ECG signal is segmented. The segmentation method can be to take the first 100 data points (or a duration of 278ms) and the last 150 data points (or a duration of 417ms) of the R-wave peak as a heartbeat, and then segment the original heartbeat signal into heartbeat 1, heartbeat 2, ..., and heartbeat n. Here, n is a positive integer.

[0042] The preset segmentation method can be understood as a pre-defined segmentation method. In this embodiment of the invention, there can be multiple preset segmentation methods, which can be set according to actual needs, and no specific limitation is made here.

[0043] Optionally, in this embodiment of the invention, dividing the original heartbeat signal into at least two original heartbeat segments according to a preset segmentation method includes: determining the target feature point corresponding to the original heartbeat signal, and dividing the original heartbeat signal into at least two original heartbeat segments according to the target feature point.

[0044] The target feature points include the starting point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the ending point of the original heartbeat signal.

[0045] The original heartbeat signal can be composed of continuous ECG signals, which mainly consist of P waves, QRS complexes, and T waves. The starting point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the ending point of the ECG signal can be used as target feature points.

[0046] Optionally, when segmenting the original heartbeat signal, one or more target feature points can be selected from the start point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the end point of the ECG signal to segment the original heartbeat signal and obtain at least two original heartbeat segments.

[0047] For example, such as Figure 3 As shown, the starting point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the ending point of a raw heartbeat signal are marked as target feature points. Based on the target feature points, the segment from the starting point to the inflection point of the P wave is divided into the first raw heartbeat segment, the segment from the inflection point of the P wave to the inflection point of the Q wave is divided into the second raw heartbeat segment, the segment from the inflection point of the Q wave to the inflection point of the R wave is divided into the third raw heartbeat segment, the segment from the inflection point of the R wave to the inflection point of the S wave is divided into the fourth raw heartbeat segment, the segment from the inflection point of the S wave to the inflection point of the T wave is divided into the fifth raw heartbeat segment, and the segment from the inflection point of the T wave to the ending point is divided into the sixth raw heartbeat segment. Thus, a raw electrocardiogram signal is divided into 6 raw heartbeat segments.

[0048] Optionally, in the original heartbeat signal, each data point corresponds to the heartbeat signal on the data point. In the original heartbeat signal, any one or more data points can be selected as target feature points. Then, when segmenting the original heartbeat signal, any one or more data points marked as target feature points can be selected from the preset data points to segment the original heartbeat signal and obtain at least two original heartbeat segments.

[0049] Optionally, during the acquisition of the raw ECG signal, the ECG signal detected at each acquisition time is recorded. Therefore, when segmenting the raw heartbeat signal, one or more acquisition times can be selected as target feature points. Thus, when segmenting the raw heartbeat signal, the acquisition times marked as target feature points within the signal time can be selected to segment the raw heartbeat signal, resulting in at least two raw heartbeat segments.

[0050] It is understandable that the original heartbeat signal is divided into two original heartbeat segments. Depending on the target feature points, the two original heartbeat segments can be of equal length and / or unequal length.

[0051] S120. Obtain at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method.

[0052] The preset heartbeat type can be a heartbeat type classified according to different electrocardiogram signal waveform shapes. Optionally, refer to this application. Figure 4 The provided electrocardiogram (ECG) waveform diagrams show that the ECG waveform shapes can be mainly divided into: N-type, S-type, V-type, and F-type.

[0053] In this embodiment of the invention, a template heartbeat signal matching a template heartbeat signal of a preset heartbeat type is obtained based on the original heartbeat signal. A preset segmentation method for dividing the original heartbeat signal is then selected to divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments. The segmentation method for the template heartbeat signal should be consistent with the segmentation method for the original heartbeat signal.

[0054] S130. For each original heartbeat segment, obtain the template heartbeat segment corresponding to the original heartbeat segment from the template heartbeat segments of each preset heartbeat type as the heartbeat segment to be matched, and determine the preset heartbeat type to which the original heartbeat segment belongs based on the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched.

[0055] The curve similarity can be the similarity between the electrocardiogram (ECG) signal curve in the original heartbeat segment and the ECG signal curve in the template heartbeat segment. The heartbeat segment to be matched can be the template heartbeat segment corresponding to the original heartbeat segment as the heartbeat segment to be matched with the current original heartbeat segment.

[0056] In this embodiment of the invention, for each original heartbeat segment, a template heartbeat segment corresponding to the original heartbeat segment is selected from each preset heartbeat type as the heartbeat segment to be matched, the curve similarity between the original heartbeat segment and each heartbeat segment to be matched is calculated, and the preset heartbeat type to which each original heartbeat segment belongs is determined based on the calculated curve similarity.

[0057] Optionally, before calculating the curve similarity between the original heartbeat fragment and each heartbeat fragment to be matched, it is also necessary to construct a corresponding training template and a test template for the original heartbeat fragment for each preset heartbeat type of heartbeat fragment to be matched.

[0058] For example, the template matching method, used for similarity calculation and matching in pattern recognition algorithms, can be employed to identify electrocardiogram (ECG) signals. For instance, the four signals N, S, V, and F can be divided into different templates to construct an ECG recognition system based on template matching, dividing the system data into training templates and test templates. Optionally, the training template can be represented as R = [r1, r2, ..., r...]. m ,…,r M ], where M is the total number of points in the template, and m is the signal value corresponding to the time sequence number m of the training heartbeat signal. The test template is represented as T = [t1, t2, ..., t n ,…,t N In this model, N represents the total number of points in the template, and n represents the signal value corresponding to the timing index n of the test heartbeat signal. The similarity between corresponding data points in the training template R and the test template T is calculated to obtain the curve similarity between them. This is used to distinguish the ECG signal waveform and determine the preset heartbeat type to which the original heartbeat segment belongs. Specifically, the most similar heartbeat segment to the original heartbeat segment is determined based on the curve similarity, and the preset heartbeat type corresponding to this matching heartbeat segment is then used as the preset heartbeat type to which the original heartbeat segment belongs.

[0059] S140. Determine the preset heartbeat type to which the original heartbeat signal belongs based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs.

[0060] In this embodiment of the invention, after curve similarity calculation, the preset heartbeat type to which each original heartbeat segment belongs can be determined in the original heartbeat signal. The preset heartbeat type to which the original heartbeat signal belongs is determined by the preset heartbeat type to which each original heartbeat segment belongs.

[0061] Optionally, if the preset heartbeat types to which each original heartbeat segment belongs are consistent, then the preset heartbeat type to which each original heartbeat segment belongs is taken as the preset heartbeat type to which the original heartbeat signal belongs. If the preset heartbeat types to which each original heartbeat segment belongs are inconsistent, then the preset heartbeat type with the largest total number of corresponding original heartbeat segments among the preset heartbeat types is taken as the preset heartbeat type to which the original heartbeat signal belongs, and / or, the preset heartbeat type to which the original heartbeat signal belongs can also be determined according to a weighted Gaussian model or other methods.

[0062] The technical solution of this invention divides the original heartbeat signal into original heartbeat signals corresponding to each heartbeat. For each original heartbeat signal, it is divided into at least two original heartbeat segments according to a preset segmentation method. Compared with the method of identifying multiple heartbeats together in related technologies, the segmentation of a single heartbeat is more refined and helps to improve the speed of subsequent classification processing. Furthermore, the original heartbeat signal is segmented to achieve refined processing of the heartbeat signal, making it easier to capture more detailed information. Then, the template heartbeat signal is divided using the same preset segmentation method to facilitate comparison between the original heartbeat signal segments and the template heartbeat signal. Then, the preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each template heartbeat segment and the preset heartbeat type to which each template heartbeat segment belongs, thus realizing the classification of each original heartbeat segment in the original heartbeat signal. Finally, the preset heartbeat type to which the original heartbeat signal belongs is determined by combining the preset heartbeat type to which each original heartbeat segment belongs in the original heartbeat signal. By employing a refined processing method that segments and classifies heartbeat signals, the technical problems of inaccurate and inefficient heartbeat signal classification in existing technologies have been solved, achieving a high-efficiency and high-precision classification effect for heartbeat signals.

[0063] Example 2

[0064] Figure 5 This is a flowchart of another heartbeat signal classification method provided in Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is to further illustrate the matching method between the original heartbeat signal and the heartbeat segment to be matched. As shown in Figure 5, the method includes:

[0065] S210. Obtain the original electrocardiogram (ECG) signal, divide the original ECG signal into original heartbeat signals corresponding to each heartbeat, and for each original heartbeat signal, divide the original heartbeat signal into at least two original heartbeat segments according to a preset segmentation method.

[0066] S220. Obtain at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method.

[0067] S230. Determine the curve similarity between the original heartbeat fragment and each of the heartbeat fragments to be matched according to a preset similarity algorithm.

[0068] The preset similarity algorithm can be a pre-set algorithm for calculating the curve similarity between the original heartbeat segment and the heartbeat segment to be matched. For example, the preset similarity algorithm includes at least one of the following: Euclidean distance algorithm, chi-square distance algorithm, Manhattan distance algorithm, Mahalanobis distance algorithm, point matching algorithm, and dynamic time warping algorithm.

[0069] In this embodiment of the invention, the curve similarity between the original heartbeat fragment and each of the heartbeat fragments to be matched is determined according to a preset similarity algorithm.

[0070] Optionally, the training template can be represented as R = [r1, r2, ..., r m ,…,r M ], where M is the total number of points in the template, and m is the signal value corresponding to the time sequence number m of the training heartbeat signal. The test template is represented as T = [t1, t2, ..., t n ,…,t N ], where N is the total number of points in the template, and is the signal value corresponding to the time sequence number n of the test heartbeat signal. The curve similarity between the training template R and the test template T is calculated using a preset similarity algorithm. The preset similarity algorithm includes at least one of the following: Euclidean distance algorithm, chi-square distance algorithm, Manhattan distance algorithm, Mahalanobis distance algorithm, point matching algorithm, and dynamic time warping algorithm.

[0071] Optional, such as Figure 6 As shown, when calculating the curve similarity between the training template R and the test template T using the dynamic time warping algorithm, the distance between corresponding points in the two template curves is calculated using the dynamic time warping algorithm. The smaller the distance between corresponding points in the two template curves, the higher the similarity between the two template curves. In this embodiment of the invention, any one of the above-mentioned curve similarity algorithms can be used.

[0072] For example, the dynamic time warping algorithm and the Manhattan distance algorithm can be used together to calculate the curve similarity between the training template R and the test template T, and the closest similarity between the two can be used as the final curve similarity.

[0073] Optionally, before determining the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched according to the preset similarity algorithm, the method further includes: performing curve fitting on the original heartbeat segment using an exponential fitting method and / or a Bezier curve fitting method.

[0074] In this embodiment of the invention, due to uncertainties in the ECG signal acquisition process, the same type of heartbeat may have different shapes. Before determining the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched according to the preset similarity algorithm, the original heartbeat segment is curve-fitted using the exponential fitting method and / or the Bezier curve fitting method.

[0075] For example, such as Figure 7 As shown, when using the dynamic time warping algorithm to match the training template R and the test template T, uncertainties cause different morphologies of the same type of heartbeat, resulting in irregular test and training waveforms and thus a large matching error. However, after fitting the test and training waveforms using the Bezier curve fitting method, the test and training waveforms are very smooth, the matching is more efficient and the error is minimal.

[0076] S240. The preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs is determined by majority voting.

[0077] Optionally, the original heartbeat signal is divided into at least two original heartbeat segments. After curve similarity calculation, each original heartbeat segment is assigned a preset heartbeat type. Thus, the complete original heartbeat signal may have at least one preset heartbeat type. A majority voting rule is adopted, and each preset heartbeat type is voted on. The preset heartbeat type with the highest number of votes is selected as the preset heartbeat type of the current original heartbeat signal.

[0078] For example, suppose the original heartbeat signal is divided into seven original heartbeat segments, and the preset heartbeat types corresponding to the seven original heartbeat segments are: N type, N type, S type, N type, V type, F type, and V type. Then, the majority voting rule is adopted: 3 votes for N type, 1 vote for S type, 2 votes for V type, and 1 vote for F type. The 3 votes for N type corresponding to the highest number of votes are selected as the preset heartbeat type of the current original heartbeat signal. The preset heartbeat type of the current original heartbeat signal is N type.

[0079] Optionally, if there are two or more preset heartbeat types corresponding to the highest number of votes, a weighted Gaussian model is used to determine the preset heartbeat type to which the original heartbeat signal belongs.

[0080] In this embodiment of the invention, when the majority voting rule is adopted, there may be a situation where the number of votes is the same, which makes it impossible to determine the result. However, if there are two or more preset heartbeat types corresponding to the highest number of votes, a weighted Gaussian model is used to determine the preset heartbeat type to which the original heartbeat signal belongs.

[0081] Alternatively, the weighted Gaussian model can be as follows:

[0082]

[0083] In the above formula, f N It is a mathematical model of type N, f S It is an S-type mathematical model, f V It is a mathematical model of type V, f F It is a mathematical model of type F. 11 ~w 16 For weights of type N, w 21 ~w 26 For weights of type S, w 31 ~w 36 For weights of type V, w 41 ~w 46 The weights are of type F. The weights are calculated using a least-squares recursive algorithm, and the final weight table is shown below:

[0084] Parameter matrix weight results

[0085]

[0086] Then, the preset heartbeat type to which the original heartbeat signal belongs is determined based on the weighting results of the parameter matrix.

[0087] The technical solution of this invention, after segmenting the original electrocardiogram (ECG) signal and dividing it into template heartbeat signals, further calculates the curve similarity between the original heartbeat segments and each of the heartbeat segments to be matched using a preset similarity algorithm. Then, based on the calculated curve similarity, it determines the preset heartbeat type to which each original heartbeat segment belongs. By calculating the similarity of each original heartbeat segment using the similarity algorithm, the accuracy of heartbeat segment recognition is improved, and the error in heartbeat segment recognition is reduced. Furthermore, the preset heartbeat type to which the original heartbeat signal belongs is determined through majority voting rules or a weighted Gaussian model, further ensuring the accuracy of heartbeat signal recognition. In addition, before performing similarity calculation, a curve fitting method can be used to fit the test waveform and the training waveform, further improving matching efficiency and reducing matching error. Through the refined processing of the heartbeat signal using segmented similarity algorithm calculation and curve fitting method, the technical problems of inaccurate heartbeat signal recognition and low recognition efficiency in existing technologies are solved, achieving the technical effect of high-efficiency and high-precision classification and recognition of heartbeat signals.

[0088] Figure 8 This is a schematic diagram of another heartbeat signal classification process provided by an embodiment of the present invention. In a specific example, such as Figure 8 As shown, the classification process for heartbeat signals may include: raw heartbeat signal preprocessing stage, training template heartbeat signal preprocessing stage, training template establishment stage, template matching stage, heartbeat segment matching stage, heartbeat type determination stage, and curve segment fitting stage, wherein:

[0089] In the preprocessing stage of the raw heartbeat signal, since each heartbeat needs to contain important information of the ECG signal, such as the P wave, QRS complex and T wave, the algorithm detects the R wave peak and then segments the periodically continuous ECG signal. The segmentation method is to take the first 100 (lasting 278ms) and the last 150 (lasting 417ms) data points of the R wave peak as a raw heartbeat signal.

[0090] Before establishing the training template, the heartbeat signal of the training template needs to be preprocessed. The same algorithm used in the preprocessing of the original heartbeat signal is applied to the training template heartbeat signal to divide it into training template heartbeat signals, thereby determining the waveform shape of the training template. Currently, the mainstream types are: N-type, S-type, V-type, and F-type. After determining the waveform shape type of the training template, template matching is performed based on the established training and test templates to match the corresponding training template. The training template can be represented as R = [r1, r2, ..., r m ,…,r M ], where M is the total number of points in the template, and m is the signal value corresponding to the time sequence number m of the training heartbeat signal. The test template is represented as T = [t1, t2, ..., t n ,…,t N ], where N is the total number of points in the template, and n is the signal value corresponding to the timing number n of the test heartbeat signal.

[0091] In the heartbeat segment matching stage, the curve similarity between the training template R and the test template T is calculated using a dynamic time warping algorithm. Curve similarity is calculated for each heartbeat segment of the original heartbeat signal, and the heartbeat type to which the original heartbeat segment belongs is determined based on the curve similarity results. Then, based on the calculation results, the heartbeat type determination stage begins. Initially, a voting method is used to determine the final result. However, when there is a tie, a result cannot be determined. Therefore, the voting rules are modified: for results that cannot be decided by majority vote, a weighted Gaussian model is used for determination.

[0092] In the curve segmentation fitting stage, uncertainties during ECG signal acquisition, such as equipment malfunctions or issues with the subject, can lead to different morphologies even for the same type of heartbeat. The dynamic time warping algorithm calculates the curve similarity between the two sets of curves. Curve variations directly affect the recognition results; exponential fitting and Bézier curve fitting methods can be used to eliminate many of these influences. After segmented curve fitting, the process continues with the training template establishment stage, heartbeat segment matching stage, and heartbeat type determination stage, ultimately determining the heartbeat type of the current original heartbeat signal.

[0093] In realizing this invention, the inventors used four methods to perform electrocardiogram signal matching and identification:

[0094] Method 1: Overall Heartbeat Dynamic Time Warping Matching. From the training dataset, select 5 heartbeat samples for each of the N, V, S, and F types as training samples. From the test training set, randomly select 200 heartbeat samples for each type as test samples. The identification rules are as follows: There are 20 training samples and 800 test samples. Calculate the dynamic time warping distance between each test sample and the 20 training samples, generating 20 distance values. Find the minimum of these 20 values, and the final type is determined by the training sample corresponding to this minimum value. The final calculated Se, Acc, and +P results are shown below:

[0095] Overall heart rate dynamic time warping algorithm matching and recognition rate

[0096]

[0097] Method 2: Dynamic Time Warping Matching Recognition Based on Feature Point Segmentation; 20 training samples and 800 test samples. Heartbeats (250 points) are divided into six segments for dynamic time warping matching. The matching process is as follows: Taking the first segment as an example, the dynamic time warping distance is calculated between the test sample and the 20 training samples. The result is determined as the type of the training sample with the smallest dynamic time warping value. There are a total of 6 results for the six segments. A voting method is used for the final judgment, and the final judgment results are shown below:

[0098] Based on Gaussian model, the heartbeat segmentation matching results are used to determine the results.

[0099]

[0100] Method 3: Dynamic Time Warping Matching Recognition Based on Feature Point Segmentation After Curve Fitting; The fitted heartbeats (also 250 points) are divided into six segments for dynamic time warping matching. The matching process is as follows: Using point R as the reference, optimal path searches are performed to the left and right respectively. Therefore, the matching rules for the first, second, and third segments are changed to matching from point P to the starting point, from point Q to point P, and from point R to point Q, respectively. Taking the first segment as an example, there are 20 training samples and 800 test samples. The dynamic time warping distance is calculated between test sample 1 and the 20 training samples, resulting in 20 distance values. The result is determined as the type of the training sample with the smallest value. The matching methods for the other five segments are the same as above. The final judgment result is shown below:

[0101] Based on Gaussian model, the heartbeat segmentation matching results are used to determine the results.

[0102]

[0103] Method 4: Dynamic time warping matching identification based on fixed-length segmentation after curve fitting; equal-length processing is applied to the two fitted heartbeats. The final decision result is shown below:

[0104] Based on fixed-length piecewise matching results after curve fitting

[0105]

[0106] Therefore, it can be seen that the technical solution of the present invention can classify heartbeat signals more accurately.

[0107] Example 3

[0108] Figure 9 This is a schematic diagram of a heartbeat signal classification device provided in Embodiment 3 of the present invention. Figure 9 As shown, the device includes: a raw heartbeat signal processing module 410, a template heartbeat signal processing module 420, a heartbeat segment type determination module 430, and a heartbeat type determination module 440, wherein:

[0109] The raw heartbeat signal processing module 410 is used to acquire the raw electrocardiogram signal, divide the raw electrocardiogram signal into raw heartbeat signals corresponding to each heartbeat, and divide the raw heartbeat signal into at least two raw heartbeat segments according to a pre-template segmentation method for each raw heartbeat signal.

[0110] The template heartbeat signal processing module 420 is used to acquire at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and to divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method.

[0111] The heartbeat fragment type determination module 430 is used to, for each original heartbeat fragment, obtain the template heartbeat fragment corresponding to the original heartbeat fragment from the template heartbeat fragments of each preset heartbeat type as the heartbeat fragment to be matched, and determine the preset heartbeat type to which the original heartbeat fragment belongs based on the curve similarity between the original heartbeat fragment and each of the heartbeat fragments to be matched.

[0112] The heartbeat type determination module 440 is used to determine the preset heartbeat type to which the original heartbeat signal belongs based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs.

[0113] The technical solution of this invention divides the original heartbeat signal into original heartbeat signals corresponding to each heartbeat. For each original heartbeat signal, it is divided into at least two original heartbeat segments according to a preset segmentation method. Compared with the method of identifying multiple heartbeats together in related technologies, the segmentation of a single heartbeat is more refined and helps to improve the speed of subsequent classification processing. Furthermore, the original heartbeat signal is segmented to achieve refined processing of the heartbeat signal, making it easier to capture more detailed information. Then, the template heartbeat signal is divided using the same preset segmentation method to facilitate comparison between the original heartbeat signal segments and the template heartbeat signal. Then, the preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each template heartbeat segment and the preset heartbeat type to which each template heartbeat segment belongs, thus realizing the classification of each original heartbeat segment in the original heartbeat signal. Finally, the preset heartbeat type to which the original heartbeat signal belongs is determined by combining the preset heartbeat type to which each original heartbeat segment belongs in the original heartbeat signal. By employing a refined processing method that segments and classifies heartbeat signals, the technical problems of inaccurate and inefficient heartbeat signal classification in existing technologies have been solved, achieving a high-efficiency and high-precision classification effect for heartbeat signals.

[0114] Optionally, the raw heartbeat signal processing module 410 includes:

[0115] The target feature points corresponding to the original heartbeat signal are determined, and the original heartbeat signal is divided into at least two original heartbeat segments based on the target feature points. The target feature points include the start point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the end point of the original heartbeat signal.

[0116] Optionally, the heartbeat fragment type determination module 430 includes:

[0117] The curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched is determined according to a preset similarity algorithm, wherein the preset similarity algorithm includes at least one of Euclidean distance algorithm, chi-square distance algorithm, Manhattan distance algorithm, Mahalanobis distance algorithm, point matching algorithm and dynamic time warping algorithm.

[0118] Optionally, the heartbeat fragment type determination module 430 also includes:

[0119] The original heartbeat fragments were subjected to curve fitting using exponential fitting and / or Bezier curve fitting methods.

[0120] Optionally, the heartbeat type determination module 440 includes:

[0121] The preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs is determined by majority voting.

[0122] If there are two or more preset heartbeat types corresponding to the highest number of votes, then a weighted Gaussian model is used to determine the preset heartbeat type to which the original heartbeat signal belongs.

[0123] Optionally, the raw heartbeat signal processing module 410 includes:

[0124] The peak of the R wave in the original heartbeat signal is determined, and the curve segments corresponding to the first preset number of data points whose acquisition time is before the peak of the R wave and the second preset number of data points whose acquisition time is after the peak of the R wave are segmented as the original heartbeat signal for each heartbeat.

[0125] The aforementioned heartbeat signal classification device can execute the heartbeat signal classification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the heartbeat signal classification method provided in any embodiment of the present invention.

[0126] Since the heartbeat signal classification device described above is an apparatus capable of executing the heartbeat signal classification method in the embodiments of the present invention, those skilled in the art can understand the specific implementation and various variations of the heartbeat signal classification device in this embodiment based on the heartbeat signal classification method described in the embodiments of the present invention. Therefore, how the heartbeat signal classification device implements the heartbeat signal classification method in the embodiments of the present invention will not be described in detail here. Any apparatus used by those skilled in the art to implement the heartbeat signal classification method in the embodiments of the present invention falls within the scope of protection of this application.

[0127] Example 4

[0128] Figure 10 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0129] like Figure 10 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0130] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0131] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the classification method for heartbeat signals.

[0132] In some embodiments, the heartbeat signal classification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the heartbeat signal classification method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the heartbeat signal classification method by any other suitable means (e.g., by means of firmware).

[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0138] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0139] Example 5

[0140] Embodiment 6 of the present invention also provides a computer storage medium for storing a computer program, which, when executed by a computer processor, is used to perform the heartbeat signal classification method described in any of the above embodiments of the present invention:

[0141] The raw electrocardiogram (ECG) signal is acquired and divided into raw heartbeat signals corresponding to each heartbeat. For each raw heartbeat signal, the raw heartbeat signal is divided into at least two raw heartbeat segments according to a preset segmentation method.

[0142] Obtain at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method.

[0143] For each original heartbeat segment, the template heartbeat segment corresponding to the original heartbeat segment in each preset heartbeat type is obtained as the heartbeat segment to be matched. The preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched.

[0144] The preset heartbeat type to which the original heartbeat signal belongs is determined based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs.

[0145] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0146] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0147] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, radio frequency (RF), or any suitable combination thereof.

[0148] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0149] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0150] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for classifying heartbeat signals, characterized in that, include: The raw electrocardiogram (ECG) signal is acquired and divided into raw heartbeat signals corresponding to each heartbeat. For each raw heartbeat signal, the raw heartbeat signal is divided into at least two raw heartbeat segments according to a preset segmentation method. Obtain at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method. For each original heartbeat segment, the template heartbeat segment corresponding to the original heartbeat segment in each preset heartbeat type is obtained as the heartbeat segment to be matched. The preset heartbeat type to which the original heartbeat segment belongs is determined according to the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched; wherein, the curve similarity is the similarity between the electrocardiogram signal curve in the original heartbeat segment and the electrocardiogram signal curve in the template heartbeat segment; The preset heartbeat type of the original heartbeat signal is determined based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs; The step of dividing the original heartbeat signal into at least two original heartbeat segments according to a preset segmentation method includes: The target feature points corresponding to the original heartbeat signal are determined, and the original heartbeat signal is divided into at least two original heartbeat segments based on the target feature points; wherein, the target feature points include the starting point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the ending point of the original heartbeat signal. The step of dividing the original heartbeat signal into at least two original heartbeat segments based on the target feature points includes: Select any one or more of the target feature points from the starting point, P wave inflection point, Q wave inflection point, R wave inflection point, S wave inflection point, T wave inflection point, and ending point of the ECG signal in the original heartbeat signal to segment the original heartbeat signal, thereby obtaining at least two original heartbeat segments.

2. The method according to claim 1, characterized in that, Before determining the preset heartbeat type to which the original heartbeat segment belongs based on the curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched, the method further includes: The curve similarity between the original heartbeat segment and each of the heartbeat segments to be matched is determined according to a preset similarity algorithm, wherein the preset similarity algorithm includes at least one of Euclidean distance algorithm, chi-square distance algorithm, Manhattan distance algorithm, Mahalanobis distance algorithm, point matching algorithm and dynamic time warping algorithm.

3. The method according to claim 2, characterized in that, Before determining the curve similarity between the original heartbeat fragment and each of the heartbeat fragments to be matched according to a preset similarity algorithm, the method further includes: The original heartbeat fragments were subjected to curve fitting using exponential fitting and / or Bezier curve fitting methods.

4. The method according to claim 1, characterized in that, The step of determining the preset heartbeat type of the original heartbeat signal based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs includes: The preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs is determined by majority voting.

5. The method according to claim 4, characterized in that, Also includes: If there are two or more preset heartbeat types corresponding to the highest number of votes, then a weighted Gaussian model is used to determine the preset heartbeat type to which the original heartbeat signal belongs.

6. The method according to claim 1, characterized in that, The step of dividing the original heartbeat signal into original heartbeat signals corresponding to each heartbeat includes: The peak of the R wave in the original heartbeat signal is determined, and the curve segments corresponding to the first preset number of data points whose acquisition time is before the peak of the R wave and the second preset number of data points whose acquisition time is after the peak of the R wave are segmented as the original heartbeat signal for each heartbeat.

7. A heartbeat signal classification device, characterized in that, include: The raw heartbeat signal processing module is used to acquire raw electrocardiogram (ECG) signals, divide the raw ECG signals into raw heartbeat signals corresponding to each heartbeat, and divide each raw heartbeat signal into at least two raw heartbeat segments according to a preset segmentation method. The template heartbeat signal processing module is used to acquire at least one template heartbeat signal of a preset heartbeat type corresponding to the original heartbeat signal, and to divide the template heartbeat signal of each preset heartbeat type into at least two template heartbeat segments according to the preset segmentation method. The heartbeat fragment type determination module is used to, for each original heartbeat fragment, obtain the template heartbeat fragment corresponding to the original heartbeat fragment from the template heartbeat fragments of each preset heartbeat type as the heartbeat fragment to be matched, and determine the preset heartbeat type to which the original heartbeat fragment belongs based on the curve similarity between the original heartbeat fragment and each of the heartbeat fragments to be matched; wherein, the curve similarity is the similarity between the electrocardiogram signal curve in the original heartbeat fragment and the electrocardiogram signal curve in the template heartbeat fragment; The heartbeat type determination module is used to determine the preset heartbeat type to which the original heartbeat signal belongs based on the preset heartbeat type to which each original heartbeat segment in the original heartbeat signal belongs; The original heartbeat signal processing module includes: The target feature points corresponding to the original heartbeat signal are determined, and the original heartbeat signal is divided into at least two original heartbeat segments based on the target feature points; wherein, the target feature points include the starting point, the inflection point of the P wave, the inflection point of the Q wave, the inflection point of the R wave, the inflection point of the S wave, the inflection point of the T wave, and the ending point of the original heartbeat signal. The step of dividing the original heartbeat signal into at least two original heartbeat segments based on the target feature points includes: Select any one or more of the target feature points from the starting point, P wave inflection point, Q wave inflection point, R wave inflection point, S wave inflection point, T wave inflection point, and ending point of the ECG signal in the original heartbeat signal to segment the original heartbeat signal, thereby obtaining at least two original heartbeat segments.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform the heartbeat signal classification method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for classifying heartbeat signals according to any one of claims 1-6.