A method for denoising ECG signals based on generative adversarial networks

Through the method based on the generative adversarial network, combined with the autoencoder and XGBOOST algorithm, the model parameters are optimized by qubits, and the problems of poor detail retention ability and insufficient real-time noise reduction in the electrocardiogram signal denoising method are solved, achieving high efficiency and real-time ECG signal noise reduction processing.

CN116595311BActive Publication Date: 2025-02-07HUNAN VENTMED MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210407777.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-02-07
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The existing ECG signal noise reduction methods have problems such as poor retention of signal details after noise reduction, needing to divide the signal to be processed, weak generalization ability, and poor real-time noise reduction.

Method used

Using a method based on generative adversarial network, the generator model and discriminator model are constructed, and the autoencoder and XGBOOST algorithm are integrated, and combined with a qubit-based intelligent optimization algorithm to optimize the model parameters to achieve efficient noise reduction processing of the electrocardiogram signal.

Benefits of technology

It improves the real-time and detailed retention capabilities of signal noise reduction processing, enhances the generalization capabilities of the model, and solves the problems of insufficient signal details loss and noise reduction in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116595311B_ABST
    Figure CN116595311B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of ECG signal denoising processing, and discloses an ECG signal denoising method based on a generative adversarial network, comprising: constructing a generator model, the generator model performs denoising processing on noisy ECG signal data to obtain a denoised ECG signal; constructing a discriminator model, taking the denoised ECG signal and the noisy ECG signal data as input, and inputting them into the discriminator model for signal recognition and classification; optimizing the generative adversarial network model using an intelligent optimization algorithm based on quantum bits; inputting the ECG signal data to be denoised into the optimized generator model, and the model outputs the denoised ECG signal. The method of the present invention implements denoising processing of noisy ECG signals based on an adversarial network model, and at the same time optimizes the model using an intelligent optimization algorithm based on quantum bits, thereby improving the optimization efficiency and the real-time performance of ECG signal denoising processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram signal denoising processing, and in particular to an electrocardiogram signal denoising method based on a generative adversarial network. Background Art

[0002] Electrocardiogram is a non-invasive test to judge the health of human heart. Its detection method is simple and fast, with high reliability and accuracy. However, in the actual ECG sampling process, ECG signals are often interfered by noise, which affects the readability and recognizability of the signal. The existing ECG signal denoising methods have problems such as poor signal detail retention after denoising, the need to divide the processed signal into heart beats, weak generalization ability, and poor real-time denoising. To address this problem, this solution proposes an ECG signal denoising method based on generative adversarial networks. Summary of the invention

[0003] The present invention provides an ECG signal denoising method based on a generative adversarial network, the purpose of which is to (1) implement denoising processing of noisy ECG signals based on an adversarial network model; and (2) improve the optimization efficiency and the real-time performance of ECG signal denoising processing by using an intelligent optimization algorithm based on quantum bits.

[0004] To achieve the above object, the present invention provides a method for reducing noise of electrocardiogram signals based on a generative adversarial network, comprising the following steps:

[0005] S1: constructing a generator model, wherein the generator model is composed of an XGBOOST model and includes multiple signal noise reduction processing sub-models. The generator model performs noise reduction processing on noisy ECG signal data to obtain a noise-reduced ECG signal;

[0006] S2: construct a discriminator model, which is composed of an XGBOOST model and includes multiple ECG signal recognition and judgment sub-models. The denoised ECG signal and the noisy ECG signal data are input into the discriminator model for signal recognition and classification. The denoised ECG signal is the denoised ECG signal generated by the generator.

[0007] S3: optimizing the generative adversarial network model using a quantum bit-based intelligent optimization algorithm to obtain optimized model parameters, and using the optimized model parameters as parameters of the generative adversarial network model, wherein the generative adversarial network model includes a generator model and a discriminator model;

[0008] S4: The ECG signal data to be denoised is input into the optimized generator model, and the model outputs the denoised ECG signal.

[0009] As a further improvement method of the present invention:

[0010] The signal noise reduction processing sub-model in the generator model is constructed in the S1 step, including:

[0011] The constructed signal denoising processing sub-model is an autoencoder model, the input of the autoencoder model is noisy ECG signal data, in the autoencoder model training stage, the output of the autoencoder is ECG signal data similar to the input value and the ECG signal data after denoising, when the autoencoder model training is completed, the output of the autoencoder is the ECG signal data after denoising;

[0012] The structure of the autoencoder includes a convolution layer, an activation function layer and a deconvolution layer. Each autoencoder has 6 convolution layers and 6 deconvolution layers. There is an activation function layer between the convolution layers. The convolution layer structure and the deconvolution layer structure of each signal denoising processing sub-model are different, that is, each convolution layer and deconvolution layer in each signal denoising processing sub-model has a different convolution kernel size.

[0013] The objective function of the autoencoder training is:

[0014]

[0015]

[0016]

[0017] in:

[0018] G represents the autoencoder model, x(t) represents the noisy ECG signal input into the autoencoder model, and t represents the time domain information;

[0019] represents the denoised ECG signal output by the autoencoder, and y(t) represents the pure ECG signal corresponding to x(t);

[0020] represents the denoised ECG signal at time domain information n, and y(n) represents the pure ECG signal at time domain information n;

[0021] G(x(t)) represents the noisy ECG signal output by the autoencoder, D(G(x(t))) represents the input of the noisy ECG signal into the ECG signal recognition and judgment sub-model, and p(x(t)) represents the signal distribution of the noisy ECG signal input into the autoencoder model;

[0022] E(·) indicates expected value calculation;

[0023] α is a parameter, set it to 0.6;

[0024] β is a parameter and is set to 0.2.

[0025] In the step S1, the signal noise reduction processing sub-model is integrated based on the XGBOOST algorithm to obtain a generator model, including:

[0026] The signal noise reduction processing sub-model is integrated based on the XGBOOST algorithm. The integration process of the signal noise reduction processing sub-model is as follows:

[0027] 1) Get N sample data {(e1,y1),(e2,y2),…,(e N ,y N )}, where e N Represents the noisy ECG signal of the Nth sample data, y N Indicates e N Initialize M signal denoising processing sub-models for the corresponding pure ECG signal, each of which has a different structure, and input the sample data into the initialized signal denoising processing sub-models;

[0028] 2) Iteratively train m = 1, 2, 3, ..., M signal denoising processing sub-models. For each sample data (e i ,y i ), i=1,2,…,N, calculation model G m The residual of:

[0029]

[0030] in:

[0031] Lo G (m,(e i ,y i )) represents the signal noise reduction processing sub-model G m The objective function value of

[0032] And the residual of the i-th sample is used to update the true value of the sample, that is, the i-th sample is (e i ,r mi );

[0033] Use the updated sample data to train each signal denoising processing sub-model. The model training goal is to minimize the objective function of the model training. Then the mth signal denoising processing sub-model obtained by training is G′ m ;

[0034] 3) Integration to obtain the final generator model:

[0035]

[0036] in:

[0037] w m is the weight of the mth signal denoising sub-model;

[0038] G′ m is the mth signal denoising processing sub-model, and the model input is the noisy ECG signal x(t);

[0039] g is the final generator model, and the model output is the denoised ECG signal and a noisy signal with a distribution similar to x(t).

[0040] The electrocardiogram signal recognition and judgment sub-model in the discriminator model is constructed in step S2, including:

[0041] The constructed ECG signal recognition and judgment sub-model is a binary classifier, and the input of the binary classifier is the ECG signal after denoising and the noisy ECG signal data of the generator. In a specific embodiment of the present invention, in the model training stage, by inputting the noisy ECG signal into the generator model, the generator model generates a noisy ECG signal with similar data distribution and an ECG signal after denoising, and inputs both into the discriminator. The discriminator first determines whether the data distribution of the noisy ECG signal generated by the generator model is similar to that of the original noisy ECG signal, and determines whether the ECG signal after denoising is similar to the pure ECG signal. According to the judgment result, the parameters of the generator model are tuned until the generator model can generate a noisy ECG signal with a distribution similar to the real distribution, and a denoised ECG signal with better denoising effect. At this time, it means that the generator has completely learned the difference between the noisy ECG signal and the pure signal.

[0042] The objective function of the binary classifier training is:

[0043]

[0044] in:

[0045] g(x(t)) is the noisy ECG signal output by the generator model;

[0046] D is a binary classifier model;

[0047] is the denoised ECG signal output by the generator model, and y(t) is the pure ECG signal corresponding to x(t);

[0048] D(g(x(t)),x(t)) is used to determine whether there is a difference between g(x(t)) and x(t), D(·)={0,1}, D(g(x(t)),x(t))=0 means that the signal g(x(t)) is similar to the signal x(t), and D(g(x(t)),x(t))=1 means that there is a difference between the signal g(x(t)) and the signal x(t).

[0049] In step S2, the ECG signal recognition and judgment sub-models are integrated based on the XGBOOST algorithm to obtain a discriminator model, including:

[0050] The ECG recognition and judgment sub-models are integrated based on the XGBOOST algorithm. The integration process of the ECG recognition and judgment sub-models is as follows:

[0051] 1) Construct 5 ECG recognition and judgment sub-models, input the noisy ECG signals and pure ECG signals output by the generator model into the constructed ECG recognition and judgment sub-models, and train the sub-model parameters based on the objective function of the ECG recognition and judgment sub-models;

[0052] 2) The trained ECG recognition and judgment sub-models are integrated, and the integration formula is:

[0053]

[0054] in:

[0055] d represents the integrated discriminator model, D′ j is the jth ECG recognition judgment sub-model obtained through training;

