Human body signal filtering processing method and device

By combining the dual-branch denoising and diffusion model of Transformers and LSTM, the complex relationship problem of human signals in the time and space dimensions is solved, and efficient filtering effect and cross-individual generalization ability are achieved, which is suitable for health monitoring, disease diagnosis and rehabilitation treatment.

CN120336809APending Publication Date: 2025-07-18DONGGUAN UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510410064.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively capture the complex relationship between human signals in time and space dimensions, and cannot adapt to individual differences, resulting in poor filtering effect and insufficient generalization ability.

Method used

The dual-branch filtering method based on the denoising diffusion model is adopted, combined with the Transformers and LSTM models, the global dependence and timing characteristics of multi-channel signals are captured through the multi-head self-attention mechanism and long-term memory network, and a conditional diffusion mechanism and domain adversarial training technology are introduced to adapt to different noise environments and individual differences.

Benefits of technology

It significantly improves the filtering effect and generalization ability, can handle the characteristics of multiple frequency bands at the same time, adapt to different noise environments and individual differences, and improves the applicability of signal quality and application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336809A_ABST
    Figure CN120336809A_ABST
Patent Text Reader

Abstract

The invention discloses a human body signal filtering processing method and device. The method comprises the following steps: acquiring a clean human body signal of a user and a corresponding label by using multi-channel human body signal sensor equipment; preprocessing the human body signal, wherein the preprocessing comprises standardization processing and tensor representation; designing a conditional denoising diffusion model to gradually add noise to the human body signal, then performing multi-scale feature extraction and domain classification on the human body signal with noise, and training an artificial intelligence model of human body signal filtering; and finally, evaluating the human body signal filtering effect of the user, and further applying the human body signal filtering effect to downstream tasks. The human body signal filtering processing device comprises a human body signal acquisition module, a preprocessing module, a training diffusion model module, a multi-scale feature extraction module, a condition fusion module, a cross-subject generalization module and a human body signal filtering effect evaluation module. By using the human body signal filtering processing method and device provided by the invention, the denoising problem of the existing human body signal filtering method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human signal processing, and particularly relates to a method and device for filtering and processing human signals. Background Art

[0002] Filtering of human signals is one of the key technologies in biomedical signal processing and is widely used in fields such as health monitoring, disease diagnosis, and rehabilitation therapy. Human signals (such as electroencephalogram (EEG), electrocardiogram (ECG), electromyogram (EMG), etc.) usually have the characteristics of low signal-to-noise ratio, with small amplitudes (for example, EEG signals are only at the microvolt level) and are easily interfered by various noises. These noises include physiological noises (such as electrooculogram, electromyogram, electrocardiogram), environmental noises (such as power frequency interference), and equipment noises (such as poor electrode contact). In addition, human signals are usually collected through multiple channels, there is spatial correlation between channels, and the signals contain multiple frequency band components (such as delta, theta, alpha, beta, gamma waves in EEG signals), and different frequency band components have different physiological meanings. For example, the alpha wave in EEG signals is related to the relaxation state, while the gamma wave is closely related to higher cognitive functions. These characteristics make the filtering processing and analysis of human signals highly complex.

[0003] The purpose of filtering is to remove noises and retain useful signal components, and its basic principle is to separate the useful components and noise components in the signal through mathematical or algorithmic means. Filtering plays an important role in human signal processing. First, filtering can effectively remove noises and improve the signal-to-noise ratio of the signal, thus providing a cleaner signal for subsequent analysis. Second, since different frequency band components of human signals have different physiological meanings, filtering can specifically retain the signal components of a specific frequency band and remove irrelevant noise components. For example, in the analysis of electrocardiogram (ECG) signals, filtering can highlight the characteristic waveforms of heart activities; in the analysis of electromyogram (EMG) signals, filtering can extract the characteristic frequencies of muscle activities. Therefore, filtering is not only a key step in the preprocessing of human signals but also an important means to improve the accuracy of signal analysis.

