Method, device, electronic device and storage medium for denoising electrocardiogram signal

By determining the characteristic sequence and dictionary of the ECG signal and using the matching probability sequence for signal reconstruction, the problem of poor artifact noise suppression in the prior art is solved, and efficient identification and suppression of ECG signal noise is achieved.

CN115736937BActive Publication Date: 2024-12-06GUANGZHOU SHIYUAN ELECTRONICS CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111024832.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-02
Publication Date
2024-12-06
Estimated Expiration
2041-09-02

AI Technical Summary

Technical Problem

The existing electrocardiogram signal denoising method has poor effect on suppressing artifact noise, because the artifact noise and the electrocardiogram waveform are highly coincident, resulting in a low upper limit of identification performance.

Method used

By determining the characteristic sequence and feature dictionary of the electrocardiogram signal, signal reconstruction is performed using the matching probability sequence, which improves the suppression effect of artifact noise. The specific steps include: framed ECG signals, extracting feature sequences and dictionaries, clustering and matching probability calculation based on waveform information, and finally signal reconstruction based on matching probability sequence.

Benefits of technology

It effectively improves the noise suppression effect in the ECG signal, especially the artifact noise, improves the recognition performance without the need for additional reference signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115736937B_ABST
    Figure CN115736937B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, electronic device and storage medium for denoising an electrocardiogram signal. The method comprises: determining a characteristic sequence of an electrocardiogram signal, wherein the characteristic sequence is a sequence formed after extracting features from the electrocardiogram signal after framing; determining a feature dictionary and a matching probability sequence corresponding to the characteristic sequence, wherein the characteristic dictionary is formed after screening and clustering the characteristic sequence based on the waveform information of the electrocardiogram signal, and the matching probability sequence represents the matching probability between the characteristic parameter vectors included in the characteristic dictionary and the characteristic parameter vectors included in the characteristic sequence; performing signal reconstruction according to the matching probability sequence and a set containing electrocardiogram waveform components to obtain a reconstructed signal. By using this method, the waveform characteristics of the electrocardiogram signal can be effectively utilized to identify and suppress the noise in the electrocardiogram signal, thereby effectively improving the noise suppression effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to an electrocardiogram signal denoising method, device, electronic device and storage medium. Background Art

[0002] As society ages, the incidence and harmfulness of cardiovascular diseases continue to rise. As a routine physical examination item, electrocardiogram (ECG) is of great significance for the diagnosis and monitoring of cardiovascular diseases. ECG can automatically record the bioelectric signals (ECG signals) generated by myocardial excitation during heart activity.

[0003] ECG signal is a weak bioelectric signal that is easily interfered. The current ECG signal denoising method has poor effect on artifact noise suppression. The reason is that the distribution of artifact noise in the feature domain is highly overlapped with the ECG waveform. Therefore, how to improve the suppression effect of ECG signal noise is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present invention provide an electrocardiogram signal denoising method, an apparatus, an electronic device and a storage medium, which effectively improve the effect of suppressing electrocardiogram signal noise.

[0005] In a first aspect, an embodiment of the present invention provides an electrocardiogram signal denoising method, comprising:

[0006] Determine a characteristic sequence of the ECG signal, where the characteristic sequence is a sequence formed after the ECG signal is divided into frames and features are extracted;

[0007] Determine a feature dictionary and a matching probability sequence corresponding to the feature sequence, wherein the feature dictionary is formed by screening and clustering the feature sequence based on the waveform information of the electrocardiogram signal, and the matching probability sequence represents the matching probability between the feature parameter vector included in the feature dictionary and the feature parameter vector included in the feature sequence;

[0008] The signal is reconstructed according to the matching probability sequence and the set containing the electrocardiogram waveform components to obtain a reconstructed signal.

[0009] In a second aspect, an embodiment of the present invention further provides an electrocardiogram signal denoising device, comprising:

[0010] A feature sequence determination module is used to determine the feature sequence of the ECG signal, where the feature sequence is a sequence formed after the ECG signal is divided into frames and features are extracted;

[0011] A feature dictionary and matching probability sequence determination module is used to determine a feature dictionary and a matching probability sequence corresponding to a feature sequence, wherein the feature dictionary is formed by screening and clustering the feature sequence based on the waveform information of the electrocardiogram signal, and the matching probability sequence represents the matching probability between the feature parameter vector included in the feature dictionary and the feature parameter vector included in the feature sequence;

[0012] The reconstructed signal determination module is used to reconstruct the signal according to the matching probability sequence and the set containing the electrocardiogram waveform components to obtain the reconstructed signal.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] One or more programs are executed by one or more processors, so that the one or more processors implement the electrocardiogram signal denoising method provided by the embodiment of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the electrocardiogram signal denoising method provided by an embodiment of the present invention.

[0018] The embodiment of the present invention provides an ECG signal denoising method, device, electronic device and storage medium, firstly determining the feature sequence of the ECG signal; then determining the corresponding feature dictionary and matching probability sequence according to the feature sequence; finally reconstructing the signal according to the matching probability sequence and the set containing the ECG waveform components to obtain a reconstructed signal. The above technical solution utilizes the waveform characteristics and time domain distribution characteristics of the ECG signal to process and reconstruct the ECG signal, and can identify and suppress the noise in the ECG signal, thereby effectively improving the noise suppression effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a flow chart of an electrocardiogram signal denoising method provided in Embodiment 1 of the present invention;

