A method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling

By employing slope acceleration detection and morphological scaling methods, the problem of accurate identification and seamless signal reconstruction of artifact boundaries in electromyographic signals induced by electrical stimulation was solved, achieving precise suppression of artifacts and effective preservation of physiological signals, which is applicable to clinical neurophysiological examinations.

CN122123724APending Publication Date: 2026-06-02NCC MEDICAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NCC MEDICAL
Filing Date
2026-04-20
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify stimulation artifact boundaries and seamlessly reconstruct signals in electrically induced electromyographic signals without requiring pre-trained templates or introducing filtering distortions. This is especially true in dynamic environments where artifacts and physiological signals often overlap in the same direction.

Method used

A slope-accelerated detection and morphological scaling method is adopted. Through high sampling rate signal acquisition and preprocessing, combined with environmental background noise analysis, artifact boundary localization, morphological scaling preprocessing and second-order bidirectional zero-phase bandpass filtering, the accurate localization of artifact boundaries and distortion-free signal reconstruction are achieved.

Benefits of technology

It achieves accurate identification of the artifact termination point and suppression of artifact amplitude when the stimulation artifact and physiological signal have high temporal overlap and the same polarity, while preserving the characteristics of the physiological signal, avoiding the filter ringing effect, and ensuring the continuity and accuracy of the signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122123724A_ABST
    Figure CN122123724A_ABST
Patent Text Reader

Abstract

This invention provides a method for processing evoked electromyography (EMG) artifacts based on slope acceleration detection and morphological scaling. The method includes: acquiring EMG signals with the stimulus trigger as the zero point of time; extracting the terminal resting segment, calculating the first-order difference standard deviation, and constructing an adaptive threshold; calculating the local slope amplitude, sign, and historical slope reference point by point within the search interval, and determining the artifact end index based on polarity reversal, slope acceleration, or smooth exit criteria; linearly scaling the artifact segment using the end point as an anchor point to suppress artifact amplitude and eliminate boundary steps; performing a second-order bidirectional zero-phase bandpass filter on the scaled signal to filter out interference and retain waveform phase; scaling the original signal and backfilling it into the artifact segment, followed by level alignment and square root fade-in processing to reconstruct a smooth and continuous physiological signal. This invention achieves precise positioning of artifact boundaries and distortion-free signal reconstruction, possessing advantages such as thorough artifact suppression, no ringing distortion, complete preservation of physiological morphology, and strong adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of biomedical signal processing technology, specifically relating to a method for detecting and suppressing stimulation artifacts in evoked electromyography (EMG) signals induced by electrical stimulation, and particularly to an evoked EMG signal processing method based on second-order slope acceleration detection and morphological scaling (Morphing) reconstruction, which is applicable to signal preprocessing in clinical neurophysiological examinations such as nerve conduction velocity measurement, H-reflex, and F-wave detection. Background Technology

[0002] Evoked electromyography (EMG) signals are bioelectrical responses recorded in target muscles after electrical stimulation of peripheral nerves, and are widely used for assessing nerve conduction function. However, because the amplitude of the electrical stimulation pulse is much higher than that of physiological signals, the acquired signals are often accompanied by strong stimulation artifacts. These artifacts typically have a steep rising edge and a slowly decaying exponential tail, and highly overlap with physiological signals (such as M waves) in the time domain, severely affecting signal analysis and interpretation.

[0003] Traditional artifact suppression methods include temporal blanking, template subtraction, and adaptive filtering. Temporal blanking fills artifact segments with zeros or constants, which is simple to operate but causes signal steps, leading to filter ringing and introducing new artifacts. Template subtraction relies on the repeatability of artifact morphology and is difficult to handle electrode drift or changes in stimulus polarity. Adaptive filtering can handle partial overlap, but it has high computational complexity, poor real-time performance, and is highly dependent on the location of artifact start and end points, making it difficult to achieve accurate boundary recognition in dynamic environments.

