A method and device for processing electrocardiogram signals based on intelligent algorithm

Through the improved bee colony algorithm and random forest algorithm, the problem of low efficiency in high-frequency ECG signal processing and diagnosis is solved, intelligent classification prediction of high-frequency signals is realized, and the accuracy and efficiency of heart disease diagnosis are improved.

CN115886832BActive Publication Date: 2024-10-08HUNAN VENTMED MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211437693.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2024-10-08
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Existing technology cannot effectively process and analyze high-frequency ECG signals. In particular, it fails to fully utilize high-frequency components in disease diagnosis, and relies on doctors' manual judgment, which is inefficient and cannot quickly identify the association with other heart diseases.

Method used

The blind source separation technology based on the improved bee colony algorithm is used to process high-frequency ECG signals, and the random forest algorithm is used for feature identification and classification prediction to achieve intelligent classification prediction of high-frequency ECG signals.

Benefits of technology

Through intelligent algorithm processing, the separation performance and disease diagnosis accuracy of high-frequency ECG signals are improved, the intelligent classification and prediction of high-frequency signals is realized, and the reference value of doctors' diagnosis is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115886832B_ABST
    Figure CN115886832B_ABST
Patent Text Reader

Abstract

The present invention discloses an ECG signal processing method based on an intelligent algorithm, which includes: combining the blind source separation technology based on the improved bee colony algorithm to process high-frequency ECG signals, further identifying the features of the processed high-frequency ECG signals, and using the random forest algorithm to perform classification prediction based on the features, so as to realize intelligent classification prediction of high-frequency ECG signals, improve the efficiency of using high-frequency ECG signals, and enhance the efficiency and accuracy of doctors' disease judgment; the present invention also provides an ECG signal processing device based on an intelligent algorithm. The present invention realizes accurate judgment of partially hidden heart diseases from high-frequency ECG signals, reduces the burden of manual judgment, and improves the accuracy of classification prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical devices, and in particular to an electrocardiogram signal processing method and device based on an intelligent algorithm. Background Art

[0002] ECG signals are generated by the electrical activity of the heart. The electrical activity of the heart is mainly manifested in the depolarization and repolarization process of myocardial cells. The polarization state of myocardial cells refers to the negative charge inside the myocardial cell membrane and the same amount of negative charge outside the cell membrane, which produces a potential difference. The value of this potential difference remains relatively constant and is called the resting potential. When myocardial cells are stimulated, it will cause the movement of positive and negative charges inside and outside the myocardial cell membrane. At this time, the myocardial cells will be depolarized and negatively polarized. At this time, a pair of electric couples will be formed with the myocardial cells that are still in a resting state. This change process can be detected on the body surface using ECG electrodes. The detected ECG signals reflect the working state and physiological condition of the heart from a macroscopic perspective, so the ECG is of great clinical significance.

[0003] The frequency response range of an electrocardiograph is one of its important indicators. High-frequency electrocardiographs are more accurate in diagnosing heart disease. Conventional electrocardiographs are recorded using an electromagnetic heat pen-type recorder, and their frequency range is about 40HZ. A more sophisticated electrocardiograph does not exceed 100HZ, which means that it can only record the low-frequency components of the electrocardiograph signal, and the high-frequency components of the electrocardiograph signal will be filtered out. The high-frequency component in the electrocardiograph signal refers to the component greater than 100HZ, which can show small changes in the QRS waveform and help improve the accuracy of heart disease diagnosis. The high-frequency electrocardiograph is a diagnostic technology developed on the basis of the conventional electrocardiograph. The high-frequency components in each electrocardiogram wave group were discovered very early and attracted people's attention.

[0004] The existing technology for processing high-frequency ECG signals only stays at detecting certain specific features, such as the relationship between its high-frequency notches and pauses and coronary heart disease, but does not analyze other features of the high-frequency ECG and the relationship with other diseases, and does not realize intelligent analysis of high-frequency ECG signals. It only relies on manual judgment by doctors, which is inefficient and cannot be quickly identified. Summary of the invention

[0005] 1. Technical issues to be solved

[0006] In order to solve the above technical problems, the present invention provides an ECG signal processing method and device based on an intelligent algorithm. The method processes high-frequency ECG signals in combination with a blind source separation technology based on an improved bee colony algorithm, further performs feature recognition on the processed high-frequency ECG signals, and performs classification and prediction based on the features, thereby realizing intelligent classification and prediction of high-frequency ECG signals.

[0007] (II) Technical solution

[0008] In order to solve the above-mentioned technical problems and achieve the purpose of the invention, the present invention is implemented by the following technical solutions:

[0009] A method for processing electrocardiogram signals based on an intelligent algorithm comprises the following steps:

