A method for detecting abnormal electrocardiogram degree based on artificial intelligence

By applying artificial intelligence-based methods in electrocardiogram abnormality detection, including adaptive filters and two-dimensional discrete wavelet transformation, the problems of high subjectivity, efficiency and misdiagnosis rate of detection in the prior art are solved, and higher detection accuracy and efficiency are achieved.

CN119577657BActive Publication Date: 2025-05-13MEDEX (BEIJING) TECH LTD CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510128213.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-13
Estimated Expiration
2045-02-05

AI Technical Summary

Technical Problem

The prior art has problems such as strong subjectivity, low efficiency and high misdiagnosis rate in electrocardiogram abnormality detection.

Method used

Using an artificial intelligence-based method, low-frequency noise is removed through an adaptive filter, the signal is decomposed using two-dimensional discrete wavelet transformation, threshold processing, signal reconstruction, feature sequences are extracted, and model parameters are estimated and predicted through the ECG time series anomaly detection model to calculate the abnormality score.

Benefits of technology

It improves the accuracy and efficiency of electrocardiogram abnormality detection, reduces the rate of misdiagnosis, enhances the comprehensiveness and accuracy of the detection, and improves the system's learning ability and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577657B_ABST
    Figure CN119577657B_ABST
Patent Text Reader

Abstract

A method for detecting abnormal degree of electrocardiogram based on artificial intelligence includes: removing low-frequency noise from original electrocardiogram data; constructing an abnormal detection model for electrocardiogram time series according to the electrocardiogram signal after removing the low-frequency noise; decomposing the electrocardiogram signal after removing the low-frequency noise into different low-frequency components and high-frequency components; performing threshold processing on the high-frequency components and reconstructing the electrocardiogram signal; extracting features from the electrocardiogram signal data after removing noise interference to obtain an electrocardiogram feature sequence; inputting the electrocardiogram feature sequence into the electrocardiogram time series abnormal detection model to estimate model parameters and output model parameters; predicting the predicted value of the electrocardiogram feature sequence according to the estimated model parameters to obtain an abnormal score of the electrocardiogram. After the present invention automatically constructs the electrocardiogram time series abnormal detection model according to the electrocardiogram signal through the intelligent engine, the model parameters are adjusted, thereby improving the accuracy and efficiency of electrocardiogram abnormal detection and enhancing the generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram abnormality detection, and in particular to an electrocardiogram abnormality degree detection method based on artificial intelligence. Background Art

[0002] In health monitoring, it is necessary to select a matching model from the existing models based on different health data to monitor health conditions. This not only requires a large amount of model foundation, but also cannot reconstruct the model based on specific health data, which reduces the reference value of the monitoring results.

[0003] Electrocardiogram (ECG) is a diagnostic technique that records the electrical physiological activity of the heart in time units through the body wall and captures and records it through electrodes in contact with the skin. ECG can accurately and detailedly measure and record the electrical activity of the heart. Abnormal bands in the ECG can reflect the patient's heart health status.

[0004] Although the electrocardiogram plays an important role in the diagnosis of heart diseases, existing technologies still have some limitations in detecting abnormal electrocardiograms. These limitations mainly include: strong subjectivity: traditional electrocardiogram interpretation relies on the doctor's experience and expertise. Different doctors may have different interpretations of the same electrocardiogram, resulting in a strong subjectivity in the diagnosis results. Low efficiency: doctors need to analyze each band of the electrocardiogram point by point, which is a time-consuming process. Especially when faced with a large amount of electrocardiogram data, the doctor's work efficiency will be affected. High misdiagnosis rate: Since the shape, amplitude, and period of all the small bands in the normal part of the electrocardiogram are consistent to a certain extent, but not completely consistent, some normal bands will still be considered abnormal bands due to differences in period and amplitude. If the degree of abnormality is detected directly based on the difference between the abnormal band and other normal bands, the accuracy of the result will be affected. Moreover, due to the complexity and diversity of the electrocardiogram, some subtle abnormal bands may be ignored or misjudged, resulting in misdiagnosis or missed diagnosis.

[0005] Therefore, the problems existing in the prior art need to be further improved and optimized to improve the accuracy and efficiency of detection. Summary of the invention

[0006] In order to overcome the shortcomings of the prior art, the present invention provides an electrocardiogram abnormality detection method based on artificial intelligence, which solves the technical problems of strong subjectivity, low efficiency and high misdiagnosis rate of electrocardiogram detection in the prior art.

[0007] An embodiment of the present invention provides an electrocardiogram abnormality detection method based on artificial intelligence, the method comprising:

[0008] Using an adaptive filter to remove low-frequency noise from the original electrocardiogram data to obtain an electrocardiogram signal after the low-frequency noise is removed;

[0009] Decomposing the electrocardiogram signal after removing the low-frequency noise into low-frequency components and high-frequency components at different scales and different translation positions by using two-dimensional discrete wavelet transform;

[0010] Performing threshold processing on the high-frequency component, and then performing two-dimensional discrete wavelet inverse transform on the low-frequency component and the high-frequency component after the threshold processing to reconstruct the electrocardiogram signal, so as to obtain the electrocardiogram signal with noise interference removed;