[0004] Reconstructing high-quality signals from low-quality human signals is of great significance in research or clinical analysis. For example, in the diagnosis of heart diseases, high-quality ECG signals can improve the diagnostic accuracy of diseases such as arrhythmia; in sports rehabilitation, high-quality EMG signals can help evaluate the recovery of muscle function. In addition, in the field of brain-computer interface (BCI), high-quality EEG signals can significantly enhance the performance of the system and improve the accuracy and stability of real-time control. In the research of emotion recognition and cognitive science, high-quality EEG signals can help researchers more accurately analyze the dynamic changes of brain activities, thus promoting the development of related fields.

[0005] In recent years, human signal filtering technology has evolved from traditional methods to modern methods. Traditional filtering methods mainly include time-domain filtering (such as band-pass filtering, notch filtering), frequency-domain filtering (such as Fourier transform, wavelet transform), and spatial-domain filtering (such as independent component analysis ICA). Although these methods are computationally simple and easy to implement, they have limitations in dealing with complex noise and multi-scale features. With the development of deep learning technology, modern filtering methods have gradually emerged. These innovative technologies have significantly improved the effectiveness and applicability of human signal filtering, opening up broader prospects for biomedical research and medical applications.

[0006] Human signal filtering is of great significance in biomedical signal processing. However, due to the high complexity of human signals (such as electroencephalogram EEG, electrocardiogram ECG, electromyogram EMG, etc.) in the time and space dimensions, signal processing faces huge challenges. Traditional filtering methods usually require manual parameter settings, such as the frequency range of band-pass filtering or the component selection of independent component analysis (ICA). This method not only relies on expert experience but also is difficult to adapt to the noise characteristics of different signals. In addition, human signals usually contain multiple frequency band components (such as delta, theta, alpha, beta, gamma waves in EEG signals). Traditional methods usually use single-scale filters, such as fixed-scale convolutional kernels or wavelet basis functions, and are difficult to handle noises of different frequencies simultaneously. Although wavelet transform and ICA can process multi-band signals, their performance is limited by the choice of basis functions and the setting of decomposition levels, and they cannot comprehensively capture the complex characteristics of signals. In contrast, the denoising diffusion model (Denoising Diffusion Probabilistic Models, DDPM) can automatically adapt to the noise characteristics of different signals by learning the data distribution, thus significantly reducing the dependence on manual intervention.

[0007] Traditional time-frequency analysis methods (such as short-time Fourier transform STFT, wavelet transform WT) aim to provide local information of signals in both the time and frequency domains simultaneously. However, the time resolution and frequency resolution of STFT are limited by the choice of window function and cannot provide both high time resolution and high frequency resolution simultaneously. Although wavelet transform can provide multi-scale features, its time resolution and frequency resolution are still limited by the choice of basis functions. More importantly, time-frequency analysis methods usually only process single-channel signals and cannot effectively utilize the spatial correlation of multi-channel signals, which limits their application in multi-channel data analysis.

[0008] Existing deep learning technologies (such as Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN)) have made significant progress in human signal processing, but there are still obvious limitations. CNN mainly focuses on spatial features (such as the correlation between multiple channels), but it is difficult to capture long-term dependencies; while RNN mainly focuses on temporal features (such as the temporal variation of signals), but it is difficult to effectively utilize the spatial information of multi-channel signals. In addition, CNN extracts features through local convolution operations and is difficult to capture global dependencies; RNN captures features through recursive processing of time steps and is difficult to process multi-scale temporal information simultaneously. This single way of extracting temporal or spatial information cannot comprehensively capture the complex relationships of human signals in the temporal and spatial dimensions.

[0009] In addition, human signals also have significant individual differences. Traditional methods usually need to process each individual separately, which is not only time-consuming and laborious, but also limits the generalization ability of the model. For example, in Brain-Computer Interface (BCI), the EEG signals of different individuals are significantly different, and existing models are difficult to directly transfer. This limitation makes traditional methods face great challenges in practical applications. Therefore, there is an urgent need for a filtering technology that can simultaneously capture temporal and spatial information, adapt to individual differences, and have high generalization ability to meet the needs of human signal processing. Therefore, it is necessary to design a new method and device for filtering and processing human signals to solve the above problems. Summary of the Invention

[0010] An object of the present invention is to propose a method and device for filtering and processing human signals to solve at least one of the technical problems existing in the above-mentioned prior art.

[0011] To achieve the above object, the present invention adopts the following technical solutions:

[0012] A method for filtering and processing human signals, the method comprising the following steps:

[0013] S1. Use a multi-channel human signal sensor device to obtain the clean human signal of the user and the corresponding label;

[0014] S2. Preprocess the human signal, including normalization processing and tensor representation;

[0015] S3. Design a conditional denoising diffusion model to gradually add noise to the human signal, then perform multi-scale feature extraction and domain classification on the noisy human signal, and train an artificial intelligence model for filtering human signals;

[0016] S4. Evaluate the filtering effect of the user's human signal and further use it for downstream tasks.

[0017] Preferably, the S1 specifically comprises the following steps:

[0018] S11. Collect human body signals of C channels using a multi-channel human body signal electrode;

[0019] S12. Mark the labels corresponding to the human body signals.

[0020] Preferably, the S2 specifically includes the following steps:

[0021] S21. Perform normalization processing on the human body signals of each channel to make their mean value 0 and standard deviation 1:

[0022]

[0023] where X is the original signal, μ is the mean value, and σ is the standard deviation;

[0024] S22. Set the window length L of the data volume processed at one time and the sliding step s, and perform data cutting on the human body signals;

[0025] S23. For multi-channel human body signals, maintain the spatial relationship between channels and construct a tensor with the shape of [N, C, T], where N is the number of samples, C is the number of channels, and T is the number of time points.

[0026] Preferably, the S3 specifically includes the following steps:

[0027] S31. Obtain the conditional input c according to the specific task, select the time step t, and select the noise level β t , and gradually add noise to the original clean human body signal X0 to obtain the noisy human body signal X t :

[0028]

[0029] where X t-1 is the clean signal relative to X t , is the standard Gaussian noise, and α t = 1 - β t is the noise scheduling parameter;

[0030] Calculate X directly from X0 through recursive expansion t :

[0031]

[0032] where is the cumulative noise attenuation coefficient;

[0033] In the forward diffusion process of the diffusion denoising model, gradually add noise to the human body signal, and the transition probability q(X t |X t-1 ) follows a Gaussian distribution:

[0034]

[0035] where β t is the noise scheduling parameter;

[0036] Define the reverse denoising process, which gradually recovers the clean human body signal from the noise through a neural network. The transition probability p θ (X t-1 |X t ) follows a Gaussian distribution:

[0037]

[0038] where μ θ and Σ θ are the outputs of the neural network; Use the neural network to predict the noise ε θ (X t , t, c); According to the predicted noise, calculate the denoised signal as:

[0039]

[0040] where σ t is the noise variance, and set is additional noise;

[0041] When t = 1, the recovery of X0 is calculated as:

[0042]

[0043] Specifically, the neural network model in the reverse denoising process includes:

[0044] S32. Design a dual-branch denoising model of Transformers and LSTM; For the Transformers branch, use the Transformer encoder to perform global modeling on the input signal; Input the noisy human body signal X t with dimensions [N, C, T]. First, perform positional encoding on the input signal to retain the time information:

[0045]

[0046] Then capture the global dependencies through the multi-head self-attention mechanism:

[0047]

[0048] where the output matrix B contains the enhanced feature channel data, Attention represents the self-attention operator, Q, K, and V are the query matrix, key matrix, and value matrix respectively, and d k is the dimension of the key;

[0049] Next, a non - linear transformation is performed on the attention output through a feed - forward neural network:

[0050] FFN(X) = ReLU(XW1 + b1)W2 + b2

[0051] where X represents the input of the multi - head attention or FFN, ReLU(·) represents the activation function, W1 and W2 are the weight matrices of the first and second layers of the network respectively, and b1 and b2 are the biases of the first and second layers of the network respectively;

[0052] The finally output feature dimension is [N, C, T];

[0053] For the LSTM branch, LSTM is used to capture the global temporal dependencies and perform time - series modeling on the input signal; the noisy human body signal X is input t with the dimension of [N, C, T], and then the LSTM layer is used to capture the temporal features:

[0054] h t , c t = LSTM(x t , h t-1 , c t-1 )

[0055] where h t is the hidden state at time t, c t is the cell state, and x t is the input sequence;

[0056] The finally output feature dimension is [N, C, T];

[0057] S33. On the outputs of the two branches, first, multi - scale feature extraction is performed respectively. Convolution kernels or pooling operations of different scales are used to extract multi - scale features, and then the multi - scale features of the Transformers branch and the LSTM branch are concatenated together to achieve feature fusion;