[0010] ECG signal preprocessing: removing baseline drift based on high-pass filter; removing power frequency interference based on comb filter; separating myoelectric interference signal based on blind source separation algorithm combined with bee colony algorithm; calculating separation matrix based on the optimal solution of bee colony algorithm and outputting separation signal;

[0011] Signal separation is performed based on frequency, and the preprocessed signal is divided into two parts: a part containing high-frequency signals and a part containing only low-frequency signals. Since the high-frequency part containing high-frequency ECG signals and the part containing low-frequency signals have their own characteristics, the signal is separated into two parts: a part containing high-frequency signals and a part containing only low-frequency signals. The two parts containing only low-frequency signals are conventional ECG signals.

[0012] The ECG signal feature extraction includes feature extraction based on only low-frequency ECG signals and feature extraction based on high-frequency ECG signals.

[0013] Intelligent algorithm classification prediction, that is, matching the extracted features with the disease. Based on the random forest algorithm, the relevant diseases are predicted and classified according to the above extracted features.

[0014] Output the results. Based on the classification prediction in the previous step, the results are output to provide reference for doctors' diagnosis.

[0015] Furthermore, the transfer function of the comb filter is expressed as:

[0016]

[0017] Where, b = (1 + ρ) / 2, N is the order of the comb filter, f s is the sampling frequency, f c is the filtering frequency, f c =50Hz, ρ is the coefficient.

[0018] Furthermore, the blind source separation algorithm based on combining the bee colony algorithm comprises the following steps:

[0019] (1) Preprocess the observed signal and center and whiten the signal;

[0020] (2) Initialize the parameters and population of the bee colony algorithm, set the maximum number of iterations of the artificial bee colony algorithm, the maximum number of searches at the nectar source, and the number of bee populations, of which half are honey bees and half are observation bees;

[0021] Randomly generate an initial solution according to the initialization formula;

[0022] The initialization formula is:

[0023] x ij =x minj +rand[0,1](x maxj -x minj )

[0024] Among them, x ij The ranking of the i-th nectar source is the value of j, 1≤i≤SN, and it is a natural number, 1≤j≤D, and it is a natural number, D is the number of sequences to be found, x maxj 、x minj is the maximum and minimum value of all solutions in the j-dimension; randomly select the value of the nectar source between the extreme values, and then calculate the fitness of the nectar source;

[0025] (3) The honey bees search the neighborhood of the nectar source to generate a new location. The global optimal solution of the algorithm is probabilistically cross-linked with the solution after the honey bee neighborhood search to obtain a new solution. The original solution and the new solution are compared according to the greedy criterion to select the nectar source with the shortest task completion time in task scheduling.

[0026] Based on the deficiency of the bee colony algorithm in convergence accuracy, the present invention adopts a method of adjusting the update step size based on the number of iterations to perform neighborhood search. The search strategy is as follows:

[0027]

[0028] Among them, p is a value related to the number of iterations, as follows:

[0029] p=Ae m

[0030] A is a random parameter, and its value range is [0,1].

[0031] (4) Observe bees to obtain nectar source information transmitted by the honey bees’ waggle dance, calculate nectar source pheromones, and select nectar sources based on the relationship between sensitivity and nectar source pheromones.

[0032] The specific implementation is as follows:

[0033] Set variables m(i) and n(i) to record the number of consecutive updates of the i-th honey source, and update according to the following formula:

[0034]

[0035] The number of nectar source updates is represented by m(i) and n(i), thus obtaining the search activity of this nectar source. The pheromone H(i) of the i-th nectar source is calculated as:

[0036]

[0037] Among them, A is the reference value of the nectar source, lim is the maximum number of local searches, and fit(i) is the fitness of the i-th nectar source.

[0038] The fitness fit(i) is calculated as follows:

[0039]

[0040] Among them, f(i) is the objective function of the algorithm, which corresponds to the fourth-order cumulant.

[0041] The observer bees select nectar sources based on the pheromones and sensitivity of each nectar source. The probability of dynamic selection is:

[0042]

[0043] Among them, H(i) is the pheromone of the i-th hired honey source, and N is the number of hired bees. Therefore, the observer bees consider the fitness and the search activity of the honey source when selecting hired bees, and select the honey source with higher activity, which ensures that the algorithm jumps out of the local optimum in the early stage and searches carefully in the later stage, and finally makes the improved algorithm converge quickly and with high convergence accuracy.

[0044] According to the randomly generated sensitivity S(i) of the i-th observer bee, if the sensitivity S(i)≤P(i) of the i-th observer bee, a neighborhood search is performed to select a better nectar source; if S(i)>P(i), the location of the nectar source remains unchanged.