[0056] b j D′ is the ECG recognition judgment submodel j The integration weight of

[0057] 3) The discriminator model outputs the judgment result of the ECG signal and inputs the judgment result into the generator model to assist the training of the generator model.

[0058] In the step S3, the generative adversarial network model is optimized using a quantum bit-based intelligent optimization algorithm, including:

[0059] Construct an optimization objective function of a generative adversarial network model, wherein the generative adversarial network model includes a generator model and a discriminator model, wherein the parameters to be optimized are the weight of the signal denoising processing sub-model in the generator model and the weight of the central electrostatic recognition judgment sub-model in the discriminator model, and the optimization objective function of the generative adversarial network model is:

[0060]

[0061] in:

[0062] G′ m is the mth signal denoising processing sub-model obtained through training, w m For model G′ m The integrated weight of the model is the noisy ECG signal, and y is the pure signal corresponding to the noisy ECG signal;

[0063] To use ECG recognition to determine the sub-model D′ j Denoising ECG signals Comparison result with pure ECG signal, b j ECG recognition judgment sub-model D′ j The integration weight of

[0064] The optimization objective function is solved by using a quantum bit-based intelligent optimization algorithm. The optimization result of the optimization objective function is the weight vector (w1, w2, ..., w M ,b1,…,b5), the process of the intelligent optimization algorithm based on quantum bits is:

[0065] Generate several quantum bits and establish the potential energy equation of the quantum bits:

[0066]

[0067] in:

[0068] B represents the number of qubits generated;

[0069] u represents the position vector of the generated quantum bit, the quantum bit position vector is the solution of the optimization objective function, the quantum bit position vector is the weight vector of the generative adversarial network model, and the dimension of the quantum bit position vector is M+5;

[0070] h represents the dimension of the quantum bit position vector, h = M + 5;

[0071] represents the arbitrary position vector of the quantum bit at time τ;

[0072] Represented by the position vector u * is the value of the objective function of the weight vector;

[0073] Based on the kinetic energy of quantum bits To solve:

[0074]

[0075] in:

[0076] P(u k ,u k-1 ) represents the position vector u k-1 Move to u k The quantum bit kinetic energy of

[0077] represents the initial position u0 of the quantum bit at the initial moment;

[0078] W(u k ) indicates that the quantum bit appears in the position vector u k probability;

[0079] The generated quantum bits are iteratively diffused, and the probability weights W)u are adjusted by iterative diffusion of multiple quantum bit position vectors. k ) is iteratively updated, and multiple solutions are obtained based on the updated results of the probability weights. Substitute multiple solution results into the potential energy equation of the quantum bit and select the objective function value The smallest weight vector is used as the optimization parameter of the generative adversarial network model.

[0080] In the step S4, the ECG signal data to be denoised is input into the optimized generator model, including:

[0081] The ECG signal data to be denoised is input into the optimized generative adversarial network model, wherein the generator model performs denoising on the ECG signal data to be denoised to obtain the denoised ECG signal.

[0082] Compared with the prior art, the present invention proposes a method for reducing noise of ECG signals based on a generative adversarial network, which has the following advantages:

[0083] First, this scheme proposes an ECG signal denoising method based on a generative adversarial network. In the generative adversarial network model training stage, the noisy ECG signal is input into the generator model, and the generator model generates a noisy ECG signal with similar data distribution and an ECG signal after denoising, and both are input into the discriminator. The discriminator first determines whether the data distribution of the noisy ECG signal generated by the generator model is similar to that of the original noisy ECG signal, and whether the ECG signal after denoising is similar to the pure ECG signal. According to the judgment result, the parameters of the generator model are tuned until the generator model can generate a noisy ECG signal with a distribution similar to the real distribution, and a denoised ECG signal with good denoising effect. At this time, it means that the generator has fully learned The difference between the noisy ECG signal and the pure signal; the generator model is integrated by several signal denoising processing sub-models, and the constructed signal denoising processing sub-model is an autoencoder model. The structure of the autoencoder includes a convolution layer, an activation function layer and a deconvolution layer. Each autoencoder has 6 convolution layers and 6 deconvolution layers, and there is an activation function layer between the convolution layers. The convolution layer structure and the deconvolution layer structure of each signal denoising processing sub-model are different, that is, each convolution layer and deconvolution layer in each signal denoising processing sub-model has a different convolution kernel size. Compared with the traditional generator model, the constructed generator model removes the pooling layer to avoid the loss of ECG signal details; the objective function of the autoencoder training is:

[0084]

[0085]

[0086]