[0011] Performing feature extraction on the electrocardiogram signal data after removing noise interference to obtain an electrocardiogram feature sequence;

[0012] Inputting the electrocardiogram feature sequence into an electrocardiogram time series anomaly detection model to estimate model parameters, and outputting model parameters; wherein the model parameters include autoregressive coefficient, periodic autoregressive coefficient, moving average coefficient, periodic moving average coefficient, difference order and periodic difference order;

[0013] The predicted value of the electrocardiogram feature sequence is predicted according to the estimated model parameters, and the electrocardiogram abnormality score is obtained by comparing the absolute deviation between the actual observed value and the predicted value of the electrocardiogram feature sequence and normalizing them to the standard deviation scale of the time series.

[0014] According to the above aspects and any possible implementation, an implementation is further provided, wherein the step of removing low-frequency noise from the original electrocardiogram data using an adaptive filter to obtain an electrocardiogram signal after the low-frequency noise is removed comprises:

[0015] Adaptive filter is used to adjust the filter coefficient in real time by minimizing the error, so that the output of the filter gradually approaches the expected response signal, thereby removing low-frequency noise; the coefficient update formula of the adaptive filter is:

[0016]

[0017] in, Indicated in The coefficient vector of the filter at time instant; Indicated in The coefficient vector of the filter at time instant; is the step size factor; It is The error signal at the moment; It is The input signal at time.

[0018] According to the above aspects and any possible implementation, an implementation is further provided, wherein the electrocardiogram signal after the low-frequency noise is removed is decomposed into low-frequency components and high-frequency components at different scales and different translation positions by using a two-dimensional discrete wavelet transform, comprising:

[0019] The electrocardiogram signal after the low-frequency noise is removed is subjected to a two-dimensional discrete wavelet transform and expressed as a linear combination of wavelet basis functions at different scales and different translation positions; wherein the scale coefficient in the linear combination corresponds to the low-frequency approximate part of the signal, and the wavelet coefficient corresponds to the high-frequency detail part of different frequencies; wherein the two-dimensional discrete wavelet transform adopts the following formula:

[0020]

[0021] in, represents the scale coefficient, corresponding to the low-frequency approximation part; is the given initial scale parameter, is the translation parameter; Represents the wavelet coefficients, corresponding to the high-frequency details of different frequencies; among them, Used to distinguish wavelets in different directions, Indicates the number of layers of wavelet decomposition; is the scale parameter; is the original input discrete ECG signal sequence, Represents the sequence number of discrete time points; is the length of the signal, that is, the number of discrete points; and The scaling functions are and wavelet function Discrete form at corresponding scale and translation position; represents the coefficients of the wavelet low-pass filter, represents the coefficients in the discrete two-scale equation of the wavelet function, represents the order of the wavelet; Represented in scale , translate to When At discrete time points The value of ; is the index associated with the filter coefficient; 2N is the length of the filter.

[0022] According to the above aspect and any possible implementation manner, an implementation manner is further provided, wherein the threshold processing is performed on the high frequency component, including:

[0023] Based on the wavelet coefficients in the linear combination Construct high-frequency coefficient matrix;

[0024] Setting Thresholds ;

[0025] Each element in the high-frequency coefficient matrix is ​​subjected to threshold processing to remove high-frequency noise, thereby obtaining a high-frequency coefficient matrix after threshold processing, wherein the threshold processing formula is:

[0026] .

[0027] According to the above aspects and any possible implementation, an implementation is further provided, wherein the electrocardiogram signal is reconstructed by performing a two-dimensional discrete wavelet inverse transform using the low-frequency component and the high-frequency component after threshold processing to obtain an electrocardiogram signal with noise interference removed, including:

[0028] The scale coefficient representing the low-frequency component and the high-frequency coefficient matrix after threshold processing are subjected to two-dimensional discrete wavelet inverse transform signal reconstruction to obtain electrocardiogram signal data with noise interference removed; wherein the two-dimensional discrete wavelet inverse transform signal reconstruction formula is:

[0029]

[0030] in, represents the reconstructed discrete ECG signal sequence, Represents the sequence number of discrete time points.

[0031] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the step of extracting features from the electrocardiogram signal data after removing noise interference to obtain an electrocardiogram feature sequence comprises:

[0032] Performing a convolution kernel transformation on the electrocardiogram signal from which noise interference is removed to generate a transformed convolution kernel;

[0033] The transformed convolution kernel is used to slide on the ECG signal to perform convolution operation and extract the ECG feature sequence.

[0034] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the performing a convolution kernel transformation on the electrocardiogram signal from which the noise interference is removed to generate a transformed convolution kernel comprises:

[0035] a) defining a convolution kernel transformation group G: the group G includes a variety of rotation and reflection operations, each operation corresponds to a specific transformation matrix or transformation rule;

[0036] b) generating transformation indexes indices(G): generating corresponding transformation indexes according to each rotation and reflection operation defined in the group G;