[0045] (5) The observation bee becomes a collecting bee neighborhood to search for the current solution, and crosses the global optimal solution with its probability to obtain another solution, and selects the new solution according to the greedy strategy.

[0046] (6) If the nectar source reaches its exploitation limit, honey bees will transform into scout bees to produce new nectar sources.

[0047] (7) If the algorithm reaches the termination iteration number, the optimal solution and the minimum task scheduling completion time found by all current bee colonies are returned, and the algorithm ends.

[0048] (8) The separation matrix is ​​calculated based on the optimal solution of the bee swarm algorithm and the separation signal is output.

[0049] Furthermore, the objective function of the bee colony algorithm is expressed as:

[0050]

[0051] When K(y i )≥0, signal y i Satisfies the conditions of super-Gaussian distribution; when K(y i )<0, signal y iSatisfies the conditions of sub-Gaussian distribution.

[0052] Furthermore, the blind source separation algorithm includes:

[0053] 1) Signal centralization

[0054]

[0055] in, represents the mixed signal after centralization, E(x i ) represents x i The mean value of is a matrix with a mean of zero, expressed as:

[0056]

[0057] Using eigenvalue decomposition method to decompose The covariance matrix of is:

[0058]

[0059] Where E is the matrix C X The orthogonal matrix of C X The diagonal matrix of .

[0060] 2) Signal whitening

[0061] The signal is whitened by:

[0062]

[0063] Among them, B is the whitening matrix.

[0064] 3) Find local extreme values

[0065] The algorithm for finding local extrema is as follows:

[0066] a. Randomly select an initial vector, make a quotient of it and its norm, and set k = 1;

[0067] b. Let w(k) = E(H(H T w(k-1) 3 )-3w(k-1));

[0068] c. Calculate w(k) / ‖w(k)‖;

[0069] d. If |w T (k)w(k-1)|→1, the algorithm converges and outputs w(k); otherwise, let k=k+1 and return to step b;

[0070] Among them, w(k) is the separation component.

[0071] Furthermore, the feature extraction based on high-frequency electrocardiogram signal includes:

[0072] Based on the determined QRS waveform position, the QRS waveform position in the high-frequency ECG signal is located according to the time information in the time domain, and feature extraction is performed.

[0073] High-frequency ECG signal feature extraction includes the following two steps:

[0074] (1) Identify characteristic waves

[0075] The differential formula is used to derive the differential waveform of the QRS wave, and the formula is as follows:

[0076]

[0077] Among them, k is the harmonic coefficient.

[0078] When the QRS waveform changes direction, that is, the waveform changes from upward to downward or from downward to upward, the differential waveform will change significantly. At the change point, the differential waveform changes direction and crosses the zero point. Therefore, when there is a characteristic wave on the QRS waveform, the differential waveform of the characteristic wave will cross the zero point twice, realizing the automatic recognition of the characteristic wave. The recognition conditions include:

[0079] a. The differential value crosses zero twice; b. The differential value difference is greater than the threshold; c. The time interval between the differential value zero crossings is within a threshold range.

[0080] High-frequency ECG recognizes characteristic waves through differential waveforms, marks the characteristic wave positions on the QSR waveform, and displays the number of characteristic waves and the differential waveform of the QSR wave.

[0081] (2) Feature extraction

[0082] The time domain features include P wave peak, average value, frequency; Q wave peak, average value, frequency; R wave peak, average value, frequency; S wave peak, average value, frequency; T wave peak, average value, frequency; PR period, ST period, QT period, characteristic wave position, number; wavelet domain features include: wavelet packet entropy value.

[0083] The calculation method of wavelet packet entropy is as follows:

[0084] a. Signal decomposition

[0085] Decompose the signal s(t) to the jth layer through wavelet packets and get 2 j subspaces, and the subsignals of the subspaces are:

[0086]

[0087] in, is the wavelet packet decomposition coefficient, θjk (t) is the wavelet function.

[0088] b. Calculate the node energy and total energy of wavelet packets

[0089] The node energy is:

[0090]

[0091] The total energy is:

[0092] E=∑E j

[0093] Then the wavelet packet energy distribution is:

[0094]

[0095] c. Calculate the wavelet packet entropy:

[0096] W=-∑P i ln[P i ]

[0097] Furthermore, the random forest-based prediction classification algorithm includes the following steps:

[0098] (1) Initialize sample weights

[0099] (2) Resample the samples, randomly generate k training sets, and further generate corresponding decision trees based on the k training sets;

[0100] (3) Randomly select m features from all M features and use them as the feature set for splitting the decision tree. Select the optimal splitting method and do not prune a single decision tree to maximize its growth.

[0101] (4) Train the decision tree, calculate the variance of the distance from all predicted points to the actual point in the decision tree, and further calculate the weight of the decision tree:

[0102]