[0020] Figure 1A A schematic diagram of common noise types in electrical signals in related art;

[0021] Figure 1B A schematic diagram of the distribution of artifact noise in the feature domain provided by the present invention;

[0022] Figure 1C A schematic diagram of a network structure for extracting feature sequences based on a stacked convolutional neural network (CNN) provided in Embodiment 1 of the present invention;

[0023] Figure 1D A schematic diagram of a network structure for extracting a feature dictionary based on a local self-attention network provided in Embodiment 1 of the present invention;

[0024] Figure 2 A schematic diagram of a flow chart of an electrocardiogram signal denoising method provided in Embodiment 2 of the present invention;

[0025] Figure 2A A diagram showing the noise processing result of the electrocardiogram signal denoising method provided in the second embodiment of the present invention;

[0026] Figure 3 A schematic diagram of the structure of an electrocardiogram signal denoising device provided in Embodiment 3 of the present invention;

[0027] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0028] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0029] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0030] The term “including” and its variations used in the present invention are open inclusions, that is, “including but not limited to.” The term “based on” means “based at least in part on.” The term “one embodiment” means “at least one embodiment.”

[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0032] Embodiment 1

[0033] Figure 1A flow chart of an ECG signal denoising method provided in Embodiment 1 of the present invention is provided. The method can be applied to effectively suppress the noise in the ECG signal when performing ECG signal analysis. The method can be performed by the ECG signal denoising device in the embodiment of the present invention, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device with data processing capabilities, and the electronic device includes but is not limited to a computer.

[0034] Figure 1A Schematic diagram of common noise types in electrical signals in related technologies, such as Figure 1A As shown in FIG. 1 , common noise types in ECG signals include power frequency noise, myoelectric noise, baseline drift, and artifact noise. No restrictions are imposed on the noise types here.

[0035] Noise reduction is an important part of the ECG algorithm. Most of the existing ECG signal denoising methods (such as bandpass filtering, wavelet denoising, sparse decomposition denoising, denoising autoencoder, etc.) identify and suppress noise based on the difference between the ECG waveform and the overall distribution of noise in the feature domain (referring to the distribution obtained based on the statistics of the existing training data). These methods have a relatively good suppression effect on power frequency noise, myoelectric noise and baseline drift, but are not effective in suppressing artifact noise. The reason is that the waveform and frequency band range of the artifact noise are similar to the ECG waveform, so the distribution of the artifact noise in the feature domain is highly overlapped with the ECG waveform. Figure 1B This is a schematic diagram of the distribution of artifact noise in the feature domain provided by the present invention, see Figure 1B The distribution of artifact noise in the feature domain is highly consistent with the ECG waveform.

[0036] The higher the distribution overlap of the feature domain, the greater the proportion of noise that is easily confused with the ECG waveform, and the lower the upper limit of noise recognition performance. In addition, the existing adaptive filter method has a higher theoretical upper limit of performance due to the introduction of additional reference signals, but the disadvantage is that it is difficult to obtain effective reference signals.

[0037] In view of the above technical problems, the present invention provides a method for denoising an electrocardiogram signal. Figure 1 As shown, the method specifically comprises the following steps:

[0038] S110, determining a characteristic sequence of the electrocardiogram signal, where the characteristic sequence is a sequence formed after the electrocardiogram signal is divided into frames and then subjected to feature extraction.

[0039] Among them, the ECG signal can refer to a weak bioelectric signal, which is easily interfered by noise. Generally, the ECG signal contains ECG wave components and noise components; among them, the ECG wave component can refer to a repeated quasi-periodic signal. Since the normal heartbeat interval of a person is greater than or equal to 0.2 seconds, the period of the normal ECG wave component is also greater than or equal to 0.2 seconds, and the signal with a repetition period of less than 0.2 seconds in the ECG signal can be classified as the noise part. The feature sequence can refer to the sequence formed after feature extraction of the signal frame sequence.

[0040] The present invention can frame the ECG signal in the time domain to extract a signal frame sequence, thereby extracting a feature sequence from the signal frame sequence. Framing can refer to the process of cutting a signal into small segments during signal processing, where each small segment is a frame; for example, in this embodiment, a sequence consisting of multiple signal frames after the ECG signal is framed can be called a signal frame sequence. The specific technical means of framing are not limited here, such as being implemented by a sliding window.

[0041] For example, assuming that the ECG signal is where c sig Indicates the number of leads for each input ECG, l sig Indicates the number of time domain sampling points of each lead ECG; generally, the ECG signal S contains the ECG waveform component S ECG and the noise component S Noise If the sliding window width is set to w, for example, w = 7, the output signal frame sequence is where c frame =w·c sig Indicates the number of sampling points contained in each signal frame, l seq Indicates the length of the signal frame sequence.

[0042] This embodiment does not limit how to determine the characteristic sequence of the ECG signal, and methods for extracting the characteristic sequence include but are not limited to one of the following: a stacked convolutional neural network (CNN) and other model methods supporting gradient backpropagation training, etc.

[0043] Exemplarily, the present invention can determine the feature sequence through CNN. Specifically, Figure 1C A schematic diagram of the network structure of extracting feature sequences based on a stacked convolutional neural network (CNN) provided in the first embodiment of the present invention. Figure 1C As shown, the signal frame sequence After CNN processing, the feature sequence is obtained where c fea Represents the dimension of the feature parameter vector, each dimension represents the amplitude, bias, width and key points 1 to m; c fea It can be expressed as c fea=3+m, where m is the preset number of key points, for example, m=5.