[0004] Therefore, how to achieve accurate identification of stimulus artifact boundaries and seamless signal reconstruction without the need for pre-training templates or the introduction of filtering distortion has become a key challenge in induced electromyography signal processing. Summary of the Invention

[0005] To address the technical problems existing in the prior art, this invention proposes a method for processing evoked electromyography artifacts based on slope acceleration detection and morphological scaling, achieving precise localization of artifact boundaries and distortion-free signal reconstruction, such as... Figure 1 As shown, the method includes the following steps: Step one, signal acquisition and preprocessing, uses the stimulus trigger as the zero point of time to ensure that the signal is strictly aligned with the stimulus event in the time domain, providing a unified time reference for subsequent boundary detection; a high sampling rate (usually ≥10kHz) can accurately capture steep changes in artifacts, which is the hardware basis for achieving slope-accelerated detection.

[0006] High sampling rate was used to acquire evoked electromyographic signals. The stimulation trigger moment was taken as the zero point, and a complete response window containing stimulation artifacts, physiological responses, and background noise was extracted to obtain a discrete signal sequence. ,in Sampling rate , (unit: Hz), N is the total number of sample points in a single collection.

[0007] The acquired raw signals are stored digitally in a buffer to ensure that subsequent steps can be processed based on the same time reference.

[0008] This step outputs the discrete signal sequence to be processed. .

[0009] Step two involves environmental background noise analysis to address the failure of traditional fixed thresholds under different signal-to-noise ratios, thereby improving the robustness and generalization ability of the algorithm.

[0010] Input signal sequence The resting segment at the end contains no physiological response and only system noise and background interference; this step selects the last 20% of sampling points as the resting segment, with the starting index being [index missing]. In evoked electromyography (EMG) signals, the period within 30ms after stimulation usually contains physiological responses (such as M waves), while the last 20% of the period (generally after 40ms after stimulation) corresponds to a time when the muscle has returned to a resting state, leaving only system noise and background interference, which can accurately reflect the environmental noise level. Taking the last 20% can avoid the inclusion of physiological signal components while ensuring a sufficient sample size, thus improving the statistical stability of noise estimation. Using a first-order difference sequence to calculate the standard deviation can effectively remove the influence of baseline drift, making the obtained noise level consistent with the physical meaning of the subsequent slope criterion. The floor operation ensures that the obtained index is a valid integer, while placing the resting segment slightly later, further ensuring that the tail of the physiological response is not included, which conforms to the robustness design of the algorithm.

[0011] 1. Calculate the first-order difference sequence of the resting segment. To reflect rapid fluctuations between sampling points: .

[0012] 2. Calculate the standard deviation of the difference sequence. Characterizing environmental noise levels: ,in is the mean of the difference sequence.

[0013] 3. Construct an adaptive threshold T for subsequent artifact termination determination: ;in This is the sensitivity coefficient, usually taken as 3 to 8, which can be adjusted according to clinical needs.

[0014] This step outputs an adaptive threshold T.

[0015] Step 3, artifact boundary localization, solves the problem of inaccurate boundary identification in traditional methods when artifacts and physiological signals overlap in the same direction, and achieves accurate adaptive localization under high sampling rate.

[0016] Input signal The index corresponding to the minimum hidden time (Converted from the user-defined blank_min_ms) The index corresponding to the maximum search time (Converted from blank_limit_ms:) ), and the threshold T obtained in step two.

[0017] 1. Calculate the global first-order difference sequence: .

[0018] 2. Determine the initial slope sign :Pick The sign of the average of the next 5 consecutive difference points, i.e.: .

[0019] 3. Within the search range Determine the value point i within the inner circle: (1) Calculate the local slope amplitude : Take the absolute value of the average of the three consecutive difference points after point i, that is: ; (2) Calculate the sign of the local slope : ; (3) Calculate historical slope reference Take the absolute value of the average of the five consecutive difference points before point i, that is: ,when ;for ,Pick ; (4) Determine the artifact end index based on the following criteria. : ①Condition A (polarity reversal): If and If the artifact is found to be unsuccessful, then the artifact is considered to have ended. ; ②Condition B (Slope Acceleration): If and If the artifact is found to be unsuccessful, then the artifact is considered to have ended. ; ③Condition C (Smooth Exit): If If the artifact is found to be unsuccessful, then the artifact is considered to have ended. ; ④ Condition D (Timeout Exit): If the above condition is not triggered after searching the entire interval, then take... .

