Wireless communication method, electronic device and storage medium for neurostimulator

By determining the change time of the power supply state of the nerve stimulator in the program controller, predicting the available communication time period to avoid communication affecting pulse stability, solving the voltage fluctuation caused by modulation/demodulation, and improving the therapeutic effect of the nerve stimulator.

CN118490986BActive Publication Date: 2024-11-12HANGZHOU SEENEURO MEDICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410954683.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-12
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

When the neural stimulator conducts wireless communication, the modulation/demodulation technology causes the receiving voltage fluctuations of the receiving coil, affecting the stability of the power supply voltage, and thus affecting the stability of the electrical stimulation pulse and affecting the treatment effect.

Method used

By determining the change time of the power supply state of the nerve stimulator in the program controller, it is predicted that the available communication time period for the nerve stimulator not to output electrical stimulation pulses, and conduct wireless communication within this period to avoid the power supply voltage fluctuations caused by communication to pulses. Generation impact.

Benefits of technology

It effectively avoids the negative impact of the supply voltage fluctuations of nerve stimulators caused by communication on the stability of electrical stimulation pulses, and improves the stability of the treatment effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118490986B_ABST
    Figure CN118490986B_ABST
Patent Text Reader

Abstract

The present specification provides a wireless communication method, electronic device and storage medium for a neurostimulator, the method comprising: during the process of the programmer supplying power to the neurostimulator, determining all end moments of a first change in the power supply state and all start moments of a second change in the power supply state within a continuous time period; wherein the first change indicates that the neurostimulator stops outputting electrical stimulation pulses at the end moment, and the second change indicates that the neurostimulator starts outputting electrical stimulation pulses at the start moment; determining an available communication time period based on at least one end moment and at least one start moment, wherein the neurostimulator does not generate electrical stimulation pulses within the available communication time period; determining target data that needs to be sent within the available communication time period, and sending the target data to the neurostimulator within the available communication time period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technology, and in particular to a wireless communication method, electronic device and storage medium for a neurostimulator. Background Art

[0002] Neurostimulators are devices used to deliver electrical signals to specific nerve regions, with the primary goal of modulating the electrical activity of neurons to achieve therapeutic effects. They play an important role in the fields of neuroscience and biomedical engineering, particularly in pain management, movement disorders, and epilepsy.

[0003] In the related art, since the neurostimulator is implanted in human tissue through surgery and electrically stimulates the muscle or nerve tissue according to the needs of the patient's condition, the size of the neurostimulator should be as small as possible to reduce the surgical risk. In order to reduce the size of the neurostimulator, the neurostimulator uses modulation / demodulation technology to achieve simultaneous wireless power supply and wireless communication on a receiving coil to simplify the energy storage unit and communication unit inside the neurostimulator.

[0004] However, this solution also brings new technical problems, namely, modulation / demodulation will affect the stability of the receiving voltage of the receiving coil, especially when the modulation depth is large, which will cause obvious fluctuations in the receiving voltage. The working circuit inside the neurostimulator relies on a stable power supply voltage to maintain normal operation. When the receiving voltage of the receiving coil fluctuates, the power management module may not be able to completely smooth these fluctuations, so the power supply voltage of the neurostimulator will also fluctuate. The stimulation pulse generation circuit of the neurostimulator is very sensitive to the power supply voltage. The fluctuation of the power supply voltage will directly affect the working state of the components in the pulse generation circuit (such as operational amplifiers, transistors, etc.), and ultimately cause the output stimulation pulse to fluctuate, thereby affecting the treatment effect. Summary of the invention

[0005] In order to overcome the problems existing in the related art, this specification provides a wireless communication method, an electronic device and a storage medium for a neurostimulator.

[0006] According to a first aspect of an embodiment of this specification, a wireless communication method for a neurostimulator is provided, the method being applied to a programmer controlling the neurostimulator, the neurostimulator being provided with a receiving coil, the receiving coil being used for both wireless communication and wireless power supply between the neurostimulator and the programmer, the method comprising:

[0007] In the process of the programmer supplying power to the neurostimulator, all ending moments of a first change in the power supply state and all starting moments of a second change in the power supply state within a continuous time period are determined; wherein the first change indicates that the neurostimulator stops outputting electrical stimulation pulses at the ending moment, and the second change indicates that the neurostimulator starts outputting electrical stimulation pulses at the starting moment;

[0008] determining an available communication time period based on at least one end time and at least one start time;

[0009] Target data that needs to be sent within the available communication time period is determined, and the target data is sent to the neural stimulator within the available communication time period.

[0010] According to a second aspect of an embodiment of this specification, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method described in the first aspect are implemented.

[0011] According to a third aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0012] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0013] In the embodiments of the present specification, during the process of supplying power to the neurostimulator, the programmer can predict the available communication time period when the neurostimulator does not generate electrical stimulation pulses by determining all the end moments of the first change in the power supply state of the programmer and all the start moments of the second change in the power supply state within a continuous time period, and send the target data to the neurostimulator within the available communication time period. It can be seen that in this scheme, the programmer actively determines the output state of the neurostimulator according to the specific changes in the power supply state on its own side, and predicts the time period when the neurostimulator stops outputting electrical stimulation pulses as the available communication time period for sending data to it subsequently. The determination process of the available communication time period does not require interaction with the neurostimulator, and the determination logic is simple and efficient. Because the programmer communicates with the neurostimulator only during the time period when the neurostimulator does not output electrical stimulation pulses, and does not communicate at all during the time period when the neurostimulator outputs electrical stimulation pulses, the negative impact that the power supply voltage fluctuation of the neurostimulator caused by communication may have on the stability of the electrical stimulation pulses is effectively avoided.

[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0016] Figure 1 This is a schematic diagram of a scenario of interaction between a neural stimulator and a programmer according to an exemplary embodiment of this specification.

[0017] Figure 2 It is a flow chart of a wireless communication method for a neurostimulator according to an exemplary embodiment of the present specification.

[0018] Figure 3 It is a schematic diagram of a power supply component of a program controller of the related technology shown in this specification according to an exemplary embodiment.

[0019] Figure 4 This is a schematic diagram of a power supply component of a program controller of the present application shown in this specification according to an exemplary embodiment.

[0020] Figure 5 It is a schematic diagram of another power supply component of the program controller of the present application shown in this specification according to an exemplary embodiment.

[0021] Figure 6 It is a schematic diagram of another power supply component of the program controller of the present application shown in this specification according to an exemplary embodiment.

[0022] Figure 7 It is a schematic diagram of another power supply component of the program controller of the present application shown in this specification according to an exemplary embodiment.