[0044] S120, determining a feature dictionary and a matching probability sequence corresponding to the feature sequence, wherein the feature dictionary is formed by screening and clustering the feature sequence based on waveform information of the electrocardiogram signal, and the matching probability sequence represents the matching probability between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence.

[0045] The waveform information of the ECG signal can be understood as information characterizing the waveform characteristics of the ECG signal, and the waveform information is not limited here. For example, the waveform information can be information characterizing the relatively stable characteristics of the ECG signal in a short period of time compared to noise, or can be information characterizing that the ECG signal recurs in the time domain, and the repetition period is greater than or equal to 0.2 seconds.

[0046] When the present invention determines a feature dictionary based on waveform information and performs ECG signal denoising based on the feature dictionary, it can effectively perform ECG signal denoising based on the characteristics of the ECG waveform being relatively stable compared to noise in a short period of time and the distribution characteristics of the ECG waveform in the time domain (interbeat interval >= 0.2s), thereby improving the ECG signal's suppression effect on noise, especially artifact noise.

[0047] By screening the feature sequence based on the waveform information of the ECG signal, the feature parameter vectors that appear repeatedly in the feature sequence and have a repetition period greater than or equal to 0.2 seconds can be retained, and then clustered to generate a feature dictionary. The feature dictionary is extracted using the waveform information of the ECG signal in the feature sequence, that is, based on the characteristic that the ECG waveform is relatively stable compared to noise in a short period of time, the feature dictionary is adaptively extracted in the feature sequence, which is essentially to extract the representation of the typical ECG waveform in the feature domain. Each feature parameter vector in the feature dictionary corresponds to a class of feature parameter vectors in the feature sequence. Each feature parameter vector in the feature dictionary can appear repeatedly in the feature sequence.

[0048] Methods for extracting feature dictionaries include but are not limited to one of the following: stacked local self-attention networks and other models supporting gradient backpropagation training, etc.

[0049] Taking the extraction of feature dictionary through local self-attention network as an example, Figure 1D A schematic diagram of a network structure based on extracting a feature dictionary based on a local self-attention network provided in the first embodiment of the present invention. Figure 1D As shown, the feature sequence F is processed by the local self-attention network to obtain the feature dictionary Wherein n represents the size of the extracted feature dictionary (ie, the number of feature parameter vectors in the dictionary, each row represents a type of feature parameter vector), for example, n=16.

[0050] When extracting the feature dictionary, the present invention targets the feature sequence of the ECG signal rather than the original signal, and obtains a feature dictionary with strong anti-noise capability by using robust features. Based on the current input signal, that is, the ECG signal, the distribution of its ECG waveform components in the feature domain is adaptively inferred. Since the distribution only contains the ECG waveform in the current input signal, the distribution is more concentrated than the overall distribution of the ECG waveform, has a low overlap with the distribution of artifact noise, and has a small proportion of easily confused noise samples. Therefore, the artifact noise recognition performance upper limit of the present invention is relatively high, and no additional reference signal is required.

[0051] The matching probability may refer to the matching probability value between a feature parameter vector in the feature dictionary and a feature parameter vector in the feature sequence; the matching probability sequence may refer to a sequence consisting of a set of matching probability values ​​of feature parameter vectors included in the feature dictionary and feature parameter vectors included in the feature sequence. The feature parameter vector may be a vector consisting of morphological parameters of the ECG signal. The morphological parameters include but are not limited to the amplitude of the ECG signal, the mean value of the ECG signal over a period of time, i.e., the bias, the width of the ECG signal, and the key points in the ECG signal.

[0052] The matching probability sequence has two dimensions, one dimension represents the feature parameter vector in the feature dictionary, and the other dimension is the time domain position. The sequence position of each matching probability in the matching probability sequence represents the time domain position, and the value of the sequence represents the possibility of the feature parameter vector in the corresponding feature dictionary appearing at the corresponding time domain position. The matching probability can be used to determine whether the corresponding signal frame is noise.

[0053] This embodiment does not limit the specific technical means for determining the matching probability, for example, it can be determined by a matching degree sequence. The purpose of performing noise recognition on the matching degree sequence is to recognize the matching degree sequence and determine whether the corresponding signal frame is noise.

[0054] Among them, the matching degree can refer to the similarity between a feature parameter vector in the feature dictionary and a feature parameter vector in the feature sequence, and the matching degree sequence can refer to a sequence composed of the set of matching degrees of the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence. The matching degree sequence has two dimensions, one dimension represents which feature parameter vector in the feature dictionary is used to calculate the matching degree, and the other dimension is the time domain position. The sequence position of each matching degree in the matching degree sequence represents the time domain position, and the value of the sequence represents the possibility of the feature parameter vector in the corresponding feature dictionary appearing at the corresponding time domain position. Taking the storage of the matching degree sequence in the form of a matrix as an example, the number of rows in the matching degree sequence represents each feature parameter vector in the feature dictionary, and the number of columns is the time domain length l seqTaking the data in 1 row and 1 column as an example, the first row can correspond to the first feature parameter vector in the feature dictionary, and the first column can correspond to the matching degree sequence corresponding to the first feature parameter vector. Each feature parameter vector in the feature dictionary corresponds to a matching degree sequence. The value of the matching degree sequence represents the possibility of the corresponding feature parameter vector appearing in the corresponding time domain position.