[0020] in , , The preset coefficients are used, and typical values ​​are taken as follows: 0.8, 1.25, 2; Its function is to compensate for detection delay, causing the end point to move forward by a certain number of points, thus avoiding the lag caused by window averaging.

[0021] This step outputs the artifact end index. .

[0022] Combining slope polarity reversal, amplitude acceleration, and smooth exit mechanisms, this system can adapt to complex situations involving different stimulus polarities (forward / reverse methods) and the co-directional overlap of artifacts and physiological signals. Local slope calculation employs continuous multi-point averaging to suppress single-point noise interference; historical slope references are used to capture abnormally large slope increases, effectively identifying the turning point where artifact decay ends and physiological signals begin to rise.

[0023] Step four, shape scaling preprocessing, solves the step discontinuity problem caused by directly setting to zero or filling with constants in traditional blanking methods, avoids ringing artifacts after bandpass filtering, and provides smooth input for subsequent filtering.

[0024] Input signal End index of artifacts The shape scaling factor m (usually taken as 0.05 to 0.50, preferably 0.10 to 0.40).

[0025] End point signal value at As anchor points, for pseudo-trace segments Perform linear scaling: , ,for Keep the original value unchanged, that is .

[0026] This step outputs a preprocessed signal. .

[0027] The scaling operation significantly suppresses artifact amplitude while preserving the original waveform shape, and at the same time, because... Aligning with the original value ensures level continuity between the scaling segment and subsequent signal segments, eliminating step jumps that could cause filter ringing.

[0028] Step 5: Second-order bidirectional zero-phase bandpass filtering solves the phase distortion problem introduced by conventional bandpass filtering, preserves the latency and waveform characteristics of induced electromyographic signals, and provides an accurate basis for clinical interpretation.

[0029] Input preprocessing signal ; 1. Design a second-order Butterworth bandpass filter and set its lower cutoff frequency. (e.g., 20Hz) and upper cutoff frequency (e.g., 2000Hz), implemented using the second-order section (SOS) form, with the following difference equation: ; in These are the filter coefficients.

[0030] 2. To eliminate phase distortion, a bidirectional zero-phase filtering technique is employed: First, the input signal... Forward filtering is performed to obtain Then Time reversal Forward filtering is performed to obtain Finally Reverse it again to get the output. This process can be represented as: ; in Indicates SOS filtering operation. This indicates a sequence reversal operation. To reduce boundary effects, an appropriate length of padding (e.g., padding length) can be applied to both ends of the signal before filtering. ).

[0031] This step outputs a filtered signal. The signal has been filtered to remove power frequency interference and high-frequency noise, while retaining the time-domain phase characteristics of the original waveform.

[0032] Bidirectional filtering ensures zero-phase output, avoiding waveform shift caused by conventional filtering; the second-order Butterworth filter has a flat passband characteristic, making it suitable for biomedical signal processing; the SOS structure improves numerical stability.

[0033] Step six, feature backfilling and smooth reconstruction, solves the problems of complete loss of artifact segment information and abrupt changes in the starting segment. While suppressing artifacts, it preserves the continuity of physiological signals, making it easier for clinicians to observe and interpret.

[0034] Input signal Filtered signal End index of artifacts , Shape scaling factor m.

[0035] 1. Construct the original scaling backfill segment: For ,Pick: This segment retains the morphological trend of the original signal, but the amplitude has been compressed by a factor m.

[0036] 2. Calculate the level alignment offset. This causes the end of the backfill section to interact with the filtered signal. Continuous: .

[0037] 3. Apply an offset to the backfill section to obtain the aligned backfill section: , .

[0038] 4. Replace the front segment of the filtered signal with the aligned backfill segment: , .