[0103] where w i is the weight of the i-th decision tree, is the variance of the distance from the predicted point to the actual point.

[0104] (5) Output the predicted classification results

[0105] The present invention also provides an electrocardiogram signal processing device based on an intelligent algorithm, which specifically comprises:

[0106] The ECG signal preprocessing module is used to remove the baseline drift by using a 0.5 Hz high-pass filter. For power frequency interference, the present invention uses a comb filter to remove 50 Hz power frequency interference. The transfer function of the comb filter is expressed as:

[0107]

[0108] Where, b = (1 + ρ) / 2, N is the order of the comb filter, f s is the sampling frequency, f c is the filtering frequency, f c =50Hz, ρ is the coefficient;

[0109] A blind source separation algorithm based on an improved bee colony algorithm is used to address myoelectric interference.

[0110] The signal separation module is used to divide the preprocessed signal into two parts: a part containing high-frequency signals and a part containing only low-frequency signals.

[0111] The feature extraction module is used for extracting features based on low-frequency electrocardiogram signals and extracting features based on high-frequency electrocardiogram signals.

[0112] The intelligent algorithm classification prediction module is used to predict and classify related diseases based on the features extracted by the feature extraction module based on the random forest algorithm.

[0113] (III) Beneficial effects

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

[0115] (1) Analyze and process high-frequency ECG signals based on intelligent algorithms to achieve intelligent classification and prediction of high-frequency ECG signals.

[0116] (2) The blind source separation algorithm was improved based on the bee swarm algorithm, which improved the signal separation performance and effectively eliminated the electromyographic interference.

[0117] (3) Signal features are extracted based on high-frequency electrocardiogram signals, and disease classification prediction is achieved through the random forest algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0118] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0119] Figure 1 This is a flow chart of the ECG signal processing method based on intelligent algorithm according to an embodiment of the present application.

[0120] Figure 2is a flow chart of a signal separation algorithm based on an improved bee colony algorithm according to an embodiment of the present application

[0121] Figure 3 Conventional ECG signal waveform DETAILED DESCRIPTION

[0122] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0123] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0124] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0125] See also Figure 1 , the ECG signal processing method based on intelligent algorithm includes:

[0126] S1: ECG signal preprocessing. ECG signals are relatively weak and have a low signal-to-noise ratio. They are more susceptible to various interferences. The sources of noise are mainly the following three.

[0127] (1) Baseline drift

[0128] The baseline drift of ECG signal is caused by human breathing and movement.

[0129] (2) Power frequency interference: 50HZ power frequency interference is an inevitable noise in the process of high-frequency ECG signal acquisition. 50HZ power frequency interference will greatly reduce the signal-to-noise ratio of high-frequency ECG signals, so power frequency interference is the first noise to be removed in ECG acquisition.

[0130] (3) Electromyographic interference (EMG): Since the ECG signal is collected from the human body surface, electromyographic interference is inevitable. The electromyographic (EMG) baseline generated by electromyographic interference is usually within a very small voltage range, so it is generally not obvious. The main energy of electromyographic interference is concentrated in the frequency range of 30Hz-300Hz. When collecting signals, it can be clearly seen that there are many burr signals on the waveform. Such signals can generally be considered as electromyographic interference signals.

[0131] Therefore, ECG signal preprocessing is mainly performed on the above two types of noise.

[0132] (1) In order to remove the baseline drift phenomenon, the present invention adopts a 0.5 Hz high-pass filter.

[0133] (2) In view of power frequency interference, the present invention adopts a comb filter to remove 50 Hz power frequency interference. The transfer function of the comb filter is expressed as:

[0134]

[0135] Where, b = (1 + ρ) / 2, N is the order of the comb filter, f s is the sampling frequency, f c is the filtering frequency, f c =50Hz, ρ is the coefficient.

[0136] The characteristic curve of the amplitude-frequency response is in the shape of a comb, and the greater the order N, the greater the number of teeth. The comb filter designed by the present invention has an attenuation effect on 50Hz, 100Hz, 150Hz, 200Hz and other 50Hz and 50Hz multiple frequency signals, that is, it prevents the frequency from passing.

[0137] (3) Targeting electromyographic interference

[0138] The frequency range of myoelectric interference is wide, including signals above 100 Hz. Therefore, unlike the processing of ordinary ECG signals, it cannot be directly filtered out by high-frequency filtering. Therefore, for high-frequency ECG signals, signal processing is one of the difficulties.

[0139] The present invention adopts an improved blind source separation algorithm based on the bee colony algorithm to remove electromyographic interference, as follows:

[0140] "Blind source separation is a technique for separating independent source signals from mixed signals measured by a group of sensors, using only the weak known condition that the source signals are independent of each other, when the transfer function of the system, the mixing coefficient of the source signals and their probability distribution are unknown."