[0023] Figure 8 The diagram is a schematic diagram of a method for determining an available communication time period according to an exemplary embodiment of the present specification.

[0024] Fig. 9 This is a schematic diagram of another method for determining an available communication time period according to an exemplary embodiment of this specification.

[0025] Fig.10 It is a schematic diagram of a method for determining a measured time interval according to an exemplary embodiment of the present specification.

[0026] Fig.11 It is a block diagram of an electronic device shown in this specification according to an exemplary embodiment.

[0027] Fig.12 It is a block diagram of a wireless communication device for a neurostimulator according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION

[0028] like Figure 1 As shown, the neurostimulator 10 is implanted in the patient's body by a doctor, and includes an electrode and a pulse generator. The electrode is placed near the target nerve, and an electrical stimulation pulse is generated to the target nerve through the pulse generator. The programmer 11 includes but is not limited to the functions of controlling the parameter configuration and adjustment of the neurostimulator 10, data transmission, and providing electrical energy to the neurostimulator 10. The programmer 11 can refer to any electronic device with the above functions. For example, if an electronic device has the above functions, it can be used as the programmer 11 in this specification. In practical applications, the programmer 11 can adjust the working parameters of the neurostimulator 10, such as current intensity, frequency, pulse width, and stimulation mode. During the operation of the neurostimulator 10, the programmer 11 can also receive feedback information (such as electrode resistance change, internal state, etc.) sent by the neurostimulator 10, so that the programmer 11 can adjust the working parameters of the programmer 10 according to the feedback information. Exemplarily, the neurostimulator 10 includes but is not limited to a spinal cord stimulator (SCS), a peripheral nerve stimulator (PNS), and a tibial nerve stimulator (TNS).

[0029] The neurostimulator 10 is equipped with a receiving coil, which is used for two-way wireless communication between the neurostimulator 10 and the programmer 11, and the neurostimulator 10 receives the electric energy provided by the programmer 11 through the receiving coil. Specifically, the receiving coil of the programmer 11 generates an alternating magnetic field through high-frequency alternating current. The receiving coil of the neurostimulator 10 is in the alternating magnetic field. Based on the principle of electromagnetic induction, an induced current is generated in the receiving coil to supply energy to the pulse generator. While sending the power supply signal, the programmer 11 can superimpose a modulation signal on the power supply signal. The demodulation circuit of the neurostimulator 10 extracts the modulation signal from the received power supply signal, that is, the data sent by the programmer 11, and then the demodulated data is handed over to the microprocessor of the neurostimulator 10 for processing, so as to adjust the working parameters of the neurostimulator 10. The modulation / demodulation technology applied to the neurostimulator 10 can specifically be ASK / AM modulation technology. When using ASK / AM modulation technology for wireless communication, the modulation depth determines the amplitude variation range of the carrier signal. A larger amplitude depth means that the amplitude variation of the carrier signal is larger, which causes the voltage fluctuation at the receiving end of the rectifier circuit to be more obvious. For example, assuming that the carrier signal voltage is 5V and the modulation depth is 0.6, the voltage range after modulation varies between 2V and 8V. If the modulation depth is increased to 0.8, the voltage range becomes 1V to 9V, with greater fluctuations. Due to the fluctuation of the power supply voltage of the neurostimulator 10, the current output by the neurostimulator 10 will also fluctuate. This fluctuation will cause the amplitude of the stimulation pulse to change, thereby affecting the stimulation effect. For other modulation techniques, such as frequency modulation (FM) and phase modulation (PM), although the impact on voltage is not as great as that of AM modulation, voltage fluctuations are also introduced during the demodulation process of the neurostimulator 10, thereby affecting the stimulation effect. Therefore, in the process of communication between the programmer 11 and the neurostimulator 10, the power supply voltage fluctuation of the neurostimulator 10 caused by communication may have a negative impact on the stability of the output electrical stimulation pulse.

[0030] As described in the above embodiments, during the communication between the neurostimulator 10 and the programmer 11, the voltage fluctuation of the receiving coil of the neurostimulator 10 caused by the modulation / demodulation signal during the communication indirectly causes the fluctuation of the electrical stimulation pulse output by the neurostimulator 10. This specification proposes a new wireless communication solution, that is, the communication between the neurostimulator 10 and the programmer 11 is only realized during the time period when the neurostimulator 10 does not generate electrical stimulation pulses, thereby avoiding the negative impact of the power supply voltage fluctuation at the end of the neurostimulator 10 caused by the communication on the stability of the electrical stimulation pulse.

[0031] Next, the embodiments of this specification are described in detail.

[0032] like Figure 2 As shown, Figure 2 This is a flowchart of a wireless communication method for a neurostimulator according to an exemplary embodiment of the present specification. The method is applied to Figure 1 The program controller 11 comprises steps 201-203:

[0033] Step 201: In the process of the programmer supplying power to the neurostimulator, all ending moments of a first change in the power supply state and all starting moments of a second change in the power supply state within a continuous time period are determined.

[0034] In the process of the programmer 11 supplying power to the neurostimulator 10, the neurostimulator 10 is equivalent to the load device of the programmer 11. In the process of the neurostimulator 10 working, the load of the programmer 11 also changes accordingly. At the moment when the neurostimulator 10 starts to output electrical stimulation pulses and stops outputting electrical stimulation pulses, the power supply state of the programmer 11 will also undergo specific changes accordingly. For example, at the moment when the neurostimulator 10 starts to output electrical stimulation pulses, the total load of the neurostimulator 10 suddenly increases, and the current output by the power supply module of the programmer 11 will also increase sharply accordingly. Similarly, at the moment when the neurostimulator 10 stops outputting electrical stimulation pulses, the total load of the neurostimulator 10 suddenly decreases (the load of the module responsible for outputting electrical stimulation pulses in the neurostimulator 10 is reduced to 0, while the load of other modules remains basically unchanged, so the total load is reduced), and the current output by the power supply module of the programmer 11 will also decrease sharply accordingly. Therefore, the start time when the neurostimulator 10 starts to output electrical stimulation pulses and the stop time when the neurostimulator 10 stops outputting electrical stimulation pulses can be determined by the time when the power supply state of the programmer 11 changes (i.e., the first change and the second change) during the process of the programmer 11 supplying power to the neurostimulator 10.

[0035] like Figure 3 As shown, the power supply components for supplying power to the neurostimulator in the programmer of the related art include but are not limited to a power supply module 110, an inverter circuit 111 and a transmitting coil 112. The power supply module 110 is used to provide a direct current that conforms to the current electrical stimulation mode of the neurostimulator, and converts the direct current output from the power supply module 110 into a high-frequency alternating current through the inverter circuit 111, and then the transmitting coil 112 converts the high-frequency alternating current into a wireless electromagnetic wave, and the receiving coil of the neurostimulator receives the electromagnetic wave of the transmitting coil 112 through electromagnetic induction and generates high-frequency alternating current, which is converted into direct current by the rectifier circuit for use by the internal circuit of the neurostimulator.