[0087] Where: G represents the autoencoder model, x(t) represents the noisy ECG signal input into the autoencoder model, and t represents the time domain information; represents the denoised ECG signal output by the autoencoder, and y(t) represents the pure ECG signal corresponding to x(t); Represents the denoised ECG signal at time domain information n, y(n) represents the pure ECG signal at time domain information n; G(x(t)) represents the noisy ECG signal output by the autoencoder, D(G(x(t))) represents the input of the noisy ECG signal into the ECG signal recognition and judgment sub-model, p(x(t)) represents the signal distribution of the noisy ECG signal input into the autoencoder model; E(·) represents the expected value calculation; α is a parameter, which is set to 0.6; β is a parameter, which is set to 0.2. The signal denoising processing sub-model is integrated based on the XGBOOST algorithm, and the integration process of the signal denoising processing sub-model is as follows: 1) Obtain N sample data {(e1,y1),(e2,y2),…,(e N ,y N )}, where e N Represents the noisy ECG signal of the Nth sample data, y N Indicates e N Corresponding to the pure ECG signal, initialize M signal denoising processing sub-models, each of which has a different structure, and input the sample data into the initialized signal denoising processing sub-model; 2) iteratively train m = 1, 2, 3, ..., M signal denoising processing sub-models, for each sample data (e i ,y i ), i=1,2,…,N, calculation model G m The residual of:

[0088]

[0089] Among them: Lo G (m,(e i ,y i )) represents the signal noise reduction processing sub-model G m The objective function value of the i-th sample is updated with the residual of the i-th sample as the true value of the sample, that is, the i-th sample is (e i ,r mi) ; Use the updated sample data to train each signal denoising processing sub-model. The model training goal is to minimize the objective function of the model training. The mth signal denoising processing sub-model obtained by training is G′ m ; 3) Integration to obtain the final generator model:

[0090]

[0091] Where: w m is the weight of the mth signal denoising sub-model; G′ m is the mth signal denoising processing sub-model, and the model input is the noisy ECG signal x(t); g is the final generated generator model, and the model output is the denoised ECG signal and the noisy signal with a similar distribution to x(t). The generator and discriminator models are constructed by weighted integration. Models with different structures can extract different signal detail information, making the discriminator model more accurate in judging and identifying the ECG signal, thereby improving the denoising effect of the generator model on the noisy ECG signal.

[0092] At the same time, this scheme proposes a parameter optimization algorithm for a generative adversarial network, and constructs an optimization objective function of a generative adversarial network model. The generative adversarial network model includes a generator model and a discriminator model. The parameters to be optimized are the weights of the signal denoising processing sub-model in the generator model and the weights of the central electrostatic recognition judgment sub-model in the discriminator model. The optimization objective function of the generative adversarial network model is:

[0093]

[0094] Where: G′ m is the mth signal denoising processing sub-model obtained through training, w m For model G′ m The integrated weight of the model is the noisy ECG signal, and y is the pure signal corresponding to the noisy ECG signal; To use ECG recognition to determine the sub-model D′ j Denoising ECG signals Comparison result with pure ECG signal, b j ECG recognition judgment sub-model D′ j The integrated weight of the network model is generated by using a quantum bit-based intelligent optimization algorithm to solve the optimization objective function. The optimization result of the optimization objective function is the weight vector (w1, w2, ..., w M ,b1,…,b5), the process of the intelligent optimization algorithm based on quantum bits is: generate a number of quantum bits, establish the potential energy equation of the quantum bits:

[0095]

[0096] Wherein: B represents the number of generated quantum bits; u represents the position vector of the generated quantum bits, the quantum bit position vector is the solution of the optimization objective function, the quantum bit position vector is the weight vector of the generative adversarial network model, and the dimension of the quantum bit position vector is M+5; h represents the dimension of the quantum bit position vector, h=M+5; represents the arbitrary position vector of the quantum bit at time τ; Represented by the position vector u * is the value of the objective function of the weight vector; based on the kinetic energy term of the quantum bit To solve:

[0097]

[0098] Where: P(u k ,u k-1 ) represents the position vector u k-1 Move to u k The quantum bit kinetic energy of represents the initial position u0 of the quantum bit at the initial moment; W(u k ) indicates that the quantum bit appears in the position vector u k The probability of the generated quantum bits is iteratively diffused, and the probability weight W(u k ) is iteratively updated, and multiple solutions are obtained based on the updated results of the probability weights. Substitute multiple solution results into the potential energy equation of the quantum bit and select the objective function value The smallest weight vector is used as the optimization parameter of the generative adversarial network model. Compared with the traditional solution, this solution uses a quantum bit-based intelligent optimization algorithm to optimize the model parameters, which improves the optimization efficiency, can quickly obtain a model for noise reduction, and improves the real-time performance of ECG signal noise reduction processing. At the same time, since the position vector of the traditional heuristic optimization algorithm is only a 2-dimensional vector, it cannot represent the multi-dimensional parameter vector of the generative adversarial network proposed in this solution. By improving the optimization algorithm through quantum bits, the position information of quantum bits can be mapped to multi-dimensional space, thereby realizing the solution of the multi-dimensional parameter vector of the generative adversarial network. BRIEF DESCRIPTION OF THE DRAWINGS