[0141] The observed signal is often formed by the source signal after different time delays and superpositions. The BSS model established according to this idea is called a linear convolution model.

[0142] Independent Component Analysis (ICA) is a basic method of BSS. The basic idea of ​​ICA is to assume that all source signal components are statistically independent of each other, and each observation signal is also statistically independent of each other. Without any prior knowledge, the source signal can be restored by analyzing the observation signal alone.

[0143] The FastICA algorithm mainly includes the following steps:

[0144] 1) Signal centralization

[0145]

[0146] in, represents the mixed signal after centralization, E(x i ) represents x i The mean value of is a matrix with a mean of zero, expressed as:

[0147]

[0148] Using eigenvalue decomposition method to decompose The covariance matrix of is:

[0149]

[0150] Where E is the matrix C X The orthogonal matrix of C X The diagonal matrix of .

[0151] 2) Signal whitening

[0152] The signal is whitened by:

[0153]

[0154] Among them, B is the whitening matrix.

[0155] 3) Find local extreme values

[0156] The algorithm for finding local extrema is as follows:

[0157] a. Randomly select an initial vector, make a quotient of it and its norm, and set k = 1;

[0158] b. Let w(k) = E(H(H T w(k-1) 3)-3w(k-1));

[0159] c. Calculate w(k) / ‖w(k)‖;

[0160] d. If |w T (k)w(k-1)|→1, the algorithm converges and outputs w(k); otherwise, let k=k+1 and return to step b;

[0161] Among them, w(k) is the separation component.

[0162] 4) Improvement based on bee colony algorithm

[0163] Most of the signals conform to super-Gaussian distribution or sub-Gaussian distribution. When the non-Gaussianity of the signal reaches the maximum, the signal separation effect is considered to be the best. In the problem of blind source separation, the fourth-order cumulant of the signal is used as the criterion for judging independence. The larger the absolute value of the fourth-order cumulant, the stronger the non-Gaussianity of the separated signal, indicating that the effect of blind source separation is better. Therefore, the fourth-order cumulant is used as the objective function, and the optimal solution is searched based on the bee swarm algorithm, so that the separation algorithm has the best separation effect.

[0164] The objective function is expressed as:

[0165]

[0166] When K(y i )≥0, signal y i Satisfies the conditions of super-Gaussian distribution; when K(y i )<0, signal y i Satisfies the conditions of sub-Gaussian distribution.

[0167] If the signal is a Gaussian signal, then its fourth-order cumulant is zero. For most non-Gaussian signals, a signal whose fourth-order cumulant is greater than zero is called a super-Gaussian signal.

[0168] like Figure 2 As shown in the figure, the steps of FastICA algorithm based on bee colony algorithm are as follows:

[0169] (1) Preprocess the observed signal and center and whiten the signal;

[0170] (2) Initialize the parameters and population of the bee colony algorithm, set the maximum number of iterations of the artificial bee colony algorithm, the maximum number of searches at the nectar source, and the number of bee populations, of which half are honey bees and half are observation bees;

[0171] Randomly generate an initial solution according to the initialization formula;

[0172] The initialization formula is:

[0173] x ij =xminj +rand[0,1](x majj -x minj )

[0174] Among them, x ij The ranking of the i-th nectar source is the value of j, 1≤i≤SN, and it is a natural number, 1≤j≤D, and it is a natural number, D is the number of sequences to be found, x maxj 、x minj is the maximum and minimum value of all solutions in the j-dimension; randomly select the value of the nectar source between the extreme values, and then calculate the fitness of the nectar source;

[0175] (3) The honey bees search the neighborhood of the nectar source to generate a new location. The global optimal solution of the algorithm is probabilistically cross-linked with the solution after the honey bee neighborhood search to obtain a new solution. The original solution and the new solution are compared according to the greedy criterion to select the nectar source with the shortest task completion time in task scheduling.

[0176] Based on the deficiency of the bee colony algorithm in convergence accuracy, the present invention adopts a method of adjusting the update step size based on the number of iterations to perform neighborhood search. The search strategy is as follows:

[0177]

[0178] Among them, p is a value related to the number of iterations, as follows:

[0179] p=Ae m

[0180] A is a random parameter, and its value range is [0,1].

[0181] (4) Observe bees to obtain nectar source information transmitted by the honey bees’ waggle dance, calculate nectar source pheromones, and select nectar sources based on the relationship between sensitivity and nectar source pheromones.

[0182] The specific implementation method is as follows:

[0183] Set variables m(i) and n(i) to record the number of consecutive updates of the i-th honey source, and update according to the following formula:

[0184]