[0037] c) Apply the Gather function to perform convolution kernel transformation: Use the Gather function to select and rearrange the elements of the original convolution kernel K according to the generated transformation index indices(G). The convolution kernel transformation formula is:

[0038]

[0039] in, It is used to select and rearrange tensor elements according to given indices. It is used to transform the convolution kernel according to the group. is the original convolution kernel, indices(G) represents the index generated by the rotation and reflection operations based on the group definition;

[0040] d) Optimize the transformation group G and transformation index indices(G): Optimize the transformation group G and transformation index indices(G) by training and learning a large amount of ECG data; By continuously adjusting the rotation and reflection operations in the group and the corresponding transformation index, the transformed convolution kernel More adaptable to the feature extraction requirements of electrocardiogram signals.

[0041] According to the above aspects and any possible implementation, an implementation is further provided, wherein the step of sliding the transformed convolution kernel on the electrocardiogram signal to perform a convolution operation to extract the electrocardiogram feature sequence comprises:

[0042] The convolution layer uses the transformed convolution kernel The following convolution operation is performed on the input ECG signal:

[0043]

[0044] in, It is the convolution layer at a certain position corresponding to the time point Output feature value; is the value of the input ECG signal at the corresponding time position, Indicates the offset relative to the starting position within the sliding range of the convolution transform kernel; is the length of the convolution kernel; It is the weight value of the corresponding position in the convolution kernel.

[0045] According to the above aspects and any possible implementation, an implementation is further provided, wherein the electrocardiogram feature sequence is input into an electrocardiogram time series abnormality detection model to estimate model parameters, and the model parameters are output, including:

[0046] The electrocardiogram time series anomaly detection model adopts the following model formula:

[0047]

[0048] in, It's time The electrocardiogram feature sequence value after being extracted by the convolution layer at the moment; is the autoregressive operator, is the autoregressive order, which means using the past of the moment The linear combination predicts the current value, is the backshift operator; is a periodic autoregressive operator, is the cyclical autoregressive order, It is a cycle; The difference order is The difference operation is used to convert Convert to a stationary series; is a periodic difference operation with an order of , perform differential processing on the data in the cycle; is the moving average operator, is the moving average order; is the periodic moving average operator, is the periodic moving average order, and the forecast error on the period is corrected accordingly; is a white noise sequence.

[0049] According to the above aspects and any possible implementation, an implementation is further provided, wherein the predicted value of the electrocardiogram feature sequence is predicted according to the estimated model parameters, and the electrocardiogram abnormality score is obtained by comparing the absolute deviation between the actual observed value and the predicted value of the electrocardiogram feature sequence and normalizing it to the standard deviation scale of the time series, including:

[0050] The prediction equation for predicting the predicted value of the electrocardiogram feature sequence according to the estimated model parameters is:

[0051]

[0052] Substitute the estimated parameter values ​​into the above prediction equation and calculate the , to predict The value of time, first Prediction value at time As known data, substitute it into the prediction equation to calculate , and so on, to obtain the predicted value sequence at multiple time points in the future ;

[0053] The calculation formula for the ECG abnormality score is:

[0054]

[0055] in, is the actual observed value of the ECG feature sequence, is the model prediction value of the ECG feature sequence, It is a time series The standard deviation of .

[0056] Compared with the prior art, the present invention has achieved the following beneficial effects:

[0057] (1) The intelligent engine automatically builds an ECG time series anomaly detection model based on the ECG signal, ensuring the matching degree between the ECG signal and the model.

[0058] (2) Adaptive filtering is used to remove low-frequency noise, which effectively reduces the interference of noise on the ECG signal and makes subsequent processing more accurate. The signal is decomposed into low-frequency and high-frequency components at different scales and different translation positions using two-dimensional discrete wavelet transform, and high-frequency noise is removed by threshold processing, further improving the purity of the signal. The convolution kernel transform generates the transformed convolution kernel through rotation and reflection operations, which can capture the features of different directions and shapes in the ECG signal, improving the comprehensiveness and accuracy of feature extraction. The time series anomaly detection model adopts complex model structures such as autoregression, periodic autoregression, and moving average, which can more accurately predict the ECG feature sequence, thereby more accurately judging the degree of abnormality.

[0059] (3) Both adaptive filters and two-dimensional discrete wavelet transform are efficient signal processing technologies that can quickly process ECG signals while ensuring accuracy. The convolution kernel transform improves the flexibility and adaptability of the convolution kernel transform and reduces the amount of calculation by optimizing the transformation group and transformation index. The time series anomaly detection model converts the signal into a stationary series through differential operations and periodic differential operations, which facilitates subsequent modeling and analysis, further improving the detection efficiency.

[0060] (4) The convolution kernel transformation and time series anomaly detection model in the present invention have strong learning and generalization capabilities, and can adapt to the changes in the characteristics of different individuals and different electrocardiogram signals. By training and learning a large amount of electrocardiogram data, the transformation group and transformation index, as well as the model parameters, can be continuously optimized, making the detection method more robust and reliable.

[0061] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are provided for a better understanding of the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0063] Figure 1 A flow chart of an artificial intelligence-based electrocardiogram abnormality detection method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.