[0055] The method for determining the matching probability sequence may include but is not limited to one of the following: a method of combining Sigmoid with LocalSoftMax or a method of using GumbelSoftMax operation instead of LocalSoftMax in a local window.

[0056] It should be noted that the matching probability sequence includes the matching probabilities of the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence. The matching probability sequence can be determined based on the matching degree sequence. After determining the matching probability sequence, the matching probabilities of the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence can be determined.

[0057] Exemplarily, firstly, according to the distribution characteristics of the ECG signal in the time domain, the matching degree sequence is locally non-maximum suppressed, and then a matching probability sequence is obtained, wherein the elements in the matching probability sequence represent the matching probability between the feature parameter vector contained in the feature dictionary and the feature parameter vector contained in the feature sequence. In this embodiment, the matching probability sequence can be obtained by combining Sigmoid with LocalSoftMax. The calculation formula is as follows:

[0058]

[0059] Among them, i, j, k, τ represent the coordinates of each dimension of the tensor, i corresponds to n, j corresponds to l seq , k corresponds to c fea τ represents the width of the non-maximum suppression window, and the default setting is τ=50, i.e. 0.2 seconds; β∈(0,+∞) is a trainable parameter (initial value is 1), and the larger its value, the higher the sparsity of P. The window width of non-maximum suppression can be determined based on the distribution characteristics of the ECG signal in the time domain.

[0060] To calculate the matching probability by Sigmoid method, The present invention can simultaneously perform non-maximum suppression processing and match probability calculation on the matching degree sequence. When processing simultaneously, the matching probability is directly calculated on the data after non-maximum suppression to obtain the matching probability.

[0061] After determining the matching probability sequence, noise determination is performed based on the matching probability sequence. If the matching probability between a feature parameter vector in the feature sequence and all feature parameter vectors in the feature dictionary is very low, the signal frame corresponding to the feature parameter vector in the feature sequence will be identified as noise.

[0062] The present invention introduces the time domain distribution prior information of the ECG characteristic waveform (i.e., the distribution characteristics of the ECG signal in the time domain) when determining the matching probability sequence, further improving the performance upper limit of artifact noise recognition. The present invention uses LocalSoftMax with parameter β to replace the traditional non-maximum suppression method, and gradually increases the value of β during the training process to achieve: in the early stage of training, β is small, there are many gradient return paths, and the training speed is fast; in the later stage of training, β is large, the sparsity is high, and the denoising effect is good.

[0063] S130 , performing signal reconstruction according to the matching probability sequence and the set containing the electrocardiogram waveform components to obtain a reconstructed signal.

[0064] The set of ECG waveform components may refer to relatively stable signal waveform components in ECG signals and / or relatively stable waveform components in processed ECG signals. Exemplarily, the set of ECG waveform components includes but is not limited to: signal frame sequence, feature sequence and feature dictionary.

[0065] Signal reconstruction may refer to reconstructing the ECG signal according to a set of ECG waveform components and a matching probability sequence to obtain a reconstructed signal with noise filtered out.

[0066] This embodiment does not limit the specific technical means of reconstruction. Different sets containing ECG waveform components correspond to different reconstruction means. For example, when the set containing ECG waveform components is a signal frame sequence or the feature sequence formed after framing the ECG signal, the set containing ECG waveform components can be screened based on the matching probability sequence to obtain a reconstructed signal; when the set containing ECG waveform components is a feature dictionary, the feature dictionary can be filled into the empty sequence based on the matching probability sequence to obtain a reconstructed signal.

[0067] It should be noted that the signal frame sequence and feature sequence can represent all the features of the ECG signal, such as the ECG waveform component S ECG and the noise component S Noise Therefore, during reconstruction, the noise components in the signal frame sequence and feature sequence should be filtered based on the matching probability sequence to obtain the reconstructed signal; the feature dictionary includes the feature parameter vector corresponding to the signal that appears repeatedly on the ECG signal, that is, the feature dictionary contains part of the information in the ECG signal, and the feature dictionary does not contain time domain information. Therefore, during reconstruction, the feature dictionary should be filled into the empty sequence based on the matching probability sequence to obtain the reconstructed signal.

[0068] Exemplarily, this step may perform signal reconstruction according to the matching probability sequence in combination with the signal frame sequence or the feature sequence or the feature dictionary to obtain a reconstructed signal.

[0069] Taking the reconstruction based on the feature sequence as an example, when reconstructing the signal, the reconstructed signal is obtained according to the feature sequence F and the matching probability sequence P. The specific steps of the reconstruction method are as follows:

[0070] First, the feature sequence F is screened using the matching probability sequence P to remove the noise in the feature sequence and obtain the screened feature sequence The calculation formula is:

[0071] Among them, filtering is performed based on the dimension where k is located. In the present invention, the dimension where k is located corresponds to the dimension of the feature parameter vector. Exemplarily, P is a matrix of four rows and five columns, each row representing a feature parameter vector in the feature dictionary. Each column represents the time domain position corresponding to the corresponding feature parameter vector in the column, and the value of the matrix represents the probability of the corresponding feature parameter vector appearing in the corresponding time domain position.