[0185] The number of nectar source updates is represented by m(i) and n(i), thus obtaining the search activity of this nectar source. The pheromone H(i) of the i-th nectar source is calculated as:

[0186]

[0187] Among them, A is the reference value of the nectar source, lim is the maximum number of local searches, and fit(i) is the fitness of the i-th nectar source.

[0188] The fitness fit(i) is calculated as follows:

[0189]

[0190] Among them, f(i) is the objective function of the algorithm, which corresponds to the fourth-order cumulant.

[0191] The observer bees select nectar sources based on the pheromones and sensitivity of each nectar source. The probability of dynamic selection is:

[0192]

[0193] Among them, H(i) is the pheromone of the i-th hired honey source, and N is the number of hired bees. Therefore, the observer bees consider the fitness and the search activity of the honey source when selecting hired bees, and select the honey source with higher activity, which ensures that the algorithm jumps out of the local optimum in the early stage and searches carefully in the later stage, and finally makes the improved algorithm converge quickly and with high convergence accuracy.

[0194] According to the randomly generated sensitivity S(i) of the i-th observer bee, if the sensitivity S(i)≤P(i) of the i-th observer bee, a neighborhood search is performed to select a better nectar source; if S(i)>P(i), the location of the nectar source remains unchanged.

[0195] (5) The observation bee becomes a collecting bee neighborhood to search for the current solution, and crosses the global optimal solution with its probability to obtain another solution, and selects the new solution according to the greedy strategy.

[0196] (6) If the nectar source reaches its exploitation limit, honey bees will transform into scout bees to produce new nectar sources.

[0197] (7) If the algorithm reaches the termination iteration number, the optimal solution and the minimum task scheduling completion time found by all current bee colonies are returned, and the algorithm ends.

[0198] (8) The separation matrix is ​​calculated based on the optimal solution of the bee swarm algorithm and the separation signal is output.

[0199] S2: Separate the signal according to the frequency, and divide the preprocessed signal into two parts: a part containing high-frequency signals and a part containing only low-frequency signals.

[0200] Since the high-frequency part of the high-frequency ECG signal and the low-frequency signal have their own characteristics, the signal is separated into two parts: the part containing the high-frequency signal and the part containing only the low-frequency signal. The two parts containing only the low-frequency signal are the conventional ECG signals.

[0201] Based on wavelet transform, high-frequency and low-frequency signals are separated, and their respective time domain information is retained, and the two are linked together through time information.

[0202] The processing method based on low-frequency signals is the same as the conventional ECG signal processing method.

[0203] The high-frequency signal retains the high-frequency information of the electrocardiogram signal, including the identification information of heart diseases such as coronary heart disease, myocarditis, cardiac hypertrophy, rheumatic heart disease, etc., and the signal analysis thereof is the key to the present invention.

[0204] S3: Extracting features from ECG signals, including feature extraction based on low-frequency ECG signals and feature extraction based on high-frequency ECG signals.

[0205] S31: Feature extraction based on low-frequency ECG signals

[0206] Low-frequency ECG signals are conventional ECG signals, which are composed of a series of wave groups. Each stage of the waveform shows the changes in the electrical signals during the heart's electrical conduction process. The QRS waveform is the most important waveform of the ECG signal, and it is the most direct reflection of the heart's electrical activity. During the acquisition process, the QRS waves are often concentrated, such as Figure 3 As shown:

[0207] The characteristic bands of conventional electrocardiogram include:

[0208] 1. P wave: the potential change caused by the depolarization process of myocardial cells;

[0209] 2. PR period: reflects the time limit for the ventricular muscle to begin depolarization.

[0210] 3. QRS complex: potential changes caused by the depolarization process of ventricular muscle.

[0211] 4. ST period: The QRS wave reaches a horizontal line between the starting points of the T wave.

[0212] 5. QT period: the time from the QRS wave to the end of the T wave.

[0213] 6. U wave: reflects the change of afterpotential of action potential.

[0214] Since the R wave in the QRS complex of the ECG signal is a singular point in the waveform, the R wave can be detected using the wavelet transform algorithm. When detecting the R wave in the QRS waveform of the ECG signal, as long as the modulus maximum point of the wavelet transform basis function is found, the corresponding R wave can be found, and then the positions of other waveforms can be determined.

[0215] S32: Feature extraction based on high-frequency ECG signals

[0216] Based on the QRS waveform position determined in step S31, the QRS waveform position in the high-frequency electrocardiogram signal is located according to the time information in the time domain, and feature extraction is performed.

[0217] High-frequency ECG signal feature extraction includes the following two steps:

[0218] (1) Identify characteristic waves

[0219] The differential formula is used to derive the differential waveform of the QRS wave, and the formula is as follows:

[0220]

[0221] Among them, k is the harmonic coefficient.