[0036] Since the DC voltage or DC current output by the power supply module 110 and the AC current / AC voltage output by the inverter circuit 111 will change accordingly when the neurostimulator starts to output electrical stimulation pulses or stops outputting electrical stimulation pulses, the specific changes can reflect the output state of the electrical stimulation pulses of the neurostimulator. Figure 3 Based on the power supply component, the time when the neurostimulator starts to output electrical stimulation pulses and stops outputting electrical stimulation pulses is determined by detecting the time when the power supply state of the programmer changes. See the following embodiments for details:

[0037] In one illustrated embodiment, Figure 4 As shown, the output end of the power supply module 110 of the programmer 11 is connected to the input end of the inverter circuit 111, the output end of the inverter circuit 111 is connected to the input end of the transmitting coil 112, the output end of the transmitting coil 112 is connected to the input end of the first envelope detection module 410, and the output end of the first envelope detection module 410 is connected to the input end of the first power supply status detection module 411.

[0038] In this embodiment, the first envelope detection module 410 is used to identify the envelope of the transmission waveform of the transmitting coil 112. The first envelope detection module 410 can be a simple diode envelope detector. Of course, it can also be based on the diode envelope detector, and add components such as amplifiers to improve the sensitivity and accuracy of detection. The first power supply state detection module 411 detects the change of the power supply state based on the envelope signal output by the first envelope detection module 410. The first power supply state detection module 411 can specifically include a voltage sampling submodule and a detection submodule. The input end of the voltage sampling submodule is connected to the input end of the first envelope detection module 410 to collect the voltage waveform after envelope detection, and the output end of the voltage sampling submodule is connected to the detection submodule to determine the change of the power supply state according to the voltage waveform collected by the voltage sampling submodule. The voltage sampling submodule can be specifically an analog-to-digital converter, which is used to convert the analog voltage waveform after envelope detection into a digital signal, so that the detection submodule can analyze and process it.

[0039] For example, at the moment when the neurostimulator 10 starts to output electrical stimulation pulses, the load suddenly increases, and the amplitude of the transmission signal of the transmitting coil 112 begins to decrease, causing the envelope of the transmission waveform to change accordingly. This is specifically manifested as the first envelope detection circuit 113 identifying an instantaneous drop in the envelope voltage from the transmission waveform. The voltage sampling submodule converts the collected envelope voltage signal into a digital signal, and the detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has started to output electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0040] For another example, at the moment when the neurostimulator 10 stops outputting electrical stimulation pulses, the load suddenly decreases, and the amplitude of the transmitting signal of the transmitting coil 112 begins to rise, causing the envelope of the transmitting waveform to change accordingly. This is specifically manifested as the instantaneous rise of the envelope voltage identified by the first envelope detection circuit 113 from the transmitting waveform. The voltage sampling submodule converts the collected envelope voltage signal into a digital signal, and the detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has stopped outputting electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0041] In another illustrative embodiment, Figure 5 As shown, the output end of the power supply module 110 of the program controller 11 is connected to the input end of the inverter circuit 111, the output end of the inverter circuit 111 is connected to the input end of the first current sampling module 510, the output end of the first current sampling module 510 is connected to the input end of the transmitting coil 112, the input end of the second envelope detection module 511 is connected to the output end of the first current sampling module 510, and the output end of the second envelope detection module 511 is connected to the input end of the second power supply state detection module 512.

[0042] The first current sampling module 510 is used to sample the alternating current output by the inverter circuit 111 and convert it into a voltage signal that is easy to process. The second envelope detection module 511 is used to identify the envelope of the alternating current waveform. The second power supply state detection module 512 detects the change of the power supply state based on the envelope output by the second envelope detection module 511. The second envelope detection module 511 is used to identify the envelope of the alternating current waveform output by the first current sampling module 510. The second envelope detection module 511 can be a simple diode envelope detector. Of course, it can also be based on the diode envelope detector, and add amplifiers and other components to improve the sensitivity and accuracy of detection. The second power supply state detection module 512 can specifically include a voltage sampling submodule and a detection submodule. The input end of the voltage sampling submodule is connected to the input end of the second envelope detection module 511 to collect the voltage waveform after envelope detection, and the output end of the voltage sampling submodule is connected to the detection submodule to determine the change of the power supply state according to the voltage waveform collected by the voltage sampling submodule. The voltage sampling submodule can be an analog-to-digital converter.

[0043] For example, at the moment when the neurostimulator 10 starts to output electrical stimulation pulses, the load suddenly increases, and the alternating current output by the inverter circuit 111 suddenly increases, causing the envelope of the current waveform to change accordingly. This is specifically manifested as the instantaneous rise of the envelope edge identified by the second envelope detection circuit 411 from the current waveform. The voltage sampling submodule converts the collected envelope voltage signal into a digital signal, and the detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has started to output electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0044] For another example, at the moment when the neurostimulator 10 stops outputting electrical stimulation pulses, the load suddenly decreases, and the alternating current output by the inverter circuit 111 suddenly decreases, causing the envelope of the current waveform to change accordingly. This is specifically manifested as the instantaneous drop of the envelope edge identified from the current waveform by the second envelope detection circuit 411. The voltage sampling submodule converts the collected envelope voltage signal into a digital signal, and the detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has stopped outputting electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0045] In another illustrative embodiment, Figure 6 As shown, the first output end of the power supply module 110 of the programmer 11 is connected to the input end of the inverter circuit 111, the output end of the inverter circuit 111 is connected to the input end of the transmitting coil 112, and the second output end of the power supply module 110 is connected to the third power supply status detection module 610, so that the third power supply status detection module 610 detects the power supply status based on the DC voltage output by the power supply module 110.

[0046] The third power supply state detection module 610 may specifically include a voltage sampling submodule and a detection submodule, wherein the input end of the voltage sampling submodule is connected to the input end of the power supply module 110 to collect the DC voltage output by the power supply module 110, and the output end of the voltage sampling submodule is connected to the detection submodule to determine the change of the power supply state according to the DC voltage collected by the voltage sampling submodule. The voltage sampling submodule may specifically be an analog-to-digital converter.