[0039] 5. To eliminate abrupt changes at the starting point, apply a square root fade-in weight to the replaced front segment: , ; , ; for ,Keep .

[0040] This step outputs the final reconstructed signal. The signal exhibits a similar physiological morphology to the original signal in the pseudo-trace segment, with moderate amplitude, smooth start, and natural transition to subsequent filtering segments.

[0041] The backfill segment utilizes the morphological information of the original signal to restore the suppressed physiological components (such as early M-waves) of the artifact segment, avoiding complete loss; the offset ensures the continuity of the level at the boundary between the backfill segment and the filter segment; the square root fade-in weight makes the signal grow smoothly from zero, avoiding artificial abrupt changes and improving visual naturalness.

[0042] The method described in this invention starts with stimulus triggering and sequentially proceeds through five core steps: environmental noise analysis, artifact boundary localization, morphological scaling preprocessing, filtering, and backfilling reconstruction, forming a closed-loop processing flow. Each step has a clear input-output dependency relationship. Step 1: Output discrete signal sequence .

[0043] Step two provides an adaptive threshold T for step three, enabling boundary detection to dynamically adjust according to the actual noise level and ensuring detection accuracy.

[0044] The artifact end index output in step three The range of the artifact's influence segment is defined, which is the temporal boundary of all subsequent operations.

[0045] Step Four Utilization Shape scaling is applied to the pseudo-trace segments to output a smooth preprocessed signal. This provides a stepless input signal for the filtering step.

[0046] Step 5 involves performing zero-phase bandpass filtering on the preprocessed signal to output a filtered signal that removes high-frequency interference. .

[0047] Step Six: Combining the Original Signal and filtered signal By refilling and fading in, the physiological morphology of the artifact segments is reconstructed, and the final signal is output. .

[0048] The entire process ensures artifact suppression while preserving the physiological characteristics of the original signal to the greatest extent, exhibiting good real-time performance and robustness, and is suitable for both real-time clinical processing and offline analysis.

[0049] Compared with the prior art, the present invention has the following significant advantages: (1) The present invention adopts the "inflection point + accelerated detection" combined criterion. By the change of local slope sign and the significant increase of slope amplitude relative to historical reference, it can accurately identify the end point of the artifact when the stimulus artifact and the physiological signal are highly overlapping in the time domain and have the same polarity. This effectively avoids boundary misjudgment or delay caused by overlapping in the same direction and ensures the accuracy of the latency characteristics.

[0050] (2) The present invention uses morphological scaling preprocessing to linearly scale the pseudo-trace segment with the pseudo-trace end point as the anchor point. While preserving the waveform shape, it greatly suppresses the pseudo-trace amplitude and ensures that the scaling segment and the subsequent signal segment level are continuous. This fundamentally eliminates the step change caused by zeroing in the traditional time blanking method and avoids the filter ringing effect.

[0051] (3) The present invention uses feature backfilling and smooth reconstruction technology to compress the original signal according to the scaling factor and backfill it into the pseudo-trace segment. By offset alignment and square root fade-in weighting, the reconstructed segment retains the physiological morphological trend of the original signal and is naturally connected with the filtered physiological segment, thus preserving the suppressed early physiological information in the pseudo-trace segment to the maximum extent, which is convenient for clinical interpretation.

[0052] Other features and advantages of the invention will be set forth in the following description or may be learned by practicing the invention. Attached Figure Description

[0053] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0054] Figure 1 This is a flowchart illustrating the overall steps of the method of the present invention.

[0055] Figure 2 The figure shows the artifact suppression effect of the method of the present invention when applied to the positive stimulation method; the gray line in the figure is the original signal, the red line is the processed signal, and the dashed line marks the artifact end point; the signal-to-noise ratio of the artifact segment decreased from 42.3dB to 17.1dB.

[0056] Figure 3 This is a comparison chart showing the effect of traditional time blanking method on the same group of data; the gray line in the figure is the original signal, and the blue line is the processed signal; the signal-to-noise ratio of the artifact segment only decreased from 42.3dB to 37.0dB, and ringing artifacts exist near the artifact end point.