[0222] When the QRS waveform changes direction, that is, the waveform changes from upward to downward or from downward to upward, the differential waveform will change significantly. At the change point, the differential waveform changes direction and crosses the zero point. Therefore, when there is a characteristic wave on the QRS waveform, the differential waveform of the characteristic wave will cross the zero point twice, realizing the automatic recognition of the characteristic wave. The recognition conditions include:

[0223] a. The differential value crosses zero twice; b. The differential value difference is greater than the threshold; c. The time interval between the differential value zero crossings is within a threshold range.

[0224] High-frequency ECG recognizes characteristic waves through differential waveforms, marks the characteristic wave positions on the QSR waveform, and displays the number of characteristic waves and the differential waveform of the QSR wave.

[0225] (2) Feature extraction

[0226] The time domain features include P wave peak, average value, frequency; Q wave peak, average value, frequency; R wave peak, average value, frequency; S wave peak, average value, frequency; T wave peak, average value, frequency; PR period, ST period, QT period, characteristic wave position, number; wavelet domain features include: wavelet packet entropy value.

[0227] The calculation method of wavelet packet entropy is as follows:

[0228] a. Signal decomposition

[0229] Decompose the signal s(t) to the jth layer through wavelet packets and get 2 j subspaces, and the subsignals of the subspaces are:

[0230]

[0231] in, is the wavelet packet decomposition coefficient, θ j,k (t) is the wavelet function.

[0232] b. Calculate the node energy and total energy of wavelet packets

[0233] The node energy is:

[0234]

[0235] The total energy is:

[0236] E=∑E j

[0237] Then the wavelet packet energy distribution is:

[0238]

[0239] c. Calculate the wavelet packet entropy:

[0240] W=-∑P i ln[P i ]

[0241] S4: Intelligent algorithm classification prediction, that is, matching the extracted features with the disease.

[0242] Based on the random forest algorithm, the relevant diseases are predicted and classified according to the features extracted in step S3.

[0243] The heart diseases known to be manifested in high-frequency ECG signals include:

[0244] (1) Sinus arrhythmia, including sinus arrhythmia, sinus tachycardia, sinus bradycardia, and sinus arrest;

[0245] (2) Premature contractions, including atrial premature beats, junctional premature beats, and ventricular premature beats

[0246] (3) heart block, including atrioventricular 1st degree, atrioventricular 2nd degree type 1, atrioventricular 2nd degree type 2, and atrioventricular 3rd degree;

[0247] (4) Flutter and fibrillation, including atrial flutter, atrial fibrillation, ventricular flutter, and ventricular fibrillation;

[0248] (5) Paroxysmal tachycardia, including paroxysmal supraventricular tachycardia, paroxysmal ventricular tachycardia, and torsades de pointes;

[0249] (6) Myocardial infarction, myocarditis

[0250] (7) Coronary heart disease, hypertension, rheumatic heart disease

[0251] (8) Cardiac hypertrophy, rheumatic heart disease

[0252] The prediction classification algorithm based on random forest includes the following steps:

[0253] (1) Initialize sample weights

[0254] (2) Resample the samples, randomly generate k training sets, and further generate corresponding decision trees based on the k training sets;

[0255] (3) Randomly select m features from all M features and use them as the feature set for splitting the decision tree. Select the optimal splitting method and do not prune a single decision tree to maximize its growth.

[0256] (4) Train the decision tree, calculate the variance of the distance from all predicted points to the actual point in the decision tree, and further calculate the weight of the decision tree:

[0257]

[0258] where w i is the weight of the i-th decision tree, is the variance of the distance from the predicted point to the actual point.

[0259] (5) Output the predicted classification results

[0260] S5: Output results

[0261] Based on the classification prediction in step S4, the result is output to provide reference for doctors' diagnosis.

[0262] In this embodiment, the high-frequency ECG signal is analyzed and processed based on an intelligent algorithm to achieve intelligent classification and prediction of the high-frequency ECG signal; the blind source separation algorithm is improved based on the bee colony algorithm, the signal separation performance is improved, and the effective elimination of myoelectric interference is achieved; the signal features are extracted based on the high-frequency ECG signal, and the classification and prediction of the disease are achieved through the random forest algorithm.

[0263] The embodiment of the present invention further proposes an electrocardiogram signal processing device based on an intelligent algorithm, which specifically includes:

[0264] The ECG signal preprocessing module is used to remove the baseline drift by using a 0.5 Hz high-pass filter. For power frequency interference, the present invention uses a comb filter to remove 50 Hz power frequency interference. The transfer function of the comb filter is expressed as:

[0265]

[0266] Where, b = (1 + ρ) / 2, N is the order of the comb filter, f s is the sampling frequency, f c is the filtering frequency, f c =50Hz, ρ is the coefficient;

