Method and device for identifying st segment, equipment and storage medium
Patent Information
- Application Number
- CN202310312685.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-03-22
AI Technical Summary
但由于ST段波形变化多样,其检测方法远不如QRS波群的检测方法成熟,现有的ST段的检测方法大多计算复杂,没有可以兼具普适性和精确性的检测方法
[0043]本发明提出的ST段的识别方法,首先通过获取待检测的目标心电信号,基于目标心电信号的R波位置对目标心电信号划分心动周期,得到目标心动周期,接着在目标心动周期上搜索S波和T波,得到ST段,基于ST段得到ST段的幅值,并在目标心动周期上获取P波和Q波之间满足预设条件的基准点,根据ST段的幅值与基准点的幅值之间的差值,判断ST段的状态是否正常,心动周期上的满足预设条件的信号点,作为ST段的基准点,由于基准点体现了人体实际的心电特征,使得在判断ST段幅值时根据人体实际的心电特征,判断ST段的状态,减小判断误差,提高精准性,此外,该方法计算过程简易,有效地减少了计算过程,因此,在提高精准度的同时还提高了普适性。
Smart Images

Figure CN116392141B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrocardiogram (ECG) recognition technology, and more particularly to a method, apparatus, device, and storage medium for ST segment-based recognition. Background Technology
[0002] The ST segment of an electrocardiogram (ECG) reflects a relatively long process before ventricular repolarization and is one of the primary diagnostic items for cardiovascular diseases such as myocardial ischemia and myocardial infarction. However, due to the diverse waveform changes in the ST segment, its detection methods are far less mature than those for the QRS complex. Most existing ST segment detection methods are computationally complex, and there is no detection method that combines universality and accuracy. Summary of the Invention
[0003] Therefore, it is necessary to propose methods, devices, equipment, and storage media for identifying ST segments in order to solve the existing problems.
[0004] To achieve the above objectives, the first aspect of this application provides a method for identifying ST segments, the method comprising:
[0005] Acquire the target electrocardiogram signal to be detected;
[0006] The target ECG signal is divided into cardiac cycles based on the R wave position to obtain the target cardiac cycle;
[0007] Search for S waves and T waves on the target cardiac cycle, obtain the ST segment using the S waves and T waves, and determine the amplitude of the ST segment;
[0008] A reference point is obtained between the P wave and Q wave that meets preset conditions during the target cardiac cycle;
[0009] The state of the ST segment is determined based on the difference between the amplitude of the ST segment and the amplitude of the reference point.
[0010] Furthermore, determining the amplitude of the ST segment specifically includes:
[0011] The potential values of the electrocardiogram signal on the ST segment are decentered to obtain a decentered electrocardiogram amplitude sample.
[0012] A covariance matrix is constructed based on the ECG amplitude samples, and the eigenvalues and eigenvectors of the covariance matrix are calculated.
[0013] An orthogonal transformation matrix is formed based on the eigenvalues and eigenvectors, and a target ECG amplitude sample is obtained by calculation based on the orthogonal transformation matrix and the ECG amplitude sample.
[0014] The mean value of the data in the target ECG amplitude sample is calculated to obtain the average amplitude, and the average amplitude is used as the amplitude of the ST segment.
[0015] Furthermore, the step of forming an orthogonal transformation matrix based on the eigenvalues and eigenvectors, and calculating the target ECG amplitude sample based on the orthogonal transformation matrix and the ECG amplitude sample, specifically includes:
[0016] The feature values are sorted in a preset order, and the first N target feature values are selected from the sorted feature value sequence.
[0017] Extract the target feature vector corresponding to the target feature value from the feature vector, and form the orthogonal transformation matrix from the target feature vector;
[0018] The ECG amplitude sample is processed based on the orthogonal transformation matrix to obtain the target ECG amplitude sample.
[0019] Furthermore, the step of processing the ECG amplitude samples based on the orthogonal transformation matrix to obtain the target ECG amplitude samples specifically includes:
[0020] The orthogonal transformation matrix is used as a coefficient to multiply the ECG amplitude sample, and the ECG amplitude sample is compressed to obtain the compressed effective ECG amplitude sample.
[0021] Extract the segments that meet the preset conditions from the valid ECG amplitude samples as target ECG amplitude samples.
[0022] Furthermore, the step of extracting segments that meet preset conditions from the effective ECG amplitude samples as target ECG amplitude samples specifically includes:
[0023] In the effective ECG amplitude sample, every M consecutive amplitudes are taken as a segment, and the mean of the absolute values of all amplitudes within the segment is calculated;
[0024] The segment corresponding to the smallest mean is taken as the target ECG amplitude sample.
[0025] Furthermore, the step of dividing the target ECG signal into cardiac cycles based on the R-wave position to obtain the target cardiac cycle specifically includes:
[0026] Based on the target ECG signal, select an effective ECG segment and detect the position of the R-wave peak on the ECG segment;
[0027] The average heart rate of the target electrocardiogram signal is calculated based on the position of the R-wave peak.
[0028] The target cardiac cycle is obtained by dividing the cardiac cycle based on the average heart rate and the position of the R wave peak.
[0029] Furthermore, the step of searching for S waves and T waves on the target cardiac cycle to obtain the ST segment specifically includes:
[0030] The target S wave and target T wave of the target cardiac cycle are determined based on the slope change of the target cardiac cycle.
[0031] Search for signal points on the target S-wave that meet preset conditions as the endpoint of the target S-wave;
[0032] The starting point of the target T-wave is obtained by searching within the target T-wave based on the quadratic spline wavelet transformation and the slope transformation.
[0033] The ST segment is obtained by finding the end point of the target S wave and the beginning point of the target T wave.
[0034] To achieve the above objectives, a second aspect of this application provides an ST segment identification device, the device comprising: a signal acquisition unit, a signal processing unit, and a signal judgment unit;
[0035] The signal acquisition unit is used to acquire the target electrocardiogram signal to be detected;
[0036] The signal processing unit is used to divide the target electrocardiogram signal into cardiac cycles based on the R wave position of the target electrocardiogram signal to obtain the target cardiac cycle;
[0037] Search for S waves and T waves on the target cardiac cycle, obtain the ST segment using the S waves and T waves, and determine the amplitude of the ST segment;
[0038] A reference point is obtained between the P wave and Q wave that meets preset conditions during the target cardiac cycle;
[0039] The signal judgment unit is used to determine whether the state of the ST segment is normal based on the difference between the amplitude of the ST segment and the amplitude of the reference point.
[0040] To achieve the above objectives, a third aspect of this application provides a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the processor performs the steps of the method described in the first aspect.
[0041] To achieve the above objectives, a fourth aspect of this application provides a computer device including a memory and a processor, characterized in that the memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the method described in the first aspect.
[0042] The embodiments of the present invention have the following beneficial effects:
[0043] The ST segment identification method proposed in this invention first acquires the target ECG signal to be detected, divides the target ECG signal into cardiac cycles based on the R wave position, and obtains the target cardiac cycle. Then, it searches for S waves and T waves on the target cardiac cycle to obtain the ST segment. Based on the ST segment, it obtains the amplitude of the ST segment, and obtains a reference point between the P wave and Q wave that meets preset conditions on the target cardiac cycle. The difference between the amplitude of the ST segment and the amplitude of the reference point is used to determine whether the ST segment is normal. The signal point on the cardiac cycle that meets the preset conditions is used as the reference point of the ST segment. Since the reference point reflects the actual ECG characteristics of the human body, the ST segment status is judged based on the actual ECG characteristics when judging the ST segment amplitude, reducing judgment error and improving accuracy. In addition, the calculation process of this method is simple and effectively reduces the calculation process. Therefore, it improves both accuracy and universality. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.
[0045] in:
[0046] Figure 1 This is a flowchart illustrating the ST segment identification method according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the cardiac cycle according to an embodiment of the present invention;
[0048] Figure 3 This is a flowchart illustrating the process of determining the amplitude of the ST segment in an embodiment of the present invention;
[0049] Figure 4 This is a structural block diagram of the ST segment identification device according to an embodiment of the present invention;
[0050] Figure 5 This is a diagram showing the internal structure of a computer device in an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.
[0052] During electrocardiogram (ECG) testing, the normal ST segment is relatively stable and without curvature, resembling an isoelectric line, neither elevated nor depressed. However, ST segment elevation or depression indicates ST segment alteration. ST segment elevation may indicate acute myocardial infarction, myocarditis, or cardiomyopathy; ST segment depression may indicate myocardial ischemia. ST segment alteration can also be caused by valvular heart disease, pericarditis, acute stroke, electrolyte imbalance, hypokalemia, hyperkalemia, or drug poisoning. Therefore, detecting ST segment alteration is crucial for ECG testing. Current algorithms for identifying ST segment alteration are complex and lack universality. This invention provides a feasible, computationally simple, and efficient method for ST segment identification.
[0053] Please refer to the details. Figure 1 , Figure 1 This is a flowchart illustrating the ST segment identification method according to an embodiment of the present invention, specifically including:
[0054] Step 110: Obtain the target electrocardiogram signal to be detected.
[0055] Specifically, the target ECG signal can be obtained from the ECG signal of a certain lead in the database. Since the read ECG signal has a lot of noise, which will affect the subsequent recognition results, the read ECG signal can be preprocessed first, and the processed ECG signal that is easier to recognize and smoother can be used as the target ECG signal.
[0056] Optionally, the preprocessing process may include filtering. For example, filtering the data on a single-lead ECG signal, using a moving average filter to remove 50Hz power frequency interference, a median filter to remove baseline drift interference, and a 30Hz low-pass filter to remove high-frequency interference, can make the ECG signal data smoother after filtering.
[0057] Step 120: Divide the target ECG signal into cardiac cycles based on the R wave position of the target ECG signal to obtain the target cardiac cycle.
[0058] A schematic diagram of a cardiac cycle is provided in an embodiment of the present invention. Please refer to [link / reference]. Figure 2 ,like Figure 2As shown, an electrocardiogram (ECG) cycle includes at least the P wave, Q wave, R wave, S wave, and T wave. It's easy to see that the R wave is characterized by its "tall and steep" shape. Therefore, this characteristic can be used to easily locate the R wave on the target ECG signal. After obtaining the R wave's location, the cardiac cycle can be divided based on its position. After dividing the target ECG cycle into cardiac cycles, one or more target cardiac cycles can be obtained. Subsequent steps can then be based on these target cardiac cycles for further analysis, narrowing the search range for subsequent S wave and T wave identification, thus making the search results more accurate.
[0059] Step 130: Search for S waves and T waves on the target cardiac cycle, use S waves and T waves to obtain the ST segment, and determine the amplitude of the ST segment.
[0060] The purpose of this invention is to analyze the waveform characteristics of the ST segment to determine whether the ST segment is normal. Therefore, after obtaining the target cardiac cycle, the location of the ST segment should be determined first. Figure 2 As shown, the ST segment is the region between the S wave and the T wave. Therefore, the S wave and T wave are searched separately on the target cardiac cycle to determine the S wave and T wave on the target cardiac cycle, and the region between the S wave and T wave is extracted as the ST segment. After determining the ST segment, the amplitude of the ST segment is determined based on the potential value of the signal point on the ST segment. By extracting the ST segment on the target ECG cycle and performing amplitude analysis on the ST segment, the amplitude of the ST segment is obtained, providing a basis for judging the state of the ST segment.
[0061] Step 140: Obtain a reference point between the P wave and Q wave that meets preset conditions on the target cardiac cycle.
[0062] To accurately determine the ST segment value, this invention assesses the ST segment state based on the electrocardiographic characteristics of the actually acquired ECG signal, thereby improving the ST segment recognition result. Specifically, it searches for the flattest P and Q waves within the target cardiac cycle, and obtains a reference point within this segment. This reference point can be the average of all signal points in the flattest segment, or it can be the center point of all signal points, etc., without limitation. This reference point serves as a reference for comparison with the ST segment amplitude. A preset reference point is found between the P and Q waves, representing the ECG characteristics of the target cardiac cycle. Determining the reference point through the ECG characteristics of the target cardiac cycle and comparing it with the ST segment amplitude effectively improves the recognition result. The process of obtaining ECG characteristics based on the target cardiac cycle proposed in this invention effectively reduces recognition errors and improves the accuracy of the recognition result.
[0063] Step 150: Determine whether the ST segment is in normal condition based on the difference between the amplitude of the ST segment and the amplitude of the reference point.
[0064] After obtaining a reference point, the amplitude of the reference point is compared with the amplitude of the ST segment to determine whether the ST segment is functioning correctly. Optionally, the difference between the amplitude of the ST segment and the amplitude of the reference point can be calculated, and this difference can be compared with a first preset range, a second preset range, and a third preset range to determine whether the ST segment is functioning correctly. If the difference is within the first preset range, the ST segment is determined to be depressed; if the difference is within the second preset range, the ST segment is determined to be normal; if the difference is within the third preset range, the ST segment is determined to be elevated. It is understood that the first preset range, the second preset range, and the third preset range are independent of each other.
[0065] This invention, by comparing the amplitude of the ST segment with the amplitude of a reference point representing the electrocardiographic characteristics of the target cardiac cycle, can effectively adapt the ST segment identification to the electrocardiographic characteristics of the target cardiac cycle, reduce the error of the identification results, and improve accuracy.
[0066] The following describes how to accurately segment the cardiac cycle on the target cardiac signal to obtain an effective target cardiac cycle. Step 120, segmenting the cardiac cycle on the target ECG signal based on the R wave position, specifically includes:
[0067] Step 1: Select an effective ECG segment based on the target ECG signal and detect the position of the R wave peak on the ECG segment.
[0068] To avoid inaccurate ST segment identification due to ECG abnormalities caused by phenomena such as ventricular tachycardia or ventricular fibrillation in the target ECG signal, this embodiment of the invention selects effective ECG segments on the target cardiac cycle before dividing the target ECG signal into cardiac cycles. This mainly involves detecting abnormalities in the target ECG signal to determine whether any abnormalities have occurred, and using ECG signals without detected abnormalities as effective ECG segments. Then, based on the effective ECG segments, the position of the R wave peak is searched, thereby providing a simple location for the R wave.
[0069] Step 2: Calculate the average heart rate of the target ECG signal based on the position of the R-wave peak.
[0070] To improve detection efficiency, the most representative ECG segment is selected for cardiac cycle division. Specifically, the highest R-wave peak is located on the valid ECG segment, and segments of n / 2 minutes before and after the highest R-wave peak are taken as the midpoint to obtain an n-minute ECG segment, which is then used as the ECG segment to be detected. After obtaining the ECG segment to be detected, the RR interval can be obtained based on the position of the RR peak. The average RR interval is calculated based on all RR intervals on the ECG segment to be detected, and then the average heart rate is calculated. There are currently several methods for calculating heart rate from RR intervals, so they will not be elaborated here.
[0071] Step 3: Divide the cardiac cycle based on the average heart rate and the position of the R wave peak to obtain the target cardiac cycle.
[0072] After obtaining the average heart rate, the cardiac cycle of the ECG segment to be detected can be divided according to the magnitude of the average heart rate and the position of the R wave peak to obtain the target cardiac cycle. This allows subsequent steps to be further analyzed based on the target cardiac cycle, narrowing the search range for subsequent identification of S and T waves, thus making the search results more accurate.
[0073] Based on this, the present invention also proposes a method for obtaining the ST segment to obtain a more accurate ST segment. In step 130, searching for the S wave and T wave on the target cardiac cycle to obtain the ST segment specifically includes: determining the target S wave and target T wave of the target cardiac cycle based on the slope change of the target cardiac cycle; searching for signal points on the target S wave that meet preset conditions as the endpoint of the target S wave; searching within the target T wave based on quadratic spline wavelet changes and slope changes to obtain the starting point of the target T wave; and obtaining the ST segment through the endpoint of the target S wave and the starting point of the target T wave.
[0074] Specifically, it is necessary to obtain the end point of the S wave and the beginning point of the T wave separately, and the segment between the end point of the S wave and the beginning point of the T wave is taken as the ST segment. Therefore, this embodiment of the invention proposes a preferred method for obtaining the end point of the S wave and the beginning point of the T wave.
[0075] First, the target S-wave and target T-wave are obtained by searching the target cardiac cycle based on the slope change within the target cardiac cycle. Second, a search window is used on the target S-wave to search for signal points that meet preset conditions as the endpoint of the target S-wave. For example, a dynamic search window is used to search to the right of the target S-wave; if all signal points within the dynamic search window are less than a preset threshold, then one of the points within the dynamic search window is taken as the endpoint of the target S-wave. The size of the dynamic search window can be determined based on the average heart rate. Third, the starting point of the target T-wave is obtained by searching the target T-wave based on the quadratic spline wavelet changes and slope changes. Finally, the segment between the endpoint of the target S-wave and the starting point of the target T-wave is defined as the ST segment.
[0076] By using the above method, a more accurate range of ST segments can be obtained, so that the error is smaller when performing subsequent analysis and calculation based on ST segments, thereby improving the accuracy of the identification results.
[0077] After obtaining the ST segment, its amplitude is determined based on the ST segment. To further improve the accuracy of ST segment identification, this embodiment of the invention provides a method for determining the ST segment amplitude. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a flowchart illustrating the process of determining the amplitude of the ST segment in an embodiment of the present invention. The method specifically includes:
[0078] Step 310: Decenter the potential values of the ECG signal on the ST segment to obtain a decentered ECG amplitude sample.
[0079] Specifically, the ST segment data is decentered, that is, the potential values of the ECG signal in the ST segment are decentered. The specific formula for decentering is as follows:
[0080]
[0081] In the formula, X represents the mean potential value of the ECG signal on the ST segment; n represents the number of ECG signals on the ST segment; X i X represents the i-th ECG signal on the ST segment; X' represents the potential value of the ECG signal on the ST segment; and X' represents the decentered ECG amplitude.
[0082] By decentering the potential values of the ECG signals in the ST segment, the ECG signals in the ST segment are processed based on the same baseline, and the ECG amplitude values obtained after decentering each ECG signal in the ST segment are used to form an ECG amplitude sample.
[0083] Step 320: Construct a covariance matrix based on the ECG amplitude samples, and calculate the eigenvalues and eigenvectors of the covariance matrix; form an orthogonal transformation matrix based on the eigenvalues and eigenvectors, and calculate the target ECG amplitude samples based on the orthogonal transformation matrix and the ECG amplitude samples.
[0084] To improve the efficiency of acquiring ST segment amplitude, the acquired ECG amplitude samples can be filtered to reduce the correlation of ECG signals in the samples and retain signals that are more representative of the ST segment ECG signal. Based on this, this invention proposes a specific filtering process. A covariance matrix is constructed based on the ECG amplitude samples, and the eigenvalues and eigenvectors of this covariance matrix are calculated. The eigenvalues are sorted according to a preset order, and the top N target eigenvalues are selected from the sorted eigenvalue sequence. Target eigenvectors corresponding to the target eigenvalues are extracted from the eigenvectors, and the target eigenvectors are combined into an orthogonal transformation matrix. Optionally, the eigenvalues can be sorted in descending order to obtain the eigenvalue sequence. It is understood that the higher the eigenvalue, the more representative it is of the main features of the ST segment. Therefore, the top N largest eigenvalues are selected as target eigenvalues, and the eigenvalue vectors corresponding to the target eigenvalues are used as target eigenvectors. All target eigenvectors are combined into an orthogonal transformation matrix to achieve eigenvalue filtering.
[0085] Furthermore, the ECG amplitude samples are processed based on the orthogonal transformation matrix to obtain the target ECG amplitude samples. Specifically, this includes: multiplying the ECG amplitude samples by the orthogonal transformation matrix as coefficients to compress the ECG amplitude samples and obtain compressed effective ECG amplitude samples; and extracting segments that meet preset conditions from the effective ECG amplitude samples as target ECG amplitude samples.
[0086] By multiplying the orthogonal transformation matrix obtained after filtering with the ECG amplitude sample, the ECG amplitude sample is compressed. The data in the compressed sample has a higher correlation with the ST segment, thereby further extracting the main features of the ST segment. Based on the above process, the ECG amplitude sample is filtered, and the ECG amplitude sample that has more ST segment ECG characteristics after filtering is taken as the effective ECG amplitude sample.
[0087] Furthermore, segments meeting preset conditions are obtained from the effective ECG amplitude samples as target ECG amplitude samples. Optionally, every M consecutive amplitudes in the effective ECG amplitude samples can be considered as a segment, and the mean of the absolute values of all amplitudes within the segment can be calculated. The segment corresponding to the smallest mean is selected as the target ECG amplitude sample, where M can be determined by the average heart rate. For example, if the effective ECG amplitude samples contain data ABCDEF, then ABC, BCD, CDE, and DEF can be considered as segments, each containing three data points. The mean of the absolute values of the three data points is then calculated. If the mean of ABC is the largest (3) and the mean of BCD is the smallest (0), then segment BCD is selected as the target ECG amplitude sample. The method described above for calculating the mean of amplitudes within a segment can find the part with the smallest change within the ST segment, i.e., the flattest part. It is understood that this method for determining the flattest part can also be applied to the process of confirming the reference point in step 140, and the method is similar, so it will not be described again here.
[0088] Step 330: Calculate the mean of the data in the target ECG amplitude sample to obtain the average amplitude, and use the average amplitude as the ST segment amplitude.
[0089] By using the method described above to calculate the average amplitude within a segment, we can find the part of the ST segment with the smallest change, i.e., the flattest part. We can then use the average amplitude of this part as the amplitude of the ST segment. Analyzing the ST segment using the amplitude obtained above can make the identification results of the ST segment more accurate.
[0090] Finally, after obtaining the amplitude of the ST segment, the difference between the ST segment amplitude and the amplitude of the reference point can be calculated. This difference is then compared with the first, second, and third preset ranges to determine whether the ST segment is in a normal state. For example, if the first preset range is less than -0.05mV, the second preset range is greater than or equal to -0.05mV and less than or equal to 0.05mV, and the third preset range is greater than 0.05mV, then when the difference is -0.05mV, the ST segment is determined to be low; when the difference is greater than or equal to -0.05mV and less than or equal to 0.05mV, the ST segment is determined to be normal; and when the difference is greater than 0.05mV, the ST segment is determined to be high.
[0091] An ST segment identification device is proposed in this embodiment of the invention; please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a structural block diagram of the ST segment identification device according to an embodiment of the present invention. The device specifically includes: a signal acquisition unit 401, a signal processing unit 402, and a signal judgment unit 403.
[0092] The signal acquisition unit 401 is used to acquire the target electrocardiogram signal to be detected.
[0093] The signal processing unit 402 is used to divide the target ECG signal into cardiac cycles based on the R wave position of the target ECG signal to obtain the target cardiac cycle; to search for S waves and T waves on the target cardiac cycle, to obtain the ST segment using the S waves and T waves, and to determine the amplitude of the ST segment; and to obtain a reference point between the P wave and Q wave that meets preset conditions on the target cardiac cycle.
[0094] The signal judgment unit 403 is used to determine whether the state of the ST segment is normal based on the difference between the amplitude of the ST segment and the amplitude of the reference point.
[0095] Based on the above-mentioned device, by finding the reference point between the P wave and the Q wave and using this reference point as the actual electrocardiographic characteristics of the human body, the ST segment state can be judged according to the actual electrocardiographic characteristics of the human body when judging the ST segment amplitude, thereby reducing judgment error and improving accuracy. In addition, the calculation process of this method is simple and effectively reduces the calculation process. Therefore, while improving accuracy, it also improves universality.
[0096] Figure 5 An internal structural diagram of a computer device according to one embodiment of the present invention is shown. This computer device can specifically be a terminal or a system. Figure 5 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program causes the processor to perform the steps in the above-described method embodiments. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the steps in the above-described method embodiments. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0097] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps in the above method embodiments.
[0098] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the steps in the above method embodiments.
[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for identifying ST segments, characterized in that, The method includes: Acquire the target electrocardiogram signal to be detected; The target ECG signal is divided into cardiac cycles based on the R wave position to obtain the target cardiac cycle; Search for S waves and T waves on the target cardiac cycle, obtain the ST segment using the S waves and T waves, and determine the amplitude of the ST segment; A reference point is obtained between the P wave and Q wave that meets preset conditions during the target cardiac cycle; The state of the ST segment is determined based on the difference between the amplitude of the ST segment and the amplitude of the reference point. Specifically, determining the amplitude of the ST segment includes: The potential values of the electrocardiogram signal on the ST segment are decentered to obtain a decentered electrocardiogram amplitude sample. A covariance matrix is constructed based on the ECG amplitude samples, and the eigenvalues and eigenvectors of the covariance matrix are calculated. An orthogonal transformation matrix is formed based on the eigenvalues and eigenvectors, and a target ECG amplitude sample is obtained by calculation based on the orthogonal transformation matrix and the ECG amplitude sample. The mean value of the data in the target ECG amplitude sample is calculated to obtain the average amplitude, and the average amplitude is used as the amplitude of the ST segment.
2. The method according to claim 1, characterized in that, The step of constructing an orthogonal transformation matrix based on the eigenvalues and eigenvectors, and then calculating the target ECG amplitude sample based on the orthogonal transformation matrix and the ECG amplitude sample, specifically includes: The feature values are sorted in a preset order, and the first N target feature values are selected from the sorted feature value sequence. Extract the target feature vector corresponding to the target feature value from the feature vector, and form the orthogonal transformation matrix from the target feature vector; The ECG amplitude sample is processed based on the orthogonal transformation matrix to obtain the target ECG amplitude sample.
3. The method according to claim 2, characterized in that, The step of processing the ECG amplitude sample based on the orthogonal transformation matrix to obtain the target ECG amplitude sample specifically includes: The orthogonal transformation matrix is used as a coefficient to multiply the ECG amplitude sample, and the ECG amplitude sample is compressed to obtain the compressed effective ECG amplitude sample. Extract the segments that meet the preset conditions from the valid ECG amplitude samples as target ECG amplitude samples.
4. The method according to claim 3, characterized in that, The step of extracting segments that meet preset conditions from the effective ECG amplitude samples as target ECG amplitude samples specifically includes: In the effective ECG amplitude sample, every M consecutive amplitudes are taken as a segment, and the mean of the absolute values of all amplitudes within the segment is calculated; The segment corresponding to the smallest mean is taken as the target ECG amplitude sample.
5. The method according to claim 1, characterized in that, The step of dividing the target ECG signal into cardiac cycles based on the R-wave position to obtain the target cardiac cycle specifically includes: Based on the target ECG signal, select an effective ECG segment and detect the position of the R-wave peak on the ECG segment; The average heart rate of the target electrocardiogram signal is calculated based on the position of the R-wave peak. The target cardiac cycle is obtained by dividing the cardiac cycle based on the average heart rate and the position of the R wave peak.
6. The method according to claim 1, characterized in that, The process of searching for S and T waves on the target cardiac cycle to obtain the ST segment specifically includes: The target S wave and target T wave of the target cardiac cycle are determined based on the slope change of the target cardiac cycle. Search for signal points on the target S-wave that meet preset conditions as the endpoint of the target S-wave; The starting point of the target T-wave is obtained by searching within the target T-wave based on the quadratic spline wavelet transformation and the slope transformation. The ST segment is obtained by finding the end point of the target S wave and the beginning point of the target T wave.
7. A device for identifying ST segments, characterized in that, The device includes: a signal acquisition unit, a signal processing unit, and a signal judgment unit; The signal acquisition unit is used to acquire the target electrocardiogram signal to be detected; The signal processing unit is used to divide the target ECG signal into cardiac cycles based on the R wave position of the target ECG signal to obtain the target cardiac cycle; to search for S waves and T waves on the target cardiac cycle, to obtain the ST segment using the S waves and T waves, and to determine the amplitude of the ST segment; and to obtain a reference point between the P wave and Q wave that meets preset conditions on the target cardiac cycle. The signal judgment unit is used to determine whether the state of the ST segment is normal based on the difference between the amplitude of the ST segment and the amplitude of the reference point. The signal processing unit is used to decenter the potential values of the ECG signal on the ST segment to obtain a decentered ECG amplitude sample; construct a covariance matrix based on the ECG amplitude sample, and calculate the eigenvalues and eigenvectors of the covariance matrix; form an orthogonal transformation matrix based on the eigenvalues and eigenvectors, and calculate a target ECG amplitude sample based on the orthogonal transformation matrix and the ECG amplitude sample; calculate the mean of the data in the target ECG amplitude sample to obtain the average amplitude, and use the average amplitude as the amplitude of the ST segment.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the processor performs the steps of the method as described in any one of claims 1 to 6.
9. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Automatic recognition of EC G ST section based on template match
CN101028186A
Single-lead ECG signal PQRST wave joint precise recognition algorithm
CN110327032A