[0047] For example, at the moment when the neurostimulator 10 starts to output electrical stimulation pulses, the load suddenly increases, and the DC voltage output by the power supply module 110 suddenly decreases. The voltage sampling submodule converts the collected DC voltage signal into a digital signal, and the detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 starts to output electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0048] For another example, at the moment when the neurostimulator 10 stops outputting electrical stimulation pulses, the load suddenly decreases, and the DC voltage output by the power supply module 110 suddenly increases. The voltage sampling submodule converts the collected DC voltage signal into a digital signal, and the detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has stopped outputting electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0049] In another illustrative embodiment, Figure 7 As shown, the output end of the power supply module 110 of the programmer 11 is connected to the input end of the second current sampling module 710, the first output end of the second current sampling module 710 is connected to the input end of the inverter circuit 111, the output end of the inverter circuit 111 is connected to the input end of the transmitting coil 112, and the second output end of the second current sampling module 710 is connected to the fourth power supply state detection module 711.

[0050] The second current sampling module 710 is used to sample the DC current output by the power supply module 110 and convert the DC current signal into a voltage signal that is easy to process. The fourth power supply state detection module 711 may specifically include a voltage sampling submodule and a detection submodule, wherein the input end of the voltage sampling submodule is connected to the second output end of the second current sampling module 710, and the output end of the voltage sampling submodule is connected to the detection submodule to determine the change of the power supply state according to the DC voltage collected by the voltage sampling submodule. The voltage sampling submodule may specifically be an analog-to-digital converter.

[0051] For example, at the moment when the neurostimulator 10 starts to output electrical stimulation pulses, the load suddenly increases, and the DC current output by the power supply module 110 suddenly increases. The second current sampling module 710 samples the DC current output by the power supply module 110 and converts the DC current signal into an easy-to-process voltage signal. The voltage sampling submodule converts the collected DC voltage signal into a digital signal. The detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has started to output electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0052] For another example, at the moment when the neurostimulator 10 stops outputting electrical stimulation pulses, the load suddenly decreases, and the DC current output by the power supply module 110 suddenly decreases. The second current sampling module 710 samples the DC current output by the power supply module 110 and converts the DC current signal into an easy-to-process voltage signal. The voltage sampling submodule converts the collected DC voltage signal into a digital signal. The detection submodule determines whether the change in the power supply status at the current moment indicates that the neurostimulator 10 has stopped outputting electrical stimulation pulses by analyzing the changing characteristics of the voltage data.

[0053] In the above embodiment, the moment when the power supply state of the programmer 11 undergoes a first change can be determined as the end moment when the neurostimulator 10 stops outputting electrical stimulation pulses; the moment when the power supply state of the programmer 11 undergoes a second change can be determined as the start moment when the neurostimulator 10 starts outputting electrical stimulation pulses. It can be seen that this solution does not require the neurostimulator 10 to send a prompt signal to inform the programmer 11 of the output state of its electrical stimulation pulses, but determines the switching moment of the output state of the electrical stimulation pulses of the neurostimulator 10 according to the moment of the specific change of the power supply state on the programmer 11 side, thereby simplifying the method of determining the switching moment of the output state of the electrical stimulation pulses on the neurostimulator 10 side.

[0054] Regarding the timing of determining the start time and the end time, in an illustrated embodiment, when the programmer 11 needs to communicate with the neurostimulator 10, all the end times of the first change in the power supply state and all the start times of the second change in the power supply state are determined within a continuous time period before the communication.

[0055] In another illustrated embodiment, when the programmer 11 starts to supply power to the neurostimulator 10, all end times of the first change in the power supply state and all start times of the second change in the power supply state can be determined within a continuous time period after the start of power supply. In this embodiment, data of all end times and all start times can be prepared when the programmer 11 starts to supply power, so as to determine all future available communication time periods based on at least one end time and at least one start time, thereby avoiding the need to repeatedly determine the available communication time period before each communication, so as to reduce the workload of determining the available communication time period.

[0056] Step 202: Determine an available communication time period based on at least one end time and at least one start time.

[0057] After step 201 is completed, an available communication time period may be determined based on at least one end time and at least one start time determined in step 201 , wherein the neurostimulator 10 does not generate an electrical stimulation pulse within the available communication time period.

[0058] In one illustrated embodiment, Figure 8As shown, it is assumed that based on the first change and the second change of the power supply state determined in the continuous time period (solid line part) between the first end time and the second end time, at least one available communication time period after the second end time (dashed line part) is predicted. In the continuous time period, the programmer 11 determines that the power supply state has a first change at the first end time, determines that the power supply state has a second change at the first start time, and determines that the power supply state has a first change at the second end time. The duration between the first end time and the second end time is the duration of a complete pulse cycle of the neurostimulator 10, the time period between the first end time and the first start time indicates that the neurostimulator 10 stops outputting electrical stimulation pulses in this time period, and the first start time to the second end time indicates that the neurostimulator 10 continues to output electrical stimulation pulses in this time period. Based on the first end time, the first start time and the second end time that are adjacent in sequence, the measured pulse period and the measured pulse width of the neurostimulator 10 in the current electrical stimulation mode can be determined, wherein the pulse width is the duration of the neurostimulator continuously outputting electrical stimulation pulses in one pulse cycle. Since the neurostimulator 10 outputs electrical stimulation pulses according to fixed pulse period and pulse width parameters in the same electrical stimulation mode, all available communication time periods after the second end time can be predicted based on the determined second end time, the measured pulse period and the measured pulse width. For example, the measured pulse period minus the measured pulse width is the measured interval duration. Based on the second end time, the measured pulse period and the measured pulse width, it can be predicted that the first available communication time period is the time period between the second end time and the second start time after the measured interval duration. Similarly, the start time of the second available communication time period is the third end time after the second end time plus a measured pulse period, and the end time of the second available communication time period is the third start time after the second end time plus a measured pulse period and a measured interval duration. Similarly, the third available communication time period, the fourth available communication time period, etc. can be predicted based on the second end time, the measured pulse period and the measured pulse width.

[0059] In another illustrated embodiment, it is assumed that within a continuous time period, the programmer 11 determines that a second change in the power supply state occurs at a second start time, determines that a first change in the power supply state occurs at a third end time, and determines that a second change in the power supply state occurs at a third start time. Based on the sequentially adjacent second start time, third end time, and third start time, the measured pulse period and measured pulse width of the neurostimulator in the current electrical stimulation mode can be determined, and based on the third start time, the measured pulse period, and the measured pulse width, the end time after the third start time and its adjacent start time are determined, and for the determined end time and its adjacent start time, the time period between each end time and the first start time thereafter is determined as the available communication time period corresponding to the end time. Since the method of determining the available communication time period in this embodiment is similar to that in Figure 8 Similarly, please refer to the previous embodiment for details, and this specification will not go into details here.