[0099] Figure 1 A schematic diagram of a flow chart of a method for denoising an electrocardiogram signal based on a generative adversarial network provided by an embodiment of the present invention;

[0100] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0101] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0102] S1: construct a generator model, wherein the generator model is composed of an XGBOOST model and includes multiple signal noise reduction processing sub-models. The generator model performs noise reduction processing on noisy ECG signal data to obtain a noise-reduced ECG signal.

[0103] The signal noise reduction processing sub-model in the generator model is constructed in the S1 step, including:

[0104] The constructed signal denoising processing sub-model is an autoencoder model, the input of the autoencoder model is noisy ECG signal data, in the autoencoder model training stage, the output of the autoencoder is ECG signal data similar to the input value and the ECG signal data after denoising, when the autoencoder model training is completed, the output of the autoencoder is the ECG signal data after denoising;

[0105] The structure of the autoencoder includes a convolution layer, an activation function layer and a deconvolution layer. Each autoencoder has 6 convolution layers and 6 deconvolution layers. There is an activation function layer between the convolution layers. The convolution layer structure and the deconvolution layer structure of each signal denoising processing sub-model are different, that is, each convolution layer and deconvolution layer in each signal denoising processing sub-model has a different convolution kernel size.

[0106] The objective function of the autoencoder training is:

[0107]

[0108]

[0109]

[0110] in:

[0111] G represents the autoencoder model, x(t) represents the noisy ECG signal input into the autoencoder model, and t represents the time domain information;

[0112] represents the denoised ECG signal output by the autoencoder, and y(t) represents the pure ECG signal corresponding to x(t);

[0113] represents the denoised ECG signal at time domain information n, and y(n) represents the pure ECG signal at time domain information n;

[0114] G(x(t)) represents the noisy ECG signal output by the autoencoder, D(G(x(t))) represents the input of the noisy ECG signal into the ECG signal recognition and judgment sub-model, and p(x(t)) represents the signal distribution of the noisy ECG signal input into the autoencoder model;

[0115] E(·) indicates expected value calculation;

[0116] α is a parameter, set it to 0.6;

[0117] β is a parameter and is set to 0.2.

[0118] In the step S1, the signal noise reduction processing sub-model is integrated based on the XGBOOST algorithm to obtain a generator model, including:

[0119] The signal noise reduction processing sub-model is integrated based on the XGBOOST algorithm. The integration process of the signal noise reduction processing sub-model is as follows:

[0120] 1) Get N sample data {(e1,y1),(e2,y2),…,(e N ,y N )}, where e N Represents the noisy ECG signal of the Nth sample data, y N Indicates e N Initialize M signal denoising processing sub-models for the corresponding pure ECG signal, each of which has a different structure, and input the sample data into the initialized signal denoising processing sub-models;

[0121] 2) Iteratively train m = 1, 2, 3, ..., M signal denoising processing sub-models. For each sample data (e i ,y i ), i=1,2,…,N, calculation model G m The residual of:

[0122]

[0123] in:

[0124] Lo G (m,(e i ,y i )) represents the signal noise reduction processing sub-model G m The objective function value of

[0125] And the residual of the i-th sample is used to update the true value of the sample, that is, the i-th sample is (e i ,r mi );

[0126] Use the updated sample data to train each signal denoising processing sub-model. The model training goal is to minimize the objective function of the model training. Then the mth signal denoising processing sub-model obtained by training is G′ m ;

[0127] 3) Integration to obtain the final generator model:

[0128]

[0129] in:

[0130] w m is the weight of the mth signal denoising sub-model;

[0131] G′ m is the mth signal denoising processing sub-model, and the model input is the noisy ECG signal x(t);

[0132] g is the final generator model, and the model output is the denoised ECG signal and a noisy signal with a distribution similar to x(t).

[0133] S2: Construct a discriminator model, which is composed of an XGBOOST model and includes multiple ECG signal recognition and judgment sub-models. The denoised ECG signal and the noisy ECG signal data are used as input and input into the discriminator model for signal recognition and classification. The denoised ECG signal is the denoised ECG signal generated by the generator.

[0134] The electrocardiogram signal recognition and judgment sub-model in the discriminator model is constructed in step S2, including:

[0135] The constructed ECG signal recognition and judgment sub-model is a binary classifier, and the input of the binary classifier is the ECG signal after denoising and the noisy ECG signal data of the generator. In a specific embodiment of the present invention, in the model training stage, by inputting the noisy ECG signal into the generator model, the generator model generates a noisy ECG signal with similar data distribution and an ECG signal after denoising, and inputs both into the discriminator. The discriminator first determines whether the data distribution of the noisy ECG signal generated by the generator model is similar to that of the original noisy ECG signal, and determines whether the ECG signal after denoising is similar to the pure ECG signal. According to the judgment result, the parameters of the generator model are tuned until the generator model can generate a noisy ECG signal with a distribution similar to the real distribution, and a denoised ECG signal with better denoising effect. At this time, it means that the generator has completely learned the difference between the noisy ECG signal and the pure signal.