[0058] S34. The embedding layer is used to map the discrete conditions into continuous vectors, and the continuous conditions are directly encoded using the fully - connected layer. The condition encoding is fused with the multi - scale features in S33;

[0059] S35. The domain - adversarial training technique is used to improve the generalization ability of the model among different subjects; a domain classifier is introduced to distinguish the features of the source domain and the target domain. The multi - scale denoising model in S33 is used as the shared feature extractor, and the domain classifier is constructed using the fully - connected layer and the activation function. The gradient reversal layer is used before the domain classifier to achieve domain - adversarial training, so that the feature extractor generates domain - invariant features;

[0060] S36. During the model training process, input the noisy signal into the diffusion denoising model to extract features and predict the noise; and use the gradient reversal layer to input the features into the domain classifier to predict the domain label. For the loss function of the multi-scale feature extraction module, calculate the losses for features at different scales separately to ensure that the model can effectively process noises at different frequencies, and then use a weighted loss function to balance the contributions of different scales. Suppose there are a total of P scales, and the denoising loss at the i-th scale is Sum the denoising losses of all scales after weighting:

[0061]

[0062] where λ i represents the weight parameter at the i-th scale;

[0063] Suppose the domain classification loss is

[0064] Optimize the denoising task and the domain classification task simultaneously, and sum the denoising loss and the domain classification loss after weighting as the total loss of the model:

[0065]

[0066] where λ represents the weight parameter;

[0067] Calculate the gradient through backpropagation and use the Adam optimizer to optimize the parameters and update the model parameters.

[0068] Preferably, the S44 specifically includes the following steps:

[0069] S41. Use the signal-to-noise ratio as the evaluation metric:

[0070]

[0071] where is the denoised signal;

[0072] S42. Use the denoised signal for the downstream task and evaluate the performance of the task.

[0073] A human body signal filtering and processing device, comprising:

[0074] A human body signal acquisition module, configured to acquire the clean human body signal and the corresponding label of the user from a multi-channel human body signal sensor device;

[0075] A preprocessing module, configured to perform preprocessing operations on the human body signal;

[0076] A module for constructing a noisy human body signal, configured to design a conditional denoising diffusion model to gradually add noise to the human body signal;

[0077] A multi-scale feature extraction module is used for the outputs of the two branches. It performs multi-scale feature extraction respectively, uses convolutional kernels or pooling operations of different scales to extract multi-scale features, and then concatenates the multi-scale features of the Transformers branch and the LSTM branch to achieve feature fusion. By convolutional kernels or pooling operations of different scales, different frequency components in the signal are processed respectively;

[0078] A conditional fusion module is used to map discrete conditions to continuous vectors using an embedding layer, directly encodes the continuous conditions using a fully connected layer, fuses the condition encoding with multi-scale features, and then uses a fully connected layer or a convolutional layer to map the fused features to the output space;

[0079] A cross-subject generalization module is used to improve the generalization ability of the model between different subjects using domain adversarial training technology. The noisy signal is input into a diffusion denoising model to extract features and predict noise, and through domain adversarial training, the model can be migrated from the source domain to the target domain;

[0080] A human body signal filtering effect evaluation module is used to evaluate the filtering effect of the user's human body signal and is further used for downstream tasks.

[0081] Compared with the prior art, a human body signal filtering processing method and device provided by the present invention have the following beneficial effects:

[0082] 1. Based on the denoising diffusion model (DDPM), the present invention designs a two-branch model combining Transformers and LSTM, which can simultaneously capture the global dependencies and temporal features of multi-channel human body signals. The Transformers branch extracts the global dependencies of multi-channel signals through the multi-head self-attention mechanism, while the LSTM branch captures the temporal features of the signals through the long short-term memory network, so as to achieve a comprehensive modeling of time and space information. Compared with the traditional DDPM model, the present invention further introduces a conditional diffusion mechanism, taking the noise type, individual information or task label as conditional inputs to guide the filtering process. This conditional diffusion design can significantly improve the filtering effect and generalization ability of the model, enabling it to adapt to different noise environments, individual differences and task requirements.