[0060] In the aforementioned two embodiments, all available communication time periods in the future (the first available communication time period, the second available communication time period, etc.) can be predicted at one time based on all end moments of the first change in the power supply status and all start moments of the second change in the power supply status detected in a continuous time period, so that the programmer 11 can reasonably arrange the target data that needs to be sent in any available communication time period based on all predicted available communication time periods, and control the programmer 11 to send the target data to the neurostimulator 10 within the available communication time period.

[0061] If the programmer 11 and the neurostimulator 10 use different types of clock oscillators, their frequencies and stabilities may be different, which will cause clock drift after the two have been running for a period of time. As time goes by, the cumulative error between the first clock of the programmer 11 and the second clock of the neurostimulator 10 becomes larger and larger, resulting in a larger error between the actual start time of the later available communication time period determined by the first clock and the actual end time when the neurostimulator 10 stops outputting electrical stimulation pulses (ideally, the actual start time and the actual end time should be the same). For example, Figure 8As shown, the error between the actual start time (i.e., the second end time) of the first available communication time period determined by the first clock and the actual end time when the neurostimulator 10 stops outputting electrical stimulation pulses may be 0.01us, while the error between the actual start time (i.e., the third end time) of the second available communication time period determined by the first clock and the actual end time when the neurostimulator 10 stops outputting electrical stimulation pulses may increase to 0.02us. Therefore, when the accumulated error exceeds the error threshold, the predicted available communication time period may be inconsistent with the actual time period when the neurostimulator stops outputting electrical stimulation pulses. In other words, some data may be communicated during the time period when the neurostimulator 10 outputs electrical stimulation pulses.

[0062] Therefore, in an illustrated embodiment, after determining the available communication time period using the methods of the above two embodiments, the cumulative error between the first clock of the programmer and the second clock of the neurostimulator can be calculated. If the cumulative error exceeds the error threshold, the first clock is corrected so that the first clock and the second clock are synchronized, and the available communication time period is re-determined. Exemplarily, before the neurostimulator 10 and the programmer 11 are shipped out of the factory, the maximum clock drift of the neurostimulator 10 and the programmer 11 within a unit time length can be determined from a batch of sample devices, and then the cumulative error between the first clock of the programmer 11 and the second clock of the neurostimulator 10 over time is calculated using the maximum clock offset as an error standard, and when the cumulative error exceeds the error threshold, the first clock is corrected so that the first clock and the second clock are synchronized, and the available communication time period is re-determined. For example, at the current moment when it is determined that the cumulative error exceeds the error threshold, the available communication time period can be re-determined based on the end moment of the first change or the start moment of the second change that is closest to the current moment, as well as the previously determined measured pulse period and measured pulse width.

[0063] In this embodiment, when the cumulative error between the first clock of the programmer 11 and the second clock of the neurostimulator 10 exceeds the error threshold, the available communication time period can be re-predicted so that the clock error between each predicted available communication time period and the time period when the neurostimulator 10 stops outputting electrical stimulation pulses can always be kept within the error threshold, thereby avoiding as much as possible the negative impact that the power supply voltage fluctuation of the neurostimulator 10 caused by communication may have on the stability of the electrical stimulation pulses.

[0064] In addition to the above method for determining the available communication time period, this specification also provides another method for determining the available communication time period, see the following embodiment for details:

[0065] Determine the end time of the first change in the power supply status within the continuous time period and the start time of the first second change in the power supply status thereafter; determine the communication time when the first change in the power supply status occurs and the measured interval length between the end time and the start time, and use the time period between the communication time and the time with the measured interval length from the communication time as the available communication time period.

[0066] For example, Fig. 9 As shown, it is assumed that in a continuous time period, the programmer 11 determines that the power supply state has undergone a first change at the first end time, and determines that the power supply state has undergone a second change at the first start time. The time period between the first start time and the first end time is the time period when the neurostimulator stops outputting electrical stimulation pulses. Based on the first start time and the first end time, the measured interval duration can be calculated, and the measured interval duration is the time interval when the neurostimulator 10 stops outputting electrical stimulation pulses within the pulse cycle. Then, in the future, when the power supply state of the programmer 11 is detected to have undergone a first change at the first communication time, the time period between the first communication time and the second start time of the measured interval duration from the first communication time can be used as the first available communication time period; similarly, in the future, when the power supply state of the programmer 11 is detected to have undergone a first change at the second communication time, the time period between the second communication time and the third start time of the measured interval duration from the second communication time can be used as the second available communication time period. Similarly, at each other communication time when the power supply state of the programmer 11 undergoes a first change, based on the previously calculated measured interval duration, other available communication time periods corresponding to the communication time can be determined.

[0067] In this embodiment, compared with the two previous implementations of determining the available communication time period, since the start time of the available communication time period (i.e., the communication time) is determined by real-time detection of the first change in the power supply state of the program controller 11, rather than a predicted result, it will not be affected by the clock error, and the end time of the available communication time period is the time when the communication time is separated from the actual measured interval, and when the communication time is accurate, it will not be affected by the clock error. Therefore, the method of determining the available communication time period based on this embodiment can be unaffected by the clock error, and there is no need to redetermine the available communication time period when the accumulated clock error is greater than the error threshold.

[0068] In the case of external interference in the programmer 11, the external interference may affect the accuracy of the programmer 11 in determining all the end moments of the first change in the power supply state and all the start moments of the second change in the power supply state within a continuous time period, and then affect the accuracy of determining the available communication time period based on at least one end moment and at least one start moment. For example, electromagnetic interference may affect the clock accuracy inside the programmer 11, resulting in a deviation in the timing of the end moment of the first change in the power supply state and the start moment of the second change. Or electromagnetic interference may also affect the power supply state of the programmer 11, resulting in the programmer 11 being unable to accurately detect specific changes in the power supply state. Therefore, in the presence of external interference, it is difficult to determine the exact end moment and start moment, and then the accurate available communication time period cannot be determined based on the inaccurate end moment and start moment.

[0069] Therefore, this specification proposes that when determining all the end times of the first change in the power supply state and all the start times of the second change in the power supply state within a continuous time period, a verification mechanism can be added to determine whether all the currently determined start times and end times are accurate, that is, whether the program controller 11 is subject to external interference. If it is determined that all the currently determined start times and end times are accurate, the available communication time period can be determined based on at least one determined end time and at least one determined start time. See the following embodiments for details:

[0070] In an illustrated embodiment, the measured time interval between any end moment and the first start moment thereafter in a continuous time period is determined; the preset pulse period and preset pulse width of the current electrical stimulation mode in the programmer 11 are obtained, and if the error between the measured time interval and the preset time interval obtained by subtracting the preset pulse width from the preset pulse period exceeds an error threshold, the available communication time period is not determined based on all the end moments and all the start moments determined in the continuous time period.

