Self-adaptive control method and system of percutaneous nerve stimulation equipment

By setting a delayed sampling window in the percutaneous electrical nerve stimulation device to avoid the muscle contraction tremor period, and combining signal quality assessment and interpolation reconstruction, reliable blood flow monitoring and adaptive stimulation frequency adjustment were achieved under the interference of muscle contraction. This solved the problems of motion artifacts and frequency adaptability, and improved blood pumping efficiency and system reliability.

CN122006104APending Publication Date: 2026-05-12RESONANT MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RESONANT MEDICAL TECH CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing transcutaneous electrical nerve stimulation (TENS) devices cause severe motion artifacts in photoplethysmography (PPG) pulse wave signals due to mechanical tremors during muscle contraction, making it impossible to reliably obtain blood flow monitoring data. Furthermore, fixed-frequency stimulation protocols cannot adapt to differences in venous return capacity among different individuals and under different physiological conditions, resulting in low pumping efficiency or the risk of stasis.

Method used

An adaptive control method is adopted. By setting a delay time after the electrical stimulation pulse ends to shield the signal acquisition, the optical sensing module acquires the signal during the stabilization period, calculates the signal quality index, and performs interpolation fitting to reconstruct the venous blood flow waveform. The stimulation frequency and timing are adjusted according to the venous filling time to form a closed-loop adaptive control.

Benefits of technology

It effectively avoids motion artifact interference, ensures the quality of blood flow monitoring data, achieves automatic matching of stimulation frequency with the physiological rhythm of venous filling, improves pumping efficiency, reduces the risk of mis-adjustment of parameters, and enhances the robustness and safety of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122006104A_ABST
    Figure CN122006104A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical instrument control, and discloses a self-adaptive control method and system for percutaneous nerve stimulation equipment. The method comprises the following steps of: recording an electric stimulation pulse ending moment as a time sequence reference point, setting a starting moment of a sampling time window as delay time after the time sequence reference point, and shielding signal acquisition in an electric stimulation pulse duration and the delay time; the optical sensing module only collects photoelectric volume pulse wave signals in a stable period after mechanical tremor and calm of muscles; effective signal segments in adjacent sampling time windows are used as interpolation nodes to carry out interpolation fitting on the waveform in the shielded period so as to reconstruct a continuous vein blood flow waveform; and extracting the vein filling time VRT from the reconstructed waveform, and adjusting the stimulation interval time of the next period according to the deviation value between the VRT and the current stimulation period T. According to the method and the device, automatic matching of the stimulation frequency and the vein filling physiological rhythm of the user is realized while motion artifact interference is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical device technology, and in particular to adaptive control technology for transcutaneous electrical nerve stimulation devices. Background Technology

[0002] Transcutaneous electrical nerve stimulation (TENS) technology induces rhythmic muscle contractions by applying electrical stimulation pulses to target nerves, thereby promoting venous blood return through the muscle pump effect. It has wide applications in clinical and rehabilitation fields. In the prevention of deep vein thrombosis (DVT) in the lower extremities, TENS devices are typically attached to the common peroneal nerve pathway. Stimulation induces contraction of the gastrocnemius muscle, compressing the deep veins in the lower extremities and promoting venous blood return towards the heart, thus reducing the risk of thrombosis caused by prolonged bed rest or sitting. In postoperative rehabilitation, patients experience reduced venous return due to limited mobility after surgery, requiring TENS to simulate the muscle pump function during normal walking and maintain lower extremity blood circulation. In long-distance travel protection, passengers often experience venous blood pooling in the lower extremities due to prolonged sitting; portable TENS devices can be used to promote lower extremity blood circulation during travel.

[0003] In the aforementioned application scenarios, to achieve effective venous blood drainage, the intensity of electrical stimulation needs to reach a threshold level sufficient to induce visible muscle contraction. However, muscle contraction is inevitably accompanied by mechanical tremors, which cause drastic changes in the contact state between the optical sensor attached to the skin surface and the skin, thus introducing severe motion artifacts into the photoplethysmography (PPG) signal. Existing technologies typically employ signal filtering algorithms to attempt to separate the effective blood flow signal components from the contaminated acquisition data. However, because the amplitude of the motion artifacts far exceeds that of the effective blood flow signal and the two overlap in the spectrum, the filtering effect is unsatisfactory, rendering the data acquired during stimulation unusable for closed-loop feedback control.

[0004] Furthermore, most existing transcutaneous electrical nerve stimulation (TENS) devices employ a fixed-frequency stimulation output mode. However, there are significant differences in venous return capacity among individuals, and the venous filling time of the same individual can vary under different physiological states. When the stimulation frequency is too fast, the vein is squeezed again before it has fully filled, creating a dry pump effect and reducing pumping efficiency. When the stimulation frequency is too slow, the vein has already filled, but the stimulation is delayed, resulting not only in efficiency loss but also potentially increasing the risk of blood stasis. Fixed-frequency stimulation protocols cannot adaptively adjust according to the user's current physiological state, making it difficult to achieve optimal pumping effects in different individuals and usage scenarios.

[0005] Therefore, there is an urgent need for a new technical solution that can reliably acquire blood flow monitoring data under the interference of muscle contraction caused by strong electrical stimulation, and realize automatic matching of stimulation frequency with the user's venous filling physiological rhythm based on the data. Summary of the Invention

[0006] The purpose of this application is to provide an adaptive control method and system for a transcutaneous nerve stimulation device to solve the problems mentioned in the background art.

[0007] This application discloses an adaptive control method for a transcutaneous nerve stimulation device, comprising the following steps executed by a controller: S1. Control the stimulation output module to output electrical stimulation pulses according to the current stimulation cycle T, and record the pulse end time as the timing reference point; S2. Set a sampling time window, wherein the starting time of the sampling time window is the delay time after the timing reference point. The delay time To avoid the mechanical tremor period caused by muscle contraction; within the sampling time window, the optical sensing module is activated to acquire the photoplethysmography (PPG) signal; wherein, during the duration of the electrical stimulation pulse and the delay time... Within this period, signal acquisition may be blocked or data for that time period may be marked as invalid. S3. Calculate the signal quality index Q for the photoplethysmography (PPG) signals acquired within the sampling time window; when the signal quality index Q is lower than a preset quality threshold... When the current stimulation period T is maintained, the next period begins; when the signal quality index Q is not lower than the quality threshold... Then proceed to step S4; S4. Using the effective signal segments collected within adjacent sampling time windows as interpolation nodes, interpolate and fit the signal waveforms during the periods that were shielded or marked as invalid in step S2 to reconstruct continuous venous blood flow waveforms; extract the venous filling time VRT from the reconstructed venous blood flow waveforms, where the venous filling time VRT is the time interval from the trough point caused by muscle contraction to the blood volume stabilization point. S5. Calculate the periodic deviation value ,in According to the aforementioned periodic deviation value The size and direction of the stimulus will be adjusted to regulate the stimulation interval in the next cycle.

[0008] In a preferred embodiment, in step S2, the delay time The value ranges from 50 milliseconds to 200 milliseconds.

[0009] In a preferred embodiment, in step S3, the calculation method of the signal quality index Q includes at least one of the following: Calculate the signal-to-noise ratio of the photoplethysmography (PPG) signal within the sampling time window, and the quality threshold. This corresponds to the signal-to-noise ratio threshold; Calculate the baseline drift amplitude of the photoplethysmography signal within the sampling time window, and the quality threshold. This corresponds to the drift threshold; The quality threshold is used to detect whether there is a saturation point or a cutoff point in the photoplethysmography signal within the sampling time window. This corresponds to the outlier threshold.

[0010] In a preferred embodiment, in step S4, the interpolation fitting employs a piecewise linear interpolation algorithm or a spline interpolation algorithm.

[0011] In a preferred embodiment, step S4 specifically includes the following steps for extracting the venous filling time (VRT): Step S4a: Perform smoothing filtering on the reconstructed venous blood flow waveform to remove high-frequency noise; Step S4b: Identify the troughs in the reconstructed waveform caused by muscle contraction and compression. The trough point The moment when venous blood volume is at its lowest; Step S4c, from the trough point Initially, search along the positive time axis for the stable point where the waveform recovers to a steady state. The condition for determining the stable state is that the duration for which the waveform slope is continuously lower than the slope threshold reaches a preset stability determination time. Step S4d: Calculate the value from the trough point To the stable point The time difference is taken as the venous filling time VRT.

[0012] In a preferred embodiment, in step S5, the step of determining the period deviation value... The size and direction of the stimulus, and the timing of the next stimulation cycle, are adjusted accordingly, including: When the period deviation value If the value is positive and exceeds the first threshold, the current stimulation frequency is determined to be too fast, and the stimulation interval time of the next cycle is extended. When the period deviation value When the value is negative and its absolute value exceeds the second threshold, the current stimulation frequency is determined to be too slow, and the stimulation interval time of the next cycle is shortened. When the period deviation value When the absolute value does not exceed the corresponding threshold, the current stimulation period T remains unchanged.

[0013] In a preferred embodiment, in step S5, the adjustment of the stimulation interval for the next cycle employs a gradual adjustment strategy: the change in the stimulation interval for a single adjustment does not exceed a preset maximum adjustment step size. The maximum adjustment step size The value ranges from 5% to 20% of the current stimulation period T.

[0014] In a preferred embodiment, a phase-triggered optimization step is also included: When the period deviation value After the absolute value of the stimulation cycle does not exceed the corresponding threshold for several consecutive cycles and the stimulation cycle is determined to be basically matched with the venous filling time, the controller enters the phase optimization mode. In the phase optimization mode, the controller identifies the venous filling phase based on the real-time acquired photoplethysmography (PPG) signal. When the current venous blood volume is detected to be close to the peak filling value, the next electrical stimulation pulse is triggered to synchronize the stimulation time with the peak venous filling value.

[0015] In a preferred embodiment, the method for identifying the venous filling phase includes: Monitor the real-time trend of photoplethysmography (PPG) signals; When the signal amplitude changes from an upward trend to a stable trend or begins to decline, it is determined that the current moment is close to the peak of fullness. The stimulus output is triggered within a preset response time after the peak filling level is determined.

[0016] In a preferred embodiment, an abnormal state handling step is also included: When the signal quality index Q is lower than the quality threshold for N consecutive stimulation cycles When the controller determines that the sensor contact is abnormal or there is continuous interference, it will pause the adaptive adjustment of the stimulation parameters described in step S5, switch to the fixed parameter safe output mode, and output an abnormality prompt message. Where N is a preset threshold for continuous abnormal cycles, with a value ranging from 3 to 10.

[0017] This application also discloses an adaptive control system for a transcutaneous nerve stimulation device, comprising: The stimulation output module is configured to generate electrical stimulation pulse signals with adjustable period and pulse width; The optical sensing module is configured to acquire photoplethysmography (PPG) signals from the target location. The main control module is connected to both the stimulation output module and the optical sensing module. The main control module includes a timing control unit, a signal processing unit, and a parameter adjustment unit. The timing control unit is configured to: control the stimulation output module to output electrical stimulation pulses according to the current stimulation period T, record the pulse end time as a timing reference point, and control the optical sensing module to only delay time after the timing reference point. Then, a sampling time window is opened for effective data acquisition, during the duration of the electrical stimulation pulse and the delay time. Internal shielding signal acquisition or marking the data for that period as invalid; wherein the delay time Used to avoid the mechanical tremor period caused by muscle contraction; The signal processing unit is configured to: calculate a signal quality index Q on the photoplethysmography (PPG) signals acquired within the sampling time window; and when the signal quality index Q is not lower than a quality threshold... At that time, the effective signal segments collected within the adjacent sampling time window are used as interpolation nodes to perform interpolation fitting, reconstruct the continuous venous blood flow waveform, and extract the venous filling time VRT from the reconstructed waveform; The parameter adjustment unit is configured to: calculate the period deviation between the venous filling time VRT and the current stimulation cycle T. According to the said period deviation value The size and direction of the stimulus parameters are used to generate stimulation parameter adjustment instructions, which are then sent to the stimulation output module to adjust the stimulation interval time for the next cycle.