[0083] 2. The present invention designs a multi-scale feature extraction module, which processes different frequency components in the signal through convolutional kernels or pooling operations of different scales. This multi-scale strategy can effectively retain the features of multiple frequency bands, thus capturing the useful information of the signal more comprehensively. For example, in electroencephalogram (EEG) signals, both low-frequency delta waves and high-frequency gamma waves can be processed simultaneously; in electrocardiogram (ECG) signals, different frequency components of heart activities can be separated. This design significantly improves the filtering accuracy and applicability.

[0084] 3. Regarding the significant individual differences in human signals, the present invention also designs a cross - individual generalization module. Through domain - adversarial training, the model can be migrated from the source domain (source individual) to the target domain (target individual), significantly improving the generalization ability of the model. This design reduces the need for individual training for each person, providing a more efficient solution for practical applications such as health monitoring, disease diagnosis, and rehabilitation treatment. For example, in a brain - computer interface (BCI), the model can quickly adapt to new users; in the diagnosis of heart diseases, the model can generalize to the ECG signals of different patients. Brief Description of the Drawings

[0085] Figure 1 It is a flowchart of the human signal filtering processing method described in the present invention. Detailed Embodiments

[0086] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.

[0087] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention.

[0088] Please refer to the attached Figure 1 As shown, this embodiment provides a human signal filtering processing method and device. The method includes:

[0089] S1. Use a multi - channel human signal sensor device to obtain the clean human signals of the user and the corresponding labels.

[0090] S2. Pre - process the human signals. This includes normalization processing and tensor representation.

[0091] S3. Design a conditional denoising diffusion model to gradually add noise to the human signals, then perform multi - scale feature extraction and domain classification on the noisy human signals, and train an artificial intelligence model for human signal filtering.

[0092] S4. Evaluate the filtering effect of the user's human signals and further use them for downstream tasks.

[0093] Optionally, the specific steps of S1 include the following:

[0094] S11. Collect human signals of C channels using a multi-channel human signal electrode;

[0095] S12. Mark the tags corresponding to the human signals, such as task type, subject information, etc.

[0096] Optionally, S2 specifically includes the following steps:

[0097] S21. Standardize the human signals of each channel so that the mean is 0 and the standard deviation is 1:

[0098]

[0099] where X is the original signal, μ is the mean, and σ is the standard deviation.

[0100] S22. Set the window length L of the amount of data processed at one time and the sliding step s, and cut the human signals.

[0101] S23. For multi-channel human signals, maintain the spatial relationship between channels and construct a tensor with the shape of [N, C, T], where N is the number of samples, C is the number of channels, and T is the number of time points.

[0102] Optionally, S3 specifically includes the following steps:

[0103] S31. To train the diffusion model, it is necessary to construct noisy human signals. Obtain the conditional input c according to the specific task, such as noise type, subject information, task label, etc. Among them, the noise type is such as Gaussian noise, power frequency interference, other biological signal artifacts, etc., the subject information is such as the age, gender, health status of the subject, etc., and the task label is such as the labels of tasks such as emotion recognition, motor imagery, etc. Select the time step t and select the noise level β t , from β1 = 10 -4 to β T′ = 0.02 linearly increasing, T′ is the final step, and gradually add noise to the original clean human signal X0 to obtain the noisy human signal X t :

[0104]

[0105] where X t-1 is the clean signal relative to X t , is the standard Gaussian noise, and α t = 1 - β t is the noise scheduling parameter.

[0106] By recursive expansion, X can be directly calculated from X0 t :

[0107]

[0108] Among them is the cumulative noise attenuation coefficient.

[0109] In the forward diffusion process of the diffusion denoising model, noise is gradually added to the human body signal, and the transition probability q(X t |X t-1 ) follows a Gaussian distribution:

[0110]

[0111] where β t is the noise scheduling parameter.

[0112] Define the reverse denoising process, and gradually recover the clean human body signal from the noise through a neural network. The transition probability p θ (X t-1 |X t ) follows a Gaussian distribution:

[0113]

[0114] where, μ θ and Σ θ are the outputs of the neural network. Use the neural network to predict the noise ε θ (X t , t, c). According to the predicted noise, calculate the denoised signal as:

[0115]

[0116] where, σ t is the noise variance, usually set is the additional noise.

[0117] When t = 1, the final recovery of X0 can be calculated as:

[0118]