[0066] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart showing a method for detecting abnormal electrocardiogram degree based on artificial intelligence according to an embodiment of the present invention. Figure 1 As shown, an electrocardiogram abnormality detection method based on artificial intelligence in an embodiment of the present invention comprises:

[0067] S110: removing low-frequency noise from the original electrocardiogram data using an adaptive filter to obtain an electrocardiogram signal after the low-frequency noise is removed;

[0068] The collected original ECG data This is the unprocessed raw numerical information obtained directly from the detection equipment, recording the electrophysiological activity of the heart, including the potential changes corresponding to each time point, etc.

[0069] The step S110 specifically includes:

[0070] Adaptive filters are used to adjust the filter coefficients in real time by minimizing the error, so that the output of the filter gradually (as much as possible) approaches the desired response signal, thereby removing low-frequency noise or other specific noise; the coefficient update formula of the adaptive filter is:

[0071]

[0072] in, Indicated in The coefficient vector of the time-adaptive filter determines the weighting of the filter on the different components of the input signal. Its dimension depends on factors such as the order of the filter. For example, if a second-order filter is used, it is a vector containing two elements. Indicated in The coefficient vector of the filter at the moment is the updated coefficient. The purpose is to gradually optimize the filter performance by continuously updating it. is the step size factor, which is a positive number that determines the magnitude of each coefficient update. If the value is too large, the filter may not converge or the convergence may be unstable; if the value is too small, the convergence speed will be too slow, affecting the real-time performance, etc. It needs to be reasonably selected according to the specific signal characteristics; It is The error signal at the moment is equal to the expected signal (ideally, it corresponds to a pure electrocardiogram signal without noise and other interference) minus the actual output signal of the filter at that moment. It reflects the degree of deviation between the current filter output and the expected output and is the factor that drives the coefficient update; It is The input signal at a certain moment, in the present invention, is information such as the potential value at the corresponding moment in the original electrocardiogram data.

[0073] This step S110 adjusts the filter coefficient in real time by minimizing the error, so that the output of the filter gradually approaches the expected response signal, thereby effectively removing low-frequency noise, improving the signal-to-noise ratio of the electrocardiogram signal, and providing a purer data basis for subsequent processing.

[0074] The step S110 also includes, based on the electrocardiogram signal after the low-frequency noise is removed, constructing an electrocardiogram time series anomaly detection model. Specifically, the intelligent engine can realize automatic clustering based on the electrocardiogram signal after the low-frequency noise is removed, and construct the electrocardiogram time series anomaly detection model according to the clustering result. Label screening is performed on the electrocardiogram signal after the low-frequency noise is removed, and the electrocardiogram signal including a specified signal can be screened in the electrocardiogram signal after the low-frequency noise is removed, and the specified signal is the target label. The search engine can also realize automatic clustering based on other health data and build a health detection model according to the clustering result.

[0075] S120: Decomposing the electrocardiogram signal after the low-frequency noise is removed into low-frequency components and high-frequency components at different scales and different translation positions by using a two-dimensional discrete wavelet transform;

[0076] The step S120 specifically includes:

[0077] After removing low-frequency noise, the ECG signal Perform a two-dimensional discrete wavelet transform and express it as a linear combination of wavelet basis functions at different scales (corresponding to different frequency ranges) and different translation positions; the scale coefficients in the linear combination correspond to the low-frequency approximation part of the signal, and the wavelet coefficients correspond to the high-frequency details of different frequencies; the two-dimensional discrete wavelet transform uses the following formula:

[0078]

[0079] in, represents the scale coefficient, corresponding to the low-frequency approximation part, is the given initial scale parameter, is the translation parameter, which reflects the overall characteristics of the signal at a coarse scale, similar to a fuzzy representation of the original signal but retaining the overall contour; Represents the wavelet coefficients, corresponding to the high-frequency details of different frequencies. These coefficients can capture the detailed change characteristics in the electrocardiogram signal, such as some small potential fluctuations, etc. Used to distinguish wavelets in different directions (such as horizontal, vertical, diagonal, etc.), represents the number of wavelet decomposition layers, is a scale parameter that determines the corresponding frequency range. As it increases, the corresponding frequency range becomes lower (that is, closer to the low-frequency part). The same is the translation parameter; is the original input discrete ECG signal sequence, Represents the sequence number of discrete time points; is the length of the signal, that is, the number of discrete points; and The scaling functions are and wavelet function Discrete form at corresponding scale and translation position; represents the coefficients of the wavelet low-pass filter, represents the coefficients in the discrete two-scale equation of the wavelet function, represents the order of the wavelet; Represented in scale , translate to When At discrete time points The value of ; It is the index related to the filter coefficient, and traverses the positions corresponding to all possible coefficients in the summation calculation; 2N is the length of the filter.

[0080] Through the wavelet transform of step S120, the signal is decomposed into a series of low-frequency components (scaling coefficients) and high-frequency components (wavelet coefficients) at different scales and translation positions, providing rich multi-scale feature information. Both the scaling coefficients and the wavelet coefficients are obtained by performing inner product operations with the corresponding wavelet basis functions (scaling functions or wavelet functions), and they respectively reflect the low-frequency and high-frequency characteristics of the signal at different scales and translation positions. These coefficients together constitute the wavelet representation of the signal, providing a basis for subsequent signal processing and analysis.