[0072] For example, P is In this example, k is 4 and j is 5, where j corresponds to the length of the signal frame sequence and k represents the size of the feature dictionary, that is, the number of feature parameter vectors included in the feature dictionary. When matching the feature sequence F based on the matching probability sequence P, the maximum value of the matching probability of each column is determined to form a sequence of 1 row and 5 columns. is [0.6 0.5 0.60.6 0.5]. The feature parameter vectors corresponding to different columns are determined based on the feature parameter vectors corresponding to the matching probability in P. In this example, they correspond to the fourth feature parameter vector, the fourth feature parameter vector, the third feature parameter vector, the second feature parameter vector, the fourth feature parameter vector and the first feature parameter vector respectively.

[0073] Secondly, take the characteristic parameter vector of the jth column from X And calculate its corresponding column coordinate j on the ECG signal S sig =j·l sig / l seq .

[0074] Then the characteristic parameter vector v j Get morphological parameters such as amplitude, offset, width and key points.

[0075] After that, a standardized feature waveform template with an amplitude of 1 and a mean of 0 is generated according to the key points through the cubic spline interpolation algorithm, and is adjusted according to parameters such as amplitude, offset and width, such as adjusting the amplitude, offset and width of the standardized feature waveform template. The adjusted feature waveform template is placed at the corresponding position j sig superior.

[0076] Finally, if the waveforms reconstructed according to different parameter vectors overlap, the overlapping part is weighted according to the size of the matching probability to obtain the reconstructed signal Y.

[0077] In this embodiment, the method for reconstructing the signal can also be implemented using other models that support gradient backpropagation training, which is not limited to this.

[0078] It should be noted that this example takes the feature sequence F as an example for explanation, and the technical means for reconstructing based on the signal frame sequence and the feature dictionary is similar to the technical means for reconstructing based on the feature sequence.

[0079] When the signal frame sequence is reconstructed, the signal frame sequence is first screened using the matching probability sequence P to remove noise in the signal frame sequence. For subsequent processing steps, please refer to the corresponding content of the feature sequence.

[0080] When the feature dictionary is reconstructed, the empty sequence is first filled with the matching probability sequence P and the feature dictionary. Since the feature parameter vector in the feature dictionary includes the feature parameter vector corresponding to the repeated waveform in the feature sequence, the noise in the feature sequence is removed. Therefore, the sequence filled based on the feature dictionary does not include noise. For the subsequent processing steps, please refer to the relevant content of the feature sequence.

[0081] When filling an empty sequence based on a feature dictionary, determine the matching probability of each row that is greater than a certain threshold, and then fill the corresponding feature parameter vector to the corresponding time domain position of the empty sequence based on the time domain position corresponding to the matching probability greater than a certain threshold for the feature parameter vector corresponding to each row. For example, if the first row corresponds to the first feature parameter vector, and the certain threshold is 0.6, then select the matching probabilities with values ​​greater than 0.6 from all columns of the first row, and then fill the first feature parameter vector at the target time domain position of the empty sequence, and the target time domain position is the time domain position corresponding to the column where the matching probability greater than 0.6 is located.

[0082] A method for denoising an ECG signal provided in a first embodiment of the present invention extracts a feature sequence of the ECG signal and then extracts a feature dictionary from the feature sequence. Compared with directly extracting the feature dictionary from the original ECG signal, the method for extracting the adaptive feature dictionary can obtain a feature dictionary with strong anti-noise capability; finally, a matching probability sequence is determined according to the feature dictionary, and a reconstructed signal is obtained according to the matching probability sequence and a set containing ECG waveform components. The above technical solution utilizes the waveform characteristics of the ECG signal to process and reconstruct the ECG signal, and can identify and suppress the noise in the ECG signal, thereby effectively improving the noise suppression effect.

[0083] Embodiment 2

[0084] Figure 2 The flowchart of a method for denoising an electrocardiogram signal provided in the second embodiment of the present invention is a refinement of the second embodiment based on the above embodiment. In this embodiment, the operation of determining a feature dictionary and a matching probability sequence is described in detail. It should be noted that the technical details not described in detail in this embodiment can be referred to the above embodiment.

[0085] like Figure 2 As shown, the method of this embodiment specifically includes the following steps:

[0086] S210, determining a characteristic sequence of the electrocardiogram signal, where the characteristic sequence is a sequence formed after the electrocardiogram signal is divided into frames and then subjected to feature extraction.

[0087] S220 , extracting a feature parameter vector containing waveform information of the electrocardiogram signal from the feature sequence to form a feature dictionary.

[0088] In this step, when determining the feature dictionary, the feature dictionary is adaptively extracted from the feature sequence according to the characteristic that the ECG signal is relatively stable compared to noise in a short period of time, that is, the representation of the ECG waveform component in the feature domain is extracted.

[0089] S230 , determining a matching degree sequence, where the matching degree sequence represents the matching degree between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence.

[0090] The matching degree sequence can be represented as a matrix, the number of rows of the matrix is ​​the number of feature parameter vectors in the feature dictionary, the number of columns of the matrix is ​​the number of feature parameter vectors in the feature sequence, and each element in the matrix is ​​the matching degree; for example, the extracted feature dictionary contains 4 feature parameter vectors, which can be represented as A, B, C and D respectively, and the feature sequence contains 5 feature parameter vectors, then A is respectively matched with the 5 feature parameter vectors in the feature sequence, and the obtained matching degree is placed in the row where A is located. Similarly, the rows where B, C and D are located are also respectively placed with the calculated matching degree, thereby forming a matrix of 4 rows and 5 columns, which is the matching degree sequence. The matching degree calculation method may include but is not limited to one of the following: vector cosine similarity operation, vector inner product, Pearson correlation coefficient, Euclidean distance, and vector probability likelihood, etc.