[0057] Figure 4 This is a diagram showing the artifact suppression effect of the method of the present invention when applied to the reverse stimulation method; the gray line in the figure represents the original signal, the red line represents the processed signal, and the dashed line marks the artifact end point; the signal-to-noise ratio of the artifact segment decreased from 16.7dB to -9.3dB. Detailed Implementation

[0058] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the following embodiments are only used to explain the present invention and are not intended to limit the scope of the present invention.

[0059] System Architecture: The method described in this invention is implemented based on the following hardware and software systems: (1) Electromyographic signal stimulation module: responsible for generating electrical pulse signals with preset pulse width, current intensity and frequency, acting on the patient's nerve trunk or motor point, inducing physiological electrical response, and outputting synchronous trigger marker.

[0060] (2) High-frequency surface electromyography acquisition module: with sampling rate Acquiring electrical signals from the muscle surface at ≥10kHz can accurately capture steep changes in artifacts, providing the hardware foundation for accelerated slope detection.

[0061] (3) Environmental background noise analysis module: extracts the resting period data of the signal end, dynamically calculates the standard deviation of environmental noise, and provides an adaptive threshold for artifact boundary detection.

[0062] (4) Boundary positioning module: Execute the "inflection point + acceleration detection" combined algorithm to accurately lock the end index of stimulus artifact.

[0063] (5) Morphological scaling preprocessing module: linearly scales the pseudo-trace segments, suppresses the amplitude of pseudo-traces and eliminates boundary steps.

[0064] (6) Second-order bidirectional series filter module: a second-order Butterworth bandpass filter and bidirectional zero-phase filter are used to filter out interference and retain waveform phase.

[0065] (7) Feature backfilling and smooth reconstruction module: The scaled original signal is backfilled into the pseudo-trace segment, and the physiologically meaningful signal start segment is reconstructed through level alignment and fade-in processing.

[0066] Each module is executed in the order of "hardware triggering and sampling first, followed by software adaptive analysis and reconstruction". The overall process takes the moment of stimulation as the zero point and forms a closed-loop processing chain.

[0067] Example: This embodiment applies the method of the present invention to clinical nerve conduction velocity measurement, processing electromyographic signals induced by a single electrical stimulation. The system hardware includes an electrical stimulation generation unit and a high-frequency surface electromyography acquisition unit (sampling rate...). (20kHz) and an embedded processing platform. All processing steps are performed in the following order: Step 1, Signal Acquisition and Preprocessing: Using the stimulus trigger moment as the zero point, signals within 50ms after the stimulus are acquired and extracted to obtain a discrete sequence. Total number of sample points N= ×0.05=1000. This sequence contains stimulus artifacts (amplitude approximately ±5mV), physiological responses (M-wave, amplitude approximately 0.5mV), and background noise. Store x[n] in a buffer as input for subsequent steps.

[0068] Step 2, Environmental Background Noise Analysis: Take the last 20% of the sample points of the signal as the resting segment, and use the starting point index. Calculate the first-order difference sequence of the resting segment: , ; Calculate the difference mean Standard deviation Set the sensitivity coefficient. The adaptive threshold is obtained as follows: .

[0069] Step 3, artifact boundary localization: Set the minimum blanking time (blank_min_ms) to 0.5ms and the maximum search time (blank_limit_ms) to 8ms, and convert this to an index: , ; Calculate the global first-order difference .Pick The average of the last 5 difference points: , .

[0070] Calculate point i point by point in the interval [10, 160): Local slope amplitude ; Local slope sign ; Historical slope reference (when ); Take coefficient , , The search process is as follows: when hour, ,and If condition A is satisfied, take... .

[0071] Verification has shown that this point corresponds to the turning point where artifact decay ends and physiological signals begin to rise.

[0072] Step 4, Shape scaling preprocessing: Take the shape scaling factor End point of the artifact .right 33 is linearly scaled: ;for , After preprocessing, the artifact amplitude was reduced to about 1mV, and the signal at n=33 was continuous without step changes.