[0081] S130: performing threshold processing on the high-frequency component, and then performing two-dimensional discrete wavelet inverse transform on the low-frequency component and the high-frequency component after the threshold processing to reconstruct the electrocardiogram signal, so as to obtain the electrocardiogram signal with noise interference removed;

[0082] In step S130, threshold processing is performed on the high frequency components, including:

[0083] Based on wavelet coefficients in linear combination Construct high-frequency coefficient matrix;

[0084] Setting Thresholds Its value is determined by experiments based on various factors such as signal energy distribution and noise level. The selection can be determined by experiments and other methods based on various factors such as signal energy distribution and noise level;

[0085] Each element in the high-frequency coefficient matrix is ​​subjected to threshold processing to remove high-frequency noise, thereby obtaining a high-frequency coefficient matrix after threshold processing, wherein the threshold processing formula is:

[0086] .

[0087] According to the above processing, when the absolute value of the high-frequency coefficient is less than When , it is set to 0 in order to remove those high-frequency components with small amplitudes that may be caused by noise, etc., and retain relatively important high-frequency feature information.

[0088] By removing high-frequency noise through the above threshold processing, important characteristic information in the signal is retained, and the purity of the signal is further improved.

[0089] In step S130, the electrocardiogram signal is reconstructed by performing a two-dimensional discrete wavelet inverse transform using the low-frequency component and the high-frequency component after threshold processing to obtain an electrocardiogram signal with noise interference removed, including:

[0090] The scale factor representing the low-frequency component And the high-frequency coefficient matrix after threshold processing Perform two-dimensional discrete wavelet inverse transform signal reconstruction to obtain electrocardiogram signal data with noise interference removed; wherein the two-dimensional discrete wavelet inverse transform signal reconstruction formula is:

[0091]

[0092] in, represents the reconstructed discrete ECG signal sequence, Represents the sequence number of discrete time points.

[0093] Signal reconstruction is the inverse process of wavelet transform. The wavelet coefficients after threshold processing (including low-frequency scaling coefficients and processed high-frequency coefficients) are used to restore the signal through inverse wavelet transform to obtain the ECG signal after removing some noise interference. Inverse wavelet transform is the inverse process of wavelet transform. Its formula is inverse to that of wavelet transform. The signal is reconstructed by substituting the processed coefficients into the inverse transform formula to return it to the above time domain representation.

[0094] S140: extracting features from the electrocardiogram signal data after removing noise interference to obtain an electrocardiogram feature sequence;

[0095] In step S140, feature extraction is performed on the electrocardiogram signal data after removing noise interference to obtain an electrocardiogram feature sequence, which specifically includes:

[0096] S141: performing convolution kernel transformation on the electrocardiogram signal from which noise interference is removed to generate a transformed convolution kernel;

[0097] The step S141 specifically includes:

[0098] a) Define the convolution kernel transformation group G: The group G includes a variety of rotation and reflection operations, each of which corresponds to a specific transformation matrix or transformation rule. These operations are intended to capture the features of different directions and shapes in the electrocardiogram signal by changing the direction and shape of the convolution kernel.

[0099] b) Generate transformation index indices(G): Generate corresponding transformation indexes according to each rotation and reflection operation defined in the group G; these indices are used to indicate how to rearrange the elements of the original convolution kernel K to obtain the transformed convolution kernel The generation of transformation indexes should ensure that all possible transformations in the group G are covered, and each transformation can be uniquely identified by the index.

[0100] c) Apply the Gather function to transform the convolution kernel: Use the Gather function to select and rearrange the elements of the original convolution kernel K according to the generated transformation index indices(G). Specifically, the Gather function selects elements from the original convolution kernel K according to the position specified by the index and arranges them in a new order to form the transformed convolution kernel. (It is a matrix, for example it can be The transformed convolution kernel will have a different direction and shape from the original convolution kernel, and can more effectively capture specific features in the ECG signal. The convolution kernel transformation formula is:

[0101]

[0102] in, It is used to select and rearrange tensor elements according to given indices. It is used to transform the convolution kernel according to the group. is the original convolution kernel, indices(G) represents the index generated by the rotation and reflection operations based on the group definition;

[0103] d) Optimizing the transformation group G and transformation index indices(G): In practical applications, the transformation group G and transformation index indices(G) can be optimized by training and learning a large amount of ECG data; by continuously adjusting the rotation and reflection operations in the group and the corresponding transformation index, the transformed convolution kernel It is more adaptable to the feature extraction requirements of electrocardiogram signals, thereby improving the accuracy and efficiency of detection.