[0091] In this step, the matching degree of the feature parameter vectors contained in the feature dictionary and the feature parameter vectors contained in the feature sequence can be calculated to obtain a matching degree sequence, that is, the matching degree (i.e., similarity) of the feature parameter vectors corresponding to each key value in the feature dictionary and each feature parameter vector in the feature sequence is calculated to obtain a matching degree sequence. By calculating the matching degree, the ECG signal S ECG Distribution in the feature domain.

[0092] The matching degree calculation can be realized by vector cosine similarity operation. The corresponding matching degree sequence is obtained by performing cosine similarity operation on feature dictionary D and feature sequence F. The calculation formula is as follows:

[0093]

[0094] Among them, i, j, k represent the coordinates of each dimension of the tensor, i represents the coordinate corresponding to n, j represents l seq The corresponding coordinates, k represents c fea The corresponding coordinates.

[0095] S240 . According to the distribution characteristics of the ECG signal in the time domain, the matching degree sequence is processed to obtain a matching probability sequence.

[0096] The distribution characteristics in the time domain may be that the repetition period is greater than or equal to a set duration, such as the distribution characteristics of a 0.2 second ECG signal waveform in the time domain.

[0097] When determining the matching probability sequence according to the distribution characteristics, the matching degree sequence can be subjected to local non-maximum suppression and matching probability calculation based on the distribution characteristics to obtain the matching probability sequence, and the specific processing means are not limited here. For example, the window width of the non-maximum suppression can be set by the set time length in the distribution characteristics, and then the matching probability can be calculated based on the LocalSoftMax method.

[0098] Optionally, the processing of the matching degree sequence includes: non-maximum suppression and matching probability calculation.

[0099] Among them, non-maximum suppression and matching probability calculation can be performed simultaneously. Non-maximum suppression can refer to retaining the maximum value and removing all other values ​​less than the maximum value. For example, non-maximum suppression can be used to retain the maximum value in the obtained matching degree sequence. After the matching degree sequence is subjected to non-maximum suppression, the suppressed sequence can be used to calculate the matching probability. The sequence after the matching probability is calculated can be used to form a matching probability sequence.

[0100] S250 , performing signal reconstruction according to the matching probability sequence and the set containing the electrocardiogram waveform components to obtain a reconstructed signal.

[0101] A method for denoising an ECG signal provided in a second embodiment of the present invention, on the basis of the above-mentioned embodiment, concretizes the operation of determining a feature dictionary and a matching probability sequence. The method can improve the anti-noise ability of the extracted feature dictionary by extracting the feature dictionary from the feature sequence; it can also screen a set containing ECG waveform components according to the determined matching probability sequence, thereby obtaining a screened sequence distributed in the feature domain and reconstructing the signal thereof to achieve a denoising effect; and compared with the method of performing noise identification in the feature domain distribution of the overall ECG signal waveform, the feature domain distribution of the ECG signal extracted by this method is more concentrated, the overlap with the artifact noise distribution is lower, the proportion of easily confused noise samples is small, and the upper limit of the performance of identifying artifact noise in the ECG signal can be effectively improved without the need for additional reference signals.

[0102] On the basis of the above technical solution, the set containing ECG waveform components includes one of the following: a signal frame sequence formed after framing the ECG signal; a feature sequence; a feature dictionary.

[0103] In an optional example, when the set containing ECG waveform components is a signal frame sequence or a feature sequence formed after framing the ECG signal, the set containing ECG waveform components is filtered by matching the probability sequence to obtain the filtered feature sequence; and the signal is reconstructed according to the filtered feature sequence to obtain a reconstructed signal.

[0104] Among them, screening can refer to filtering noise in a feature sequence or a signal frame sequence based on a matching probability sequence. When screening, the feature parameter vector that may appear at each time domain position can be determined, that is, a maximum value is determined for each column of the matching probability sequence, and the feature vector corresponding to the maximum value is determined as the feature parameter vector that may appear in the corresponding column. The dot product result of the feature sequence or signal frame sequence and the feature parameter vector that may appear at each time domain position is used as the filtered feature sequence.

[0105] The matching probability sequence can be used as a tool for searching or detecting, and is used to search or detect at which time domain position a certain feature parameter vector in the feature dictionary will appear in the signal frame sequence or feature sequence; the size of the matching probability value in the matching probability sequence can represent the probability size of a certain feature parameter vector in the feature dictionary appearing in the time domain position, and is used to determine the time domain position of the feature parameter vector in the feature dictionary in the signal frame sequence or feature sequence.

[0106] In an optional example, when the set containing ECG waveform components is a feature dictionary, the feature dictionary is filled into an empty sequence according to a matching probability sequence to obtain a filled feature sequence; a signal is reconstructed according to the filled feature sequence to obtain a reconstructed signal; and the empty sequence is determined based on the feature sequence.

[0107] The length of the empty sequence can be the same as the length of the characteristic sequence. If the sequence is represented in the form of a matrix, the dimension of the matrix of the empty sequence is the same as the dimension of the matrix of the characteristic sequence.

[0108] According to the matching probability sequence, the feature parameter vectors in the feature dictionary corresponding to the matching probability greater than a certain threshold in the matching probability sequence are filled into the corresponding time domain position in the empty sequence (the time domain position can be determined based on the time domain position corresponding to the matching probability), and a filled feature sequence can be obtained; the threshold can be set according to the actual signal processing situation, which is not limited in the present embodiment.