[0073] Step 5, Second-order bidirectional zero-phase bandpass filtering: Design a second-order Butterworth bandpass filter with a lower cutoff frequency of [missing information]. upper cutoff frequency The filter employs a second-order segmented (SOS) structure. The filter coefficients are obtained using the bilinear transform method, which will not be elaborated here.

[0074] Preprocessed signal Perform bidirectional zero-phase filtering: First, perform forward filtering to obtain... Reversed After forward filtering again, The final filtered signal is obtained after inversion. To reduce boundary effects, the signal is extended at both ends before filtering. (Using edge value mirror extension).

[0075] After filtering, 50Hz power frequency interference and high-frequency noise are effectively suppressed, and the physiological signal waveform maintains its original phase.

[0076] Step 6, Feature Backfilling and Smoothing Reconstruction: Construct the original scaling backfill segment: , ; Calculate the offset: ; Backfill section after alignment: , ; Replace the front part of the filtered signal with : , ; Apply square root fade-in weight: , ; , ; for , .

[0077] Final output signal The pseudo-trace segment starts smoothly with an amplitude of about 0.1mV, and connects naturally with the filtered physiological segment. The early M-wave morphology is clearly distinguishable.

[0078] Comparative verification: To verify the effectiveness of this invention, the same set of data was processed using the traditional time blanking method (zeroing for 1.5ms) and then subjected to the same bandpass filter. The results showed that the traditional method exhibited obvious ringing (overshoot of about 0.3mV) after the artifact segment, and the early M-wave initiation was completely erased; while the method of this invention did not exhibit ringing, and the physiological information was preserved intact.