[0018] In a preferred embodiment, the main control module further includes a safety monitoring unit, which is configured to monitor continuous abnormalities in the signal quality index Q. If the signal quality index Q is below the quality threshold for N consecutive stimulation cycles... When the parameter adjustment unit is activated, the adaptive adjustment is paused and the system enters a fixed parameter safe output mode; where N is a preset continuous abnormal period threshold, with a value range of 3 to 10.

[0019] The technical solution of this application solves the technical problem that the photoplethysmography signal of the percutaneous nerve stimulation device is seriously contaminated by motion artifacts due to the mechanical vibration caused by muscle contraction induced by electrical stimulation during operation, making it unusable for closed-loop feedback control. It also solves the technical problem that the existing fixed frequency stimulation scheme cannot adapt to the differences in venous return capacity of different individuals or the same individual under different physiological states, and achieves the following technical effects.

[0020] The controller controls the stimulation output module to output electrical stimulation pulses according to the current stimulation period T and records the pulse end time as the timing reference point. This provides an accurate time reference for the subsequent sampling time window division, so that a definite timing correlation is established between the stimulation output and the signal acquisition. This is a prerequisite for realizing the subsequent timing avoidance strategy.

[0021] By setting the start time of the sampling time window as the delay time after the timing reference point. and during the duration and delay of the electrical stimulation pulse. Internal shielding of signal acquisition or marking data for that period as invalid ensures that the optical sensing module only acquires photoplethysmography (PPG) signals during the stable period after the muscle tremor subsides. This physically avoids data acquisition during the period of strongest motion artifacts at the time-domain source, obtaining high-quality blood flow monitoring data without relying on complex signal filtering algorithms. (The delay time is...) The value range is set from 50 milliseconds to 200 milliseconds, which can achieve a balance between avoiding the main mechanical tremor period and retaining sufficient effective sampling time, ensuring both the avoidance of motion artifacts and the amount of data collected to meet the needs of subsequent signal processing.

[0022] The signal quality index Q is calculated by comparing the photoplethysmography (PPG) signals collected within the sampling time window with a preset quality threshold. In comparison, the system proceeds to subsequent feature extraction steps only when the signal quality is acceptable, while maintaining the current stimulation cycle and moving to the next cycle when the signal quality is unacceptable, thus forming a signal quality gating mechanism. This mechanism, together with the timing avoidance strategy, forms a dual defense: timing avoidance reduces artifact interference at the time domain source, while quality gating filters out residual anomalies at the data level. Together, they ensure that only reliable data enters the closed-loop control process, further identifying low-quality signals caused by poor sensor contact, external interference, or other anomalies. This prevents erroneous data from entering the closed-loop control process and causing parameter mistuning, enhancing the system's robustness in complex wearing environments. The signal quality index Q is calculated using multiple methods, including signal-to-noise ratio, baseline drift amplitude, and saturation or cutoff point detection, enabling a comprehensive evaluation of signal quality from multiple dimensions and a more complete identification of various signal anomalies.

[0023] By using effective signal segments acquired within adjacent sampling time windows as interpolation nodes to interpolate and fit the signal waveform during the shielded period, a continuous venous blood flow waveform is reconstructed. This compensates for the data periodicity loss caused by the timing avoidance strategy, enabling the controller to accurately identify troughs and stable points based on the continuous waveform and extract the venous filling time (VRT) accordingly. Silent window sampling and interpolation reconstruction form a specific synergistic relationship: the former provides high-quality effective data segments as the basis for interpolation, while the latter restores waveform continuity to support feature extraction. Their cooperation allows for accurate venous filling time acquisition while avoiding motion artifacts. Piecewise linear interpolation or spline interpolation algorithms can be used for interpolation fitting, allowing for the selection of appropriate algorithms based on the system's computational resources and accuracy requirements.

[0024] The trough points were identified after smoothing and filtering the reconstructed venous blood flow waveform. Then from the trough point Begin searching along the positive time axis for the stable point where the waveform recovers to a steady state. Finally, the calculation starts from the trough point. to stable point The time difference, used as the venous filling time (VRT), forms a standardized process for extracting venous filling time, making VRT a calculable and repeatable characteristic time parameter, providing a reliable data foundation for subsequent closed-loop parameter tuning. By setting the steady-state determination condition to a duration where the waveform slope is continuously below a slope threshold for a preset stability determination time, noise misjudgment that may be caused by single-point slope determination is avoided, improving the accuracy of steady-state point identification.

[0025] By using the formula Calculate the period deviation value The stimulation interval for the next cycle is adjusted based on the magnitude and direction of this deviation, transforming the characteristic time parameter VRT, which reflects the user's current venous filling state, into a regulation command for the stimulation cycle, thus forming a closed-loop adaptive control mechanism based on physiological feedback. When the cycle deviation value... When the value is positive and exceeds the first threshold, the stimulation interval of the next cycle is extended. When the value is negative and its absolute value exceeds the second threshold, the stimulation interval of the next cycle is shortened. When the absolute value does not exceed the corresponding threshold, the current stimulation cycle remains unchanged. This threshold-based directional adjustment strategy enables the stimulation frequency to automatically track changes in the user's venous return capacity, avoiding the risk of empty pump effect caused by too fast stimulation frequency or blood stasis caused by too slow stimulation frequency, thus improving the pumping efficiency per unit of energy consumption.

[0026] By employing a gradual adjustment strategy, the variation in the stimulus interval of a single adjustment is limited to not exceeding the preset maximum adjustment step size. This avoids system oscillations or user discomfort caused by drastic changes in stimulation parameters, ensuring a smooth and gradual parameter adjustment process, allowing the stimulation cycle to converge stably to the target value that matches the venous filling time. The maximum adjustment step size is [not specified]. The value range is set to 5% to 20% of the current stimulation period T, achieving a balance between adjusting the response speed and system stability.

[0027] After the stimulation cycle is basically matched with the venous filling time, a phase optimization mode is entered. Based on the real-time acquired photoplethysmography (PPG) signal, the venous filling phase is identified, and stimulation output is triggered when the current venous blood volume is close to the peak filling time, thus synchronizing the stimulation time with the peak venous filling phase. This phase trigger optimization function and the frequency adaptive adjustment function form a progressive optimization relationship: frequency adaptive adjustment first ensures that the stimulation cycle and venous filling time are generally matched, while phase trigger optimization further precisely controls the trigger time of each stimulation based on frequency matching, ensuring that each muscle contraction acts on the vein with the largest blood volume, maximizing the blood output of a single contraction. By monitoring the real-time change trend of the PPG signal and determining that the peak filling time is approaching when the signal amplitude changes from an upward trend to a stable trend or begins to decline, the waveform phase information is transformed into an executable trigger condition, realizing the engineering implementation of phase recognition.

[0028] By monitoring continuous anomalies in the signal quality index Q, and ensuring that the signal quality index Q is below the quality threshold for N consecutive stimulation cycles. The system pauses adaptive adjustment of stimulation parameters and switches to a fixed-parameter safe output mode while simultaneously outputting an anomaly warning message. This avoids the risk of stimulation parameters deviating from the reasonable range due to continued parameter adjustment based on unreliable data under extreme conditions such as sensor malfunction or continuous interference, thus enhancing the system's reliability and safety in complex operating environments. Setting the continuous anomaly period threshold N to a range of 3 to 10 achieves a balance between anomaly response sensitivity and system stability.

[0029] By dividing the main control module into a timing control unit, a signal processing unit, and a parameter adjustment unit, the timing control unit coordinates the timing of stimulus output and sampling time windows. The signal processing unit performs signal quality assessment, interpolation reconstruction, and extraction of venous filling time. The parameter adjustment unit calculates period deviation and generates parameter adjustment commands. These units work together to form a complete closed-loop control system, facilitating modular implementation and functional expansion. By adding a safety monitoring unit to the main control module to monitor continuous signal quality anomalies and, when necessary, suspend adaptive adjustment by controlling the parameter adjustment unit, the abnormal state handling function is decoupled from the normal closed-loop control function, improving the clarity of the system architecture.

[0030] In summary, the various technical features of this application form a progressive and interdependent organic whole: the timing avoidance strategy avoids motion artifact interference at the source and provides high-quality signal segments; the quality gating mechanism filters out residual anomalies to ensure data reliability; the interpolation reconstruction algorithm compensates for data loss caused by timing avoidance and restores waveform continuity; venous filling time extraction transforms continuous waveforms into feature parameters that can be used for closed-loop control; the frequency adaptive adjustment mechanism achieves automatic matching of stimulation frequency and physiological rhythm based on these feature parameters; phase trigger optimization further precisely controls stimulation timing based on frequency matching; and the abnormal state handling mechanism provides safety assurance for the entire closed-loop control process. These technical features are not simply parallel combinations, but form a complete technical chain from "timing avoidance sampling—quality gating screening—interpolation waveform reconstruction—feature parameter extraction—frequency adaptive adjustment—phase trigger optimization—abnormal state safety assurance." Each link supports the others and is indispensable, jointly solving the technical problem of reliably acquiring blood flow monitoring data under strong motion artifact interference caused by percutaneous nerve stimulation, and achieving automatic matching of stimulation frequency and timing with the user's venous filling physiological rhythm based on this data.

[0031] The specification of this application contains numerous technical features distributed across various technical solutions. Listing all possible combinations of these technical features (i.e., technical solutions) would make the specification excessively lengthy. To avoid this problem, the various technical features disclosed in the above-described invention, the various technical features disclosed in the following embodiments and examples, and the various technical features disclosed in the accompanying drawings can be freely combined to form various new technical solutions (all of which are considered to have been described in this specification), unless such a combination of technical features is technically infeasible. For example, one example discloses feature A+B+C, and another example discloses feature A+B+D+E. Features C and D are equivalent technical means that serve the same function, and technically only one needs to be used; they cannot be used simultaneously. Feature E can technically be combined with feature C. Therefore, the solution A+B+C+D should not be considered as described because it is technically infeasible, while the solution A+B+C+E should be considered as described. Attached Figure Description

[0032] Figure 1 This is an overall flowchart of the adaptive control method for transcutaneous nerve stimulation based on the synchronization of venous filling cycle according to an embodiment of this application.

[0033] Figure 2 This is a schematic diagram illustrating the timing relationship between stimulation pulse output, sampling window control, and photoplethysmography signal acquisition according to an embodiment of this application.

[0034] Figure 3This is a functional block diagram of the adaptive control system of the transcutaneous nerve stimulation device according to an embodiment of this application. Detailed Implementation

[0035] In the following description, many technical details are presented to help the reader better understand this application. However, those skilled in the art will understand that the technical solutions claimed in this application can be implemented even without these technical details and various variations and modifications based on the following embodiments.

[0036] Explanation of some concepts: Transcutaneous electrical nerve stimulation (TENS) is a technique that uses electrodes attached to the skin to apply electrical stimulation pulses to a target nerve in order to induce a contraction response in the corresponding muscle.

[0037] Photoplethysmography (PPG) is a non-invasive detection technique that uses photoelectric methods to detect changes in blood volume in living tissue. When a light beam of a specific wavelength shines on the skin surface, the beam is transmitted to a photodetector through transmission or reflection. Because the blood volume in the skin changes pulsatilely, the intensity of the light detected by the detector changes accordingly, thus reflecting the fluctuations in blood volume in the microvascular bed or veins.