[0119] Specifically, the neural network model in the reverse denoising process includes:

[0120] S32. Design a dual-branch denoising model of Transformers and LSTM. For the Transformers branch, use the Transformer encoder to globally model the input signal. The input noisy human body signal X t has dimensions of [N, C, T]. First, perform positional encoding on the input signal to retain the time information:

[0121]

[0122] Then, the global dependencies are captured through the multi-head self-attention mechanism:

[0123]

[0124] Among them, the output matrix B contains enhanced feature channel data, Attention represents the self-attention operator, Q, K, and V are the query matrix, key matrix, and value matrix respectively, and d k is the dimension of the key.

[0125] Next, the attention output is non-linearly transformed through a feed-forward neural network:

[0126] FFN(X) = ReLU(XW1 + b1)W2 + b2

[0127] Among them, X represents the input of the multi-head attention or FFN, ReLU(·) represents the activation function, W1 and W2 are the weight matrices of the first and second layers of the network respectively, and b1 and b2 are the biases of the first and second layers of the network respectively.

[0128] The finally output feature dimension is [N, C, T].

[0129] For the LSTM branch, LSTM is used to capture the global temporal dependencies and perform time series modeling on the input signal. The input noisy human body signal X t with the dimension of [N, C, T], and then the LSTM layer is used to capture the temporal features:

[0130] h t , c t = LSTM(x t , h t-1 , c t-1 )

[0131] Among them, h t is the hidden state at time t, c t is the cell state, and x t is the input sequence.

[0132] The finally output feature dimension is [N, C, T].

[0133] Specifically, the multi-scale feature extraction module includes:

[0134] S33. On the outputs of the dual branches, first, multi-scale feature extraction is respectively performed, and multi-scale features are extracted using convolutional kernels or pooling operations of different scales. Then, the multi-scale features of the Transformers branch and the LSTM branch are concatenated together to achieve feature fusion.

[0135] Specifically, the conditional fusion module includes:

[0136] S34. Use the embedding layer to map discrete conditions (such as noise type, subject information, task label) into continuous vectors. For continuous conditions (such as age), directly use the fully connected layer for encoding. Fuse the condition encoding with the multi-scale features in S33, such as through concatenation or attention mechanism, and then use the fully connected layer or convolutional layer to map the fused features to the output space. The output result is the denoised human signal.

[0137] Specifically, the cross-subject generalization module includes:

[0138] S35. Use domain adversarial training technology to improve the generalization ability of the model among different subjects. Introduce a domain classifier to distinguish the features of the source domain and the target domain. Use the multi-scale denoising model in S33 as the shared feature extractor. Use the fully connected layer and activation function to construct the domain classifier. Use the gradient reversal layer in front of the domain classifier to implement domain adversarial training, so that the feature extractor generates domain-invariant features.

[0139] S36. During the model training process, input the noisy signal into the conditional diffusion denoising model to extract features and predict the noise. And use the gradient reversal layer to input the features into the domain classifier to predict the domain label. For the loss function of the multi-scale feature extraction module, use the mean square error (MSE) as the loss function, calculate the loss for features of different scales respectively to ensure that the model can effectively process noises of different frequencies, and then use the weighted loss function to balance the contributions of different scales. Suppose there are a total of P scales, and the denoising loss of the i-th scale is:

[0140]

[0141] where represents the expectation operator.

[0142] Weighted sum the denoising losses of all scales:

[0143]

[0144] where λ i represents the weight parameter of the i-th scale.

[0145] For the domain classification loss, use the binary cross entropy (BCE) loss to measure the performance of the domain classifier:

[0146]

[0147] where X is the signal of the source domain or the target domain, y is the output domain label, and D(X) is the domain label probability predicted by the domain classifier.

[0148] Simultaneously optimize the denoising task and the domain classification task, and weighted sum the denoising loss and the domain classification loss as the total loss of the model:

[0149]

[0150] Among them, λ represents the weight parameter.

[0151] Calculate the gradient through backpropagation, and use the Adam optimizer for parameter optimization to update the model parameters.

[0152] Optionally, the S44 specifically includes the following steps:

[0153] S41. Use the signal-to-noise ratio (SNR) as the evaluation metric:

[0154]

[0155] Among them, is the denoised signal.