[0267] A blind source separation algorithm based on an improved bee colony algorithm is used to address myoelectric interference.

[0268] The signal separation module is used to divide the preprocessed signal into two parts: a part containing high-frequency signals and a part containing only low-frequency signals.

[0269] The feature extraction module is used for extracting features based on low-frequency electrocardiogram signals and extracting features based on high-frequency electrocardiogram signals.

[0270] The intelligent algorithm classification prediction module is used to predict and classify related diseases based on the features extracted by the feature extraction module based on the random forest algorithm.

[0271] The embodiments described above are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for processing electrocardiogram signals based on an intelligent algorithm, characterized in that: The following steps are involved: ECG signal preprocessing, removing baseline drift based on high-pass filter; Remove power frequency interference based on comb filter; Separate the electromyographic interference signal based on the blind source separation algorithm combined with the bee swarm algorithm; The separation matrix is ​​calculated based on the optimal solution of the bee colony algorithm and the separation signal is output; Signal separation is performed according to frequency, and the preprocessed signal is divided into two parts: a part containing high-frequency signals and a part containing only low-frequency signals; since the high-frequency part containing high-frequency ECG signals and the part containing low-frequency signals have their own characteristics, the signal is separated into two parts: a part containing high-frequency signals and a part containing only low-frequency signals; the part containing only low-frequency signals is the conventional ECG signal; Extracting features from ECG signals, including feature extraction based on low-frequency ECG signals and feature extraction based on high-frequency ECG signals; Intelligent algorithm classification prediction, that is, matching the extracted features with the disease; predicting and classifying related diseases based on the above extracted features based on the random forest algorithm; Output the results, based on the classification prediction in the previous step; The blind source separation algorithm based on the bee colony algorithm includes: performing neighborhood search by adjusting the update step size based on the number of iterations, and the search strategy is as follows: ; Among them, p is a value related to the number of iterations, as follows: ; A is a random parameter, and its value range is [0,1]; The objective function of the bee colony algorithm is expressed as: ; when ,Signal Satisfies the conditions of super-Gaussian distribution; when ,Signal Satisfy the conditions of sub-Gaussian distribution; The high-frequency ECG signal feature extraction includes the following two steps: (1) Identify characteristic waves a. The differential value crosses zero twice; b. The differential value difference is greater than the threshold; c. The time interval between the differential value crossing zero is within a threshold range; High-frequency ECG recognizes characteristic waves through differential waveforms, marks the characteristic wave positions on the QRS waveform, and displays the number of characteristic waves and the differential waveform of the QRS wave; (2) Feature extraction Features include time domain features and wavelet domain features; The identification characteristic wave comprises: The differential formula is used to derive the differential waveform of the QRS wave, and the formula is as follows: ; Among them, k is the harmonic coefficient; The wavelet domain features include wavelet packet entropy values; The calculation method of wavelet packet entropy is as follows: a. Signal decomposition The signal s(t) is decomposed to the jth layer through wavelet packets, and we get subspaces, and the subsignals of the subspaces are: ; in, is the wavelet packet decomposition coefficient, is the wavelet function; b. Calculate the node energy and total energy of wavelet packets The node energy is: ; The total energy is: ; Then the energy distribution of wavelet packet is: ; c. Calculate the wavelet packet entropy: 。 2. The ECG signal processing method based on intelligent algorithm according to claim 1, characterized in that: The transfer function of the comb filter is expressed as: ; in, , N is the order of the comb filter, , is the sampling frequency, is the filtering frequency, , is the coefficient.

3. The ECG signal processing method based on intelligent algorithm according to claim 1, characterized in that: The weights of the random forest algorithm tree are as follows: ; in is the weight of the i-th decision tree, is the variance of the distance from the predicted point to the actual point.

4. A device for an ECG signal processing method based on an intelligent algorithm as claimed in any one of claims 1 to 3, characterized in that: The device comprises: The ECG signal preprocessing module is used to remove the baseline drift by using a 0.5 Hz high-pass filter. For power frequency interference, the present invention uses a comb filter to remove 50 Hz power frequency interference. The transfer function of the comb filter is expressed as: ; in, , N is the order of the comb filter, , is the sampling frequency, is the filtering frequency, , is the coefficient; A blind source separation algorithm based on the bee colony algorithm is used to deal with electromyographic interference; A signal separation module, used for dividing the pre-processed signal into two parts: a part containing high-frequency signals and a part containing only low-frequency signals; A feature extraction module, used for extracting features based on low-frequency ECG signals and extracting features based on high-frequency ECG signals; The intelligent algorithm classification prediction module is used to predict and classify related diseases based on the features extracted by the feature extraction module based on the random forest algorithm.