[0104] The original convolution kernel can be obtained by manual design, which is usually based on domain knowledge and understanding of signal characteristics. For example, in image processing, specific filters (such as edge detectors, Gaussian filters, etc.) may be designed to extract specific features in the image. In deep learning, the convolution kernel is usually automatically learned through a training process. The network adjusts the weights of the convolution kernel through a back propagation algorithm according to the characteristics of the task (such as classification, regression, etc.) and the input data to minimize the loss function. In electrocardiogram analysis, the convolution kernel needs to be able to capture key features in the electrocardiogram signal, such as P waves, QRS complexes, T waves, etc., as well as their morphology, amplitude, interval and other characteristics. The size (such as 5×5) and shape (such as square, rectangle, etc.) of the convolution kernel will affect the scale of features that it can capture. Larger convolution kernels can capture a wider range of features, while smaller convolution kernels focus more on local details. In the electrocardiogram analysis of the present invention, the size and shape of the convolution kernel are determined according to the sampling rate of the electrocardiogram signal, the waveform characteristics, and the type of features to be extracted.

[0105] The original convolution kernel plays a vital role in feature extraction of ECG data. It not only determines the type of features that can be extracted, but also affects the key performance of the model, such as computational complexity and generalization ability. Therefore, when designing or training an ECG analysis model, it is necessary to carefully consider the design or learning method, size, shape and other parameters of the convolution kernel. The construction and learning process of the original convolution kernel is an iterative optimization process. Through continuous training and adjustment, the network can learn the convolution kernel weights suitable for feature extraction of ECG signals, thereby improving the accuracy and efficiency of anomaly detection.

[0106] Therefore, the convolution kernel transformation in step S141 not only realizes the rotation and reflection operation of the original convolution kernel, but also can capture the features of different directions and forms in the electrocardiogram signal, improves the comprehensiveness and accuracy of feature extraction, and provides more abundant feature information for subsequent abnormality detection. The flexibility and adaptability of the convolution kernel transformation are also improved by optimizing the transformation group and transformation index, thereby further improving the accuracy and efficiency of electrocardiogram abnormality detection.

[0107] S142: Use the transformed convolution kernel to slide on the electrocardiogram signal to perform a convolution operation to extract the electrocardiogram feature sequence.

[0108] The step S142 specifically includes:

[0109] The convolution layer uses the transformed convolution kernel The following convolution operation is performed on the input ECG signal:

[0110]

[0111] in, It is the convolution layer at a certain position corresponding to the time point The output eigenvalue, which integrates the input signal In the corresponding local area and convolution kernel The interaction of multiple such output values ​​constitutes the extracted feature map, which reflects the characteristic information of different local areas of the ECG signal, such as the slope change of the waveform, the amplitude change pattern and other characteristics; is the value of the input ECG signal at the corresponding time position, Indicates the offset relative to the starting position within the sliding range of the convolution transform kernel; is the length of the convolution kernel (that is, the number of rows or columns of the convolution kernel, etc.); It is the weight value of the corresponding position in the convolution transform kernel. Different convolution transform kernel weights can extract different types of features. The appropriate convolution transform kernel weight is determined by training and other methods, so that the features related to electrocardiogram abnormalities can be effectively captured.

[0112] S150: inputting the electrocardiogram feature sequence into an electrocardiogram time series anomaly detection model to estimate model parameters, and outputting model parameters; wherein the model parameters include autoregressive coefficient, periodic autoregressive coefficient, moving average coefficient, periodic moving average coefficient, difference order and periodic difference order;

[0113] The step S150 specifically includes:

[0114] The ECG time series anomaly detection model uses the following model formula:

[0115]

[0116] in, It's time The feature sequence value of the electrocardiogram extracted by the convolution layer at the moment (the feature sequence extracted by the convolution layer); is the autoregressive operator, is the autoregressive order, which means using the past of the moment To linearly combine and predict the current value, is the backshift operator; is a periodic autoregressive operator, is the cyclical autoregressive order, is a cycle (for ECG data, if a characteristic pattern is found to occur repeatedly at a certain time interval, this interval is the cycle). Similarly, the correlation values ​​of the past few cycles are used to predict the current moment value. The difference order is The purpose of the difference operation is to Converted into a stationary series, the difference operation is to perform the difference operation on adjacent data. Through the appropriate difference order, the statistical characteristics of the series such as mean and variance are relatively stable, which is convenient for subsequent modeling and analysis; is a periodic difference operation with an order of , perform differential processing on the data in the cycle; is the moving average operator, is the moving average order, using the past The prediction error at each moment is used to make corresponding corrections to the current prediction. is the periodic moving average operator, is the periodic moving average order, and the forecast error on the period is corrected accordingly; is a white noise sequence, representing the predicted error term, which is assumed to be an independent and identically distributed random sequence with a mean of 0 and a constant variance.

[0117] In step S150, by adopting complex model structures such as autoregression, periodic autoregression, moving average, etc., the electrocardiogram feature sequence can be predicted more accurately.

[0118] S160: Predicting the predicted value of the electrocardiogram feature sequence according to the estimated model parameters, and obtaining the electrocardiogram abnormality score by comparing the absolute deviation between the actual observed value and the predicted value of the electrocardiogram feature sequence and normalizing it to the standard deviation scale of the time series.

[0119] The step S160 specifically includes:

[0120] Assume that the current time is , known historical data , according to the model formula: , which is transformed into the following prediction equation:

[0121]