[0156] S42. Use the denoised signal for downstream tasks and evaluate the performance of the tasks.

[0157] A human signal filtering and processing device, comprising:

[0158] A human signal acquisition module, configured to acquire the clean human signal and the corresponding label of the user from a multi-channel human signal sensor device;

[0159] A preprocessing module, configured to perform preprocessing operations on the human signal;

[0160] A module for constructing a noisy human signal, configured to design a conditional denoising diffusion model to gradually add noise to the human signal;

[0161] A multi-scale feature extraction module, configured to perform multi-scale feature extraction on the outputs of the two branches respectively, use convolutional kernels or pooling operations of different scales to extract multi-scale features, and then splice the multi-scale features of the Transformers branch and the LSTM branch together to achieve feature fusion, and process different frequency components in the signal through convolutional kernels or pooling operations of different scales;

[0162] A conditional fusion module, configured to map the discrete condition to a continuous vector using an embedding layer, directly encode the continuous condition using a fully connected layer, fuse the condition encoding with the multi-scale features, and then use a fully connected layer or a convolutional layer to map the fused features to the output space;

[0163] A cross-subject generalization module, configured to use domain adversarial training technology to improve the generalization ability of the model between different subjects, input the noisy signal into the diffusion denoising model, extract features and predict noise, and enable the model to migrate from the source domain to the target domain through domain adversarial training;

[0164] The human body signal filtering effect evaluation module is used to evaluate the filtering effect of the user's human body signals and is further used for downstream tasks.

[0165] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.

Claims

1. A method for filtering and processing human body signals, characterized in that, It includes the following steps: S1. Use a multi-channel human signal sensor device to obtain the clean human signals of the user and the corresponding labels; S2. Preprocess the human signals, including normalization processing and tensor representation; S3. Design a conditional denoising diffusion model to gradually add noise to the human signals, then perform multi-scale feature extraction and domain classification on the noisy human signals, and train an artificial intelligence model for filtering human signals; S4. Evaluate the filtering effect of the user's human signals and further use it for downstream tasks.

2. The method for filtering and processing human body signals according to claim 1, characterized in that, The specific steps of S1 are as follows: S11. Use multi-channel human signal electrodes to collect human signals of C channels; S12. Mark the labels corresponding to the human signals.

3. A method for filtering and processing human body signals according to claim 1, characterized in that: The specific steps of S2 are as follows: S21. Perform normalization processing on the human signals of each channel to make their mean 0 and standard deviation 1: where X is the original signal, μ is the mean, and σ is the standard deviation; S22. Set the window length L for the amount of data processed at one time and the sliding step s, and perform data cutting on the human signals; S23. For multi-channel human signals, maintain the spatial relationship between channels and construct a tensor with the shape of [N, C, T], where N is the number of samples, C is the number of channels, and T is the number of time points.