[0109] Figure 2A The noise processing result of the ECG signal denoising method provided in the second embodiment of the present invention is shown in FIG. The processing effect of the power frequency noise, myoelectric noise, baseline drift and artifact noise by the method of the above embodiment is shown in FIG. Figure 2A As shown, it can be seen that the denoising method of this embodiment can effectively improve the denoising effect of the ECG signal.

[0110] Embodiment 3

[0111] Figure 3 This is a schematic diagram of the structure of an ECG signal denoising device provided in Embodiment 3 of the present invention. The device can be used to effectively suppress noise in ECG signals when performing ECG signal analysis, wherein the device can be implemented by software and / or hardware.

[0112] like Figure 3 As shown, the device includes: a feature sequence determination module 310, a feature dictionary and matching probability sequence determination module 320 and a reconstructed signal determination module 330.

[0113] The feature sequence determination module 310 is used to determine the feature sequence of the ECG signal, where the feature sequence is a sequence formed after the ECG signal is divided into frames and features are extracted;

[0114] The feature dictionary and matching probability sequence determination module 320 is used to determine the feature dictionary and matching probability sequence corresponding to the feature sequence, wherein the feature dictionary is formed by screening and clustering the feature sequence based on the waveform information of the ECG signal, and the matching probability sequence represents the matching probability between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence;

[0115] The reconstructed signal determination module 330 is used to perform signal reconstruction according to the matching probability sequence and the set containing the ECG waveform components to obtain a reconstructed signal.

[0116] In this embodiment, the device first determines the feature sequence of the ECG signal through the feature sequence determination module 310; then determines the feature dictionary and matching probability sequence corresponding to the feature sequence through the feature dictionary and matching probability sequence determination module 320; finally, the matching probability sequence and the set containing the ECG waveform components are reconstructed through the reconstruction signal determination module 330 to obtain a reconstructed signal. Using the above technical solution, the noise in the ECG signal can be identified and suppressed, and the noise suppression effect of the ECG signal can be effectively improved.

[0117] Optionally, the feature dictionary and matching probability sequence determination module 320 is specifically used for:

[0118] A feature parameter vector containing waveform information of the ECG signal is extracted from the feature sequence to form a feature dictionary.

[0119] Optionally, the feature dictionary and matching probability sequence determination module 320 is further specifically used for:

[0120] Determine a matching degree sequence, wherein the matching degree sequence represents the matching degree between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence;

[0121] According to the distribution characteristics of ECG signals in the time domain, the matching degree sequence is processed to obtain the matching probability sequence.

[0122] Optionally, the processing of the matching degree sequence includes: non-maximum suppression and matching probability calculation.

[0123] Optionally, the set containing ECG waveform components includes one of the following:

[0124] A signal frame sequence formed after dividing the ECG signal into frames; a feature sequence; and a feature dictionary.

[0125] Optionally, when the set including the ECG waveform components is a signal frame sequence or a feature sequence formed by framing the ECG signal, the reconstructed signal determination module 330 is specifically used to:

[0126] The set containing the ECG waveform components is screened by matching the probability sequence to obtain the screened feature sequence;

[0127] The signal is reconstructed according to the screened feature sequence to obtain a reconstructed signal.

[0128] Optionally, when the set containing the ECG waveform components is a feature dictionary, the reconstructed signal determination module 330 is further specifically used for:

[0129] According to the matching probability sequence, the feature dictionary is filled into the empty sequence to obtain the filled feature sequence;

[0130] Reconstruct the signal according to the filled characteristic sequence to obtain a reconstructed signal;

[0131] The empty sequence is determined based on the feature sequence.

[0132] The above-mentioned ECG signal denoising device can execute the ECG signal denoising method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0133] Embodiment 4

[0134] Figure 4 This is a schematic diagram of the structure of an electronic device provided by Embodiment 4 of the present invention. Figure 4 As shown, the electronic device provided by the fourth embodiment of the present invention includes: one or more processors 41 and a storage device 42; the processor 41 in the electronic device can be one or more, Figure 4 A processor 41 is taken as an example; the storage device 42 is used to store one or more programs; the one or more programs are executed by one or more processors 41, so that one or more processors 41 implement the ECG signal denoising method as any one of the embodiments of the present invention.

[0135] The electronic device may further include: an input device 43 and an output device 44 .

[0136] The processor 41, storage device 42, input device 43 and output device 44 in the electronic device may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0137] The storage device 42 in the electronic device is a computer-readable storage medium, which can be used to store one or more programs, and the program can be a software program, a computer executable program, and a module, such as the program instructions / modules corresponding to the electrocardiogram signal denoising method provided in the first or second embodiment of the present invention (for example, the attached Figure 3The modules in the ECG signal denoising device shown include: a feature sequence determination module 310, a feature dictionary and matching probability sequence determination module 320 and a reconstructed signal determination module 330). The processor 41 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the storage device 42, that is, the ECG signal denoising method in the above method embodiment is implemented.

[0138] The storage device 42 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage device 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 42 may further include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0139] The input device 43 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 44 may include a display device such as a display screen.