[0122] Substitute the estimated parameter values ​​into the above prediction equation and calculate the , to predict The value of time, first Prediction value at time As known data, substitute it into the prediction equation to calculate , and so on, to obtain the predicted value sequence at multiple time points in the future ;

[0123] The calculation formula for the ECG abnormality score is:

[0124]

[0125] in, is the actual observed value of the ECG feature sequence, is the model prediction value of the ECG feature sequence; It is a time series The standard deviation can be calculated from historical data.

[0126] It represents the calculation of the absolute deviation between the actual observation and the predicted value, and normalizes it to the standard deviation scale of the time series. The higher the score, the greater the deviation of the current observation from the normal range predicted by the model, that is, the higher the degree of abnormality. , indicating that the deviation between the current observed value and the predicted value is twice the standard deviation, the relative deviation is large, and there may be an abnormal situation; if , the degree of deviation is relatively small and the possibility of abnormality is low.

[0127] This step S160 compares the absolute deviation between the actual observed value and the predicted value and normalizes them to the standard deviation scale of the time series to obtain the electrocardiogram abnormality score, thereby accurately determining the degree of abnormality.

[0128] In summary, the above technical solution of the present invention significantly improves the accuracy and efficiency of electrocardiogram abnormality detection, and enhances the generalization ability, providing a new and effective method for clinical electrocardiogram abnormality detection.

[0129] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0130] Furthermore, the system of the present invention also includes a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium can be configured to store a program code for executing the method for detecting the degree of abnormal electrocardiogram based on artificial intelligence of the above-mentioned method embodiment, and the program code can be loaded and run by a processor to implement the above-mentioned method for detecting the degree of abnormal electrocardiogram based on artificial intelligence. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a memory device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-temporary computer-readable storage medium.

[0131] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the device of the present invention, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.

[0132] Various implementations 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0134] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting abnormal electrocardiogram degree based on artificial intelligence, characterized in that: The method comprises: Adopting an adaptive filter to remove low-frequency noise from the original electrocardiogram data to obtain an electrocardiogram signal after removing the low-frequency noise; According to the electrocardiogram signal after the low-frequency noise is removed, constructing an electrocardiogram time series anomaly detection model; Decomposing the electrocardiogram signal after removing the low-frequency noise into low-frequency components and high-frequency components at different scales and different translation positions by using two-dimensional discrete wavelet transform; Performing threshold processing on the high-frequency component, and then performing two-dimensional discrete wavelet inverse transform on the low-frequency component and the high-frequency component after the threshold processing to reconstruct the electrocardiogram signal, so as to obtain the electrocardiogram signal with noise interference removed; Performing feature extraction on the electrocardiogram signal data after removing noise interference to obtain an electrocardiogram feature sequence includes: Performing a convolution kernel transformation on the electrocardiogram signal from which noise interference is removed to generate a transformed convolution kernel; The transformed convolution kernel is used to slide on the ECG signal to perform convolution operation and extract the ECG feature sequence; The step of performing a convolution kernel transformation on the electrocardiogram signal from which noise interference is removed to generate a transformed convolution kernel comprises: a) defining a convolution kernel transformation group G: the group G includes a variety of rotation and reflection operations, each operation corresponds to a specific transformation matrix or transformation rule; b) generating transformation indexes indices(G): generating corresponding transformation indexes according to each rotation and reflection operation defined in the group G; c) Apply the Gather function to perform convolution kernel transformation: Use the Gather function to select and rearrange the elements of the original convolution kernel K according to the generated transformation index indices(G). The convolution kernel transformation formula is: , in, It is used to select and rearrange tensor elements according to given indices. It is used to transform the convolution kernel according to the group. is the original convolution kernel, indices(G) represents the index generated by the rotation and reflection operations based on the group definition; d) Optimize the transformation group G and transformation index indices(G): Optimize the transformation group G and transformation index indices(G) by training and learning a large amount of ECG data; By continuously adjusting the rotation and reflection operations in the group and the corresponding transformation index, the transformed convolution kernel More adaptable to the needs of feature extraction of ECG signals; Inputting the electrocardiogram feature sequence into an electrocardiogram time series anomaly detection model to estimate model parameters, and outputting model parameters; wherein the model parameters include autoregressive coefficient, periodic autoregressive coefficient, moving average coefficient, periodic moving average coefficient, difference order and periodic difference order; The predicted value of the electrocardiogram feature sequence is predicted according to the estimated model parameters, and the electrocardiogram abnormality score is obtained by comparing the absolute deviation between the actual observed value and the predicted value of the electrocardiogram feature sequence and normalizing them to the standard deviation scale of the time series.

2. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 1, characterized in that: in, The original electrocardiogram data is subjected to an adaptive filter to remove low-frequency noise, thereby obtaining an electrocardiogram signal after the low-frequency noise is removed, including: Adaptive filter is used to adjust the filter coefficient in real time by minimizing the error, so that the output of the filter gradually approaches the expected response signal, thereby removing low-frequency noise; the coefficient update formula of the adaptive filter is: , in, Indicated in The coefficient vector of the filter at time instant; Indicated in The coefficient vector of the filter at time instant; is the step size factor; It is The error signal at the moment; It is The input signal at time.

3. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 2, characterized in that: in, The method of using two-dimensional discrete wavelet transform to decompose the electrocardiogram signal after removing the low-frequency noise into low-frequency components and high-frequency components at different scales and different translation positions includes: The electrocardiogram signal after the low-frequency noise is removed is subjected to a two-dimensional discrete wavelet transform and expressed as a linear combination of wavelet basis functions at different scales and different translation positions; wherein the scale coefficient in the linear combination corresponds to the low-frequency approximate part of the signal, and the wavelet coefficient corresponds to the high-frequency detail part of different frequencies; wherein the two-dimensional discrete wavelet transform adopts the following formula: , , , , in, represents the scale coefficient, corresponding to the low-frequency approximation part; is the given initial scale parameter, is the translation parameter; Represents the wavelet coefficients, corresponding to the high-frequency details of different frequencies; among them, Used to distinguish wavelets in different directions, Indicates the number of layers of wavelet decomposition; is the scale parameter; is the original input discrete ECG signal sequence, Represents the discrete time point sequence number; is the length of the signal, that is, the number of discrete points; and The scaling functions are and wavelet function Discrete form at corresponding scale and translation position; represents the coefficients of the wavelet low-pass filter, represents the coefficients in the discrete two-scale equation of the wavelet function, represents the order of the wavelet; Represented in scale , translate to When At discrete time points The value of ; is the index associated with the filter coefficient; 2N is the length of the filter.

4. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 3, characterized in that: in, Threshold processing is performed on the high frequency component, including: Based on the wavelet coefficients in the linear combination Construct high-frequency coefficient matrix; Setting Thresholds ; Each element in the high-frequency coefficient matrix is ​​subjected to threshold processing to remove high-frequency noise, thereby obtaining a high-frequency coefficient matrix after threshold processing, wherein the threshold processing formula is: 。 5. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 4, characterized in that: in, Reconstructing the electrocardiogram signal by performing two-dimensional discrete wavelet inverse transform using the low-frequency component and the high-frequency component after threshold processing to obtain the electrocardiogram signal with noise interference removed, including: The scale coefficient representing the low-frequency component and the high-frequency coefficient matrix after threshold processing are subjected to two-dimensional discrete wavelet inverse transform signal reconstruction to obtain electrocardiogram signal data with noise interference removed; wherein the two-dimensional discrete wavelet inverse transform signal reconstruction formula is: , in, represents the reconstructed discrete ECG signal sequence, Represents the sequence number of discrete time points.

6. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 5, characterized in that: in, The method uses the transformed convolution kernel to slide on the electrocardiogram signal to perform a convolution operation to extract the electrocardiogram feature sequence, including: The convolution layer uses the transformed convolution kernel The following convolution operation is performed on the input ECG signal: , in, It is the convolution layer at a certain position corresponding to the time point Output feature value; is the value of the input ECG signal at the corresponding time position, Indicates the offset relative to the starting position within the sliding range of the convolution transform kernel; is the length of the convolution kernel; It is the weight value of the corresponding position in the convolution kernel.

7. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 6, characterized in that: in, Inputting the electrocardiogram feature sequence into the electrocardiogram time series anomaly detection model to estimate model parameters, and outputting model parameters, including: The electrocardiogram time series anomaly detection model adopts the following model formula: , in, It's time The electrocardiogram feature sequence value after being extracted by the convolution layer at the moment; is the autoregressive operator, is the autoregressive order, which means using the past of the moment The linear combination predicts the current value, is the backshift operator; is a periodic autoregressive operator, is the cyclical autoregressive order, It is a cycle; The difference order is The difference operation is used to convert Convert to a stationary series; is a periodic difference operation with an order of , perform differential processing on the data in the cycle; is the moving average operator, is the moving average order; is the periodic moving average operator, is the periodic moving average order, and the forecast error on the period is corrected accordingly; is a white noise sequence.

8. The method for detecting abnormal electrocardiogram degree based on artificial intelligence according to claim 7, characterized in that: in, The predicted value of the electrocardiogram feature sequence is predicted according to the estimated model parameters, and the absolute deviation between the actual observed value and the predicted value of the electrocardiogram feature sequence is compared and normalized to the standard deviation scale of the time series to obtain the electrocardiogram abnormality score, including: The prediction equation for predicting the predicted value of the electrocardiogram feature sequence according to the estimated model parameters is: , Substitute the estimated parameter values ​​into the above prediction equation and calculate the , to predict The value of time, first Prediction value at time As known data, substitute it into the prediction equation to calculate , and so on, to obtain the predicted value sequence at multiple time points in the future ; The calculation formula for the ECG abnormality score is: , in, is the actual observed value of the ECG feature sequence, is the model prediction value of the ECG feature sequence, It is a time series The standard deviation of .

Citation Information

Patent Citations

  • Wavelet transform and secondary variation reduction electrocardiosignal denoising method based on soft threshold

    CN118845034A

  • Electrocardiogram data generation method and system and storage medium

    CN119128704A