[0038] Photoplethysmography (PPG) signal refers to an electrical signal that reflects changes in local tissue blood volume, acquired by an optical sensor. Its waveform changes reflect the dynamic changes in blood volume, and in this application it is used to monitor venous blood flow status.

[0039] The stimulation period (T) is the time interval between two consecutive electrical stimulation pulses, and its reciprocal corresponds to the stimulation frequency.

[0040] The timing reference point refers to the moment when the electrical stimulation pulse ends. It serves as a zero-point reference for internal timing and timing control of the system and is used to determine the opening time of the subsequent sampling time window.

[0041] Delay time ( ( ) refers to the time interval between the start of timing from the time reference point and the start of the sampling time window, used to wait for the mechanical contraction and subsequent tremor subsidence of the muscle after electrical stimulation.

[0042] The sampling time window refers to the time interval from the end of the delay period to the output of the next electrical stimulation pulse, during which the optical sensing module performs effective signal acquisition.

[0043] The silent window refers to the time interval during which the controller blocks signal acquisition or marks the data of that period as invalid during the duration of the electrical stimulation pulse and the delay period, in order to avoid strong motion artifact interference.

[0044] Silent window sampling refers to a strategy that shields signal acquisition during the duration of the electrical stimulation pulse and the delay period, or marks the data for that period as invalid, and only collects valid data within the sampling time window after the delay period ends.

[0045] Motion artifacts refer to interference components introduced into the photoplethysmography signal due to changes in the contact state between the optical sensor and the skin caused by mechanical vibrations resulting from muscle contraction.

[0046] Interpolation fitting refers to a processing method that uses known effective signal segments as nodes and mathematical algorithms (such as linear interpolation, spline interpolation, etc.) to estimate and complete the signal waveform in unknown regions. In this application, it is used to recover waveform data missing due to silent windows.

[0047] Venous filling time (VRT) refers to the time interval required for venous blood to recover from its minimum volume state after being emptied by a muscle pump to its steady volume state, reflecting the user's current venous return capacity. In a photoplethysmography (PPG) waveform, it is represented by the time difference between the trough and the steady point.

[0048] trough point ( ( ) refers to the lowest point of blood volume caused by muscle contraction and squeezing in the photoplethysmography signal or reconstructed venous blood flow waveform, corresponding to the state after the muscle contraction squeezes the blood out of the vein.

[0049] Stable point ( The term "stable point" refers to the characteristic point where the waveform rises and tends to stabilize from the trough point. The determination condition is that the duration for which the waveform slope is continuously lower than the slope threshold reaches the preset stability determination time.

[0050] Periodic deviation value ( ), refers to the difference between the venous filling time (VRT) and the current stimulation cycle (T). This is used to determine the degree of matching between the stimulation frequency and the user's venous filling physiological rhythm, as well as the direction of adjustment.

[0051] The empty pump effect refers to the phenomenon that when the stimulation frequency is too fast, the vein is squeezed again by the next muscle contraction before it has completed filling with blood, resulting in a significant reduction in the amount of blood pumped out per contraction and low pumping efficiency.

[0052] Signal quality index (Q) refers to a quantitative parameter used to evaluate the reliability of photoplethysmography (PPG) signals acquired within a sampling time window. It may include dimensions such as signal-to-noise ratio, baseline drift amplitude, and the number of saturation or cutoff points.

[0053] The gradual adjustment strategy refers to limiting the change in a single adjustment to no more than the preset maximum adjustment step size when adjusting stimulus parameters, in order to avoid system instability caused by drastic parameter jumps.

[0054] Phase optimization mode refers to the working mode that is entered after the stimulation cycle is basically matched with the venous filling time. In this mode, the stimulation output is triggered when the venous blood volume is detected to be close to the peak filling time, so as to maximize the blood output of a single contraction.

[0055] The stimulation interval, which has the same meaning as the stimulation period T, refers to the time interval between two adjacent electrical stimulation pulse outputs. In this application, the two can be used interchangeably.

[0056] The following is a brief summary of some of the innovative aspects of this application: In summary, the technical solution of this application is not simply a patchwork of known techniques, but rather a systematic solution that creatively proposes a “interdependent approach of temporal avoidance and algorithmic reconstruction, and a progressive approach of quality gating and closed-loop parameter tuning” based on a deep understanding of the motion artifact interference mechanism during transcutaneous nerve stimulation.

[0057] Specifically, existing technologies, when dealing with motion artifacts caused by muscle contractions induced by electrical stimulation, typically employ signal filtering algorithms to attempt to separate the effective components from the contaminated acquisition data. However, since the amplitude of motion artifacts introduced by muscle tremors can often be several times or even higher than the amplitude of the effective blood flow signal, and their spectral characteristics significantly overlap with those of the effective blood flow signal, the conventional "acquisition first, then filtering" approach is difficult to achieve ideal separation results in practice. The inventors of this application recognized that rather than relying on algorithms for remedial processing after signal acquisition, it is better to adopt a proactive avoidance strategy in the time domain, i.e., by setting the start time of the sampling time window to the end time of the electrical stimulation pulse (time series reference point). Delay time after ) and during the duration and delay of the electrical stimulation pulse. The internal shielding signal acquisition or marking the data for that period as invalid will enable the optical sensing module to effectively acquire photoplethysmography (PPG) signals only during the stable period after the muscle tremor has subsided.

[0058] However, the inventors further realized that while the aforementioned timing avoidance strategy effectively mitigated the interference of motion artifacts, it came at the cost of periodic data gaps within each stimulus cycle. If waveform analysis were performed solely based on discontinuous signal segments, it would be impossible to accurately identify the points of origin and destination. to stable point The complete venous filling process is obscured, making it impossible to extract the venous filling time (VRT) used as the basis for closed-loop control. To address this, this application creatively introduces an interpolation fitting reconstruction mechanism. It utilizes effective signal segments acquired within adjacent sampling time windows as interpolation nodes to perform piecewise linear interpolation or spline interpolation to complete the waveform during the shielded period, thereby reconstructing a continuous venous blood flow waveform. It can be seen that the silent window sampling in step 200 and the interpolation fitting reconstruction in step 400 are not independent techniques, but rather have a close causal relationship: it is precisely because the temporal avoidance in step 200 leads to data loss that the interpolation reconstruction in step 400 must be introduced to restore waveform integrity; and the accurate completion of the waveform by the interpolation reconstruction in step 400 depends on the high-quality effective signal segments provided in step 200 as reliable interpolation nodes. This synergistic approach of "physical temporal avoidance creating data gaps, and algorithmic interpolation reconstruction filling data gaps" allows this application to both avoid motion artifact interference at the source and obtain continuous waveforms for feature extraction; the two are mutually causal and indispensable.

[0059] Furthermore, considering that even with a silent window sampling strategy, low-quality signals may still be obtained under abnormal conditions such as loose sensor attachment or external light source interference, this application adds a signal quality evaluation step before the feature extraction step. This step calculates the signal quality index Q (which may include dimensions such as signal-to-noise ratio, baseline drift amplitude, number of saturation points or cutoff points, etc.) and compares it with a preset quality threshold. The process involves comparison, with subsequent interpolation reconstruction and venous filling time (VRT) extraction only proceeding if the signal quality is satisfactory. Otherwise, the current stimulation cycle T remains unchanged, and the process directly moves to the next cycle. This quality gating mechanism and timing avoidance strategy form a dual defense: the former reduces artifact interference at the temporal source, while the latter filters out residual anomalies at the data level. Together, they ensure that only reliable data enters the closed-loop control process.

[0060] After obtaining the venous filling time (VRT), this application calculates the cycle deviation value. ( The stimulation interval for the next cycle is adjusted based on the magnitude and direction of the stimulation, achieving adaptive tracking of the stimulation frequency to the user's venous filling physiological rhythm. This closed-loop regulation mechanism, together with the aforementioned temporal avoidance, quality gating, and interpolation reconstruction, forms a complete causal chain: temporal avoidance provides a sampling environment with low artifact interference, quality gating ensures data reliability, interpolation reconstruction restores waveform continuity and supports accurate extraction of the venous filling time (VRT), and VRT, as the core feedback quantity of the closed-loop regulation, drives the adaptive adjustment of the stimulation period T. These technical features are not simply parallel relationships, but rather form an interdependent and progressively layered organic whole.

[0061] In summary, the technical solution of this application is a systematic technical solution formed by the inventors based on in-depth analysis of the motion artifact interference mechanism and the physiological rhythm characteristics of venous filling during percutaneous nerve stimulation. It is achieved by organically combining temporal avoidance strategy, interpolation reconstruction algorithm, quality gating mechanism and closed-loop adaptive adjustment. There are close internal correlations and synergistic relationships among the various technical features. Together, they solve the technical problem of reliably acquiring blood flow monitoring data under the interference of muscle contraction caused by strong electrical stimulation and realizing automatic matching of stimulation frequency and physiological rhythm based on the data. This technical solution is not an obvious choice that those skilled in the art could easily think of when facing the above-mentioned technical problems.

[0062] Furthermore, through long-term in-depth research, the inventors of this application have discovered that the root cause of the technical dilemma of blood flow monitoring failure during percutaneous electrical nerve stimulation is not simply attributed to motion artifacts interfering with signal acquisition, but rather to a deeper technical paradox: to achieve effective venous emptying, high-intensity electrical stimulation sufficient to induce muscle tetanic contraction must be applied; however, the violent tremors accompanying this mechanical contraction inevitably lead to transient decoupling between the attached optical sensor and the skin contact interface, thereby introducing motion artifacts with amplitudes far exceeding the effective blood flow signal. Through analysis of numerous practical cases, the inventors found that the amplitude of motion artifacts induced by muscle contraction can typically be several times or even higher than the effective blood flow signal amplitude, and its spectral characteristics significantly overlap with the effective blood flow signal. It is precisely because of this significant difference in amplitude and spectral overlap that the commonly used "acquisition first, then filtering" signal processing path in existing technologies struggles to achieve ideal separation results in practice.

[0063] Further analysis revealed that instead of relying on complex filtering algorithms for remedial processing after signal acquisition, it was better to address the problem at its source—actively avoiding the period of strongest motion artifacts in the time domain. Through in-depth research into the mechanical characteristics of muscle contraction, the inventors discovered that the mechanical contraction and subsequent tremors produced by muscles after electrical stimulation have specific temporal characteristics, with the main energy release concentrated within a certain time range after the end of the electrical stimulation pulse. Based on this discovery, the inventors creatively proposed a temporal avoidance strategy: using the end of the electrical stimulation pulse as a temporal reference point, a delay time is set to form a silent window. Within this silent window, signal acquisition is blocked or the data for that period is marked as invalid, thereby physically preventing high-amplitude motion artifacts from entering the signal acquisition link.

[0064] However, the inventors also recognized during their research that while the aforementioned temporal avoidance strategy could avoid the interference of motion artifacts at the source, it came at the cost of periodic data gaps within each stimulation cycle. Through repeated experiments and theoretical derivation, the inventors realized that if waveform analysis were performed solely based on these discontinuous signal segments, it would be impossible to accurately identify the complete venous filling process from the trough to the stable point, and thus impossible to extract the venous filling time used as the basis for closed-loop control. This constitutes the core technical contradiction faced by this application: temporal avoidance effectively avoids artifacts, but it also leads to incomplete waveform data for feature extraction.

[0065] After in-depth consideration, the inventors creatively proposed that effective signal segments acquired within adjacent sampling time windows can be used as interpolation nodes to perform algorithmic-level completion and reconstruction of data gaps during the shielded period. Thus, the inventors deeply understand the close causal relationship between timing avoidance and interpolation reconstruction: it is precisely because the timing avoidance strategy leads to data loss that interpolation reconstruction must be introduced to restore waveform integrity; and the accurate completion of the waveform by interpolation reconstruction depends on the high-quality effective signal segments provided by the timing avoidance strategy as reliable interpolation nodes. These two aspects are mutually causal and indispensable, together constituting the core technical concept of this application.

[0066] More importantly, the inventors recognized that even with the aforementioned timing avoidance strategy, low-quality signals could still be acquired under abnormal conditions such as loose sensor attachment or external light source interference. Therefore, the inventors further proposed adding a signal quality assessment mechanism as a second line of defense before feature extraction, forming a dual guarantee with the timing avoidance strategy to ensure that only reliable data enters the closed-loop control process. After obtaining reliable venous filling time characteristic parameters, the deviation between these parameters and the current stimulation cycle is calculated to drive adaptive adjustments of the stimulation parameters, thereby achieving automatic tracking of the stimulation frequency to the user's venous filling physiological rhythm.

[0067] Based on the above in-depth research, the inventors of this application propose an innovative technical solution: by establishing a timing coordination mechanism for stimulation output and signal acquisition with a timing reference point as the core, and adopting a collaborative strategy of "physical timing avoidance to avoid artifact acquisition and algorithmic interpolation reconstruction to restore waveform continuity", the venous filling time can be accurately extracted while ensuring signal quality, thereby achieving closed-loop adaptive matching between stimulation frequency and physiological rhythm.

[0068] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings. It should be noted that the following embodiments are only for explaining this application and are not intended to limit the scope of protection of this application. Those skilled in the art, after reading this specification, can make various equivalent transformations and modifications without departing from the technical concept of this application.

[0069] Example 1: Basic Adaptive Control Method This embodiment provides an adaptive control method for a percutaneous nerve stimulation device. The core idea of ​​this method is to establish a timing coordination mechanism between stimulation output and signal acquisition, obtain effective blood flow monitoring data while avoiding motion artifact interference, and then achieve closed-loop adaptive adjustment of stimulation parameters based on venous filling time.

[0070] Before describing the specific steps, it is necessary to explain the technical problem that this application aims to solve. Percutaneous electrical nerve stimulation (PENS) induces rhythmic contractions of corresponding muscles by stimulating the target nerve. These muscle contractions produce mechanical tremors, causing changes in the contact state between the optical sensor attached to the skin surface and the skin. This change introduces severe motion artifacts into the photoplethysmography (PPG) signal, with amplitudes typically several times or even higher than the effective blood flow signal. Traditional signal filtering methods struggle to effectively separate such strong artifact components from the real blood flow signal, rendering the data acquired during stimulation unusable for closed-loop feedback control. This application employs a timing avoidance strategy to mitigate motion artifact interference at its source, providing a reliable data foundation for subsequent closed-loop control.

[0071] See Figure 1 and Figure 2 The specific steps in this embodiment are as follows: Step 100: Stimulus Output and Timing Marking The purpose of this step is to establish a timing reference for the stimulus output, providing a reference for subsequent sampling window division. Specifically, the controller controls the stimulus output module to output electrical stimulation pulses according to the current stimulation period T, and records the end time of the pulse as the timing reference point.

[0072] The current stimulation period T refers to the time interval between two consecutive electrical stimulation pulse outputs. Upon initial system startup or reset, the current stimulation period T can use a preset initial value. Optionally, the typical range of the initial stimulation period T is 800 milliseconds to 1200 milliseconds, which can be preset according to the target application scenario and the physiological characteristics of the target population.

[0073] The parameters of the electrical stimulation pulse include pulse width and current amplitude. The pulse width is typically set within a range that effectively activates the target nerve. Optionally, the typical pulse width range is 200 microseconds to 500 microseconds. The current amplitude needs to be adjusted according to individual differences to reach a threshold level that can induce visible muscle contraction.

[0074] The technical significance of recording the pulse end time as a timing reference point lies in the fact that muscles only begin to contract after the electrical stimulation pulse ends, subsequently entering the mechanical tremor phase. Therefore, using the pulse end time as a timing reference point allows for the accurate calculation of the duration range of the mechanical tremor phase, thereby precisely defining the time interval requiring shielded sampling.

[0075] Step 200: Silent Window Sampling This step is one of the core innovations of this application. Its purpose is to use a temporal avoidance strategy to collect data during the stable period after the muscle mechanical tremor subsides, thereby avoiding the period of strongest motion artifacts at the physical level.

[0076] In practice, the controller sets a sampling time window, the start time of which is the delay time after the timing reference point. Delay time The purpose of this setting is to avoid the mechanical tremor phase caused by muscle contraction. The mechanical contraction and subsequent tremor generated after muscle electrical stimulation require a certain amount of time to complete the main energy release and stabilize. Delay time The value range is from 50 milliseconds to 200 milliseconds. This range is determined based on the fact that the main energy release of muscle mechanical tremors is usually completed within 50 to 150 milliseconds, and setting a delay time of no less than 50 milliseconds can ensure that the main tremor period is avoided; at the same time, setting a delay time of no more than 200 milliseconds can ensure that sufficient effective sampling time is retained within the normal stimulation cycle, and avoid affecting data quality due to an excessively short sampling window.

[0077] Within the sampling time window, the controller activates the optical sensing module to acquire the photoplethysmography (PPG) signal. The optical sensing module typically includes a light-emitting element and a photodetector. The light-emitting element emits light of a specific wavelength into the skin tissue, and the photodetector receives the light signal reflected or transmitted from the tissue. Changes in blood volume within the tissue cause alterations in light absorption characteristics, resulting in a pulsatile component related to blood volume changes in the signal output by the photodetector—the PPG signal.

[0078] More specifically, during the duration and delay of the electrical stimulation pulse. Within this period, the controller either blocks signal acquisition or marks the data for that time period as invalid. This approach ensures that subsequent signal processing steps only use high-quality data acquired during the stable period, avoiding the impact of motion artifacts on the accuracy of feature extraction. Blocking signal acquisition can be implemented in hardware, such as disabling the analog-to-digital converter during that period; or in software, such as acquiring data normally but discarding or marking the data for that period as invalid during processing.

[0079] The sampling time window can be set to end at a preset time point before the next electrical stimulation pulse output to ensure that the sampling process does not conflict with the stimulation output. Optionally, the sampling time window ends 30 to 50 milliseconds before the next electrical stimulation pulse output.

[0080] It should be noted that there is a close temporal coordination between steps 100 and 200. The temporal reference point recorded in step 100 is the starting point for defining the sampling time window in step 200. This precise temporal control based on the pulse end time allows the sampling window to be accurately positioned within the stable period after the mechanical tremor subsides, which is the key to this application's ability to acquire effective blood flow signals during stimulation.

[0081] Step 300: Signal Quality Assessment The purpose of this step is to check the quality of the acquired signals before feature extraction, so as to prevent low-quality signals caused by poor sensor contact, external interference or other abnormalities from entering the subsequent parameter adjustment process, thereby improving the robustness of the system.

[0082] In practice, the controller calculates the signal quality index Q for the photoplethysmography (PPG) signals acquired within the sampling time window. When the signal quality index Q is lower than a preset quality threshold... If the signal is deemed unusable in the current cycle, the controller skips subsequent feature extraction steps, maintains the current stimulation cycle T, and proceeds to the next cycle. This applies when the signal quality index Q is not lower than the quality threshold. If the signal quality is deemed acceptable, proceed to step 400 to continue execution.

[0083] The signal quality index Q can be calculated using one or more of the following methods in combination. The first method is to calculate the signal-to-noise ratio (SNR) of the photoplethysmography (PPG) signal within the sampling time window; in this case, the quality threshold is... This corresponds to the signal-to-noise ratio (SNR) threshold. The SNR is calculated as follows: First, bandpass filter the sampled data, extract the dominant frequency component of the pulse wave as an estimate of the signal power, and use the filtered high-frequency residual as an estimate of the noise power. The logarithm of the ratio of these two values ​​is then calculated as the SNR. Typically, the SNR threshold is between 8 and 12 dB.

[0084] The second method involves calculating the baseline drift amplitude of the photoplethysmography (PPG) signal within the sampling time window, at which point the quality threshold is determined. This corresponds to the drift threshold. Baseline drift is typically caused by relative motion between the sensor and the skin; severe baseline drift can mask the true characteristics of the blood flow signal. The amplitude of baseline drift can be assessed by calculating the ratio of the change in the DC component of the signal to the amplitude of the AC component. Optionally, a typical drift threshold is 0.3 to 0.5, meaning the baseline drift amplitude does not exceed 30% to 50% of the AC component amplitude.

[0085] The third method involves detecting whether there is a saturation point or cutoff point in the photoplethysmography (PPG) signal within the sampling time window, at which point the quality threshold is determined. This corresponds to the outlier threshold. A saturation point is a sampling point where the signal amplitude reaches the upper limit of the analog-to-digital converter's range, while a cutoff point is a sampling point where the signal amplitude reaches the lower limit of the range. The appearance of these outliers indicates problems such as improper gain settings or poor sensor placement in the signal acquisition link. The outlier threshold can be set as the upper limit of the proportion of saturation points or cutoff points to the total number of sampling points. A typical value for the outlier threshold is 3% to 5%, meaning that the total number of saturation points and cutoff points should not exceed 3% to 5% of the total number of sampling points.

[0086] In practical applications, a single indicator or a comprehensive evaluation using multiple indicators can be selected based on the system's reliability requirements. When using a comprehensive evaluation using multiple indicators, the signal quality is deemed acceptable only if all indicators meet their corresponding threshold conditions. This multi-dimensional quality assessment mechanism can more comprehensively identify various signal anomalies, further improving the system's robustness.

[0087] There is a functional progression between steps 300 and 200. Step 200 reduces motion artifact interference at the source through a timing avoidance strategy, but under certain abnormal conditions (such as sensor loosening, external impact, etc.), the signal acquired even within the silent window may still have quality issues. The signal quality assessment mechanism in step 300 acts as a second line of defense, ensuring that parameter adjustments are only performed when the data is indeed reliable, preventing misjudgments and incorrect parameter tuning caused by erroneous data.

[0088] Step 400: Signal Reconstruction and Feature Extraction The purpose of this step is to reconstruct the complete venous blood flow waveform based on the effective signal segments acquired in step 200, and to extract key feature parameters reflecting the venous filling state from it.

[0089] Because of the duration and delay time of the electrical stimulation pulse in step 200 The signals within the waveform were shielded, resulting in data gaps between the acquired valid signal segments. To extract feature parameters from the continuous waveform, it is necessary to complete the signal waveform during the shielded period. In practice, the controller uses valid signal segments acquired within adjacent sampling time windows as interpolation nodes to interpolate and fit the signal waveform during the shielded or marked invalid periods in step 200, reconstructing the continuous venous blood flow waveform.

[0090] Interpolation fitting can employ either piecewise linear interpolation or spline interpolation. Piecewise linear interpolation is computationally simple and suitable for scenarios with high real-time requirements; spline interpolation yields smoother reconstructed waveforms and is suitable for scenarios with high waveform detail requirements. Taking spline interpolation as an example, cubic spline interpolation can be used. Several data points from the end of the previous sampling window and several data points from the beginning of the current sampling window are selected as interpolation nodes. The coefficients of the spline function are calculated, and the waveform in the blank areas is then filled in. Specifically, 3 to 5 data points from the end of the previous sampling window and 3 to 5 data points from the beginning of the current sampling window are selected as interpolation nodes.

[0091] After obtaining the reconstructed continuous venous blood flow waveform, the venous filling time (VRT) needs to be extracted. VRT is defined as the time interval from the trough caused by muscle contraction to the point of stable blood volume. This parameter reflects the time required for the vein to refill to a steady state after muscle contraction squeezes out venous blood, and is an important indicator of venous return capacity.

[0092] Furthermore, the specific steps for extracting venous filling time (VRT) can be further subdivided into the following sub-steps.

[0093] Step 410: Perform smoothing filtering on the reconstructed venous blood flow waveform to remove high-frequency noise. Smoothing filtering can employ moving average filtering, low-pass filtering, or other appropriate filtering methods. The purpose of filtering is to eliminate random noise and glitches in the waveform, making the identification of troughs and stable points more accurate and reliable. A second-order Butterworth low-pass filter with a cutoff frequency of 5Hz to 10Hz can be used, or a moving average filter with a window length of 5 to 10 sampling points can be used.

[0094] Step 420: Identify the troughs in the reconstructed waveform caused by muscle contraction and compression. Trough point This corresponds to the moment when venous blood volume is at its lowest, i.e., the moment when blood volume reaches its minimum value after muscle contraction squeezes blood out of the vein. The identification of trough points can be achieved by searching for local minima of the waveform amplitude.

[0095] Step 430: From the trough point Initially, search along the positive time axis for the stable point where the waveform recovers to a steady state. The condition for determining a stable state is that the waveform slope remains below a slope threshold for a preset stability determination duration. In other words, when the waveform's rise rate remains at a low level for a period of time, the venous blood volume can be considered to have stabilized. The slope threshold can be set to 5% to 10% of the maximum rise slope of the waveform, and the stability determination duration can be set to 30 milliseconds to 80 milliseconds.

[0096] Step 440: Calculate from the trough point to stable point The time difference is used as the venous filling time (VRT).

[0097] It is important to emphasize that step 400 has a data dependency with the preceding steps. The interpolation fitting in step 400 relies on the valid signal segments provided in step 200, the quality of which has been verified in step 300. Only after the timing avoidance in step 200 and the quality screening in step 300 can step 400 obtain a reliable data basis, thereby accurately extracting the venous filling time (VRT). This synergistic cooperation between steps is key to achieving closed-loop control during stimulation in this application.

[0098] More importantly, steps 200 and 400 form a close technical synergy. The silent window sampling strategy in step 200 avoids motion artifacts through temporal avoidance, but at the cost of causing periodic data gaps. The interpolation fitting in step 400 is precisely the technical means introduced to compensate for this gap. The two are mutually causal and indispensable: without the temporal avoidance in step 200, high-quality effective data segments cannot be obtained; without the interpolation reconstruction in step 400, complete venous filling time cannot be extracted from discontinuous data segments. This combined strategy of "physical temporal avoidance + algorithmic data reconstruction" is the core innovation of this application that distinguishes it from existing technologies.

[0099] Step 500: Adaptive Adjustment of Stimulation Parameters The purpose of this step is to adaptively adjust the stimulation parameters based on the relationship between the extracted venous filling time (VRT) and the current stimulation cycle (T), so that the stimulation frequency matches the user's current venous filling physiological rhythm.

[0100] In practice, the controller first calculates the period deviation value. The calculation formula is as follows: (Formula 1) in, The period deviation value represents the difference between the venous filling time and the current stimulation cycle, used to determine whether the stimulation frequency matches the physiological rhythm; VRT is the venous filling time, which is the time interval from the trough caused by muscle contraction to the stable blood volume point, reflecting the time required for venous blood to refill; T is the current stimulation cycle, which is the time interval between two adjacent electrical stimulation pulse outputs.

[0101] Then, the controller determines the periodic deviation value. The magnitude and direction of the stimulus will influence the stimulation interval in the next cycle. The specific adjustment strategy is as follows: When the period deviation value When the value is positive and exceeds the first threshold, it indicates that VRT is greater than T, meaning the venous filling time is longer than the current stimulation cycle. This means that the vein is stimulated again before it is fully filled, which may create a pump-drying effect (i.e., the vein is squeezed again before it is fully filled), reducing pumping efficiency. At this time, the controller determines that the current stimulation frequency is too fast and extends the stimulation interval of the next cycle.

[0102] When the period deviation value When the value is negative and its absolute value exceeds the second threshold, it indicates that VRT is less than T, meaning the venous filling time is shorter than the current stimulation cycle. This means the vein has filled but the stimulation has not yet arrived, resulting in efficiency loss and an increased risk of blood stasis. At this point, the controller determines that the current stimulation frequency is too slow and shortens the stimulation interval for the next cycle.

[0103] When the period deviation value When the absolute value does not exceed the corresponding threshold, it indicates that the current stimulation cycle and the venous filling time are basically matched, and the controller maintains the current stimulation cycle T unchanged.

[0104] Optionally, the typical range for the first and second thresholds is 30 milliseconds to 80 milliseconds. The first and second thresholds can be the same, or they can be set to different values ​​depending on the application requirements.

[0105] Furthermore, the stimulation interval can be adjusted gradually to avoid system instability or user discomfort caused by drastic parameter changes. Specifically, the change in stimulation interval in a single adjustment should not exceed the preset maximum adjustment step size. Maximum adjustment step size The value of is between 5% and 20% of the current stimulation period T. This gradual adjustment strategy ensures that the system can smoothly converge to a stimulation frequency that matches the physiological rhythm, avoiding the risk of oscillation caused by over-adjustment.

[0106] For example, assuming the current stimulation period T is 1000 milliseconds, and the venous filling time VRT calculated in step 400 is 850 milliseconds, then according to Formula 1, the period deviation value... This equals 850 minus 1000, which is -150 milliseconds. If the second threshold is set to 50 milliseconds, because... If the absolute value of 150 milliseconds is greater than the second threshold of 50 milliseconds, the controller determines that the current stimulation frequency is too slow. If the maximum adjustment step size... If the interval is set to 10% of the current cycle, or 100 milliseconds, then the maximum time that can be shortened in a single cycle is 100 milliseconds. Therefore, the stimulation interval for the next cycle is adjusted to 900 milliseconds.

[0107] Step 500 is the core of the closed-loop control in this application, forming a complete feedback loop with the preceding steps. Steps 100 to 400 provide step 500 with the characteristic parameter VRT reflecting the current venous filling state. Step 500 generates adjustment instructions for the stimulation parameters based on this parameter, and the adjusted stimulation parameters will be executed in step 100 of the next cycle, forming a closed loop. This adaptive adjustment mechanism based on physiological feedback allows the stimulation frequency to automatically track changes in an individual's venous return capacity, offering significant advantages compared to fixed-frequency stimulation.

[0108] Step 600: Execute repeatedly After completing step 500, the controller returns to step 100 and continues the closed-loop control process for the next stimulation cycle. Through continuous iterative cycles, the stimulation cycle will gradually converge to a value that matches the current venous filling time, achieving frequency adaptation.

[0109] The following describes an enhanced implementation with phase-triggered optimization as an example. In this example, a phase-triggered optimization function is added to the first embodiment to further improve pumping efficiency. In the first embodiment, the stimulation output follows a fixed cycle. Even though this cycle is matched with the venous filling time, the specific timing of each stimulation trigger is still fixed, rather than precisely synchronized with the phase of venous filling. This embodiment introduces a phase synchronization mechanism on top of frequency matching, ensuring that each stimulation occurs precisely at the moment when the venous blood volume reaches its peak filling value, thereby maximizing the blood output of a single muscle contraction.

[0110] The entry condition for the phase-triggered optimization step is: when the period deviation value calculated in step 500... When the absolute value of the signal does not exceed the corresponding threshold for multiple consecutive cycles, it is determined that the stimulation cycle and the venous filling time are basically matched, and the controller enters the phase optimization mode. Optionally, the typical value of "multiple consecutive cycles" is 3 to 5 cycles.

[0111] In phase optimization mode, the controller no longer strictly triggers stimulation according to a fixed cycle, but instead identifies the venous filling phase based on real-time acquired photoplethysmography (PPG) signals. When the current venous blood volume is detected to be close to the peak filling value, the controller triggers the next electrical stimulation pulse output, synchronizing the stimulation time with the peak venous filling phase.

[0112] The specific method for identifying the venous filling phase is as follows: The controller continuously monitors the real-time trend of the photoplethysmography (PPG) signal and can calculate the short-term rate of change of the signal amplitude using a sliding window analysis method. When the signal amplitude changes from an upward trend to a stable trend or begins to decline, it is determined that the current moment is close to the filling peak. The specific judgment condition can be set as follows: the average slope of the signal in the previous time period is positive, while the average slope of the signal in the current time period is close to zero or turns negative. Optionally, the length of the sliding window can be set from 50 milliseconds to 100 milliseconds.

[0113] After determining that the peak filling time is approaching, the controller triggers the stimulus output within a preset response time. Optionally, the typical value of the preset response time is 10 milliseconds to 30 milliseconds to ensure that the phase error between the stimulus timing and the peak filling time is minimized.

[0114] The phase-triggered optimization function complements the frequency adaptive adjustment function in Example 1. Frequency adaptive adjustment ensures that the stimulation cycle and venous filling time are generally matched, while phase-triggered optimization further refines the triggering time of each stimulation. Phase synchronization is only meaningful when the frequencies are basically matched; if the frequency deviation is too large, even phase alignment cannot achieve the optimal pumping effect. Therefore, frequency adaptive adjustment and phase-triggered optimization form a progressive optimization strategy.

[0115] The following exemplarily illustrates a robust implementation that includes exception handling.

[0116] In this example, an abnormal state handling function is added based on the first embodiment to further enhance the reliability and security of the system in complex usage environments.

[0117] The abnormal state handling steps address situations where signal quality remains consistently unacceptable. Although the silent window sampling strategy in step 200 and the signal quality assessment mechanism in step 300 are effective in handling most interference situations, in certain extreme cases (such as complete sensor detachment or continuous violent movement), a acceptable signal may not be acquired for several consecutive cycles. In this case, if the system continues to attempt adaptive adjustment, it will not only fail to obtain the correct adjustment result but may also affect its performance due to the prolonged inability to execute normal control logic.

[0118] In practice, the controller monitors for continuous anomalies in the signal quality index Q. If the signal quality index Q is below a quality threshold for N consecutive stimulation cycles... When the controller determines that the sensor contact is abnormal or there is continuous interference, it performs the following actions: suspends the adaptive adjustment function of the stimulation parameters described in step 500, locks the stimulation parameters to the current value or switches to the preset fixed parameter safe output mode; at the same time, it outputs an abnormality prompt message to prompt the user to check the sensor attachment status or adjust the wearing position.

[0119] Wherein, N is a preset threshold for continuous abnormal cycles, ranging from 3 to 10. The setting of this threshold requires a trade-off between sensitivity and stability: a threshold that is too small may cause the system to be overly sensitive to occasional signal fluctuations, frequently entering safe mode and affecting normal use; a threshold that is too large may delay response even if the sensor has actually detached, affecting the reliability of the system.

[0120] Furthermore, once the system enters the fixed-parameter safe output mode, the controller can continue to monitor signal quality. The system will continue to monitor signal quality until the signal quality returns to normal and the signal quality index Q remains above the quality threshold for several consecutive cycles. When this occurs, the system can automatically exit safe mode and resume adaptive adjustment. Optionally, the number of consecutive qualified cycles required to exit safe mode can be set to 2 to 5 cycles.

[0121] The following describes an exemplary implementation of the system.

[0122] In this example, an adaptive control system for a transcutaneous nerve stimulation device is provided, which is used to perform the steps of the method described in Embodiment 1 above.

[0123] The system comprises a stimulation output module, an optical sensing module, and a main control module. The stimulation output module is configured to generate electrical stimulation pulse signals with adjustable period and pulse width. The optical sensing module is configured to acquire photoplethysmography (PPG) signals from the target site. The main control module is connected to both the stimulation output module and the optical sensing module, and is used to coordinate and control the operation of the entire system.

[0124] The main control module includes a timing control unit, a signal processing unit, and a parameter adjustment unit.

[0125] The timing control unit is configured to perform the functions of steps 100 and 200: control the stimulation output module to output electrical stimulation pulses according to the current stimulation period T, record the pulse end time as the timing reference point, and control the optical sensing module to only delay the time after the timing reference point. Then, a sampling time window is opened for effective data acquisition, including the duration of the electrical stimulation pulse and the delay time. Internal shielding of signal acquisition may result in data for that period being marked as invalid. The timing control unit can generate precise synchronization control signals through a hardware timer to achieve timing coordination between stimulus output and signal acquisition.

[0126] The signal processing unit is configured to perform the functions of steps 300 and 400: calculate the signal quality index Q of the photoplethysmography (PPG) signal acquired within the sampling time window, and determine the signal quality index Q if it is not lower than the quality threshold. During this process, effective signal segments acquired within adjacent sampling time windows are used as interpolation nodes for interpolation fitting to reconstruct continuous venous blood flow waveforms, and the venous filling time (VRT) is extracted from the reconstructed waveforms. The signal processing unit executes digital signal processing algorithms such as filtering, interpolation, and feature extraction.

[0127] The parameter adjustment unit is configured to perform the function of step 500: calculate the period deviation between the venous filling time VRT and the current stimulation period T. According to the period deviation value The magnitude and direction of the stimulus parameters are used to generate adjustment commands, which are then sent to the stimulus output module to adjust the stimulus interval for the next cycle. The parameter adjustment unit implements closed-loop control logic.

[0128] Furthermore, the main control module may also include a safety monitoring unit for performing the abnormal state handling function described in the above embodiments. The safety monitoring unit is configured to monitor continuous abnormalities in the signal quality index Q. When the signal quality index Q is below a quality threshold for N consecutive stimulation cycles... At this time, the control parameter adjustment unit pauses adaptive adjustment and puts the system into a fixed parameter safe output mode.

[0129] The main control module can be implemented using a low-power microcontroller, and each functional unit can run in the microcontroller as a software module. The stimulation output module may include a boost circuit and an output drive circuit. The boost circuit boosts the battery voltage to the voltage required for stimulation, and the output drive circuit generates a constant current pulse with a specified pulse width and amplitude under the control of the main control module. The optical sensing module may include a light-emitting diode drive circuit, a photodetector, and an analog front-end circuit. The analog front-end circuit amplifies and filters the electrical signal output by the photodetector, and the analog-to-digital converter converts the analog signal into a digital signal for processing by the main control module.

[0130] In terms of signal flow, the main control module sends pulse trigger signals and parameter configuration signals to the stimulation output module, and sends sampling enable signals to the optical sensing module. The optical sensing module returns digitized photoplethysmography (PPG) data to the main control module. Through the interaction of these signals, the modules work collaboratively to form a complete closed-loop control system.

[0131] The specific application scenarios of the embodiments of this application are described below by way of example.

[0132] This embodiment uses the application scenario of the lower limbs as an example to illustrate the specific execution process of the method of this application.

[0133] During device wearing, the stimulation electrodes are attached to the peroneal nerve pathway, and the optical sensor is attached superficially to the great saphenous vein. After the device is powered on, the system initializes, setting the initial stimulation period T to 1000 milliseconds and the delay time... Set to 100 milliseconds.

[0134] The system begins executing the closed-loop control process. In step 100, the main control module controls the stimulation output module to generate a stimulation pulse with a current amplitude of 30 mA and a pulse width of 300 microseconds. The pulse is applied to the common peroneal nerve through the stimulation electrode, triggering contraction of the gastrocnemius muscle. The controller records the end time of the pulse as a timing reference point.

[0135] In step 200, the controller waits for a delay of 100 milliseconds after the timing reference point. During the duration and delay of the electrical stimulation pulse. Internally, mechanical vibrations caused by calf muscle contraction alter the contact state between the optical sensor and the skin, thus blocking data during this period. Delay time. After the muscle tremors subside, the controller opens the sampling time window, and the optical sensing module begins acquiring photoplethysmography (PPG) signals at a preset sampling rate. Sampling continues until 50 milliseconds before the next stimulation pulse is emitted, with an effective sampling duration of approximately 850 milliseconds within this cycle.

[0136] In step 300, the signal processing unit calculates the signal-to-noise ratio (SNR) of the signal within the current sampling window. Assuming the calculated SNR is 12 dB, which is 10 dB higher than the threshold, the signal quality is deemed acceptable, and the process proceeds to step 400.

[0137] In step 400, the signal processing unit stores the valid sampled data from the most recent three cycles. For the delayed time... The masked data gaps are filled using cubic spline interpolation to form a continuous waveform. The troughs are then identified from the continuous waveform. and stable point The time difference between the two was calculated, and the venous filling time (VRT) was found to be 850 milliseconds.

[0138] In step 500, the parameter adjustment unit calculates the period deviation value according to formula 1. . This equals 850 minus 1000, which is -150 milliseconds. Since the period deviation is negative and its absolute value of 150 milliseconds exceeds the second threshold of 50 milliseconds, the controller determines that the current stimulation frequency is too slow. According to the gradual adjustment strategy, the maximum adjustment step size... The interval is set to 10% of the current cycle, or 100 milliseconds. Therefore, the stimulation interval for the next cycle is adjusted to 900 milliseconds.

[0139] The system returns to step 100 to execute the next cycle. After several iterations, the cycle deviation value... The stimulation period gradually decreases until it converges to a value that matches the user's venous filling time.

[0140] When the period deviation value When the system remains within the threshold range for five consecutive cycles, it can enter phase optimization mode to further optimize the timing of stimulation triggering, so that the stimulation time is synchronized with the peak phase of venous filling.

[0141] If the sensor shifts during use, causing the signal quality to remain substandard, and the signal quality is below the threshold for five consecutive cycles, the safety monitoring unit will trigger anomaly handling. The system will then pause adaptive adjustment, switch to a fixed parameter safety output mode, and prompt the user to check the sensor attachment status.

[0142] According to the above embodiments, firstly, motion artifact interference is eliminated at the temporal source. This is achieved by setting a delay time. A silent sampling window is established, and data is collected during the stable period after muscle tremors subside, physically avoiding the period when motion artifacts are strongest. Compared with existing technologies that rely on signal filtering algorithms to eliminate motion artifacts, the temporal avoidance strategy of this application avoids artifact acquisition at the source, obtaining high-quality blood flow monitoring data without the need for complex signal processing algorithms.

[0143] Furthermore, silent window sampling and interpolation reconstruction work synergistically. While the silent window sampling strategy effectively avoids artifact interference, it also leads to periodic data gaps. The interpolation fitting algorithm was introduced to compensate for this deficiency, and the two are technically complementary. Silent window sampling provides high-quality, effective data segments, and interpolation fitting uses these segments to reconstruct continuous waveforms. Only through their synergistic cooperation can accurate venous filling time extraction be achieved.

[0144] Furthermore, a signal quality gating mechanism enhances system robustness. A signal quality assessment step is added before feature extraction, and parameter adjustments are only performed when the signal is reliable. This prevents misjudgments and incorrect parameter tuning caused by low-quality signals, and improves the system's stability in complex wearing environments.

[0145] Furthermore, it achieves precise stimulation that adapts to physiological rhythms. By extracting the venous filling time (VRT) and comparing it with the stimulation cycle, the stimulation frequency automatically tracks the user's current venous return capacity, avoiding the dry pump effect and the risk of blood stasis, and significantly improving the pumping efficiency per unit of energy consumption.

[0146] Furthermore, phase-synchronized triggering optimizes the timing of blood pumping. Based on frequency matching, by identifying the phase-triggered stimulus at the peak of venous filling, it ensures that each muscle pump acts on the vein with the largest filling volume, maximizing the amount of blood pumped out in a single contraction.

[0147] Furthermore, an abnormal state handling mechanism ensures system security. When multiple consecutive cycles of signal quality abnormalities are detected, the system automatically switches to a fixed-parameter safe output mode and outputs a prompt message, avoiding parameter adjustments in the absence of effective feedback and enhancing system security.

[0148] The above technical features are logically synergistic: silent window sampling provides the data foundation, signal quality assessment ensures data reliability, venous filling time synchronization enables frequency adaptation, phase triggering optimization achieves precise timing, and anomaly handling ensures system safety. These features form a progressive and complete technical solution that collectively solves the technical problem of reliably acquiring blood flow monitoring data under conditions of muscle contraction interference caused by strong electrical stimulation, and automatically matching stimulation frequency and timing with physiological rhythms based on this data.

[0149] The following provides supplementary explanations regarding the typical values, determination methods, and algorithm implementations of the key parameters involved in this application, so that those skilled in the art can more clearly implement the technical solutions of this application.

[0150] Supplementary Example 1: Calculation Method of Signal Quality Index Q In one implementation, the sampling rate fs of the optical sensing module can be set from 50Hz to 500Hz. The controller processes the discrete photoplethysmography (PPG) sequence x[n] obtained within the sampling time window, where n is the sampling point number. The signal quality index Q can be composed of one or more of the following sub-indicators.

[0151] The first seed metric is the signal-to-noise ratio sub-metric. Bandpass filtering is applied to x[n] to obtain xbp[n]. The passband frequency range of the bandpass filter can be set from 0.5Hz to 5Hz, which covers the main frequency components of the venous blood flow signal and can effectively filter out high-frequency noise and DC drift. The residual e[n] = x[n] - xbp[n] is considered as the noise component. The formula for calculating the signal-to-noise ratio is: in This represents the summation of all sampling points within the sampling window. When... The sub-indicator is then deemed to have passed. The setting can be selected from 8 to 12 decibels.

[0152] The second seed metric is the baseline drift sub-metric. The baseline component b[n] is obtained by low-pass filtering or moving average of x[n], and the drift amplitude D is defined as max(b[n]) - min(b[n]). Normalization is performed using the AC amplitude A = max(xbp[n]) - min(xbp[n]) to obtain the drift ratio R = D / A. The sub-indicator is then deemed to have passed. It can be selected as 0.3 to 0.5, that is, the baseline drift amplitude does not exceed 30% to 50% of the AC component amplitude.

[0153] The third seed index is the saturation cutoff sub-index. Let U be the upper limit and L be the lower limit corresponding to the full scale of the analog-to-digital converter, and let the statistical sampling window satisfy the following: or Number of outliers The total number of sampling points in the window is Calculate the proportion of outliers .when The sub-indicator is then deemed to have passed. The value can be selected as 3% to 5%.

[0154] When using a multi-indicator comprehensive evaluation, a "full pass" rule can be adopted: the signal quality index Q is determined to have reached the quality threshold only when all of the above sub-indicators pass. Alternatively, a weighted scoring rule can be used: in , , To map each sub-indicator to a normalization function in the 0-1 range, For weighting coefficients, when The signal quality is then determined to be acceptable.

[0155] The above thresholds can be obtained through calibration during the startup phase: the average value of each sub-indicator is calculated over M cycles after device startup. with standard deviation The value of M ranges from 5 to 20; then take... , Where k takes values ​​from 1 to 2, We take the upper limit of experience to take into account individual differences and wearing differences.

[0156] Supplementary Example 2: Specific Implementation Method of Interpolation Fitting To perform interpolation fitting on the missing waveform within the silent window, the controller selects N1 valid sampling points from the end of the sampling window before the missing time period and N2 valid sampling points from the beginning of the sampling window after the missing time period as interpolation nodes. The values ​​of N1 and N2 are both in the range of 3 to 5.

[0157] Assuming delay time The previous valid sampling point sequence was {x( -k), ..., x( Delay time The subsequent valid sampling point sequence is {x( ), ..., x( +k)}, where The time corresponding to the time series reference point. The sampling time window starts at [time], and the time interval to be masked is [time]. , ].

[0158] When using a piecewise linear interpolation algorithm, for the masked time interval [ , any time within ] The reconstructed value is: When using the cubic spline interpolation algorithm, a cubic spline function S(t) is constructed such that its function value at the nodes equals the known sampled value, and its first and second derivatives at the nodes are continuous. Specifically, using the two sets of effective data points mentioned above as boundary conditions, the coefficients of the spline function are obtained by solving the three moment equations. The coefficients of S(t) are calculated over the shielded time interval […]. , By calculating the values ​​within the range, a smoothly transitioning reconstructed waveform can be obtained. This reconstructed waveform preserves the overall trend of the venous filling process and effectively restores the characteristics of the trough region that is masked by muscle tremors, thus ensuring the accuracy of the trough points. The accuracy of identification.

[0159] Supplementary Example 3: Extraction Rules for Venous Filling Time (VRT) In one implementation, the controller performs low-pass filtering on the reconstructed waveform r(t) or its discrete sequence r[n] to obtain rf[n], and calculates the first-order difference d[n] = rf[n] - rf[n-1] as an estimate of the waveform slope.

[0160] trough point Corresponding sampling point number It is obtained by searching for the minimum point of rf[n]. .

[0161] from Start searching for a stable point along the positive time axis The determination condition is: within L consecutive sampling points, the following conditions are met. ,in is the slope threshold, and L is the number of sampling points corresponding to the stability determination length.

[0162] Slope threshold The determination method is as follows: During the system initialization or calibration phase, acquire photoplethysmography (PPG) signals for several complete stimulation cycles, and identify the maximum slope value max(|d[n]|) during the blood volume rise phase of the waveform. Slope threshold. This can be set to 5% to 10% of the maximum rise slope. For example, if the maximum rise slope is 0.1 signal units per millisecond, then the slope threshold... It can be set to 0.005 to 0.01 signal units per millisecond.

[0163] The stability determination length L corresponds to a time length of 30 to 80 milliseconds. This range is determined because: too short a determination time may make the system overly sensitive to noise, leading to inaccurate stability point identification; too long a determination time may cause recognition delay, affecting the accuracy of venous filling time (VRT) calculation. The specific value of L can be calculated based on the sampling rate fs: L = determination time. fs.

[0164] Obtain the sampling point number corresponding to the stable point. Subsequently, the formula for calculating venous filling time (VRT) is: To reduce misjudgments caused by noise, it is optional to require that the stability criterion be valid in both adjacent sampling windows before outputting the VRT value.

[0165] Supplementary Example 4: Method for Determining the Periodic Deviation Threshold In step S5, the first and second thresholds used to determine whether the stimulation period needs to be adjusted typically range from 30 milliseconds to 80 milliseconds. This range is determined based on the following: too small a threshold may cause the system to be overly sensitive to normal physiological fluctuations, leading to system instability due to frequent adjustments to stimulation parameters; too large a threshold may result in a sluggish system response, making it impossible to track changes in venous filling capacity in a timely manner.

[0166] The first and second thresholds can be set to the same value, or they can be set to different values ​​depending on the application requirements. For example, if you want the system to be more sensitive to excessively fast stimulation to avoid the pump-drying effect, you can set the first threshold to a smaller value; if you want the system to be more sensitive to excessively slow stimulation to reduce the risk of blood stasis, you can set the second threshold to a smaller value.

[0167] Supplementary Example 5: Security Constraints of Phase-Triggered Mode In phase-optimized mode, stimulus triggering is driven by a phase criterion of "approaching the peak of filling", but is still constrained by a safety boundary to ensure that the system behavior is predictable and safe.

[0168] The following constraint parameter can be set optionally: minimum trigger interval To prevent excessively frequent triggering; maximum trigger interval Used to prevent prolonged periods without triggering; trigger suppression time. This is the untriggerable protection period following each stimulus.

[0169] When a phase condition close to the peak filling is detected, the following conditions must be met simultaneously for stimulus output to be triggered: the interval between the current time and the previous stimulus time is not less than [a certain value]. And the next trigger will not make the stimulus interval less than .

[0170] If within the maximum waiting time If the phase condition is not met, the controller will revert to the timed triggering mode that executes according to the current stimulation period T, so as to ensure that the system can still maintain the basic stimulation output function when the phase detection fails.

[0171] A typical value can be set to 70% to 80% of the current stimulation period T; A typical value can be set to 120% to 150% of the current stimulation period T; Typical values ​​can be set from 100 milliseconds to 200 milliseconds; Can be set to be with Same or slightly larger .

[0172] The second embodiment of this application relates to an adaptive control system for a transcutaneous nerve stimulation device, the structure of which is as follows: Figure 3 As shown, the adaptive control system of this transcutaneous nerve stimulation device includes: The stimulation output module is configured to generate electrical stimulation pulse signals with adjustable period and pulse width; The optical sensing module is configured to acquire photoplethysmography (PPG) signals from the target location. The main control module is connected to both the stimulation output module and the optical sensing module. The main control module includes a timing control unit, a signal processing unit, and a parameter adjustment unit. The timing control unit is configured to: control the stimulation output module to output electrical stimulation pulses according to the current stimulation cycle T, record the pulse end time as the timing reference point, and control the optical sensing module to open the sampling time window for effective data acquisition only after the delay time Δt after the timing reference point; shield signal acquisition or mark the data in that time period as invalid during the duration of the electrical stimulation pulse and within the delay time Δt; wherein the delay time Δt is used to avoid the mechanical tremor period caused by muscle contraction; The signal processing unit is configured to: calculate the signal quality index Q of the photoplethysmography pulse wave signal acquired within the sampling time window; when the signal quality index Q is not lower than the quality threshold Qth, use the effective signal segments acquired within the adjacent sampling time window as interpolation nodes to perform interpolation fitting, reconstruct the continuous venous blood flow waveform, and extract the venous filling time VRT from the reconstructed waveform. The parameter adjustment unit is configured to: calculate the period deviation ΔT between the venous filling time VRT and the current stimulation cycle T; generate a stimulation parameter adjustment command based on the magnitude and direction of the period deviation ΔT and send it to the stimulation output module to adjust the stimulation interval time of the next cycle.

[0173] The technical details in the above method implementation can be applied to the implementation of this system, and the technical details in the implementation of this system can also be applied to the method implementation.

[0174] The technical solutions of the above embodiments, through the synergistic cooperation of multiple technical means, solve the technical problem that the photoplethysmography pulse wave signal is seriously contaminated by motion artifacts due to the mechanical vibration caused by muscle contraction induced by electrical stimulation during the operation of the percutaneous nerve stimulation device, and cannot be used for closed-loop feedback control. They also address the technical problem that existing fixed-frequency stimulation schemes cannot adapt to the differences in venous return capacity between different individuals or the same individual under different physiological states, and achieve the following technical effects.

[0175] The controller controls the stimulation output module to output electrical stimulation pulses according to the current stimulation period T and records the pulse end time as the timing reference point. This provides an accurate time reference for the subsequent sampling time window division, so that a definite timing correlation is established between the stimulation output and the signal acquisition. This is a prerequisite for realizing the subsequent timing avoidance strategy.

[0176] By setting the start time of the sampling time window as the delay time after the timing reference point. and during the duration and delay of the electrical stimulation pulse. Internal shielding of signal acquisition or marking data for that period as invalid ensures that the optical sensing module only acquires photoplethysmography (PPG) signals during the stable period after the muscle tremor subsides. This physically avoids data acquisition during the period of strongest motion artifacts at the time-domain source, obtaining high-quality blood flow monitoring data without relying on complex signal filtering algorithms. (The delay time is...) The value range is set from 50 milliseconds to 200 milliseconds, which can achieve a balance between avoiding the main mechanical tremor period and retaining sufficient effective sampling time, ensuring both the avoidance of motion artifacts and the amount of data collected to meet the needs of subsequent signal processing.

[0177] The signal quality index Q is calculated by comparing the photoplethysmography (PPG) signals collected within the sampling time window with a preset quality threshold. In comparison, the system proceeds to subsequent feature extraction steps only when the signal quality is acceptable, while maintaining the current stimulation cycle and moving to the next cycle when the signal quality is unacceptable, thus forming a signal quality gating mechanism. This mechanism, together with the timing avoidance strategy, forms a dual defense: timing avoidance reduces artifact interference at the time domain source, while quality gating filters out residual anomalies at the data level. Together, they ensure that only reliable data enters the closed-loop control process, further identifying low-quality signals caused by poor sensor contact, external interference, or other anomalies. This prevents erroneous data from entering the closed-loop control process and causing parameter mistuning, enhancing the system's robustness in complex wearing environments. The signal quality index Q is calculated using multiple methods, including signal-to-noise ratio, baseline drift amplitude, and saturation or cutoff point detection, enabling a comprehensive evaluation of signal quality from multiple dimensions and a more complete identification of various signal anomalies.

[0178] By using effective signal segments acquired within adjacent sampling time windows as interpolation nodes to interpolate and fit the signal waveform during the shielded period, a continuous venous blood flow waveform is reconstructed. This compensates for the data periodicity loss caused by the timing avoidance strategy, enabling the controller to accurately identify troughs and stable points based on the continuous waveform and extract the venous filling time (VRT) accordingly. Silent window sampling and interpolation reconstruction form a specific synergistic relationship: the former provides high-quality effective data segments as the basis for interpolation, while the latter restores waveform continuity to support feature extraction. Their cooperation allows for accurate venous filling time acquisition while avoiding motion artifacts. Piecewise linear interpolation or spline interpolation algorithms can be used for interpolation fitting, allowing for the selection of appropriate algorithms based on the system's computational resources and accuracy requirements.

[0179] The trough points were identified after smoothing and filtering the reconstructed venous blood flow waveform. Then from the trough point Begin searching along the positive time axis for the stable point where the waveform recovers to a steady state. Finally, the calculation starts from the trough point. to stable point The time difference, used as the venous filling time (VRT), forms a standardized process for extracting venous filling time, making VRT a calculable and repeatable characteristic time parameter, providing a reliable data foundation for subsequent closed-loop parameter tuning. By setting the steady-state determination condition to a duration where the waveform slope is continuously below a slope threshold for a preset stability determination time, noise misjudgment that may be caused by single-point slope determination is avoided, improving the accuracy of steady-state point identification.

[0180] By using the formula Calculate the period deviation value The stimulation interval for the next cycle is adjusted based on the magnitude and direction of this deviation, transforming the characteristic time parameter VRT, which reflects the user's current venous filling state, into a regulation command for the stimulation cycle, thus forming a closed-loop adaptive control mechanism based on physiological feedback. When the cycle deviation value... When the value is positive and exceeds the first threshold, the stimulation interval of the next cycle is extended. When the value is negative and its absolute value exceeds the second threshold, the stimulation interval of the next cycle is shortened. When the absolute value does not exceed the corresponding threshold, the current stimulation cycle remains unchanged. This threshold-based directional adjustment strategy enables the stimulation frequency to automatically track changes in the user's venous return capacity, avoiding the risk of empty pump effect caused by too fast stimulation frequency or blood stasis caused by too slow stimulation frequency, thus improving the pumping efficiency per unit of energy consumption.

[0181] By employing a gradual adjustment strategy, the variation in the stimulus interval of a single adjustment is limited to not exceeding the preset maximum adjustment step size. This avoids system oscillations or user discomfort caused by drastic changes in stimulation parameters, ensuring a smooth and gradual parameter adjustment process, allowing the stimulation cycle to converge stably to the target value that matches the venous filling time. The maximum adjustment step size is [not specified]. The value range is set to 5% to 20% of the current stimulation period T, achieving a balance between adjusting the response speed and system stability.

[0182] After the stimulation cycle is basically matched with the venous filling time, a phase optimization mode is entered. Based on the real-time acquired photoplethysmography (PPG) signal, the venous filling phase is identified, and stimulation output is triggered when the current venous blood volume is close to the peak filling time, thus synchronizing the stimulation time with the peak venous filling phase. This phase trigger optimization function and the frequency adaptive adjustment function form a progressive optimization relationship: frequency adaptive adjustment first ensures that the stimulation cycle and venous filling time are generally matched, while phase trigger optimization further precisely controls the trigger time of each stimulation based on frequency matching, ensuring that each muscle contraction acts on the vein with the largest blood volume, maximizing the blood output of a single contraction. By monitoring the real-time change trend of the PPG signal and determining that the peak filling time is approaching when the signal amplitude changes from an upward trend to a stable trend or begins to decline, the waveform phase information is transformed into an executable trigger condition, realizing the engineering implementation of phase recognition.

[0183] By monitoring continuous anomalies in the signal quality index Q, and ensuring that the signal quality index Q is below the quality threshold for N consecutive stimulation cycles. The system pauses adaptive adjustment of stimulation parameters and switches to a fixed-parameter safe output mode while simultaneously outputting an anomaly warning message. This avoids the risk of stimulation parameters deviating from the reasonable range due to continued parameter adjustment based on unreliable data under extreme conditions such as sensor malfunction or continuous interference, thus enhancing the system's reliability and safety in complex operating environments. Setting the continuous anomaly period threshold N to a range of 3 to 10 achieves a balance between anomaly response sensitivity and system stability.

[0184] By dividing the main control module into a timing control unit, a signal processing unit, and a parameter adjustment unit, the timing control unit coordinates the timing of stimulus output and sampling time windows. The signal processing unit performs signal quality assessment, interpolation reconstruction, and extraction of venous filling time. The parameter adjustment unit calculates period deviation and generates parameter adjustment commands. These units work together to form a complete closed-loop control system, facilitating modular implementation and functional expansion. By adding a safety monitoring unit to the main control module to monitor continuous signal quality anomalies and, when necessary, suspend adaptive adjustment by controlling the parameter adjustment unit, the abnormal state handling function is decoupled from the normal closed-loop control function, improving the clarity of the system architecture.

[0185] In summary, the technical features of the above embodiments form a progressive and interdependent organic whole: the timing avoidance strategy avoids motion artifact interference at the source and provides high-quality signal segments; the quality gating mechanism filters out residual anomalies to ensure data reliability; the interpolation reconstruction algorithm compensates for data loss caused by timing avoidance and restores waveform continuity; venous filling time extraction transforms continuous waveforms into feature parameters that can be used for closed-loop control; the frequency adaptive adjustment mechanism achieves automatic matching of stimulation frequency and physiological rhythm based on these feature parameters; phase trigger optimization further precisely controls stimulation timing based on frequency matching; and the abnormal state handling mechanism provides safety assurance for the entire closed-loop control process. These technical features are not simply parallel combinations, but form a complete technical chain from "timing avoidance sampling—quality gating screening—interpolation waveform reconstruction—feature parameter extraction—frequency adaptive adjustment—phase trigger optimization—abnormal state safety assurance." Each link supports the others and is indispensable, jointly solving the technical problem of reliably acquiring blood flow monitoring data under strong motion artifact interference caused by percutaneous nerve stimulation, and achieving automatic matching of stimulation frequency and timing with the user's venous filling physiological rhythm based on this data.

[0186] It should be noted that those skilled in the art should understand that the functions of each module shown in the embodiments of the adaptive control system of the above-described transcutaneous nerve stimulation device can be understood with reference to the relevant description of the adaptive control method of the aforementioned transcutaneous nerve stimulation device. The functions of each module shown in the embodiments of the adaptive control system of the above-described transcutaneous nerve stimulation device can be implemented by a program (executable instructions) running on a processor, or by specific logic circuits. If the adaptive control system of the above-described transcutaneous nerve stimulation device is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0187] Accordingly, this application also provides a computer storage medium storing computer-executable instructions, which, when executed by a processor, implement the various method implementations of this application.

[0188] Furthermore, this application also provides an adaptive control system for a transcutaneous nerve stimulation device, including a memory for storing computer-executable instructions and a processor; the processor is used to implement the steps in the above-described method embodiments when executing the computer-executable instructions in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The aforementioned memory may be read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or solid-state drive, etc. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0189] It should be noted that in this patent application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this patent application, if it refers to performing an action according to an element, it means performing the action at least according to that element, including two cases: performing the action only according to that element, and performing the action according to that element and other elements. Expressions such as "multiple," "repeatedly," and "various" include two, two times, two kinds, and more than two, more than two times, and more than two kinds.

[0190] All documents mentioned in this application are considered to be incorporated in their entirety into the disclosure of this application so that they can serve as a basis for modifications if necessary. Furthermore, it should be understood that after reading the foregoing disclosure of this application, those skilled in the art can make various alterations or modifications to this application, and these equivalent forms also fall within the scope of protection claimed in this application.

Claims

1. An adaptive control method for a transcutaneous nerve stimulation device, characterized in that, This includes the following steps performed by the controller: S1. Control the stimulation output module to output electrical stimulation pulses according to the current stimulation cycle T, and record the pulse end time as the timing reference point; S2. Set a sampling time window, wherein the starting time of the sampling time window is the delay time after the timing reference point. The delay time To avoid the mechanical tremor period caused by muscle contraction; within the sampling time window, the optical sensing module is activated to acquire the photoplethysmography (PPG) signal; wherein, during the duration of the electrical stimulation pulse and the delay time... Within this period, signal acquisition may be blocked or data for that time period may be marked as invalid. S3. Calculate the signal quality index Q for the photoplethysmography (PPG) signals acquired within the sampling time window; when the signal quality index Q is lower than a preset quality threshold... When the current stimulation period T is maintained, the next period begins; when the signal quality index Q is not lower than the quality threshold... Then proceed to step S4; S4. Using the effective signal segments collected within adjacent sampling time windows as interpolation nodes, interpolate and fit the signal waveforms during the periods that were shielded or marked as invalid in step S2 to reconstruct continuous venous blood flow waveforms; extract the venous filling time VRT from the reconstructed venous blood flow waveforms, where the venous filling time VRT is the time interval from the trough point caused by muscle contraction to the blood volume stabilization point. S5. Calculate the periodic deviation value ,in According to the aforementioned periodic deviation value The size and direction of the stimulus will be adjusted to regulate the stimulation interval in the next cycle.

2. The method according to claim 1, characterized in that, In step S2, the delay time The value ranges from 50 milliseconds to 200 milliseconds.

3. The method according to claim 1, characterized in that, In step S3, the calculation method for the signal quality index Q includes at least one of the following: Calculate the signal-to-noise ratio of the photoplethysmography (PPG) signal within the sampling time window, and the quality threshold. This corresponds to the signal-to-noise ratio threshold; Calculate the baseline drift amplitude of the photoplethysmography signal within the sampling time window, and the quality threshold. This corresponds to the drift threshold; The quality threshold is used to detect whether there is a saturation point or a cutoff point in the photoplethysmography signal within the sampling time window. This corresponds to the outlier threshold.

4. The method according to claim 1, characterized in that, In step S4, the interpolation fitting employs a piecewise linear interpolation algorithm or a spline interpolation algorithm.

5. The method according to claim 1, characterized in that, In step S4, the specific steps for extracting the venous filling time (VRT) include: Step S4a: Perform smoothing filtering on the reconstructed venous blood flow waveform to remove high-frequency noise; Step S4b: Identify the troughs in the reconstructed waveform caused by muscle contraction and compression. The trough point The moment when venous blood volume is at its lowest; Step S4c, from the trough point Initially, search along the positive time axis for the stable point where the waveform recovers to a steady state. The condition for determining the stable state is that the duration for which the waveform slope is continuously lower than the slope threshold reaches a preset stability determination time. Step S4d: Calculate the value from the trough point To the stable point The time difference is taken as the venous filling time VRT.

6. The method according to claim 1, characterized in that, In step S5, the period deviation value is... The size and direction of the stimulus, and the timing of the next stimulation cycle, are adjusted accordingly, including: When the period deviation value If the value is positive and exceeds the first threshold, the current stimulation frequency is determined to be too fast, and the stimulation interval time of the next cycle is extended. When the period deviation value When the value is negative and its absolute value exceeds the second threshold, the current stimulation frequency is determined to be too slow, and the stimulation interval time of the next cycle is shortened. When the period deviation value When the absolute value does not exceed the corresponding threshold, the current stimulation period T remains unchanged.

7. The method according to claim 6, characterized in that, In step S5, the adjustment of the stimulation interval for the next cycle adopts a gradual adjustment strategy: the change in the stimulation interval for a single adjustment does not exceed the preset maximum adjustment step size. The maximum adjustment step size The value ranges from 5% to 20% of the current stimulation period T.

8. The method according to claim 6, characterized in that, It also includes phase-triggered optimization steps: When the period deviation value After the absolute value of the stimulation cycle does not exceed the corresponding threshold for several consecutive cycles and the stimulation cycle is determined to be basically matched with the venous filling time, the controller enters the phase optimization mode. In the phase optimization mode, the controller identifies the venous filling phase based on the real-time acquired photoplethysmography (PPG) signal. When the current venous blood volume is detected to be close to the peak filling value, the next electrical stimulation pulse is triggered to synchronize the stimulation time with the peak venous filling value.

9. The method according to claim 8, characterized in that, The method for identifying the venous filling phase includes: Monitor the real-time trend of photoplethysmography (PPG) signals; When the signal amplitude changes from an upward trend to a stable trend or begins to decline, it is determined that the current moment is close to the peak of fullness. The stimulus output is triggered within a preset response time after the peak filling level is determined.

10. An adaptive control system for a transcutaneous nerve stimulation device, characterized in that, include: The stimulation output module is configured to generate electrical stimulation pulse signals with adjustable period and pulse width; The optical sensing module is configured to acquire photoplethysmography (PPG) signals from the target location. The main control module is connected to both the stimulation output module and the optical sensing module. The main control module includes a timing control unit, a signal processing unit, and a parameter adjustment unit. The timing control unit is configured to: control the stimulation output module to output electrical stimulation pulses according to the current stimulation period T, record the pulse end time as a timing reference point, and control the optical sensing module to only delay time after the timing reference point. Then, a sampling time window is opened for effective data acquisition, during the duration of the electrical stimulation pulse and the delay time. Internal shielding signal acquisition or marking the data for that period as invalid; wherein the delay time Used to avoid the mechanical tremor period caused by muscle contraction; The signal processing unit is configured to: calculate a signal quality index Q on the photoplethysmography (PPG) signals acquired within the sampling time window; and when the signal quality index Q is not lower than a quality threshold... At that time, the effective signal segments collected within the adjacent sampling time window are used as interpolation nodes to perform interpolation fitting, reconstruct the continuous venous blood flow waveform, and extract the venous filling time VRT from the reconstructed waveform; The parameter adjustment unit is configured to: calculate the period deviation between the venous filling time VRT and the current stimulation cycle T. According to the said period deviation value The size and direction of the stimulus parameters are used to generate stimulation parameter adjustment instructions, which are then sent to the stimulation output module to adjust the stimulation interval time for the next cycle.