A method, device and equipment for coordinated control of multi-current source stimulation output, and a storage medium
Patent Information
- Application Number
- CN202611507916.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]鉴于以上所述现有技术的缺点,本申请的目的在于提供一种多电流源刺激输出的协调控制方法、装置、设备及存储介质,用于解决现有多电流源刺激输出控制过程中参数更新易干扰稳定输出通道、错位输出相位关系易发生漂移、安全更新窗口难以适应刺激负载变化、电极拓扑约束考虑不足以及单双源模式切换时主从关系适配性差的问题
[0025](1)本申请根据各路电流源对应的本次程序号与前次程序号的比对结果确定程序号变更状态,并据此确定主源和从源,使程序号未发生变化的电流源能够作为稳定时序基准,降低参数更新对稳定输出通道的影响,提高多电流源刺激输出的连续性。
Smart Images

Figure CN122998608A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical stimulation device control technology, and in particular to a coordinated control method, device, equipment and storage medium for multi-current source stimulation output. Background Technology
[0002] With the development of functional electrical stimulation, nerve stimulation, muscle stimulation, and rehabilitation techniques, electrical stimulation devices are gradually evolving from single-channel output to multi-channel, multi-current-source coordinated output. Multi-current-source stimulation output can provide combined stimulation waveforms for different stimulation sites, different treatment stages, and different stimulation targets, which is of great significance for improving stimulation accuracy, treatment adaptability, and output continuity.
[0003] Existing multi-current-source stimulation devices typically use a controller to configure the stimulation parameters of each current source separately, and maintain the stimulation waveform output through waveform interruption, timing control, or register writing. These stimulation parameters usually include waveform parameters such as program number, current amplitude, frequency, and pulse width. In scenarios with staggered output from multiple current sources, existing technologies generally use preset start-up delays, fixed phase shifts, or timing triggers to stagger the stimulation waveforms of different current sources as much as possible. During parameter updates, they typically rely on the output and silent states of the current sources, updating waveform parameters within the silent interval.
[0004] However, existing control methods still have shortcomings. First, when updating the parameters of a current source, current technology lacks a mechanism to determine a stable timing reference based on the change status of each program number, which can easily affect the output continuity of other channels. Second, after long-term operation of multi-source misaligned outputs, phase drift may occur due to clock errors or interrupt scheduling errors, leading to output overlap again. Third, existing safety update windows mostly use fixed time settings, which are difficult to adapt to changes in the stimulation load caused by electrode contact status, human tissue status, or electrode aging. Fourth, existing technologies usually do not fully consider the mapping relationship between the current source and the stimulation electrode. When there are shared electrodes or electrode spatial proximity, stimulation superposition or uncontrollable current distribution may occur. Fifth, when switching between single-source mode and multi-source mode, the original master-slave relationship and output timing relationship are difficult to directly adapt to the newly added or remaining current sources.
[0005] Existing multi-current-source stimulation output control technologies still require improvement in areas such as program parameter updates, timing reference determination, safety update window settings, phase stability maintenance, electrode topology constraints, and single / dual-source mode switching. Therefore, it is necessary to provide a coordinated control method, apparatus, device, and storage medium for multi-current-source stimulation output to address the aforementioned problems in the existing technology. Summary of the Invention
[0006] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a coordinated control method, device, equipment and storage medium for multi-current source stimulation output, which solves the problems of parameter updates easily interfering with stable output channels, misaligned output phase relationships easily drifting, safety update windows being difficult to adapt to changes in stimulation load, insufficient consideration of electrode topology constraints, and poor master-slave relationship adaptability when switching between single and dual source modes in the existing multi-current source stimulation output control process.
[0007] To achieve the above and other related objectives, a first aspect of this application provides a coordinated control method for multi-current source stimulation output, comprising:
[0008] Obtain the stimulation parameters to be updated this time; the stimulation parameters include the current program number and current waveform parameters corresponding to each current source; and obtain the previous program number of each current source.
[0009] Compare the current program number corresponding to each current source with the corresponding previous program number, and determine the change status of the program number corresponding to each current source based on the comparison result.
[0010] The master-slave roles are determined based on the change status of the program number corresponding to each current source, and the master-slave roles include master source and slave source;
[0011] Determine whether the waveform parameter safe update condition is met based on the current output state corresponding to the master source and slave source;
[0012] When the current output states corresponding to the master source and slave source meet the waveform parameter safe update conditions, a partial waveform parameter update is performed on the master source, and a complete waveform parameter update is performed on the slave source.
[0013] After updating the waveform parameters corresponding to the main source and the slave source, the main source is triggered to output a stimulus waveform, and the slave source is triggered to output a linked waveform based on the stimulus waveform output by the main source, so that the main source and the slave source form a staggered output stimulus waveform according to a preset timing relationship.
[0014] In some embodiments of the first aspect of this application, the step of determining the master and slave roles based on the change status of the program number corresponding to each current source includes: during the update round iteration process, if there is a current source whose program number has not changed, then the current source is determined as the master source, and the current source whose program number has changed is determined as the slave source; if the program numbers of each current source have not changed, then the master source and slave source determined in the previous round are maintained; if the program numbers of each current source have changed, then the master source and slave source are re-determined according to preset rules.
[0015] In some embodiments of the first aspect of this application, determining whether the waveform parameter safety update condition is met based on the current output state corresponding to the main source and the slave source includes: determining a waveform parameter safety update window based on the current output state corresponding to the main source and the slave source, wherein the current output state includes an output state and a silent state, and the waveform parameter safety update window is a time window that allows waveform parameter updates to be performed; controlling the effective state of the waveform parameter safety update window based on the timing result through a timing trigger unit corresponding to each current source; wherein the waveform parameter safety update condition is: both the main source and the slave source are in a silent state, and the corresponding waveform parameter safety update windows are both in an effective state; the output of the stimulation waveform is maintained by waveform interruption, and the waveform interruption is not masked during the waveform parameter update process.
[0016] In some embodiments of the first aspect of this application, after performing the step of determining the waveform parameter safety update window based on the current output state corresponding to the main source and the slave source, the method further performs the following steps: obtaining the load state information of the stimulation load corresponding to each current source during the stimulation output process; determining the stimulation current establishment time based on the load state information; adjusting the timing control parameters corresponding to the timing trigger unit based on the stimulation current establishment time; and adjusting the validity period of the waveform parameter safety update window based on the adjusted timing control parameters so that the validity period matches the stimulation current establishment time corresponding to the current load state.
[0017] In some embodiments of the first aspect of this application, during the process of the master source and the slave source forming a misaligned output stimulus waveform according to a preset timing relationship, the following steps are performed: periodically resynchronizing the phase relationship between the master source and the slave source; determining the resynchronization period based on the output frequency relationship between the master source and the slave source; performing resynchronization control on the slave source based on the resynchronization period to maintain the misaligned output relationship between the master source and the slave source; wherein, when the resynchronization time corresponding to the resynchronization period is reached, the output of the stimulus waveform of the slave source is paused, and after a preset misalignment delay time, the output stimulus waveform of the slave source is retried to re-establish the misaligned timing relationship between the slave source and the master source.
[0018] In some embodiments of the first aspect of this application, after performing the step of determining the master-slave role based on the program number change status corresponding to each current source, the method performs the following steps: obtaining the mapping relationship between each current source and the stimulation electrode; determining the electrode topology relationship between each current source based on the mapping relationship; determining that the at least two current sources have a simultaneous output restriction condition when the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship, or when the stimulation electrodes corresponding to at least two current sources satisfy a preset spatial proximity relationship; and controlling the at least two current sources to form a staggered output according to the preset timing relationship between the master source and the slave source based on the simultaneous output restriction condition, so as to restrict the at least two current sources from simultaneously outputting stimulation waveforms.
[0019] In some embodiments of the first aspect of this application, after completing the step of obtaining the stimulation parameters to be updated, the method performs the following steps: detecting the current stimulation output mode of the multi-current source stimulation output; when the current stimulation output mode switches from a single-source mode to a multi-source mode and a new current source is added, the master source and slave source are re-determined according to the addition status of the new current source and the output status of the existing current sources, and the master source and slave source are controlled to form a staggered output stimulation waveform according to a preset timing relationship; when the current stimulation output mode switches from a multi-source mode to a single-source mode, the master-slave role setting is canceled, and the remaining current sources are controlled to output stimulation waveforms independently.
[0020] To achieve the above and other related objectives, a second aspect of this application provides a coordinated control device for multi-current source stimulation output, comprising: a parameter acquisition module, configured to acquire stimulation parameters to be updated; the stimulation parameters including the current program number and current waveform parameters corresponding to each current source; and to acquire the previous program number corresponding to each current source; a change status determination module, configured to compare the current program number corresponding to each current source with the corresponding previous program number, and determine the change status of the program number corresponding to each current source based on the comparison result; and a master-slave role determination module, configured to determine the master-slave role based on the change status of the program number corresponding to each current source, wherein the master... The roles include a master source and a slave source; a safety update control module is used to determine whether the waveform parameter safety update condition is met based on the current output state corresponding to the master source and the slave source, and when the current output state corresponding to the master source and the slave source meet the waveform parameter safety update condition, to perform a partial waveform parameter update on the master source and a complete waveform parameter update on the slave source; an output control module is used to trigger the master source to output a stimulus waveform after completing the waveform parameter update corresponding to the master source and the slave source, and to trigger the slave source to output in a coordinated manner based on the stimulus waveform output by the master source, so that the master source and the slave source form a staggered output stimulus waveform according to a preset timing relationship.
[0021] To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a coordinated control method for multi-current source stimulation output as described in any embodiment of the first aspect of this application.
[0022] To achieve the above and other related objectives, a fourth aspect of this application provides a computer program product comprising computer program code that, when executed on a computing device, causes the computing device to implement a coordinated control method for multi-current source stimulation output as described in any embodiment of the first aspect of this application.
[0023] To achieve the above and other related objectives, a fifth aspect of this application provides a control device for multi-current source stimulation output, including a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program to implement the coordinated control method for multi-current source stimulation output as described in any embodiment of the first aspect of this application.
[0024] As described above, the coordinated control method, apparatus, device, and storage medium for multi-current source stimulation output of this application have the following beneficial effects:
[0025] (1) This application determines the program number change status based on the comparison result between the current program number and the previous program number corresponding to each current source, and determines the master source and slave source accordingly, so that the current source whose program number has not changed can be used as a stable timing reference, reducing the impact of parameter updates on the stable output channel and improving the continuity of multi-current source stimulation output.
[0026] (2) When the main source and the slave source meet the waveform parameter safe update conditions, this application performs partial waveform parameter update on the main source and complete waveform parameter update on the slave source respectively, and controls the update timing through the waveform parameter safe update window and the timing trigger unit, which can reduce the risk of parameter writing and stimulation waveform output conflict.
[0027] (3) This application does not mask the interruption of the waveform during the waveform parameter update process, and can complete the parameter update while maintaining the real-time output of the stimulus waveform, thereby reducing the possibility of waveform beat loss of control or abnormal waveform generation.
[0028] (4) This application performs periodic resynchronization during the process of the main source and the slave source forming the misaligned output stimulus waveform, which can reduce the risk of phase drift caused by clock error or interruption scheduling error during long-term operation and maintain the misaligned output relationship between multiple current sources.
[0029] (5) This application can adjust the validity period of the waveform parameter safety update window according to the stimulus load state, and combine the electrode topology relationship to limit the simultaneous output of current sources with shared electrode relationship or spatial proximity relationship, thereby improving the stimulus safety and adaptability under different load states and different electrode connection scenarios.
[0030] (6) This application can redetermine the master source and slave source when switching between single-source mode and multi-source mode, or cancel the master-slave role setting and control the independent output of the remaining current source, thereby improving the stability during the switching process of different stimulus output modes. Attached Figure Description
[0031] Figure 1 The diagram shown is a flowchart illustrating a coordinated control method for multi-current source stimulation output in one embodiment of this application.
[0032] Figure 2 This is a flowchart illustrating the process of determining the master / slave role based on the change of status according to the program number in one embodiment of this application.
[0033] Figure 3 The diagram shown is a flowchart illustrating the waveform parameter security update window and its look-ahead control in one embodiment of this application.
[0034] Figure 4 The diagram shown is a flowchart illustrating the process of adjusting the waveform parameter security update window based on the stimulus load state in one embodiment of this application.
[0035] Figure 5 The diagram shown is a schematic representation of the process for periodic resynchronization of misaligned output phases in one embodiment of this application.
[0036] Figure 6 The diagram shown is a schematic representation of a process for simultaneous output based on electrode topology constraints in one embodiment of this application.
[0037] Figure 7 The diagram shown is a flowchart illustrating the switching control between single-source mode and multi-source mode in one embodiment of this application.
[0038] Figure 8 The diagram shown is a structural schematic of a coordinated control device for multi-current source stimulation output in one embodiment of this application.
[0039] Figure 9 The diagram shown is a schematic representation of an application scenario for multi-current source stimulation output in one embodiment of this application. Detailed Implementation
[0040] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0041] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0042] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0043] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0044] Before providing a further detailed description of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows:
[0045] (1) Multi-current source stimulation output refers to a stimulation output method in which at least two current sources output stimulation waveforms respectively, and the controller coordinates and controls the waveform parameters, output timing and output status of each current source.
[0046] (2) Current source refers to the output unit used to output stimulation current to the stimulation electrode. Each current source can correspond to a different stimulation channel, or it can participate in the combined stimulation output according to the connection relationship of the stimulation electrode.
[0047] (3) Stimulation parameters refer to the set of parameters used to control the output stimulation waveform of the current source. In the embodiments of this application, the stimulation parameters include the current program number and current waveform parameters corresponding to each current source.
[0048] (4) The current procedure number refers to the procedure identifier associated with the corresponding current source in the stimulus parameters to be updated this time; the previous procedure number refers to the procedure identifier of the corresponding current source that was last applied before the current update round. The current procedure number and the previous procedure number are used to determine the procedure change.
[0049] (5) Program number change status refers to the status obtained by comparing the current program number corresponding to each current source with the corresponding previous program number, which is used to characterize whether the stimulation program of the corresponding current source has changed.
[0050] (6) The main source refers to the current source that serves as the timing reference during the multi-current source misaligned output process; the slave source refers to the current source that performs linked output based on the stimulus waveform output by the main source. The main source and slave source can be determined according to the change status of the corresponding program number of each current source.
[0051] (7) Current output state refers to the output state of the current source at the current judgment moment, including output state and silent state. Output state indicates that the current source is outputting a stimulus waveform, and silent state indicates that the current source is not currently outputting a stimulus waveform.
[0052] (8) Soft flag refers to a status flag maintained by the controller to record the current output state of the current source. The soft flag can be implemented by software variables, status bits, register flag bits or a combination thereof; when a current source starts to output a stimulus waveform, the soft flag corresponding to the current source is set to the output state, and when the current source completes the current output segment, the soft flag is set to the silent state.
[0053] (9) The waveform parameter safe update window refers to the time window during which waveform parameter updates are allowed. In the embodiments of this application, the waveform parameter safe update conditions are: both the master source and the slave source are in a silent state, and the corresponding waveform parameter safe update windows are both in a valid state.
[0054] (10) The timing trigger unit is a unit used to control the valid state of the waveform parameter security update window based on the timing result. It can be used to control the opening, closing, or validity period of the waveform parameter security update window. The timing trigger unit can be implemented by a timer, a counter, software timing logic, hardware trigger circuit, or a combination thereof.
[0055] (11) Look-ahead control refers to a control method that controls the effective state of the waveform parameter safety update window in advance based on the timing result of the timing trigger unit before the actual start of the next output segment. In the embodiments of this application, the look-ahead control may include: when the preset advance time before the start of the next output segment is reached, controlling the waveform parameter safety update window of the corresponding current source to an invalid state, so as to avoid the waveform parameter writing action being extended to the next output segment.
[0056] (12) Partial waveform parameter update refers to updating some waveform parameters of the current source while maintaining the original output timing continuity of the current source; complete waveform parameter update refers to updating or reloading the waveform parameters corresponding to the current source as a whole.
[0057] (13) Waveform interruption refers to the interruption mechanism used to maintain the output rhythm of the stimulus waveform. In the embodiments of this application, the waveform interruption is not masked during the waveform parameter update process to reduce the impact of parameter update on the real-time output of the stimulus waveform.
[0058] (14) Stimulus waveform with staggered output refers to the main source and the slave source outputting stimulus waveforms separately according to a preset timing relationship, and forming staggered stimulus waveforms in time. Multi-source staggered output is used to reduce the risk of multiple stimulus waveforms acting simultaneously.
[0059] (15) Periodic resynchronization refers to the control process of recalibrating the phase relationship between the main source and the slave source according to the resynchronization period during the process of the main source and the slave source forming misaligned output stimulus waveforms according to the preset timing relationship.
[0060] (16) Stimulation load refers to the equivalent load formed between the stimulating electrode and the stimulated object.
[0061] (17) Load status information refers to information used to characterize the current state or changes in the state of the stimulus load during the stimulus output process. The load status information can be used to reflect the contact state between the stimulating electrode and the stimulated object, changes in equivalent impedance, changes in tissue state, load fluctuations caused by electrode aging or movement, and can be used to determine the stimulation current settling time.
[0062] (18) Stimulation current settling time refers to the time required for the stimulation current to reach the target output state after the current source outputs the stimulation waveform.
[0063] (19) Electrode topology relationship refers to the electrode connection relationship or spatial association relationship determined based on the mapping relationship between each current source and the stimulation electrode. The electrode topology relationship can be used to determine whether there is a shared electrode relationship or a preset spatial proximity relationship between different current sources.
[0064] (20) Simultaneous output limiting condition refers to the control condition used to limit the simultaneous output of stimulation waveforms of the at least two current sources when the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship or the corresponding stimulation electrodes meet a preset spatial proximity relationship.
[0065] (21) Single-source mode refers to the working mode in which only one current source performs the stimulus output; multi-source mode refers to the working mode in which at least two current sources perform the stimulus output. New current source refers to the current source newly added to the stimulus output process when switching from single-source mode to multi-source mode; remaining current source refers to the current source that continues to perform stimulus output after switching from multi-source mode to single-source mode.
[0066] In some embodiments of this application, the technical solutions of these embodiments can be applied to electrical stimulation devices or systems such as functional electrical stimulation, nerve stimulation, muscle stimulation, and rehabilitation stimulation. The electrical stimulation device or system may include a controller, multiple current sources, multiple stimulation electrodes, and a stimulation load for carrying the stimulation output. The controller can coordinate and control the parameter updates, master-slave role determination, staggered output, safety update window control, and output mode switching of the multiple current sources based on the stimulation parameters, output status, and electrode connection relationships of each current source.
[0067] To facilitate understanding of the embodiments of this application, firstly, in conjunction with Figure 1 Detailed explanation. Figure 1 The diagram shown illustrates a flowchart of a coordinated control method for multi-current source stimulation output according to an embodiment of this application. The coordinated control method for multi-current source stimulation output in this embodiment mainly includes the following steps:
[0068] Step S110: Obtain the stimulation parameters to be updated this time; the stimulation parameters include the current program number and current waveform parameters corresponding to each current source; and obtain the previous program number of each current source.
[0069] The current source is a current output unit used to output a stimulus waveform. The current program number indicates the stimulus program to be applied to the corresponding current source in the current update round, and the previous program number indicates the stimulus program most recently applied to the corresponding current source before the current update round. The current waveform parameters may include parameters such as current amplitude, frequency, and pulse width used to generate the stimulus waveform.
[0070] In one implementation, the controller can periodically poll whether there are stimulus parameters to be updated. When it receives stimulus parameters to be updated from the host computer or main control device, the controller parses the current program number and waveform parameters corresponding to each current source, and obtains the previous program number of each current source as the basis for comparison to determine whether the program of each current source has changed.
[0071] Through the above steps, a basis for comparison between the current program number and the previous program number can be established for each current source. This enables the controller to distinguish between new stimulation programs and applied stimulation programs in the current update round, avoiding uniform processing of each current source when the program change status cannot be identified. This provides data basis for subsequent master-slave role adaptive determination and differentiated parameter updates.
[0072] Step S120: Compare the current program number corresponding to each current source with the corresponding previous program number, and determine the change status of the program number corresponding to each current source based on the comparison result.
[0073] Specifically, for each current source, the current program number corresponding to that current source is compared with the corresponding previous program number. If the current program number matches the previous program number, it is determined that the program number corresponding to that current source has not changed; if the current program number does not match the previous program number, it is determined that the program number corresponding to that current source has changed. Thus, the program number change status of each current source in the current update round can be obtained.
[0074] By following the steps above, we can distinguish between current sources that have undergone program changes and those that have not, thus avoiding misjudging channels that have been repeatedly issued parameters or have not undergone program changes as channels that need to be fully updated. This reduces the possibility of unnecessary full parameter reloading for unchanged channels and provides a basis for judgment to solve the problem that parameter updates can easily interfere with stable output channels.
[0075] Step S130: Determine the master / slave roles based on the program number change status corresponding to each current source. The master / slave roles include master source and slave source.
[0076] The main source is a current source that serves as a timing reference during the multi-current source misaligned output process, and the slave source is a current source that performs linked output based on the stimulation waveform output by the main source.
[0077] In one implementation, current sources with unchanged program numbers can be designated as master sources, and current sources with changed program numbers can be designated as slave sources. Since current sources with unchanged program numbers typically do not require reloading waveform parameters that affect the output timing, they are more suitable as stable timing references. This protects the output continuity of current sources with unchanged program numbers during parameter updates.
[0078] Through the above steps, a current source with an unchanged program number can be used as a stable timing reference, so that the master source can maintain good output continuity during parameter updates. This avoids the interruption of the output cycle caused by using a current source that needs to be fully updated as a timing reference in a fixed master-slave mode. This solves the problem of fixed master-slave roles and difficulty in adapting to different update scenarios in the existing technology.
[0079] Step S140: Determine whether the waveform parameter safe update condition is met based on the current output state corresponding to the main source and the slave source.
[0080] The current output state includes an output state and a silent state. The output state indicates that the current source is currently outputting a stimulus waveform, while the silent state indicates that the current source is not currently outputting a stimulus waveform. The waveform parameter safety update condition is used to determine whether a waveform parameter update is currently allowed.
[0081] In one embodiment, the satisfaction of waveform parameter safety update conditions can be determined based on whether both the master source and slave source are in a silent state and whether the corresponding waveform parameter safety update windows are both in a valid state. If both the master source and slave source are in a silent state and their corresponding waveform parameter safety update windows are both in a valid state, then the waveform parameter safety update conditions are satisfied; otherwise, the waveform parameter safety update conditions are not satisfied.
[0082] If the waveform parameter safety update conditions are not met, the controller will not perform waveform parameter update for the time being, and will continue to monitor the current output status of the main source and the slave source, as well as the valid status of the waveform parameter safety update window. Figure 1 In step S140, the negative branch is reconnected to step S140, which indicates that condition monitoring and judgment continue when the condition is not met.
[0083] By following the steps above, waveform parameter updates can be restricted to the time period when both the master and slave sources are suitable for parameter writing, avoiding parameter writing during the current source output stimulation waveform, thereby reducing the risk of waveform glitches, abnormal output, or output clock disturbances caused by parameter writing and waveform output contending for registers.
[0084] Step S150: When the current output state corresponding to the main source and the slave source satisfies the waveform parameter safe update condition, perform partial waveform parameter update on the main source and complete waveform parameter update on the slave source.
[0085] The partial waveform parameter update refers to updating some waveform parameters while maintaining the original output timing continuity of the current source; the complete waveform parameter update refers to updating or reloading the waveform parameters corresponding to the current source as a whole.
[0086] In one embodiment, performing partial waveform parameter updates on the main source can include updating parameters such as the current amplitude of the main source without reloading parameters such as the frequency and pulse width that affect the output clock cycle; performing complete waveform parameter updates on the slave source can include updating the waveform parameters such as the current amplitude, frequency, and pulse width of the slave source as a whole. This reduces the impact of parameter updates on the timing of the main source output and allows the slave source to obtain the complete waveform parameters to be applied in this application.
[0087] Through the above steps, different granularity waveform parameter update methods can be assigned according to the different roles of the master source and slave source in this update, so that the master source maintains the timing continuity, while the slave source completes the loading of complete parameters required for the new stimulus program. This avoids the interruption of the stable output channel caused by uniform and complete reloading of all current sources, and reduces the impact of parameter updates on the output beat of multiple current sources.
[0088] Step S160: After updating the waveform parameters corresponding to the main source and the slave source, the main source is triggered to output a stimulus waveform, and the slave source is triggered to output in a coordinated manner based on the stimulus waveform output by the main source, so that the main source and the slave source form a staggered output stimulus waveform according to a preset timing relationship.
[0089] Specifically, after updating the waveform parameters corresponding to the main source and the slave source, the main source can be triggered to output a stimulation waveform first. After the main source outputs the stimulation waveform, the slave source is triggered to output in a coordinated manner according to the stimulation waveform output by the main source, so that the main source and the slave source have staggered outputs in time. The preset timing relationship can be set according to stimulation requirements, output intervals, electrode connection relationships, or output safety requirements.
[0090] By triggering the main source to output the stimulation waveform after completing the waveform parameter update, and triggering the slave source to output based on the stimulation waveform of the main source, the output timing of the slave source can be determined based on the stimulation waveform of the main source, thereby enabling the main source and slave source to form a staggered output relationship in time, reducing the risk of simultaneous output or overlap of stimulation waveforms from multiple current sources, and improving the coordination and stability of multi-current source stimulation output.
[0091] Through steps S110 to S160, this embodiment of the application can first adaptively determine the master source and slave source based on the program number change status of each current source, then perform differentiated waveform parameter updates when the waveform parameter safety update conditions are met, and finally trigger the slave source's linked output based on the master source output after the waveform parameter update is completed. This reduces the impact of parameter updates on the stable output channel and enables multiple current sources to form staggered output stimulation waveforms.
[0092] Based on the above implementation method, the step of determining the master and slave roles according to the change status of the program number corresponding to each current source includes: during the update round iteration, if there is a current source whose program number has not changed, then the current source is determined as the master source, and the current source whose program number has changed is determined as the slave source; if the program numbers of each current source have not changed, then the master and slave sources determined in the previous round are maintained; if the program numbers of each current source have changed, then the master and slave sources are re-determined according to the preset rules.
[0093] Furthermore, Figure 2 This is a flowchart illustrating how the master / slave roles are determined based on a change in status according to a program number, as shown in one embodiment of this application. Figure 2 As shown, determining the master / slave role based on the change status of the program number corresponding to each current source can include the following steps:
[0094] In step S210, the change status of the program number corresponding to each current source is obtained.
[0095] Specifically, after comparing the current program number with the previous program number for each current source, the program number change status for each current source can be obtained. The program number change status can include two states: no change and a change. A unchanged program number indicates that the current source will continue to execute the same stimulation program as before in this update round; a changed program number indicates that the current source needs to switch to a new stimulation program in this update round.
[0096] In step S220, determine the program number change status combination of each current source in the current update round.
[0097] Specifically, the controller can statistically analyze the change status of the program numbers corresponding to each current source and determine whether the current update round falls under one of the following scenarios: some current source program numbers have changed, none of the current source program numbers have changed, or all current source program numbers have changed. This determination helps identify whether a current source that can serve as a stable timing reference exists.
[0098] In step S230, if there is a current source whose program number has not changed and a current source whose program number has changed, then the current source whose program number has not changed is determined as the main source, and the current source whose program number has changed is determined as the slave source.
[0099] Among them, current sources whose program numbers have not changed usually do not require reloading waveform parameters that affect the output timing, so their output timing is relatively stable and suitable as the master source. Current sources whose program numbers have changed need to apply new waveform parameters, which may involve a complete update of timing-related parameters such as frequency and pulse width. Therefore, they are identified as slave sources and their output is linked to the output timing of the master source.
[0100] For example, the system includes a first current source and a second current source. In the previous update, the previous program number of the first current source was P1, and the previous program number of the second current source was P2. In this update, the current program number of the first current source remains P1, while the current program number of the second current source has changed to P3. At this point, the program number of the first current source has not changed, but the program number of the second current source has changed. Therefore, the first current source can be designated as the master source, and the second current source as the slave source. In this way, the first current source can continue to serve as a stable timing reference, and after completing the full waveform parameter update, the second current source will perform staggered output according to the output timing of the master source.
[0101] In step S240, if the program numbers of each current source have not changed, the master source and slave source determined in the previous round are maintained.
[0102] Specifically, when the current program number of each current source is consistent with the corresponding previous program number, it indicates that the stimulation program of each current source has not changed in the current update round. In this case, reassigning the master and slave roles may introduce unnecessary changes in output scheduling. Therefore, the master and slave sources determined in the previous round can be maintained to preserve the existing misaligned output relationship.
[0103] For example, in the previous round, the first current source was the master source and the second current source was the slave source. In this update, the current program number of the first current source is still the same as its previous program number, and the current program number of the second current source is also the same as its previous program number. Therefore, there is no need to redetermine the master and slave roles, and the first current source can continue to be the master source and the second current source can continue to be the slave source.
[0104] In step S250, if the program numbers of all current sources change, the master source and slave source are re-determined according to preset rules.
[0105] Specifically, when the program numbers of all current sources change, it indicates that each current source needs to apply a new stimulation program. At this point, there is no current source with an unchanged program number that can serve as a natural, stable timing reference. Therefore, the master and slave sources can be redefined according to preset rules. These preset rules may include defaulting to designating one current source as the master source, or determining the master source based on rules such as current source priority, output channel number, and stimulation site priority.
[0106] For example, the system includes a first current source and a second current source. In the previous round, the previous program number of the first current source was P1, and the previous program number of the second current source was P2. In this update, the current program number of the first current source has changed to P4, and the current program number of the second current source has changed to P5. At this time, the program numbers of both current sources have changed. The system can determine the first current source as the master source and the second current source as the slave source according to preset rules; or it can determine the current source with the higher stimulus priority as the master source according to preset priorities.
[0107] The above method can cover different update scenarios: changes in some current source program numbers, no changes in the program numbers of all current sources, and changes in the program numbers of all current sources, thus providing clear rules for determining the master and slave roles. This method prioritizes protecting the output timing continuity when an unchanged current source exists, and avoids the loss of master and slave roles through preset rules when no unchanged current source exists, thereby improving the stability and adaptability of multi-current source stimulus output control.
[0108] Based on the above implementation, the step of determining whether the waveform parameter safety update condition is met according to the current output state corresponding to the main source and the slave source includes: determining the waveform parameter safety update window according to the current output state corresponding to the main source and the slave source, wherein the current output state includes an output state and a silent state, and the waveform parameter safety update window is a time window that allows waveform parameter updates to be performed; controlling the effective state of the waveform parameter safety update window according to the timing result through the timing trigger unit corresponding to each current source; wherein the waveform parameter safety update condition is: both the main source and the slave source are in a silent state, and the corresponding waveform parameter safety update windows are both in an effective state.
[0109] Furthermore, Figure 3 This is a schematic diagram illustrating the waveform parameter security update window and its look-ahead control in one embodiment of this application. Figure 3 As shown, determining whether the waveform parameter safe update condition is met based on the current output state corresponding to the master source and slave source may include the following steps:
[0110] In step S310, the current output status corresponding to the master source and slave source is obtained.
[0111] Specifically, the controller can acquire the output states of the master source and slave source at the current judgment moment. The current output state includes an output state and a silent state. The output state indicates that the corresponding current source is executing stimulus waveform output, and the silent state indicates that the corresponding current source is between adjacent stimulus output segments and is not currently executing stimulus waveform output. In one embodiment, the output state and silent state of each current source can be recorded by a soft flag; when a current source starts to output a stimulus waveform, the soft flag corresponding to that current source is set to the output state, and when the current source completes the current output segment, the soft flag is set to the silent state.
[0112] In step S320, a waveform parameter safety update window is determined based on the current output status corresponding to the master source and slave source.
[0113] Specifically, the waveform parameter safe update window is a time window that allows waveform parameter updates to be performed. Since writing waveform parameters may contend with the stimulus waveform output register, writing waveform parameters while the current source is outputting the stimulus waveform may affect the currently outputting stimulus waveform. Therefore, in this embodiment, the basis for forming a waveform parameter safe update window is only available when both the master and slave sources are in a silent state.
[0114] For example, the system includes a first current source and a second current source, with the first current source designated as the master source and the second current source designated as the slave source. If both the first and second current sources are in a quiescent state between adjacent stimulus output segments, then the current moment can be considered to have the basis for performing waveform parameter updates. If the first current source is in a quiescent state, but the second current source is outputting a stimulus waveform, then waveform parameter updates should not be performed to avoid writing parameters that affect the stimulus waveform being output by the second current source.
[0115] In step S330, the effective state of the waveform parameter safety update window is controlled by the timing trigger unit corresponding to each current source based on the timing result.
[0116] Specifically, the timing trigger unit is used to perform look-ahead control on the waveform parameter safety update window to avoid delaying the waveform parameter writing action to the next output segment even when the current source is in a silent state, as the time before the start of the next output segment is too short. In one embodiment, when a current source enters a silent state, the timing trigger unit corresponding to that current source can be activated. The timing trigger unit can be triggered at a preset advance time before the start of the next output segment of that current source, and the waveform parameter safety update window corresponding to that current source is controlled to be in an invalid state. Thus, the controller has already closed the corresponding waveform parameter safety update window before the actual start of the next output segment.
[0117] For example, after the first current source enters a silent state, there is still a period of time before the start of the next output segment. If the timing trigger unit has not yet been triggered, the waveform parameter safety update window corresponding to the first current source can remain valid; if the timing trigger unit has been triggered, even if the first current source has not yet actually entered the next output segment at the hardware output level, the waveform parameter safety update window corresponding to the first current source will be set to invalid in advance, thereby prohibiting new waveform parameter writing actions from entering the window.
[0118] In step S340, it is determined whether both the master source and the slave source are in a silent state, and whether the corresponding waveform parameter security update windows are both in a valid state.
[0119] Specifically, the controller can simultaneously determine two conditions: first, whether both the master and slave sources are in a silent state; second, whether the waveform parameter safety update windows corresponding to both the master and slave sources are both in a valid state. Only when both conditions are met is the waveform parameter safety update condition determined to be satisfied. If either the master or slave source is in an output state, or if the waveform parameter safety update window corresponding to either source is invalid, then the waveform parameter safety update condition is determined not to be satisfied.
[0120] For example, the first current source is the primary source, and the second current source is the secondary source. If both the first and second current sources are in a silent state, and their corresponding timing trigger units have not triggered the closing of the waveform parameter safety update window, then the waveform parameter safety update condition is satisfied. If the second current source is in a silent state, but its timing trigger unit has already closed the corresponding waveform parameter safety update window in advance, then the waveform parameter safety update condition is not satisfied, and waveform parameter updating is not allowed to continue.
[0121] In step S350, if the waveform parameter safe update condition is met, then waveform parameter updates are allowed for the master source and slave source.
[0122] Specifically, when both the master source and the slave source are in a quiescent state, and the corresponding waveform parameter safety update windows are both valid, the controller can enter the waveform parameter update process and perform waveform parameter updates of different granularities on the master source and the slave source according to the aforementioned master-slave roles. That is, it can perform partial waveform parameter updates on the master source and complete waveform parameter updates on the slave source.
[0123] In step S360, if the waveform parameter safety update condition is not met, the waveform parameter update is temporarily suspended.
[0124] Specifically, when the master or slave source is in the output state, or when the waveform parameter safety update window corresponding to the master or slave source is invalid, the controller temporarily suspends waveform parameter updates. Instead, it re-acquires the current output state of the master and slave sources at subsequent judgment times, re-determines the waveform parameter safety update window and its valid state, and re-determines whether the waveform parameter safety update conditions are met. This method prevents waveform parameter writing from extending across the silent interval to the output segment, thereby reducing the risk of abnormal waveform stimulation or waveform glitches.
[0125] It should be noted that, Figure 1 The negative branch of step S140 is linked back to step S140, which is used to summarize that condition monitoring and judgment continue when the waveform parameter safety update condition is not met. Figure 3 The illustrated process is a further detailed implementation of step S140. When step S340 determines that the waveform parameter safety update condition is not met, the controller temporarily suspends the waveform parameter update in step S360 and re-enters step S310 at a subsequent judgment time to re-acquire the current output states corresponding to the master and slave sources, re-determine the waveform parameter safety update window and its valid state, and again determine whether the waveform parameter safety update condition is met. Therefore, Figure 3 In step S360, the connection is reconnected to step S310, which is... Figure 1 The specific implementation of the no-branch back connection logic in step S140 is consistent with the technical meaning of condition monitoring and re-judgment.
[0126] By employing the above method, this embodiment of the application restricts waveform parameter updates to a time range within which both the master and slave sources are in a silent state and the waveform parameter safety update window is valid. Furthermore, a timing trigger unit performs look-ahead control on the waveform parameter safety update window, ensuring that the window expires before the start of the next output segment. This reduces the risk of conflicts between parameter writing and stimulus waveform output, improving the safety of parameter updates and output stability during multi-current source stimulus output.
[0127] Based on the above implementation method, after performing the step of determining the waveform parameter safety update window according to the current output state corresponding to the main source and the slave source, the method further performs the following steps: obtaining the load state information of the stimulation load corresponding to each current source during the stimulation output process; determining the stimulation current establishment time according to the load state information; adjusting the timing control parameters corresponding to the timing trigger unit according to the stimulation current establishment time; and adjusting the validity period of the waveform parameter safety update window based on the adjusted timing control parameters so that the validity period matches the stimulation current establishment time corresponding to the current load state.
[0128] Furthermore, Figure 4This is a flowchart illustrating the process of adjusting the waveform parameter security update window based on stimulus load state in one embodiment of this application. Figure 4 As shown, adjusting the waveform parameters for a safe update window based on the stimulus load state can include the following steps:
[0129] In step S410, the load status information of the stimulation load corresponding to each current source during the stimulation output process is obtained.
[0130] Specifically, the stimulation load can be the equivalent load formed between the stimulation electrode and the stimulated object. Since the contact state between the stimulation electrode and the stimulated object may change depending on the attachment state, skin condition, tissue impedance, electrode aging, or movement, the load state of each current source is not always fixed during the stimulation output process. The controller can acquire the load state information corresponding to each current source to determine the impact of the current stimulation load on the stimulation current establishment process.
[0131] For example, when the stimulation electrode corresponding to the first current source has a relatively stable contact with the stimulated object, the stimulation current output by the first current source can reach the target output state relatively quickly; however, when the contact impedance of the stimulation electrode corresponding to the second current source increases or the contact state becomes unstable, the time required for the stimulation current output by the second current source to reach the target output state may become longer. In this case, if a fixed waveform parameter safety update window validity period is still used, it may be difficult to accurately match the actual output boundary under the current load conditions.
[0132] In step S420, the stimulation current establishment time is determined based on the load status information.
[0133] Specifically, the stimulation current settling time characterizes the time required for the stimulation current to reach the target output state after the current source begins outputting the stimulation waveform. The stimulation current settling time may change as the load condition information changes. If the stimulation load is relatively stable, the equivalent impedance is low, or the contact condition is good, the stimulation current settling time can be shorter; if the stimulation load fluctuates significantly, the equivalent impedance is high, or the contact condition is poor, the stimulation current settling time can be longer.
[0134] By determining the stimulation current settling time based on the load status information, the controller can obtain the output settling characteristics of each current source under actual stimulation load conditions, providing a basis for subsequent adjustment of the timing control parameters of the timing trigger unit.
[0135] In step S430, the timing control parameters corresponding to the timing trigger unit are adjusted according to the stimulation current establishment time.
[0136] Specifically, the timing trigger unit is used to control the effective state of the waveform parameter safety update window. When the stimulation current settling time changes, the safety margin required before the next output segment may also change. Therefore, the timing control parameters corresponding to the timing trigger unit can be adjusted according to the stimulation current settling time, so that the timing trigger unit can control the waveform parameter safety update window in a way that adapts to the current load state.
[0137] For example, when the stimulation current settling time is short, the timing trigger unit can use a shorter early shutdown time to maintain a high utilization rate of the waveform parameter safe update window; when the stimulation current settling time is long, the timing trigger unit can appropriately increase the early shutdown time to make the waveform parameter safe update window expire earlier, thereby reserving more time margin for the next output segment and avoiding the waveform parameter writing action from being extended to the next output segment.
[0138] In step S440, the validity period of the waveform parameter security update window is adjusted based on the adjusted timing control parameters.
[0139] Specifically, the controller redetermines the closing time or validity period of the waveform parameter safety update window based on the adjusted timing control parameters, ensuring that the validity period matches the stimulation current settling time corresponding to the current load state. When the stimulation current settling time becomes longer, the waveform parameter safety update window can be controlled to expire earlier, allowing more sufficient settling time for the next output segment. When the stimulation load is relatively stable and the stimulation current settling time is short, the validity period of the waveform parameter safety update window can be appropriately extended to increase the opportunity for waveform parameter updates.
[0140] In this way, the waveform parameter safety update window is not always fixed in duration, but can be adapted and adjusted according to the change of stimulus load state. This avoids the problem of closing the window too late or too early when the load changes, thus improving the real-time performance and adaptability of waveform parameter updates while ensuring the safety of parameter writing.
[0141] Based on the above implementation, the output of the stimulation waveform is maintained by waveform interruption; during the valid state of the waveform parameter safety update window, waveform parameter updates are performed on the main source and the slave source, and the waveform interruption is not masked during the waveform parameter update process; wherein, the validity period of the waveform parameter safety update window is adapted to the maximum time required to complete one waveform parameter update, so that the waveform parameter update action can be completed within the waveform parameter safety update window.
[0142] Specifically, waveform interruption is used to maintain the output rhythm of the stimulation waveforms from each current source. If waveform interruption is masked during waveform parameter updates, the output rhythm of the stimulation waveform may become uncontrollable. Therefore, this embodiment does not protect the parameter writing process by masking waveform interruption. Instead, it performs parameter updates during the valid waveform parameter update window, ensuring that the validity period of this window is no less than the maximum time required to complete one waveform parameter update. Thus, even if waveform interruption continues during parameter updates, the parameter writing action is prevented from extending to the next output segment, thereby reducing the risk of abnormal stimulation waveforms or waveform glitches.
[0143] By employing the above method, this embodiment of the application does not require protecting the parameter writing process by blocking waveform interruptions. Instead, it utilizes a waveform parameter safe update window and a timing trigger unit to limit the parameter update timing. This avoids both the loss of control over the stimulus waveform output rhythm caused by waveform interruptions and reduces the risk of abnormal stimulus waveforms or waveform glitches resulting from the parameter writing action extending to the next output segment.
[0144] Based on the above implementation method, during the process of the main source and the slave source forming a misaligned output stimulus waveform according to a preset timing relationship, the method further performs the following steps: periodically resynchronizing the phase relationship between the main source and the slave source; determining the resynchronization period according to the output frequency relationship between the main source and the slave source; and performing resynchronization control on the slave source based on the resynchronization period to maintain the misaligned output relationship between the main source and the slave source.
[0145] Furthermore, the resynchronization control performed on the slave source based on the resynchronization period includes: pausing the output of the stimulation waveform of the slave source when the resynchronization time corresponding to the resynchronization period is reached; and re-triggering the output of the stimulation waveform of the slave source after a preset misalignment delay time to re-establish the misalignment timing relationship between the slave source and the master source; wherein the resynchronization control uses the master source as the timing reference and is performed unidirectionally on the slave source.
[0146] Furthermore, Figure 5 This is a schematic diagram illustrating the process of periodic resynchronization of misaligned output phases in one embodiment of this application. Figure 5 As shown, periodic resynchronization of misaligned output phases may include the following steps:
[0147] In step S510, the phase relationship between the master source and the slave source is periodically resynchronized.
[0148] Specifically, after the master source and slave source form misaligned output stimulus waveforms according to a preset timing relationship, although an initial misalignment relationship has been established between them, during long-term operation, the phase relationship between the master source and slave source may gradually shift due to factors such as timing errors, interruption response errors, or output frequency differences of each current source. Without resynchronization control, the originally misaligned stimulus waveforms may approach or even overlap after a period of operation. Therefore, this embodiment introduces periodic resynchronization during the misaligned output process to recalibrate the phase relationship between the master source and slave source.
[0149] In step S520, the resynchronization period is determined based on the output frequency relationship between the master source and the slave source.
[0150] Specifically, the resynchronization period can be determined based on the output frequency relationship between the master source and the slave source. In one embodiment, a common period can be determined based on the output frequencies of the master source and the slave source, and the common period can be used as the resynchronization period; alternatively, a synchronization counting condition can be set based on the number of pulse groups of the master source and the slave source within the common period, and when the count reaches the preset condition, the resynchronization time corresponding to the resynchronization period is determined.
[0151] For example, the master source outputs a stimulus waveform at a first output frequency, and the slave source outputs a stimulus waveform at a second output frequency. The controller can determine the time point when the two re-enter the same period boundary based on the relationship between the first and second output frequencies, and use this time point as the resynchronization moment. In this way, the slave source can be recalibrated before the phase error accumulates to the point of affecting the misaligned output relationship.
[0152] In step S530, it is determined whether the resynchronization time corresponding to the resynchronization period has been reached.
[0153] Specifically, the controller can determine whether the resynchronization time has been reached through a counter, timer, or software timing logic. If the resynchronization time has not been reached, the master source and slave source will continue to output out of order according to the original preset timing relationship; if the resynchronization time has been reached, the slave source resynchronization control process will begin.
[0154] For example, a synchronization counter related to the output cycle can be maintained. After each preset output unit is completed, the synchronization counter is updated; when the synchronization counter reaches the count value corresponding to the resynchronization cycle, the resynchronization time is determined.
[0155] In step S540, when the resynchronization time corresponding to the resynchronization cycle is reached, the output of the stimulation waveform from the source is paused.
[0156] Specifically, when the resynchronization time arrives, this embodiment does not pause the stimulus waveform output of the master source, but instead pauses the stimulus waveform output of the slave source. Since the master source serves as the timing reference, its output beat remains continuous, thus avoiding interference with the stable timing reference during the resynchronization process. After pausing the slave source output, the controller can wait for a preset misalignment delay time to re-establish the misalignment phase relationship between the slave source and the master source.
[0157] For example, the first current source is the master source, and the second current source is the slave source. When the resynchronization time is reached, the first current source continues to output the stimulus waveform according to the original rhythm, while the second current source pauses its output. In this way, the system does not disrupt the continuity of the first current source as the timing reference, and only performs phase reconstruction on the second current source.
[0158] In step S550, after a preset misalignment delay time, the source output stimulus waveform is retried.
[0159] Specifically, the preset misalignment delay time is used to determine the restart time position of the slave source relative to the master source. After pausing the slave source output, the controller can use the output event or the output cycle boundary of the master source as a reference to re-trigger the slave source output stimulus waveform after the preset misalignment delay time. Thus, the output phase of the slave source after restarting can be re-anchored to the timing reference of the master source.
[0160] For example, after the main source completes one stimulus waveform output, the controller starts timing; when the timing duration reaches the preset misalignment delay time, the slave source is triggered to output a stimulus waveform again, so that the starting output position of the slave source maintains the preset misalignment relationship with the main source. This method can prevent the cumulative deviation caused by the slave source's long-term independent timing from continuing to expand.
[0161] In step S560, using the primary source as the timing reference, a one-way resynchronization is performed on the secondary source to re-establish the misaligned timing relationship.
[0162] Specifically, the resynchronization control uses the master source as the timing reference and only performs pause, delay, and re-trigger operations on the slave source. The master source is not paused or restarted during resynchronization, nor is its existing output rhythm changed. By unidirectionally adjusting the slave source, the misaligned timing relationship between the slave source and the master source can be re-established while protecting the continuity of the master source's output.
[0163] For example, in a multi-source output process, the first current source is designated as the primary source and continuously outputs, while the second current source is designated as the secondary source. When the system detects that the resynchronization time has been reached, it only controls the second current source to pause its output and restarts it after a preset misalignment delay time. In this way, the output of the first current source is not affected by the resynchronization action, while the second current source re-establishes a misalignment output relationship with the first current source.
[0164] Through the above methods, the embodiments of this application can periodically calibrate the phase relationship between the main source and the slave source during long-term misaligned output. Since the resynchronization process uses the main source as the timing reference and is executed unidirectionally on the slave source, it can reduce the risk of misalignment drift caused by clock errors, interruption scheduling errors, or long-term accumulated deviations without interrupting the stable output of the main source, thereby maintaining a stable misaligned output relationship between the multi-current source stimulation waveforms.
[0165] It should be noted that, Figure 5 The periodic resynchronization process of the misaligned output phase shown is executed cyclically during the period when the main source and the slave source form the misaligned output stimulation waveform according to the preset timing relationship; when the multi-current source misaligned output process ends, the stimulation program terminates, or the system switches to single-source mode, the periodic resynchronization process terminates accordingly.
[0166] Based on the above implementation method, after performing the step of determining the master-slave role according to the program number change status of each current source, the method further performs the following steps: obtaining the mapping relationship between each current source and the stimulation electrode; determining the electrode topology relationship between each current source according to the mapping relationship; when the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship, or when the stimulation electrodes corresponding to at least two current sources satisfy a preset spatial proximity relationship, determining that the at least two current sources have a simultaneous output restriction condition; according to the simultaneous output restriction condition, controlling the at least two current sources to form a staggered output according to the preset timing relationship between the master source and the slave source, so as to restrict the at least two current sources from simultaneously outputting stimulation waveforms.
[0167] Furthermore, Figure 6 This is a schematic diagram illustrating a process for simultaneous output based on electrode topology limitations in one embodiment of this application. For example... Figure 6 As shown, simultaneous output based on electrode topology constraints can include the following steps:
[0168] In step S610, the mapping relationship between each current source and the stimulation electrode is obtained.
[0169] Specifically, the mapping relationship is used to represent the connection or correspondence between each current source and its corresponding stimulation electrode. Each current source can correspond to a set of stimulation electrodes, or it can share stimulation electrodes with other current sources. The controller can obtain the mapping relationship between each current source and the stimulation electrode based on a pre-configured electrode connection table, channel configuration data, or the current stimulation scheme.
[0170] For example, if the first current source corresponds to the first and second stimulating electrodes, and the second current source corresponds to the second and third stimulating electrodes, then the first and second current sources share an electrode relationship at the second stimulating electrode. As another example, if the first current source corresponds to the first and second stimulating electrodes, and the second current source corresponds to the third and fourth stimulating electrodes, although they do not share the same stimulating electrode, the spatial distance between the third and second stimulating electrodes may still create a spatial proximity relationship.
[0171] In step S620, the electrode topology relationship between each current source is determined according to the mapping relationship.
[0172] Specifically, electrode topology is used to characterize the connection, sharing, or spatial relationship of each current source at the stimulation electrode level. The controller can determine whether the stimulation electrodes corresponding to different current sources have overlapping, sharing, adjacent, or mutually influential relationships based on the mapping relationship between each current source and the stimulation electrode.
[0173] For example, if the stimulation electrodes corresponding to the two current sources have the same electrode, it can be determined that there is a shared electrode relationship between the two current sources; if the stimulation electrodes corresponding to the two current sources are not shared, but their electrode positions meet the preset distance threshold, the same area arrangement condition, or the preset spatial proximity rule, it can be determined that there is a preset spatial proximity relationship between the two current sources.
[0174] In step S630, it is determined whether the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship or whether they meet a preset spatial proximity relationship.
[0175] Specifically, the controller can make a combination judgment on the stimulation electrodes corresponding to each current source. When the stimulation electrodes corresponding to at least two current sources have the same electrode, it is determined that there is a shared electrode relationship; when the spatial distance, arrangement area or adjacency relationship between the stimulation electrodes corresponding to at least two current sources meets the preset spatial proximity condition, it is determined that the preset spatial proximity relationship is met.
[0176] For example, when the first and second current sources share a single return electrode, if they output stimulation waveforms simultaneously, it may lead to current superposition or unstable current distribution at the shared electrode. As another example, even if the first and second current sources do not share an electrode, but their corresponding stimulation electrodes are arranged within the same local stimulation region, simultaneous output may also cause superposition of the local stimulation areas.
[0177] If the stimulation electrodes corresponding to at least two current sources do not share an electrode relationship and do not satisfy a preset spatial proximity relationship, then it is determined that the at least two current sources have not triggered the simultaneous output constraint condition based on the electrode topology relationship.
[0178] In step S640, when the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship, or when the stimulation electrodes corresponding to at least two current sources satisfy a preset spatial proximity relationship, it is determined that the at least two current sources have a simultaneous output restriction condition.
[0179] Specifically, the simultaneous output constraint condition is used to limit the simultaneous output of stimulation waveforms by current sources that have the risk of electrode topological conflict. When the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship, it indicates that there is a direct correlation between them at the electrode connection level; when the stimulation electrodes corresponding to at least two current sources satisfy a preset spatial proximity relationship, it indicates that there may be mutual influence between them at the stimulation region level. Therefore, it can be determined that the simultaneous output constraint condition exists for the at least two current sources.
[0180] For example, if the first current source and the second current source share the same stimulation electrode, the controller can mark the first current source and the second current source as having a simultaneous output restriction condition; if the stimulation electrodes corresponding to the first current source and the second current source are located in the same local muscle area or the same local nerve stimulation area, they can also be marked as having a simultaneous output restriction condition according to the preset spatial proximity relationship.
[0181] In step S650, according to the simultaneous output constraint, the at least two current sources are controlled to form a staggered output according to the preset timing relationship between the main source and the slave source.
[0182] Specifically, for at least two current sources with simultaneous output constraints, the controller does not allow them to output stimulation waveforms simultaneously within the same time period. Instead, based on the established master-slave source relationship, it causes them to output in a staggered manner according to a preset timing relationship. The preset timing relationship can be that the master source outputs first, and the slave source outputs in conjunction with the stimulation waveform output by the master source, or it can be other time-staggered relationships set according to the stimulation scheme.
[0183] For example, a first current source is designated as the primary source, and a second current source is designated as the secondary source, with the first and second current sources sharing a common electrode. In this case, the controller can first trigger the first current source to output a stimulation waveform, and then trigger the second current source to output a stimulation waveform after the output segment of the first current source ends, or after a preset offset delay time, thereby preventing both from acting on the shared electrode simultaneously.
[0184] In step S660, the simultaneous output of stimulation waveforms by the at least two current sources is restricted.
[0185] Specifically, by controlling current sources with simultaneous output constraints to form staggered outputs according to a preset timing relationship between the master and slave sources, the simultaneous output of stimulus waveforms can be restricted at the output scheduling level. In other words, the simultaneous output constraint does not necessarily prohibit the corresponding current source from participating in the stimulus output, but rather staggers their outputs in time to reduce the risk of stimulus superposition caused by shared electrodes or spatially adjacent electrodes.
[0186] For example, when the stimulation electrodes corresponding to the first and second current sources satisfy a preset spatial proximity relationship, the controller can allow both the first and second current sources to participate in the current stimulation scheme, but avoids them acting on adjacent stimulation areas simultaneously through staggered output. This improves the safety and controllability of the stimulation output while ensuring multi-source stimulation functionality.
[0187] Through the above methods, the embodiments of this application can determine the electrode topology based on the mapping relationship between each current source and the stimulation electrode, and apply simultaneous output constraints to the corresponding current sources when there is a shared electrode relationship or a preset spatial proximity relationship. Furthermore, by controlling the corresponding current sources to form staggered outputs through the preset timing relationship between the main source and the slave source, problems such as stimulation superposition, uncontrollable current distribution, or excessively strong local stimulation in shared electrode or adjacent electrode scenarios can be avoided, thereby improving the safety and adaptability of multi-current source stimulation output.
[0188] Based on the above implementation method, after completing the step of obtaining the stimulation parameters to be updated, the method further performs the following steps: detecting the current stimulation output mode of the multi-current source stimulation output; when the current stimulation output mode switches from single-source mode to multi-source mode and there is a new current source, the master source and slave source are re-determined according to the addition status of the new current source and the output status of the existing current sources, and the master source and slave source are controlled to form staggered output stimulation waveforms according to a preset timing relationship; when the current stimulation output mode switches from multi-source mode to single-source mode, the master-slave role setting is canceled, and the remaining current sources are controlled to output stimulation waveforms independently.
[0189] Furthermore, Figure 7 This is a schematic diagram illustrating the switching control between single-source and multi-source modes in one embodiment of this application. Figure 7 As shown, the switching control between single-source mode and multi-source mode may include the following steps:
[0190] In step S710, the current stimulation output mode of the multi-current source stimulation output is detected.
[0191] Specifically, the controller can detect the current stimulation output mode based on the number of current sources currently enabled, the number of current sources currently participating in the stimulation output, or the number of current sources indicated in the stimulation parameters to be updated. The current stimulation output mode includes single-source mode and multi-source mode. Single-source mode indicates that only one current source is currently participating in the stimulation output, while multi-source mode indicates that at least two current sources are currently participating in the stimulation output.
[0192] For example, if only the first current source is in the output enabled state during the current stimulation process, and the second current source does not participate in the stimulation output, then the current stimulation output mode is a single-source mode; if both the first and second current sources are in the output enabled state, or if the stimulation parameters to be updated indicate that both current sources participate in the stimulation output, then the current stimulation output mode is a multi-source mode.
[0193] In step S720, it is determined whether the current stimulus output mode has switched from single-source mode to multi-source mode and whether there is a new current source.
[0194] Specifically, when the stimulation parameters to be updated indicate the addition of one or more current sources to participate in the stimulation output, whereas only one current source participated in the stimulation output in the previous output stage, it can be determined that the current stimulation output mode has switched from single-source mode to multi-source mode. The newly added current source can be a current source added to participate in the stimulation output during this switching process.
[0195] For example, if only the first current source outputs the stimulation waveform in the previous output stage, and the stimulation parameters to be updated indicate that the second current source also begins to participate in the stimulation output, then the second current source is a newly added current source, and the current stimulation output mode is switched from single-source mode to multi-source mode.
[0196] In step S730, when the current stimulus output mode is switched from single-source mode to multi-source mode and a new current source is added, the main source and the slave source are re-determined according to the addition status of the new current source and the output status of the existing current source.
[0197] Specifically, when a new current source is added to the stimulus output process, it may not yet have formed a stable output sequence, or it may not have the stable output state of the previous output stage. Therefore, when switching from single-source mode to multi-source mode, the master and slave sources can be redefined by combining the addition status of the new current source and the output status of the existing current sources. The addition status of the new current source can include whether the new current source is enabled, whether it has the waveform parameters to be applied, and whether it needs to participate in the current stimulus output; the output status of the existing current sources can include whether the existing current sources are in a stable output state, whether they are in a silent state, and whether they maintain the original stimulus program.
[0198] In one implementation, when an existing current source has stabilized its output and a new current source is added to the multi-source stimulus output, the existing current source can be designated as the primary source, and the new current source as the secondary source. In this way, the existing current source continues to serve as a stable timing reference, and the new current source outputs in conjunction with the existing current source based on its output timing.
[0199] For example, the first current source originally outputs a stable stimulus waveform in single-source mode. In this update, the second current source is added and enabled to participate in the stimulus output. In this case, the first current source can be designated as the master source, and the second current source as the slave source. After completing the corresponding waveform parameter update, the second current source performs staggered linkage output according to the output timing of the first current source, thereby achieving a smooth switch from single-source output to multi-source output.
[0200] In step S740, the main source and the slave source are controlled to form a staggered output stimulus waveform according to a preset timing relationship.
[0201] Specifically, after redefining the primary and secondary sources, the controller can first maintain or trigger the primary source's output stimulation waveform, and then trigger the secondary source's coordinated output based on the primary source's output stimulation waveform, so that the primary and secondary sources form staggered output stimulation waveforms according to a preset timing relationship. The preset timing relationship can be set according to the stimulation scheme, output safety requirements, electrode connection relationships, or staggered output requirements.
[0202] For example, when the first current source is designated as the primary source and the second current source as the secondary source, the first current source can be kept in its original rhythm to output the stimulus waveform. Then, after the first current source's output segment ends, or after a preset offset delay time, the second current source can be triggered to output the stimulus waveform. This avoids overlap between the output of a new current source and an existing current source.
[0203] In step S750, it is determined whether the current stimulus output mode has switched from a multi-source mode to a single-source mode.
[0204] Specifically, when the stimulus parameters to be updated indicate that some current sources that were originally involved in multi-source stimulus output should stop outputting, and only one current source is retained to continue performing stimulus output, it can be determined that the current stimulus output mode has switched from multi-source mode to single-source mode. At this time, the original master-slave relationship is no longer applicable to the scenario of independent output of a single current source.
[0205] For example, in the previous output stage, both the first current source and the second current source participated in the stimulation output. In this update, the second current source stops participating in the stimulation output, and only the first current source continues to output the stimulation waveform. In this case, the current stimulation output mode is switched from multi-source mode to single-source mode, and the first current source becomes the remaining current source.
[0206] In step S760, when the current stimulus output mode is switched from multi-source mode to single-source mode, the master-slave role setting is canceled, and the remaining current source is controlled to output the stimulus waveform independently.
[0207] Specifically, in single-source mode, only one current source participates in the stimulation output, eliminating the need for a pre-defined timing relationship between the master and slave sources to create staggered outputs. Therefore, the master-slave role setting can be eliminated, and the remaining current sources can be controlled to independently output stimulation waveforms according to their corresponding current waveform parameters or previously applied waveform parameters.
[0208] For example, if the first and second current sources originally had a master-slave relationship and thus staggered outputs, after this update, only the first current source continues to participate in the stimulus output. In this case, the master-slave role setting between the first and second current sources can be canceled, and the first current source can be controlled to output the stimulus waveform independently, while the second current source stops participating in the current stimulus output.
[0209] In step S770, if the current stimulus output mode has not been switched from multi-source mode to single-source mode, the switching process between single-source mode and multi-source mode is not triggered, and the control mode corresponding to the current stimulus output mode is maintained.
[0210] Specifically, when the current stimulus output mode does not meet the conditions for switching from a single-source mode to a multi-source mode with the addition of a new current source, nor the conditions for switching from a multi-source mode to a single-source mode, it indicates that no output mode switch requiring re-establishment or cancellation of master-slave roles has occurred in the current update round. In this case, the controller can maintain the control method corresponding to the current stimulus output mode; if it is still in a multi-source mode, it continues to output staggered values according to the established master and slave sources and preset timing relationships; if it is still in a single-source mode, it continues to control the current current source participating in the stimulus output to independently output the stimulus waveform.
[0211] Through the above methods, the embodiments of this application can dynamically establish or cancel master-slave roles based on changes in the current stimulus output mode. When switching from a single-source mode to a multi-source mode, the stable output state of existing current sources can be used to provide a timing reference for new current sources, enabling smooth integration of new current sources into the multi-source staggered output. When switching from a multi-source mode to a single-source mode, the master-slave role setting that is no longer needed can be canceled, allowing the remaining current sources to output independently. This improves the stability and adaptability during the switching process between single-source and multi-source modes.
[0212] Figure 8 The diagram shown is a structural schematic of a coordinated control device for multi-current source stimulation output in one embodiment of this application. Figure 8As shown, the multi-current source stimulation output coordination control device 800 includes a parameter acquisition module 810, a change state determination module 820, a master-slave role determination module 830, a security update control module 840, and an output control module 850.
[0213] The parameter acquisition module 810 is used to acquire the stimulation parameters to be updated and the previous program number corresponding to each current source; wherein, the stimulation parameters include the current program number and current waveform parameters corresponding to each current source.
[0214] The change status determination module 820 is used to compare the current program number corresponding to each current source with the corresponding previous program number, and determine the change status of the program number corresponding to each current source based on the comparison result.
[0215] The master-slave role determination module 830 is used to determine the master-slave role based on the change status of the program number corresponding to each current source. The master-slave role includes master source and slave source. Specifically, current sources whose program numbers have not changed can be determined as master sources, and current sources whose program numbers have changed can be determined as slave sources. When the program numbers of all current sources have not changed, the master source and slave source determined in the previous round are maintained. When the program numbers of all current sources have changed, the master source and slave source are re-determined according to preset rules.
[0216] The safety update control module 840 is used to determine whether the waveform parameter safety update condition is met based on the current output state corresponding to the main source and the slave source. When the waveform parameter safety update condition is met, the module performs a partial waveform parameter update on the main source and a complete waveform parameter update on the slave source. Furthermore, the safety update control module 840 can also control the effective state of the waveform parameter safety update window through a timing trigger unit and adjust the effective period of the waveform parameter safety update window according to the stimulus load state.
[0217] The output control module 850 is used to trigger the main source to output a stimulation waveform after updating the corresponding waveform parameters of the main source and the slave source, and to trigger the slave source to output in a coordinated manner based on the stimulation waveform output by the main source, so that the main source and the slave source form staggered output stimulation waveforms according to a preset timing relationship. Furthermore, the output control module 850 can also perform periodic resynchronization, limit simultaneous output based on electrode topology, and re-determine or cancel the master-slave role setting when switching between single-source mode and multi-source mode.
[0218] It should be noted that the above modules can be integrated into the same controller or processor, or they can be implemented by multiple hardware units, software functional units, or a combination of hardware and software units. The device in this embodiment can execute the aforementioned coordinated control method for multi-current source stimulation output and achieve the corresponding technical effects.
[0219] According to the coordinated control method for multi-current source stimulation output provided in the embodiments of this application, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the coordinated control method for multi-current source stimulation output described in any of the above embodiments.
[0220] According to the coordinated control method for multi-current source stimulation output provided in the embodiments of this application, this application also provides a control device for multi-current source stimulation output. The control device includes a processor and a memory, the memory storing a computer program, and when the processor executes the computer program, it implements the coordinated control method for multi-current source stimulation output described in any of the above embodiments.
[0221] According to the coordinated control method for multi-current source stimulation output provided in the embodiments of this application, this application also provides a computer program product. The computer program product includes computer program code, which, when run on a computing device, causes the computing device to execute the coordinated control method for multi-current source stimulation output described in any of the above embodiments.
[0222] It should be noted that the specific execution processes of the computer-readable storage medium, computer program product, and control device can be referred to the corresponding processes in the above method embodiments, and will not be repeated here. The above embodiments can achieve coordinated control of multi-current source stimulation output through software, hardware, or a combination of software and hardware, and achieve corresponding technical effects.
[0223] Figure 9 This diagram illustrates an application scenario of multi-current source stimulation output in one embodiment of this application. Figure 9 As shown in the embodiments of this application, the coordinated control method for multi-current source stimulation output can be applied to a multi-current source stimulation system, which may include a host computer or main control device, a controller, multiple current sources, multiple stimulation electrodes, and a stimulation load.
[0224] The host computer or main control device is used to send stimulation parameters to the controller; the controller is used to coordinate and control each current source; each current source outputs stimulation waveforms to the stimulation load through its corresponding stimulation electrode. The stimulation load can be the equivalent load formed between the stimulation electrode and the stimulated object.
[0225] It should be noted that, Figure 9 The application scenarios shown are only used to illustrate the typical operating environment of the embodiments of this application, and do not limit the specific quantity, structure or connection method of the controller, current source, stimulation electrode and stimulation load.
[0226] It should be understood that the specific process of each module performing the above-mentioned corresponding steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.
[0227] It should also be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0228] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).
[0229] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0230] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0231] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0232] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0233] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0234] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, 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 steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0235] In summary, this application provides a coordinated control method, apparatus, device, and storage medium for multi-current source stimulation output. The method acquires the stimulation parameters to be updated and the previous program numbers of each current source, compares the current program number with the previous program number to determine the program number change status, and determines the master source and slave source accordingly. When the waveform parameter safety update conditions are met, partial waveform parameter updates are performed on the master source, and complete waveform parameter updates are performed on the slave sources. After the update is completed, the master source outputs a stimulation waveform, and the slave sources are triggered to output in a coordinated manner based on the master source output, forming a staggered output stimulation waveform. This application can also combine stimulation load status, electrode topology relationship, and output mode switching for coordinated control, thereby reducing the interference of parameter updates on stable output channels and improving the safety and stability of multi-current source stimulation output. Therefore, this application effectively overcomes the various shortcomings of the prior art and has high industrial application value.
[0236] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A coordinated control method for multi-current source stimulus output, characterized in that, include: Obtain the stimulation parameters to be updated this time; the stimulation parameters include the current program number and current waveform parameters corresponding to each current source; And, obtain the previous program number of each current source; Compare the current program number corresponding to each current source with the corresponding previous program number, and determine the change status of the program number corresponding to each current source based on the comparison result. The master-slave roles are determined based on the change status of the program number corresponding to each current source, and the master-slave roles include master source and slave source; Determine whether the waveform parameter safe update condition is met based on the current output state corresponding to the master source and slave source; When the current output states corresponding to the master source and slave source meet the waveform parameter safe update conditions, a partial waveform parameter update is performed on the master source, and a complete waveform parameter update is performed on the slave source. After updating the waveform parameters corresponding to the main source and the slave source, the main source is triggered to output a stimulus waveform, and the slave source is triggered to output a linked waveform based on the stimulus waveform output by the main source, so that the main source and the slave source form a staggered output stimulus waveform according to a preset timing relationship.
2. The coordinated control method for multi-current source stimulation output according to claim 1, characterized in that, The process of determining the master / slave role based on the change of status of the program number corresponding to each current source includes: During the update cycle iteration, if there is a current source whose program number has not changed, then the current source is determined as the master source, and the current source whose program number has changed is determined as the slave source. If the program numbers of each current source have not changed, then the master source and slave source determined in the previous round will remain unchanged; If the program numbers of all current sources change, the master source and slave source will be re-determined according to the preset rules.
3. The coordinated control method for multi-current source stimulation output according to claim 1, characterized in that, Determine whether the waveform parameter safe update condition is met based on the current output state corresponding to the master source and slave source, including: The waveform parameter safety update window is determined based on the current output state corresponding to the master source and slave source. The current output state includes output state and silent state. The waveform parameter safety update window is a time window that allows waveform parameter updates to be performed. The effective state of the waveform parameter safety update window is controlled based on the timing results through the timing trigger unit corresponding to each current source. The waveform parameter security update condition is as follows: both the master source and the slave source are in a silent state, and the corresponding waveform parameter security update windows are both in a valid state.
4. The coordinated control method for multi-current source stimulation output according to claim 3, characterized in that, After performing the step of determining the waveform parameter safety update window based on the current output states corresponding to the master and slave sources, the method further performs the following steps: Obtain the load status information of the stimulation load corresponding to each current source during the stimulation output process; The stimulation current establishment time is determined based on the load status information; Adjust the timing control parameters corresponding to the timing trigger unit according to the establishment time of the stimulation current; The validity period of the waveform parameter safety update window is adjusted based on the adjusted timing control parameters so that the validity period matches the stimulation current establishment time corresponding to the current load state.
5. The coordinated control method for multi-current source stimulation output according to claim 3, characterized in that, The output of the stimulation waveform is maintained by the interruption of the waveform; While the waveform parameter safety update window is active, waveform parameter updates are performed on the master source and slave source, and the waveform interruption is not masked during the waveform parameter update process. The validity period of the waveform parameter security update window is adapted to the maximum time required to complete one waveform parameter update, so that the waveform parameter update action can be completed within the waveform parameter security update window.
6. The coordinated control method for multi-current source stimulation output according to claim 1, characterized in that, During the process of the main source and the slave source forming a staggered output stimulus waveform according to a preset timing relationship, the following steps are performed: The phase relationship between the master source and the slave source is periodically resynchronized; The resynchronization period is determined based on the output frequency relationship between the master source and the slave source. Based on the resynchronization cycle, resynchronization control is performed on the slave source to maintain the misaligned output relationship between the master source and the slave source.
7. The coordinated control method for multi-current source stimulation output according to claim 6, characterized in that, The resynchronization control performed on the slave source based on the resynchronization period includes: When the resynchronization time corresponding to the resynchronization cycle is reached, the output of the stimulation waveform from the source is paused. After a preset misalignment delay time, the output stimulus waveform of the slave source is triggered again to re-establish the misalignment timing relationship between the slave source and the master source. The resynchronization control uses the primary source as the timing reference and is executed unidirectionally on the secondary source.
8. The coordinated control method for multi-current source stimulation output according to claim 1, characterized in that, After completing the step of determining the master / slave role by changing the status according to the program number corresponding to each current source, the method performs the following steps: Obtain the mapping relationship between each current source and the stimulation electrode; The electrode topology between each current source is determined based on the mapping relationship; When the stimulation electrodes corresponding to at least two current sources have a shared electrode relationship, or when the stimulation electrodes corresponding to at least two current sources satisfy a preset spatial proximity relationship, it is determined that the at least two current sources have a simultaneous output limiting condition. According to the simultaneous output limiting condition, the at least two current sources are controlled to form staggered outputs according to the preset timing relationship between the main source and the slave source, so as to limit the at least two current sources from simultaneously outputting stimulation waveforms.
9. The coordinated control method for multi-current source stimulation output according to claim 1, characterized in that, After completing the step of obtaining the stimulus parameters to be updated, the method performs the following steps: Detect the current stimulation output mode of the multi-current source stimulation output; When the current stimulus output mode is switched from single-source mode to multi-source mode and a new current source is added, the main source and the slave source are re-determined according to the addition status of the new current source and the output status of the existing current source, and the main source and the slave source are controlled to form a staggered output stimulus waveform according to a preset timing relationship. When the current stimulus output mode is switched from multi-source mode to single-source mode, the master-slave role setting is canceled, and the remaining current source is controlled to output the stimulus waveform independently.
10. A coordinated control device for multi-current source stimulation output, characterized in that, include: The parameter acquisition module is used to acquire the stimulation parameters to be updated in this update; the stimulation parameters include the current program number and current waveform parameters corresponding to each current source. And, obtain the previous program number corresponding to each current source; The change status determination module is used to compare the current program number corresponding to each current source with the corresponding previous program number, and determine the change status of the program number corresponding to each current source based on the comparison result. The master-slave role determination module is used to determine the master-slave role based on the program number change status of each current source, wherein the master-slave role includes master source and slave source; The safety update control module is used to determine whether the waveform parameter safety update condition is met based on the current output state corresponding to the main source and the slave source, and when the current output state corresponding to the main source and the slave source meets the waveform parameter safety update condition, to perform a partial waveform parameter update on the main source and a complete waveform parameter update on the slave source. The output control module is used to trigger the main source to output a stimulus waveform after updating the corresponding waveform parameters of the main source and the slave source, and to trigger the slave source to output in a coordinated manner based on the stimulus waveform output by the main source, so that the main source and the slave source form a staggered output stimulus waveform according to a preset timing relationship.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the coordinated control method for multi-current source stimulation output as described in any one of claims 1 to 9.
12. A computer program product, characterized in that, The computer program product includes computer program code that, when run on a computing device, causes the computing device to perform the coordinated control method for multi-current source stimulation output as described in any one of claims 1 to 9.
13. A control device for multi-current source stimulation output, characterized in that, Including processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program to implement the coordinated control method for multi-current source stimulation output as described in any one of claims 1 to 9.