[0079] like Figure 2 As shown, the signal processed by the method of the present invention (red) shows significantly suppressed artifact amplitude compared to the original signal (gray), and the early M-wave morphology is clearly distinguishable; compared with traditional methods (such as... Figure 3 Compared to the method shown in the figure, the method of the present invention has no ringing artifacts and better signal continuity; Figure 4 This further verifies the applicability of the method of the present invention under reverse stimulation.

[0080] Furthermore, the symbols in the formula It is the floor symbol.

[0081] Furthermore, symbols It is the sign function in mathematics, also known as the positive and negative sign function: .

[0082] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling, characterized in that, The method includes the following steps: Step 1, Signal Acquisition and Preprocessing: Using the stimulus trigger moment as the zero point of time, acquire evoked electromyographic signals to obtain discrete signal sequences; Step 2, Environmental background noise analysis: Extract the resting segment at the end of the signal, calculate the environmental noise level, and construct an adaptive threshold; Step 3, Artifact Boundary Localization: Within the set search interval, detect the end point of the artifact based on the slope change to obtain the artifact end index; Step 4, Shape scaling preprocessing: Using the end point of the artifact as the anchor point, linearly scale the artifact segment to obtain the preprocessed signal; Step 5, Bidirectional zero-phase bandpass filtering: Bandpass filtering is performed on the preprocessed signal, and bidirectional filtering is used to eliminate phase distortion to obtain the filtered signal; Step 6, Feature Backfilling and Smoothing Reconstruction: The original signal is scaled and backfilled into the pseudo-trace segment. After level alignment and fade-in processing, the final reconstructed signal is output.

2. The method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling according to claim 1, characterized in that, Step one, the specific implementation method of signal acquisition and preprocessing is as follows: High sampling rate was used to acquire evoked electromyographic signals. The stimulation trigger moment was taken as the zero point, and a complete response window containing stimulation artifacts, physiological responses, and background noise was extracted to obtain a discrete signal sequence. ,in Sampling rate N represents the total number of sample points collected in a single sampling.

3. The method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling according to claim 2, characterized in that, Step two, the specific implementation method of environmental background noise analysis is as follows: Input signal sequence The resting segment at the end contains no physiological response and only system noise and background interference; this step selects the last 20% of sampling points as the resting segment, with the starting index being [index missing]. ; ① Calculate the first-order difference sequence of the resting segment. To reflect rapid fluctuations between sampling points: ; ② Calculate the standard deviation of the difference sequence Characterizing environmental noise levels: ,in The mean of the difference sequence; ③ Construct an adaptive threshold T for subsequent artifact termination determination: ;in This is the sensitivity coefficient; This step outputs an adaptive threshold T.

4. The method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling according to claim 3, characterized in that, Step 3, the specific implementation method for locating the artifact boundary is as follows: Input: Signal The index corresponding to the minimum hidden time. , Calculated from the user-defined blank_min_ms: The index corresponding to the maximum search time , Converted from blank_limit_ms: ; and the threshold T obtained in step two: ① Calculate the global first-order difference sequence: ; ② Determine the sign of the initial slope :Pick The sign of the average of the next 5 consecutive difference points, i.e.: ; ③ In the search interval Determine the value point i within the inner circle: Calculate the local slope magnitude : Take the absolute value of the average of the three consecutive difference points after point i, that is: ; Calculate the sign of the local slope : ; Calculate historical slope reference Take the absolute value of the average of the five consecutive difference points before point i, that is: ,when ;for ,Pick ; Determine the artifact end index based on the following criteria : Condition A, polarity reversal: if and If the artifact is found to be unsuccessful, then the artifact is considered to have ended. ; Condition B, slope acceleration: if and If the artifact is found to be unsuccessful, then the artifact is considered to have ended. ; Condition C, smooth exit: if If the artifact is found to be unsuccessful, then the artifact is considered to have ended. ; Condition D, Timeout Exit: If the above condition is not triggered after searching the entire interval, then... ; in , , The preset coefficients are used, and typical values ​​are taken as follows: 0.8, 1.25, 2; Its function is to compensate for detection delay, so that the end point is moved forward by a certain number of points, avoiding the lag caused by window averaging. This step outputs the artifact end index. .

5. The method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling according to claim 4, characterized in that, Step four, the specific implementation method of shape scaling preprocessing is as follows: Input signal End index of artifacts The shape scaling factor m is preferably 0.10 to 0.

40. End point signal value at As anchor points, for pseudo-trace segments Perform linear scaling: , ,for Keep the original value unchanged, that is ; This step outputs a preprocessed signal. .

6. The method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling according to claim 5, characterized in that, Step 5, the specific implementation method of bidirectional zero-phase bandpass filtering is as follows: Input preprocessing signal ; ① Design a second-order Butterworth bandpass filter and set the lower cutoff frequency. and upper cutoff frequency It is implemented using second-order section form, and its difference equation is: ; in These are the filter coefficients; ② To eliminate phase distortion, a bidirectional zero-phase filtering technique is used: first, the input signal... Forward filtering is performed to obtain Then Time reversal Forward filtering is performed to obtain Finally Reverse it again to get the output. This process can be represented as: ; in Indicates SOS filtering operation. This represents a sequence reversal operation; This step outputs a filtered signal. .

7. The method for processing induced electromyographic artifacts based on slope acceleration detection and morphological scaling according to claim 6, characterized in that, Step six, the specific implementation method of feature backfilling and smooth reconstruction is as follows: Input signal Filtered signal End index of artifacts , Shape scaling factor m; ① Construct the original scaling backfill segment: For ,Pick: This segment retains the morphological trend of the original signal, but the amplitude has been compressed by a factor m. ② Calculate the level alignment offset This causes the end of the backfill section to interact with the filtered signal. Continuous: ; ③ Apply an offset to the backfill section to obtain the aligned backfill section: , ; ④ Replace the first segment of the filtered signal with the aligned backfill segment: , ; ⑤ To eliminate abrupt changes at the starting point, a square root fade-in weight is applied to the replaced front segment: , ; , ; for ,Keep ; This step outputs the final reconstructed signal. The signal exhibits a similar physiological morphology to the original signal in the pseudo-trace segment, with moderate amplitude, smooth start, and natural transition to subsequent filtering segments.