[0071] For example, any end moment and the first start moment thereafter are randomly selected from all the end moments of the first change in the power supply state and all the start moments of the second change in the power supply state determined within the continuous time period, and the measured time interval between the end moment and the start moment is determined. Then, the preset pulse period and preset pulse width parameters of the current electrical stimulation mode stored in the programmer 11 are obtained, and the preset time interval after the preset pulse width is subtracted from the preset pulse period is calculated. By comparing the measured time interval with the preset time interval, if the error between the two exceeds 5%, it means that the programmer 11 may be subject to external interference at this time, which will affect the accuracy of the programmer 11 in determining the moment when a specific change in the power supply state occurs. Therefore, the available communication time period may not be determined based on all the end moments and all the start moments determined within the current continuous time period. After a preset period of time, it is possible to re-determine whether the power supply status is subject to external interference based on the above method. If the error between the two does not exceed 5%, it means that the programmable controller 11 is not subject to external interference at this time, and the available communication time period can be determined based on all end times and all start times determined in the continuous time period; if the error between the two still exceeds 5%, it is possible to determine whether the external interference still exists again based on the above method after the preset period of time. Until it is determined that the external interference does not exist, the available communication time period is determined based on all end times and all start times determined in the continuous time period.

[0072] If the external interference is intermittent, that is, it is generated only in certain time periods, and the time period of the measured time interval selected in the above embodiment is exactly within the time range of the external interference suspension phase, then the external interference cannot be identified based on the above method. Therefore, in response to this problem, this specification proposes another improved embodiment:

[0073] In another illustrated embodiment, each measured time interval between a preset number of end moments and the first start moment thereafter is determined from all end moments and all start moments within the determined continuous time period; the preset pulse period and preset pulse width of the current electrical stimulation mode in the programmer are obtained, and if the error between any measured time interval and the preset time interval obtained by subtracting the preset pulse width from the preset pulse period exceeds an error threshold, the available communication time period is not determined based on the end moment and start moment determined within the continuous time period.

[0074] For example, Fig.10As shown, all the end moments and all the start moments in the continuous time period determined are the first end moment, the first start moment, the second end moment, the second start moment, the third end moment, the third start moment and the fourth end moment, and a preset number of three measured time intervals are determined, which are the first measured time interval between the first end moment and the first start moment, the second measured time interval between the second end moment and the second start moment, and the third measured time interval between the third end moment and the third start moment. The preset pulse period and preset pulse width parameters of the current electrical stimulation mode stored in the programmer 11 are obtained, and the preset time interval after the preset pulse width is subtracted from the preset pulse period is calculated. By comparing each measured time interval with the preset time interval, if the error between the two exceeds 5%, it means that the programmer 11 may be subject to external interference in the time period of the measured time interval, and the available communication time period is not determined based on all the end moments and all the start moments determined in the continuous time period. After the preset time length, it can be re-determined whether the power supply state is subject to external interference based on the above method. If the error between any measured time interval and the preset time interval does not exceed 5%, it means that the programmable controller 11 is not affected by external interference at this time, and the available communication time period can be determined based on all end times and all start times determined in the continuous time period; if the error between the two still exceeds 5%, it can be determined again after the preset time period whether the external interference still exists based on the above method. Until it is determined that the external interference does not exist, the available communication time period is determined based on all end times and all start times determined in the continuous time period.

[0075] In this embodiment, based on the above method, not only the continuously occurring external interference can be effectively identified, but also the intermittently occurring external interference can be effectively identified, thereby improving the accuracy of identifying the external interference.

[0076] It should be noted that when determining multiple measured time intervals within a continuous time period, two adjacent measured time intervals may be time intervals of non-adjacent electrical stimulation pulse cycles or time intervals of adjacent electrical stimulation pulse cycles, and this specification does not impose any restrictions on this.

[0077] Furthermore, in addition to the above-mentioned method of determining whether the program controller 11 is subject to external interference by comparing the error between the actual measured time interval and the preset time interval, it is also possible to determine whether the program controller 11 is subject to external interference by comparing the error between the actual measured pulse period and / or the actual measured pulse width and the preset pulse period and / or preset pulse width parameters in the program controller 11. This manual does not impose any restrictions on this.

[0078] The electrical stimulation mode of the neurostimulator 10 refers to the various electrical parameter configurations used by the neurostimulator 10 to stimulate the nervous system, including not only the pulse period and pulse width, but also different electrical stimulation parameters such as the stimulation voltage intensity, current intensity and stimulation frequency. The neurostimulator 10 does not always work in a fixed electrical stimulation mode, but adjusts different electrical stimulation modes according to the needs of the disease. For example, a chronic pain patient feels that the pain is aggravated during daytime activities. At this time, he can switch from a low-frequency stimulation mode to a high-frequency stimulation mode to quickly relieve the pain. At night, when resting, switch back to the low-frequency mode for long-term management. After the electrical stimulation mode of the neurostimulator 10 is switched, the parameters such as the pulse period and pulse width used by the neurostimulator 10 also change, which will cause the measured pulse period and pulse width of the neurostimulation mode before the switch, which were previously inferred based on the specific changes in the power supply state, to be unavailable, and thus the available communication time period determined based on the measured pulse period and pulse width determined before the switch is also unavailable.

[0079] Therefore, in an illustrated embodiment, when the electrical stimulation mode of the neurostimulator 10 is switched, all end moments of a first change in the power supply state and all start moments of a second change in the power supply state within a continuous time period are redetermined, and an available communication time period is determined based on at least one redetermined end moment and at least one start moment.

[0080] In this embodiment, when the electrical stimulation mode of the neurostimulator 10 changes, by timely redetermining the available communication time period, it can be ensured that the redetermined available communication time period can adapt to the change of the electrical stimulation mode, so that the programmer 11 can communicate with the neurostimulator 10 in the correct available communication time period.

[0081] Step 203: Determine target data that needs to be sent within the available communication time period, and send the target data to the neural stimulator within the available communication time period.

[0082] In this embodiment, this scheme only communicates during the available communication time period when the neurostimulator 10 does not generate electrical stimulation pulses, and does not perform any communication during the time period when the neurostimulator 10 outputs electrical stimulation pulses, thereby effectively avoiding the negative impact that the power supply voltage fluctuation of the neurostimulator 10 caused by communication may have on the stability of the electrical stimulation pulses.

[0083] Regarding the meaning of target data, this solution is divided into two cases:

[0084] The first case is that the target data is complete data to be sent, and the amount of the data to be sent is less than or equal to the maximum amount of data that can be communicated with the neurostimulator 10 within the first communication time period. Then the complete data to be sent can be sent to the neurostimulator 10 within the available communication time period.

[0085] The second situation is that the amount of data to be sent is greater than the maximum amount of data that can be used to complete communication with the neurostimulator 10 within the available communication time period, that is, the complete data to be sent cannot be sent to the neurostimulator 10 within the available communication time period. At this time, the maximum amount of data that the programmer 11 can use to complete communication with the neurostimulator 10 within the available communication time period can be determined, and then the portion of the data to be sent that is the maximum amount of data is sent to the neurostimulator 10 as the target data to ensure that the target data can be sent to the neurostimulator 10 within the available communication time period. For the remaining data that has not been sent in the current data to be sent, it can continue to be sent in the available communication time period of the next electrical stimulation pulse cycle until all the data to be sent are sent. For example, let's assume that the maximum amount of data that can be communicated with the neurostimulator 10 within the available communication time period of each electrical stimulation pulse cycle is 30 bytes. At this time, if the amount of data to be sent is 50 bytes, then within the current electrical stimulation pulse cycle, 30 bytes of the data to be sent can be sent to the neurostimulator 10 in accordance with the preset sending order; and the remaining 20 bytes of data can be sent to the neurostimulator 10 in the next electrical stimulation pulse cycle. Accordingly, after receiving all the messages (of the data to be sent), the neurostimulator 10 can parse the messages and recover the complete data, that is, the complete data to be sent (of course, the data has been sent at this time).

[0086] It should be noted that the target data refers to the data that the program controller 11 decides to send within the available communication time period. When the amount of data to be sent is less than or equal to the maximum communication data amount, the target data is the complete data to be sent. When the amount of data to be sent is greater than the maximum communication data amount, the target data is the partial data of the data to be sent that meets the maximum communication data amount.

[0087] In one embodiment, in determining the maximum amount of data that can be communicated with the neurostimulator 10 within the available communication time period, the transmission time of a single code element transmitted by the programmer 11 to the neurostimulator 10 can be determined. For example, based on the theoretical transmission rate (such as baud rate) between the programmer 11 and the neurostimulator 10, the transmission time of a single code element can be 1 second divided by the theoretical transmission rate. Without considering environmental interference (such as electromagnetic interference) and other factors (retransmission mechanism, protocol overhead, etc.), the transmission time of a single code element can be roughly calculated, so that the ratio of the duration of the available communication time period to the transmission time is rounded off and determined as the maximum amount of data. The transmission time of transmitting a single code element only needs to be calculated once.

[0088] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of a device and a terminal to which it is applied.

[0089] like Fig.11 As shown, Fig.11 It is a structural diagram of an electronic device 1100 shown in this specification according to an exemplary embodiment. At the hardware level, the device includes a processor 1102, an internal bus 1104, a network interface 1106, a memory 1108 and a non-volatile memory 1110, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 1102 reading the corresponding computer program from the non-volatile memory 1110 into the memory 1108 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic module, but can also be hardware or logic devices.

[0090] like Fig.12 As shown, Fig.12 This is a wireless communication device shown in this specification according to an exemplary embodiment. The device can be applied to Fig.11 The electronic device 1100 shown in the figure is used to implement the technical solution of this specification. The electronic device 1100 can be a programmer for controlling a neurostimulator, and the neurostimulator is equipped with a receiving coil, and the receiving coil is used for wireless communication and wireless power supply between the neurostimulator and the programmer. The device includes:

[0091] The time determination module 1202 is used to determine all end times of a first change in the power supply state and all start times of a second change in the power supply state within a continuous time period during the process of the programmer supplying power to the neurostimulator; wherein the first change indicates that the neurostimulator stops outputting electrical stimulation pulses at the end time, and the second change indicates that the neurostimulator starts outputting electrical stimulation pulses at the start time.

[0092] The available communication time period determination module 1204 is used to determine an available communication time period based on at least one end time and at least one start time, wherein the neurostimulator does not generate an electrical stimulation pulse during the available communication time period.

[0093] The target data sending module 1206 is used to determine the target data that needs to be sent within the available communication time period, and send the target data to the neural stimulator within the available communication time period.

[0094] Optionally, the moment determination module 1202 is specifically used to determine all end moments of a first change in the power supply state and all start moments of a second change in the power supply state within a continuous time period after the start of power supply when the programmer starts to supply power to the neurostimulator; or, when the programmer needs to communicate with the neurostimulator, determine all end moments of the first change in the power supply state and all start moments of the second change in the power supply state within a continuous time period before communication.

[0095] Optionally, the device also includes a first available communication time period redetermining module 1208, which is used to redetermine all end moments of a first change in the power supply state and all start moments of a second change in the power supply state within a continuous time period when the electrical stimulation mode of the neurostimulator is switched, and determine the available communication time period based on at least one redetermined end moment and at least one start moment.

[0096] Optionally, the available communication time period determination module 1204 is specifically used to determine the measured pulse period and measured pulse width of the neurostimulator in the current electrical stimulation mode based on the first end time, the first start time and the second end time that are adjacent in sequence, and determine the end time and the adjacent start time after the second end time based on the second end time, the measured pulse period and the measured pulse width; or, determine the measured pulse period and measured pulse width of the neurostimulator in the current electrical stimulation mode based on the second start time, the third end time and the third start time that are adjacent in sequence, and determine the end time and the adjacent start time after the third start time based on the third start time, the measured pulse period and the measured pulse width; for the determined end time and the adjacent start time, determine the time period between each end time and the first start time thereafter as the available communication time period corresponding to the end time.

[0097] Optionally, the second available communication time period redetermining module 1210 is specifically used to calculate the cumulative error between the first clock of the programmer and the second clock of the neurostimulator after determining the available communication time period; if the cumulative error exceeds an error threshold, correct the first clock so that the first clock and the second clock are synchronized, and redetermine the available communication time period.

[0098] Optionally, the time determination module 1202 is specifically used to determine the end time of the first change in the power supply state within a continuous time period and the start time of the first second change in the power supply state thereafter. The available communication time period determination module 1204 is specifically used to determine the communication time of the first change in the power supply state and the measured interval between the end time and the start time, and use the time period between the communication time and the time separated from the communication time by the measured interval as the available communication time period.