4. A method for filtering and processing human body signals according to claim 1, characterized in that: The specific steps of S3 are as follows: S31. Obtain the conditional input c according to the specific task, select the time step t, and select the noise level β t , gradually add noise to the original clean human signal X0 to obtain the noisy human signal X t : Among them, X t-1 is the clean signal relative to X t , is the standard Gaussian noise, and α t = 1 - β t is the noise scheduling parameter; Calculate X directly from X0 by recursive expansion t : wherein is the cumulative noise attenuation coefficient; In the forward diffusion process of the diffusion denoising model, noise is gradually added to the human body signal, and the transition probability q(X t |X t-1 ) follows a Gaussian distribution: where β t is the noise scheduling parameter; Define the reverse denoising process, which gradually recovers the clean human signal from the noise through a neural network, with the transition probability p θ (X t-1 |X t ) follows a Gaussian distribution: where, μ θ and Σ θ are the outputs of the neural network; use the neural network to predict the noise ε θ (X t , t, c); according to the predicted noise, calculate the denoised signal as: Among them, σ t is the noise variance, and setting is additional noise; When t = 1, the calculation of restoring X0 is as follows: Specifically, the neural network model in the reverse denoising process includes: S32. Design a dual-branch denoising model for Transformers and LSTM; for the Transformers branch, use a Transformer encoder to globally model the input signal; input the noisy human body signal X t with dimensions [N, C, T]. First, perform positional encoding on the input signal to retain time information: Then capture the global dependencies through the multi-head self-attention mechanism: Among them, the output matrix B contains enhanced feature channel data, Attention represents the self-attention operator, Q, K, and V are the query matrix, key matrix, and value matrix respectively, and d k is the dimension of the key; Next, perform a non-linear transformation on the attention output through a feed-forward neural network: FFN(X) = ReLU(XW1 + b1)W2 + b2 where X represents the input of the multi-head attention or FFN, ReLU(·) represents the activation function, W1 and W2 are the weight matrices of the first layer and the second layer of the network respectively, and b1 and b2 are the biases of the first layer and the second layer of the network respectively; The finally output feature dimension is [N, C, T]; For the LSTM branch, use LSTM to capture global temporal dependencies and perform time series modeling on the input signal; input the noisy human body signal X t with dimensions [N, C, T], and then use the LSTM layer to capture temporal features: h t , c t = LSTM(x t , h t-1 , c t-1 ) where h t is the hidden state at time t, c t is the cell state, and x t is the input sequence; The finally output feature dimension is [N, C, T]; S33. On the outputs of the two branches, first perform multi-scale feature extraction respectively, use convolutional kernels or pooling operations of different scales to extract multi-scale features, and then splice the multi-scale features of the Transformers branch and the LSTM branch together to achieve feature fusion; S34. Use the embedding layer to map the discrete conditions into continuous vectors, directly encode the continuous conditions using a fully connected layer, and fuse the condition encoding with the multi-scale features in S33; S35. Use domain adversarial training technology to improve the generalization ability of the model among different subjects; introduce a domain classifier to distinguish the features of the source domain and the target domain, use the multi-scale denoising model in S33 as a shared feature extractor, use a fully connected layer and an activation function to construct a domain classifier, and use a gradient reversal layer in front of the domain classifier to achieve domain adversarial training, so that the feature extractor generates domain-invariant features; S36. During the model training process, input the noisy signal into the diffusion denoising model to extract features and predict the noise; and use the gradient reversal layer to input the features into the domain classifier to predict the domain label. For the loss function of the multi-scale feature extraction module, calculate the loss for features at different scales respectively to ensure that the model can effectively process noises at different frequencies, and then use the weighted loss function to balance the contributions of different scales. Suppose there are a total of P scales, and the denoising loss at the i-th scale is Weighted sum of the denoising losses of all scales: Among them, λ i represents the weight parameter of the i-th scale; Let the domain classification loss be Optimize the denoising task and the domain classification task simultaneously, and sum the denoising loss and the domain classification loss with weights as the total loss of the model: where λ represents the weight parameter; Calculate the gradient through backpropagation and use the Adam optimizer to optimize the parameters and update the model parameters.

5. A method for filtering and processing human body signals according to claim 1, characterized in that: The specific steps of S44 are as follows: S41: Use the signal-to-noise ratio as an evaluation metric. Among them, is the denoised signal; S42: Use the denoised signal for downstream tasks and evaluate the performance of the tasks.

6. A human body signal filtering and processing device, characterized in that, It includes: A human signal acquisition module for obtaining the user's clean human signals and corresponding labels from a multi-channel human signal sensor device. A preprocessing module for performing preprocessing operations on the human signals. A noisy human signal construction module for designing a conditional denoising diffusion model to gradually add noise to the human signals. A multi-scale feature extraction module for performing multi-scale feature extraction on the outputs of the two branches, using convolutional kernels or pooling operations of different scales to extract multi-scale features, and then concatenating the multi-scale features of the Transformers branch and the LSTM branch to achieve feature fusion, and processing different frequency components in the signal through convolutional kernels or pooling operations of different scales. A conditional fusion module for mapping discrete conditions to continuous vectors using an embedding layer, directly encoding the continuous conditions using a fully connected layer, fusing the condition encoding with the multi-scale features, and then using a fully connected layer or a convolutional layer to map the fused features to the output space. A cross-subject generalization module for using domain adversarial training techniques to improve the generalization ability of the model between different subjects, inputting the noisy signals into the diffusion denoising model, extracting features and predicting the noise, and enabling the model to migrate from the source domain to the target domain through domain adversarial training. A human signal filtering effect evaluation module for evaluating the filtering effect of the user's human signals and further used for downstream tasks.