[0140] Furthermore, when one or more programs included in the above-mentioned electronic device are executed by one or more processors 41, the program performs the following operations: determining a feature sequence of the ECG signal, the feature sequence being a sequence formed after feature extraction after framing the ECG signal; determining a feature dictionary and a matching probability sequence corresponding to the feature sequence, the feature dictionary being formed after screening and clustering the feature sequence based on the waveform information of the ECG signal, and the matching probability sequence representing the matching probability between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence; performing signal reconstruction based on the matching probability sequence and the set containing the ECG waveform components to obtain a reconstructed signal.

[0141] Embodiment 5

[0142] Embodiment 5 of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program is used to execute an electrocardiogram signal denoising method. The method includes: determining a feature sequence of the electrocardiogram signal, the feature sequence being a sequence formed after feature extraction after framing the electrocardiogram signal; determining a feature dictionary and a matching probability sequence corresponding to the feature sequence, the feature dictionary being formed after screening and clustering the feature sequence based on waveform information of the electrocardiogram signal, the matching probability sequence representing the matching probability between feature parameter vectors included in the feature dictionary and feature parameter vectors included in the feature sequence; performing signal reconstruction according to the matching probability sequence and a set containing electrocardiogram waveform components to obtain a reconstructed signal.

[0143] Optionally, when the program is executed by a processor, it can also be used to execute the electrocardiogram signal denoising method provided by any embodiment of the present invention.

[0144] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.

[0145] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0146] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.

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

[0148] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for denoising an electrocardiogram signal, characterized in that: include: Determine a characteristic sequence of the electrocardiogram signal, wherein the characteristic sequence is a sequence formed after the electrocardiogram signal is divided into frames and then features are extracted; Determine a feature dictionary and a matching probability sequence corresponding to the feature sequence, wherein the feature dictionary screens the feature sequence based on the waveform information of the electrocardiogram signal, retains feature parameter vectors that appear repeatedly in the feature sequence and have a repetition period greater than or equal to 0.2 seconds, and then forms clusters, wherein the matching probability sequence represents the matching probability between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence, respectively. After determining the matching probability sequence, perform noise determination based on the matching probability sequence, and if the matching probability between a feature parameter vector in the feature sequence and all feature parameter vectors in the feature dictionary is very low, then the signal frame corresponding to the feature parameter vector in the feature sequence will be identified as noise; Signal reconstruction is performed according to the matching probability sequence and the set containing the ECG waveform components to obtain a reconstructed signal; wherein the signal reconstruction refers to reconstructing the ECG signal according to the set containing the ECG waveform components and the matching probability sequence to obtain a reconstructed signal with noise filtered out.

2. The method according to claim 1, characterized in that Determining a matching probability sequence corresponding to the feature sequence includes: Determine a matching degree sequence, wherein the matching degree sequence represents the matching degree between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence; According to the distribution characteristics of the electrocardiogram signal in the time domain, the matching degree sequence is processed to obtain a matching probability sequence.

3. The method according to claim 2, characterized in that The processing of the matching degree sequence includes: non-maximum suppression and matching probability calculation.

4. The method according to claim 1, characterized in that: The set containing ECG waveform components includes one of the following: A signal frame sequence formed after framing the electrocardiogram signal; the feature sequence; and the feature dictionary.

5. The method according to claim 1, characterized in that When the set containing the ECG waveform components is a signal frame sequence or the feature sequence formed by framing the ECG signal, signal reconstruction is performed according to the matching probability sequence and the set containing the ECG waveform components to obtain a reconstructed signal, including: The set containing the electrocardiogram waveform components is screened by the matching probability sequence to obtain a screened feature sequence; The signal is reconstructed according to the screened feature sequence to obtain a reconstructed signal.

6. The method according to claim 1, characterized in that When the set including the electrocardiogram waveform components is the feature dictionary, signal reconstruction is performed according to the matching probability sequence and the set including the electrocardiogram waveform components to obtain a reconstructed signal, including: According to the matching probability sequence, the feature dictionary is filled into the empty sequence to obtain a filled feature sequence; Reconstruct the signal according to the filled characteristic sequence to obtain a reconstructed signal; The empty sequence is determined based on the feature sequence.

7. An electrocardiogram signal denoising device, characterized in that: include: A feature sequence determination module, used to determine a feature sequence of an electrocardiogram signal, wherein the feature sequence is a sequence formed by extracting features from the electrocardiogram signal after dividing the frame into frames; A feature dictionary and matching probability sequence determination module is used to determine a feature dictionary and a matching probability sequence corresponding to the feature sequence, wherein the feature dictionary screens the feature sequence based on the waveform information of the electrocardiogram signal, retains feature parameter vectors that appear repeatedly in the feature sequence and have a repetition period greater than or equal to 0.2 seconds, and then forms clusters, wherein the matching probability sequence represents the matching probability between the feature parameter vectors included in the feature dictionary and the feature parameter vectors included in the feature sequence, respectively; after determining the matching probability sequence, noise determination is performed based on the matching probability sequence, and if the matching probability between a feature parameter vector in the feature sequence and all feature parameter vectors in the feature dictionary is very low, then the signal frame corresponding to the feature parameter vector in the feature sequence will be identified as noise; The reconstructed signal determination module is used to reconstruct the signal according to the matching probability sequence and the set containing the ECG waveform components to obtain a reconstructed signal; wherein the signal reconstruction refers to reconstructing the ECG signal according to the set containing the ECG waveform components and the matching probability sequence to obtain a reconstructed signal with noise filtered out.

8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the electrocardiogram signal denoising method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the electrocardiogram signal denoising method as described in any one of claims 1 to 6 is implemented.