[0136] The objective function of the binary classifier training is:

[0137]

[0138] in:

[0139] g(x(t)) is the noisy ECG signal output by the generator model;

[0140] D is a binary classifier model;

[0141] is the denoised ECG signal output by the generator model, and y(t) is the pure ECG signal corresponding to x(t);

[0142] D(g(x(t)),x(t)) is used to determine whether there is a difference between g(x(t)) and x(t), D(·)={0,1}, D(g(x(t)),x(t))=0 means that the signal g(x(t)) is similar to the signal x(t), and D(g(x(t)),x(t))=1 means that there is a difference between the signal g(x(t)) and the signal x(t).

[0143] In step S2, the ECG signal recognition and judgment sub-models are integrated based on the XGBOOST algorithm to obtain a discriminator model, including:

[0144] The ECG recognition and judgment sub-models are integrated based on the XGBOOST algorithm. The integration process of the ECG recognition and judgment sub-models is as follows:

[0145] 1) Construct 5 ECG recognition and judgment sub-models, input the noisy ECG signals and pure ECG signals output by the generator model into the constructed ECG recognition and judgment sub-models, and train the sub-model parameters based on the objective function of the ECG recognition and judgment sub-models;

[0146] 2) The trained ECG recognition and judgment sub-models are integrated, and the integration formula is:

[0147]

[0148] in:

[0149] d represents the integrated discriminator model, D′ j is the jth ECG recognition judgment sub-model obtained through training;

[0150] b j D′ is the ECG recognition judgment submodel j The integration weight of

[0151] 3) The discriminator model outputs the judgment result of the ECG signal and inputs the judgment result into the generator model to assist the training of the generator model.

[0152] S3: Optimize the generative adversarial network model using a quantum bit-based intelligent optimization algorithm to obtain optimized model parameters, and use the optimized model parameters as parameters of the generative adversarial network model, wherein the generative adversarial network model includes a generator model and a discriminator model.

[0153] In the step S3, the generative adversarial network model is optimized using a quantum bit-based intelligent optimization algorithm, including:

[0154] Construct an optimization objective function of a generative adversarial network model, wherein the generative adversarial network model includes a generator model and a discriminator model, wherein the parameters to be optimized are the weight of the signal denoising processing sub-model in the generator model and the weight of the central electrostatic recognition judgment sub-model in the discriminator model, and the optimization objective function of the generative adversarial network model is:

[0155]

[0156] in:

[0157] G′ m is the mth signal denoising processing sub-model obtained through training, w m For model G′ m The integrated weight of the model is the noisy ECG signal, and y is the pure signal corresponding to the noisy ECG signal;

[0158] To use ECG recognition to determine the sub-model D′ j Denoising ECG signals Comparison result with pure ECG signal, b j ECG recognition judgment sub-model D′ j The integration weight of

[0159] The optimization objective function is solved by using a quantum bit-based intelligent optimization algorithm. The optimization result of the optimization objective function is the weight vector (w1, w2, ..., w M ,b1,…,b5), the process of the intelligent optimization algorithm based on quantum bits is:

[0160] Generate several quantum bits and establish the potential energy equation of the quantum bits:

[0161]

[0162] in:

[0163] B represents the number of qubits generated;

[0164] u represents the position vector of the generated quantum bit, the quantum bit position vector is the solution of the optimization objective function, the quantum bit position vector is the weight vector of the generative adversarial network model, and the dimension of the quantum bit position vector is M+5;

[0165] h represents the dimension of the quantum bit position vector, h = M + 5;

[0166] represents the arbitrary position vector of the quantum bit at time τ;

[0167] Represented by the position vector u * is the value of the objective function of the weight vector;

[0168] Based on the kinetic energy of quantum bits To solve:

[0169]

[0170] in:

[0171] P(u k ,u k-1 ) represents the position vector u k-1 Move to u k The quantum bit kinetic energy of

[0172] represents the initial position u0 of the quantum bit at the initial moment;

[0173] W(u k ) indicates that the quantum bit appears in the position vector u k The probability of

[0174] The generated quantum bits are iteratively diffused, and the probability weight W(u k ) is iteratively updated, and multiple solutions are obtained based on the updated results of the probability weights. Substitute multiple solution results into the potential energy equation of the quantum bit and select the objective function value The smallest weight vector is used as the optimization parameter of the generative adversarial network model.

[0175] S4: The ECG signal data to be denoised is input into the optimized generator model, and the model outputs the denoised ECG signal.

[0176] In the step S4, the ECG signal data to be denoised is input into the optimized generator model, including:

[0177] The ECG signal data to be denoised is input into the optimized generative adversarial network model, wherein the generator model performs denoising on the ECG signal data to be denoised to obtain the denoised ECG signal.

[0178] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0179] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0180] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for denoising an electrocardiogram signal based on a generative adversarial network, characterized in that: The method comprises: 24 S1: constructing a generator model, wherein the generator model is composed of an XGBOOST model and includes multiple signal noise reduction processing sub-models. The generator model performs noise reduction processing on noisy ECG signal data to obtain a noise-reduced ECG signal; The signal denoising processing sub-model is an autoencoder model, the input of the autoencoder model is noisy ECG signal data, during the autoencoder model training phase, the output of the autoencoder is ECG signal data similar to the input value and the denoised ECG signal data, and when the autoencoder model training is completed, the output of the autoencoder is the denoised ECG signal data; The structure of the autoencoder includes a convolution layer, an activation function layer and a deconvolution layer. Each autoencoder has 6 convolution layers and 6 deconvolution layers. There is an activation function layer between the convolution layers. The convolution layer structure and the deconvolution layer structure of each signal denoising processing sub-model are different, that is, each convolution layer and deconvolution layer in each signal denoising processing sub-model has a different convolution kernel size. The objective function of the autoencoder training is: in: G represents the autoencoder model, x(t) represents the noisy ECG signal input into the autoencoder model, and t represents the time domain information; represents the denoised ECG signal output by the autoencoder, and y(t) represents the pure ECG signal corresponding to x(t); represents the denoised ECG signal at time domain information n, and y(n) represents the pure ECG signal at time domain information n; G(x(t)) represents the noisy ECG signal output by the autoencoder, D(G(x(t))) represents the input of the noisy ECG signal into the ECG signal recognition and judgment sub-model, and p(x(t)) represents the signal distribution of the noisy ECG signal input into the autoencoder model; E(·) indicates expected value calculation; α is a parameter, set it to 0.6; β is a parameter, which is set to 0.2; S2: construct a discriminator model, which is composed of an XGBOOST model and includes multiple ECG signal recognition and judgment sub-models. The denoised ECG signal and the noisy ECG signal data are input into the discriminator model for signal recognition and classification. The denoised ECG signal is the denoised ECG signal generated by the generator. The constructed ECG signal recognition and judgment sub-model is a binary classifier, and the input of the binary classifier is the ECG signal after noise reduction by the generator and the ECG signal data with noise; The objective function of the binary classifier training is: in: g(x(t)) is the noisy ECG signal output by the generator model; D is a binary classifier model; is the denoised ECG signal output by the generator model, and y(t) is the pure ECG signal corresponding to x(t); D(g(x(t)),x(t)) is used to determine whether there is a difference between g(x(t)) and x(t), D(·)={0,1}, D(g(x(t)),x(t))=0 means that the signal g(x(t)) is similar to the signal x(t), and D(g(x(t)),x(t))=1 means that the signal g(x(t)) is different from the signal x(t); S3: Optimizing the generative adversarial network model using a quantum bit-based intelligent optimization algorithm to obtain optimized model parameters, and using the optimized model parameters as parameters of the generative adversarial network model, wherein the generative adversarial network model includes a generator model and a discriminator model, wherein the quantum bit-based intelligent optimization algorithm process includes: The optimization objective function is solved by using a quantum bit-based intelligent optimization algorithm. The optimization result of the optimization objective function is the weight vector (w1, w2, … ,w M ,b1, … ,b5), the process of the intelligent optimization algorithm based on quantum bits is: Generate several quantum bits and establish the potential energy equation of the quantum bits: in: B represents the number of qubits generated; u represents the position vector of the generated quantum bit, the quantum bit position vector is the solution of the optimization objective function, the quantum bit position vector is the weight vector of the generative adversarial network model, and the dimension of the quantum bit position vector is M+5; h represents the dimension of the quantum bit position vector, h = M + 5; represents the arbitrary position vector of the quantum bit at time τ; F u* Represented by the position vector u * is the value of the objective function of the weight vector; Based on the kinetic energy of quantum bits To solve: in: P(u k ,u k-1 ) represents the position vector u k-1 Move to u k The quantum bit kinetic energy of represents the initial position u0 of the quantum bit at the initial moment; W(u k ) indicates that the quantum bit appears in the position vector u k The probability of The generated quantum bits are iteratively diffused, and the probability weight W(u k ) is iteratively updated, and multiple solutions are obtained based on the updated results of the probability weights. Substitute multiple solution results into the potential energy equation of the quantum bit and select the objective function value F u* The minimum weight vector is used as the optimization parameter of the generative adversarial network; The generative adversarial network model includes a generator model and a discriminator model. The parameters to be optimized are the weight of the signal denoising processing sub-model in the generator model and the weight of the central electrostatic recognition judgment sub-model in the discriminator model. The optimization objective function of the generative adversarial network model is: in: G′ m is the mth signal denoising processing sub-model obtained through training, w m For model G′ m The integrated weight of the model is the noisy ECG signal, and y is the pure signal corresponding to the noisy ECG signal; To use ECG recognition to judge sub-model D j 'Denoise ECG signal Comparison result with pure ECG signal, b j ECG recognition judgment sub-model D j ′’s integration weight; The optimization objective function is solved by using a quantum bit-based intelligent optimization algorithm. The optimization result of the optimization objective function is the weight vector (w1, w2, ..., w M ,b1,…,b5); S4: The ECG signal data to be denoised is input into the optimized generator model, and the model outputs the denoised ECG signal.