[0099] Optionally, the device also includes an external interference determination module 1212, which is used to determine the measured time interval between any end moment and the first start moment thereafter within the continuous time period; obtain the preset pulse period and preset pulse width of the current electrical stimulation mode in the programmer, and if the error between the measured time interval and the preset time interval obtained by subtracting the preset pulse width from the preset pulse period exceeds the error threshold, then the available communication time period is not determined based on all the end moments and all the start moments determined within the continuous time period; or, determine each measured time interval between a preset number of end moments and the first start moment thereafter from all the end moments and all the start moments determined within the continuous time period; obtain the preset pulse period and preset pulse width of the current electrical stimulation mode in the programmer, and if the error between any measured time interval and the preset time interval obtained by subtracting the preset pulse width from the preset pulse period exceeds the error threshold, then the available communication time period is not determined based on all the end moments and all the start moments determined within the continuous time period.

[0100] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0101] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0102] The present specification also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of any of the aforementioned wireless communication methods provided in the present application are implemented.

[0103] Specifically, computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (such as EPROM, EEPROM and flash memory devices), magnetic disks (such as internal hard disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks.

Claims

1. A wireless communication method for a neurostimulator, characterized in that: The method is applied to a programmer controlling a neurostimulator, wherein the neurostimulator is provided with a receiving coil, and the receiving coil is used for wireless communication and wireless power supply between the neurostimulator and the programmer at the same time, and the method comprises: In the process of the programmer supplying power to the neurostimulator, all ending moments of a first change in the power supply state and all starting moments of a second change in the power supply state within a continuous time period are determined; wherein the first change indicates that the neurostimulator stops outputting electrical stimulation pulses at the ending moment, and the second change indicates that the neurostimulator starts outputting electrical stimulation pulses at the starting moment; determining an available communication time period based on at least one end time and at least one start time, wherein the neurostimulator does not generate an electrical stimulation pulse during the available communication time period; Determine the measured time interval between any end moment and the first start moment thereafter in the continuous time period; obtain the preset pulse period and preset pulse width of the current electrical stimulation mode in the programmer, and if the error between the measured time interval and the preset time interval obtained by subtracting the preset pulse width from the preset pulse period exceeds the error threshold, then the available communication time period is not determined based on all the end moments and all the start moments determined in the continuous time period; or, determine each measured time interval between a preset number of end moments and the first start moment thereafter from all the end moments and all the start moments determined in the continuous time period; obtain the preset pulse period and preset pulse width of the current electrical stimulation mode in the programmer, and if the error between any measured time interval and the preset time interval obtained by subtracting the preset pulse width from the preset pulse period exceeds the error threshold, then the available communication time period is not determined based on all the end moments and all the start moments determined in the continuous time period; Target data that needs to be sent within the available communication time period is determined, and the target data is sent to the neural stimulator within the available communication time period.

2. The method according to claim 1, characterized in that The determining of all end times of a first change in the power supply state and all start times of a second change in the power supply state within a continuous time period includes: When the programmer starts to supply power to the neurostimulator, all ending moments of a first change in the power supply state and all starting moments of a second change in the power supply state are determined within a continuous time period after the start of power supply; or, In the case where the programmer needs to communicate with the neurostimulator, all ending moments of a first change in the power supply state and all starting moments of a second change in the power supply state are determined within a continuous time period before the communication.

3. The method according to claim 1, characterized in that: The method further comprises: When the electrical stimulation mode of the neurostimulator is switched, all end moments of a first change in the power supply state and all start moments of a second change in the power supply state within a continuous time period are redetermined, and an available communication time period is determined based on at least one redetermined end moment and at least one start moment.

4. The method according to claim 1, characterized in that The determining of the available communication time period based on at least one end time and at least one start time comprises: Determine the measured pulse period and the measured pulse width of the neurostimulator in the current electrical stimulation mode based on the first end time, the first start time and the second end time that are adjacent in sequence, and determine the end time and the adjacent start time that are located after the second end time based on the second end time, the measured pulse period and the measured pulse width; or Determine the measured pulse period and the measured pulse width of the neurostimulator in the current electrical stimulation mode based on the second start time, the third end time and the third start time that are adjacent in sequence, and determine the end time after the third start time and its adjacent start time according to the third start time, the measured pulse period and the measured pulse width; For the determined end time and its adjacent start time, the time period between each end time and the first start time after the end time is determined as the available communication time period corresponding to the end time.

5. The method according to claim 4, characterized in that The method further comprises: After determining the available communication time period, calculating a cumulative error between a first clock of the programmer and a second clock of the neurostimulator; If the accumulated error exceeds an error threshold, the first clock is corrected to synchronize the first clock with the second clock, and an available communication time period is re-determined.

6. The method according to claim 1, characterized in that The step of determining all end times of a first change in the power supply state and all start times of a second change in the power supply state within a continuous time period includes: determining the end time of a first change in the power supply state within a continuous time period and the start time of the first second change in the power supply state thereafter; The method of determining an available communication time period based on at least one end time and at least one start time includes: determining the communication time period at which the power supply state undergoes a first change and the measured interval length between the end time period and the start time period, and taking the time period between the communication time period and the time period that is separated from the communication time period by the measured interval length as the available communication time period.

7. The method according to any one of claims 1 to 6, characterized in that The programmer further includes a first envelope detection module and a first power supply status detection module, wherein the input end of the first envelope detection module is connected to the output end of the transmitting coil of the programmer to identify the envelope of the transmitting waveform of the transmitting coil, and the output end of the first envelope detection module is connected to the input end of the first power supply status detection module, so that the first power supply status detection module detects the power supply status based on the envelope output by the first envelope detection module; or, The programmer also includes a second envelope detection module, a first current sampling module and a second power supply state detection module, wherein the input end of the second envelope detection module is connected to the output end of the first current sampling module between the inverter circuit of the programmer and the transmitting coil of the programmer, and is used to collect the envelope of the alternating current waveform on the first current sampling module, and the output end of the second envelope detection module is connected to the input end of the second power supply state detection module, so that the second power supply state detection module detects the power supply state based on the envelope output by the second envelope detection module; or, The programmer also includes a third power supply status detection module, wherein a first output end of the power supply module of the programmer is connected to an input end of the inverter circuit, an output end of the inverter circuit is connected to a transmitting coil of the programmer, and a second output end of the power supply module is connected to an input end of the third power supply status detection module, so that the third power supply status detection module detects the power supply status based on a DC voltage output by the power supply module; or, The programmer also includes a second current sampling module and a fourth power supply status detection module, wherein the output end of the power supply module of the programmer is connected to the input end of the second current sampling module, the first output end of the second current sampling module is connected to the input end of the inverter circuit, the output end of the inverter circuit is connected to the input end of the transmitting coil of the programmer, and the second output end of the second current sampling module is connected to the input end of the fourth power supply status detection module, so that the fourth power supply status detection module detects the power supply status based on the DC current collected by the second current sampling module.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.