2. The method for denoising an ECG signal based on a generative adversarial network according to claim 1, characterized in that: In the step S1, the signal noise reduction processing sub-model is integrated based on the XGBOOST algorithm to obtain a generator model, including: The signal noise reduction processing sub-model is integrated based on the XGBOOST algorithm. The integration process of the signal noise reduction processing sub-model is as follows: 1) Get N sample data {(e1,y1),(e2,y2), … ,(e N ,y N )}, where e N Represents the noisy ECG signal of the Nth sample data, y N Indicates e N Initialize M signal denoising processing sub-models for the corresponding pure ECG signal, each of which has a different structure, and input the sample data into the initialized signal denoising processing sub-models; 2) Iterative training m = 1, 2, 3, … ,M signal denoising processing sub-models, for each sample data (e i ,y i ), i=1,2, … ,N, calculation model G m The residual of: in: Lo G (m,(e i ,y i )) represents the signal noise reduction processing sub-model G m The objective function value of And the residual of the i-th sample is used to update the true value of the sample, that is, the i-th sample is (e i ,r mi ); Use the updated sample data to train each signal denoising processing sub-model. The model training goal is to minimize the objective function of the model training. Then the mth signal denoising processing sub-model obtained by training is G′ m ; 3) Integration to obtain the final generator model: in: w m is the weight of the mth signal denoising sub-model; G′ m is the mth signal denoising processing sub-model, and the model input is the noisy ECG signal x(t); g is the final generator model, and the model output is the denoised ECG signal and a noisy signal with a distribution similar to x(t).

3. The method for denoising an ECG signal based on a generative adversarial network according to claim 1, characterized in that: In step S2, the ECG signal recognition and judgment sub-models are integrated based on the XGBOOST algorithm to obtain a discriminator model, including: The ECG recognition and judgment sub-models are integrated based on the XGBOOST algorithm. The integration process of the ECG recognition and judgment sub-models is as follows: 1) Construct 5 ECG recognition and judgment sub-models, input the noisy ECG signals and pure ECG signals output by the generator model into the constructed ECG recognition and judgment sub-models, and train the sub-model parameters based on the objective function of the ECG recognition and judgment sub-models; 2) The trained ECG recognition and judgment sub-models are integrated, and the integration formula is: in: d represents the integrated discriminator model, D j ′ is the jth ECG recognition judgment sub-model obtained through training; b j D is the ECG recognition judgment sub-model j ′’s integration weight; 3) The discriminator model outputs the judgment result of the ECG signal and inputs the judgment result into the generator model to assist the training of the generator model.

4. The method for denoising an ECG signal based on a generative adversarial network according to claim 1, characterized in that: In the step S3, the generative adversarial network model is optimized using a quantum bit-based intelligent optimization algorithm, including: Construct an optimization objective function of a generative adversarial network model, wherein the generative adversarial network model includes a generator model and a discriminator model. The parameters to be optimized are the weight of the signal denoising processing sub-model in the generator model and the weight of the central electrostatic recognition judgment sub-model in the discriminator model. The optimization objective function of the generative adversarial network model is: in: G′ m is the mth signal denoising processing sub-model obtained through training, w m For model G′ m The integrated weight of the model is the noisy ECG signal, and y is the pure signal corresponding to the noisy ECG signal; To use ECG recognition to judge sub-model D j 'Denoise ECG signal Comparison result with pure ECG signal, b j ECG recognition judgment sub-model D j ′’s integration weight; The optimization objective function is solved by using a quantum bit-based intelligent optimization algorithm. The optimization result of the optimization objective function is the weight vector (w1, w2, … ,w M ,b1, … ,b5).

5. The method for denoising an ECG signal based on a generative adversarial network according to claim 1, characterized in that: In the step S4, the ECG signal data to be denoised is input into the optimized generator model, including: The ECG signal data to be denoised is input into the optimized generative adversarial network model, wherein the generator model performs denoising on the ECG signal data to be denoised to obtain the denoised ECG signal.

Citation Information

Patent Citations

  • Electrocardiosignal noise reduction method based on adversarial generative network

    CN111814656A

  • CT image noise reduction system and method

    CN111861910A