Method, device and computer equipment for generating deep brain electrical stimulation sequence

By generating a combination of target pulse waveform and pulse time interval sequence, it solves the limitations of constant frequency electrical stimulation in the existing technology, achieves flexibility and personalized control of deep brain electrical stimulation, and meets the treatment and research needs of different brain diseases.

CN118337190BActive Publication Date: 2024-09-03ZHEJIANG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410763137.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-03
Estimated Expiration
2044-06-13

AI Technical Summary

Technical Problem

Existing deep brain stimulation technology mainly relies on constant-frequency high-frequency electrical stimulation and cannot provide flexible and personalized time-varying electrical stimulation sequences, which limits the flexibility of brain disease treatment and research.

Method used

By generating a combination of target pulse waveform and pulse time interval sequence, the pulse electrical stimulation sequence is determined, converted into a time-varying deep brain stimulation sequence, and output to the area to be stimulated, providing a variety of flexible time-varying electrical stimulation solutions.

Benefits of technology

It achieves flexibility and personalized control of deep brain electrical stimulation, meets the treatment and research needs of different brain diseases, and provides more diverse electrical stimulation solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118337190B
    Figure CN118337190B
Patent Text Reader

Abstract

The present application relates to a method, device and computer equipment for generating a deep brain electrical stimulation sequence. It includes: generating a target pulse waveform based on a target pulse width, a target pulse resolution and a target pulse amplitude; generating a pulse time interval sequence through a time interval generating function; determining a pulse electrical stimulation sequence according to the target pulse waveform and the time interval sequence; determining a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and outputting the deep brain electrical stimulation sequence to the area to be stimulated. The above scheme uses various combinations of single-phase square wave pulses generated by a pulse generating function to generate a variety of different pulse forms, providing a more flexible and personalized solution for the research and treatment of deep brain electrical stimulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of signal processing, and in particular to a method, device and computer equipment for generating a deep brain electrical stimulation sequence. Background Art

[0002] DBS (deep brain stimulation) is one of the important breakthrough technologies in the field of neuroscience in recent years. It mainly uses HFS (high frequency stimulation) to regulate the activity of neurons and groups, thereby achieving control and improvement of various brain diseases such as Parkinson's disease, essential tremor and epilepsy. At present, DBS in clinical practice usually uses HFS with a constant pulse frequency, that is, the IPI (inter-pulse interval) remains constant. However, more and more studies have shown that variable frequency HFS sequences, that is, HFS sequences that change with time, can also achieve similar or even better research effects on deep brain stimulation than constant frequency HFS. Therefore, exploring the effects and mechanisms of variable frequency HFS is one of the important topics in DBS research. How to generate a deep brain stimulation sequence of variable frequency HFS to provide a more flexible and personalized solution for the study of deep brain stimulation is a problem that needs to be solved. Summary of the invention

[0003] Based on this, it is necessary to provide a method, device and computer equipment that can generate a variable frequency HFS deep brain stimulation sequence to address the above technical problems, thereby providing a more flexible and personalized solution generation method for deep brain stimulation research.

[0004] In a first aspect, the present application provides a method for generating a deep brain electrical stimulation sequence, the method comprising:

[0005] Generate a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0006] Generate a pulse time interval sequence by using a time interval generating function;

[0007] Determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence;

[0008] A time-varying deep brain electrical stimulation sequence is determined according to the pulse electrical stimulation sequence, and the deep brain electrical stimulation sequence is output to the area to be stimulated.

[0009] In one of the embodiments, the pulse time interval sequence includes a constant time interval sequence, a uniformly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, a gradually changing time interval sequence and a clustered time interval sequence.

[0010] In one embodiment, generating a pulse time interval sequence by a time interval generating function includes:

[0011] Generate a target array by using a uniform value array generation function, and generate a constant time interval sequence according to the target array and a constant pulse coefficient;

[0012] Generate a randomly distributed time interval sequence based on the random pulse time interval by a random number generation function;

[0013] Generate a normally distributed time interval sequence based on the time interval mean and time interval standard deviation corresponding to the normally distributed pulse time interval by using a normally distributed data generating function;

[0014] Generate a Poisson distribution time interval sequence based on a rate parameter of a Poisson distribution pulse time interval by using a Poisson distribution data generating function;

[0015] Generate a gradual time interval sequence based on a gradual range of the gradual time interval pulse by a gradual data generation function;

[0016] Generate a clustered time interval sequence based on a constant time interval sequence, a randomly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, and a gradually changing time interval sequence.

[0017] In one embodiment, determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence includes:

[0018] Sorting the target pulse waveforms according to the acquisition periods corresponding to the target pulse waveforms to determine a pulse waveform sequence;

[0019] The pulse waveform sequence is filled based on the pulse time interval sequence to determine a pulse electrical stimulation sequence.

[0020] In one embodiment, the pulse waveform sequence is filled based on the pulse time interval sequence to determine the pulse electrical stimulation sequence, including:

[0021] Grouping the target pulse waveforms based on the pulse waveform sequence to determine adjacent pulse groups;

[0022] Determine, according to the pulse time interval sequence, a previous pulse time interval corresponding to a previous pulse waveform in the adjacent pulse group, and determine a previous pulse width corresponding to a previous pulse waveform in the adjacent pulse group;

[0023] Determining the number of fills corresponding to the adjacent pulse groups according to the previous pulse time interval, the previous pulse width and the target pulse resolution;

[0024] Adjacent pulse time intervals of adjacent pulse groups in the pulse waveform sequence are filled based on the filling number to determine a pulse electrical stimulation sequence.

[0025] In one embodiment, generating a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude includes:

[0026] Generate a single-phase positive pulse based on a preset target pulse width, target pulse resolution and target pulse amplitude through a pulse signal generation function, and invert the single-phase positive pulse to determine a single-phase negative pulse;

[0027] A biphasic square wave pulse is generated according to the single-phase positive pulse and the single-phase negative pulse.

[0028] In one embodiment, determining a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and outputting the deep brain electrical stimulation sequence to the area to be stimulated includes:

[0029] determining a target electrical stimulation sequence from the pulse electrical stimulation sequence according to the electrical stimulation sequence selection instruction;

[0030] Converting a discrete digital signal corresponding to the target electrical stimulation sequence into a continuous analog signal to determine a time-varying deep brain electrical stimulation sequence;

[0031] The deep brain electrical stimulation sequence is transmitted to the electrical stimulator, so that the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated via the stimulation electrodes.

[0032] In a second aspect, the present application further provides a device for generating a deep brain electrical stimulation sequence, the device comprising:

[0033] A pulse waveform generation module, used to generate a target pulse waveform based on a target pulse width, a target pulse resolution and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0034] A time series generation module, used for generating a pulse time interval sequence through a time interval generation function;

[0035] A stimulation sequence generation module, used for determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence;

[0036] The electrical stimulation output module is used to determine a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated.

[0037] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0038] Generate a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0039] Generate a pulse time interval sequence by using a time interval generating function;

[0040] Determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence;

[0041] A time-varying deep brain electrical stimulation sequence is determined according to the pulse electrical stimulation sequence, and the deep brain electrical stimulation sequence is output to the area to be stimulated.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Generate a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0044] Generate a pulse time interval sequence by using a time interval generating function;

[0045] Determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence;

[0046] A time-varying deep brain electrical stimulation sequence is determined according to the pulse electrical stimulation sequence, and the deep brain electrical stimulation sequence is output to the area to be stimulated.

[0047] The method, device and computer equipment for generating the above-mentioned deep brain electrical stimulation sequence generate a target pulse waveform based on the target pulse width, target pulse resolution and target pulse amplitude; generate a pulse time interval sequence through a time interval generation function; determine the pulse electrical stimulation sequence according to the target pulse waveform and the time interval sequence; determine the time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated. This solves the problem that electrical stimulator products can usually only generate a constant IPI electrical stimulation sequence, or only meet certain specific needs of the stimulation sequence, but cannot provide a variety of flexible time-varying electrical stimulation sequences for experimental research on brain disease treatment. The above scheme uses various combinations of single-phase square wave pulses generated by the pulse generation function to generate a variety of different pulse forms, and combines with a variety of pulse time interval sequences that vary with time to generate a variety of different time-varying pulse electrical stimulation sequences, determines the deep brain electrical stimulation sequence according to the generated pulse electrical stimulation sequence, and the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated, providing a more flexible and personalized solution for the research of deep brain electrical stimulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is an application environment diagram of a method for generating a deep brain electrical stimulation sequence in one embodiment;

[0049] Figure 2 is a schematic flow chart of a method for generating a deep brain electrical stimulation sequence in one embodiment;

[0050] Figure 3 is an example diagram of a constant time interval sequence in one embodiment;

[0051] Figure 4 is an example diagram of a sequence of uniformly distributed time intervals in one embodiment;

[0052] Figure 5 is an example diagram of a normally distributed time interval sequence in one embodiment;

[0053] Figure 6 is an example diagram of a Poisson distribution time interval sequence in one embodiment;

[0054] Figure 7 is an example diagram of a gradually changing time interval sequence in one embodiment;

[0055] Figure 8 is an example diagram of a clustered time interval sequence in one embodiment;

[0056] Fig. 9 is a flow chart of a method for generating a deep brain electrical stimulation sequence in another embodiment;

[0057] Fig.10is a flow chart of a method for generating a deep brain electrical stimulation sequence in another embodiment;

[0058] Fig.11 is an exemplary diagram of a constant time interval sequence in another embodiment;

[0059] Fig.12 is an example diagram of a gradually changing time interval sequence in another embodiment;

[0060] Fig.13 is an exemplary diagram of a clustered time interval sequence in another embodiment;

[0061] Fig.14 is a structural block diagram of a device for generating a deep brain electrical stimulation sequence in one embodiment;

[0062] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0064] The method for generating a deep brain electrical stimulation sequence provided in the embodiments of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 generates a target pulse waveform based on the target pulse width, target pulse resolution and target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a biphasic square wave pulse; a pulse time interval sequence is generated by a time interval generation function; a pulse electrical stimulation sequence is determined according to the target pulse waveform and the time interval sequence; a time-varying deep brain electrical stimulation sequence is determined according to the pulse electrical stimulation sequence, and the deep brain electrical stimulation sequence is output to the area to be stimulated, and the relevant information of the deep brain electrical stimulation sequence is sent to the terminal 102 through the communication network. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0065] In one embodiment, Figure 2As shown, a method for generating a deep brain electrical stimulation sequence is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0066] S210 , generating a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude.

[0067] Among them, the target pulse waveform is a single pulse waveform that constitutes the deep brain electrical stimulation sequence. The target pulse width, target pulse resolution and target pulse amplitude can be set according to actual needs. Different types of target pulse waveforms can correspond to the same pulse width, pulse resolution and pulse amplitude, or they can correspond to different pulse widths, pulse resolutions and pulse amplitudes. The target pulse waveform includes a monophasic square wave pulse and a biphasic square wave pulse. The monophasic square wave pulse includes a monophasic positive pulse and a monophasic negative pulse, and the biphasic square wave pulse includes a biphasic symmetrical pulse and a biphasic asymmetric pulse. The biphasic symmetrical pulse includes an interval biphasic symmetrical pulse, an intervalless biphasic symmetrical pulse, a symmetrical biphasic positive pulse followed by a negative pulse, and a symmetrical biphasic positive pulse followed by a negative pulse; the biphasic asymmetric pulse includes an interval double asymmetric pulse, an intervalless biphasic asymmetric pulse, an asymmetric biphasic positive pulse followed by a negative pulse, and an asymmetric biphasic positive pulse followed by a negative pulse.

[0068] Specifically, a two-dimensional array can be constructed through MATLAB according to preset target pulse width, target pulse resolution and target pulse amplitude, and the target pulse waveform can be determined based on the two-dimensional array.

[0069] For example, the two-dimensional array [0, 0.1, 0.2, 0.3, 0.4, 0.5; -2, -2, -2, -2, -2, -2] can represent a single-phase negative pulse with a target pulse width of 0.5 seconds, a target pulse amplitude of 2, and a target pulse resolution of 10 Hz. The single-phase positive pulse can be obtained by inverting the single-phase negative pulse. The two-dimensional array [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; 3, 3, 3, 0, 0, 0, -1, -1, -1, -1, -1] can represent a two-phase asymmetric pulse with a target resolution of 1 Hz and a phase interval. The two-dimensional array [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0;-2,-2,-2,-2,-2,-2,-2,2,2,2,2,2] can represent a biphasic negative-first-positive-last pulse with a target resolution of 10 Hz, a target pulse width of 0.5 seconds, and a target pulse amplitude of 2. [0,0.00005,0.0001,0.00015,0.0002;0,-1,-1,1,1] can represent a biphasic negative-first-positive-last pulse with a target resolution of 20 kHz, a target pulse width of 0.1 milliseconds, and a target amplitude of 1. It should be noted that this pulse meets the requirements for pulse width and pulse waveform in clinical DBS.

[0070] Exemplarily, a biphasic pulse can also be directly generated by a pulse signal generation function, and the pulse signal generation function can be a square(t, duty) function of MATLAB. Wherein, if t=0:fs:1, duty=50, a biphasic positive-first-negative-last pulse with a target resolution of fs Hz, a target pulse width of 0.5 seconds, and a target pulse amplitude of 1 can be obtained by the square(t, duty) function.

[0071] S220 , generating a pulse time interval sequence by using a time interval generating function.

[0072] The time interval generation function may be a function in MATLAB or LabVIEW for generating a pulse time interval sequence. For example, the time interval generation function may include the ones() function, the rand() function, the randn() function, the poissrnd() function, and the linspace() function.

[0073] Specifically, a pulse time interval sequence is generated based on a preset number of time intervals through a time interval generation function.

[0074] S230. Determine a pulse electrical stimulation sequence according to the target pulse waveform and pulse time interval sequence.

[0075] Specifically, the target pulse waveform and the pulse time interval sequence are combined to determine the pulse electrical stimulation sequence. It should be noted that when the target pulse waveform and the pulse time interval sequence are combined, the target pulse waveform and the pulse time interval sequence need to be combined based on a permutation and combination method to ensure the integrity of the acquired pulse electrical stimulation sequence.

[0076] S240, determining a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and outputting the deep brain electrical stimulation sequence to the area to be stimulated.

[0077] It should be noted that the pulse electrical stimulation sequence is a discrete digital signal, so the pulse electrical stimulation sequence needs to be converted into a continuous analog signal in order to obtain a time-varying deep brain electrical stimulation sequence.

[0078] Specifically, the pulse electrical stimulation sequence is converted into a digital-to-analog conversion, and the pulse electrical stimulation sequence is converted into a continuous analog signal to obtain a time-varying deep brain electrical stimulation sequence, and the acquired deep brain electrical stimulation sequence is connected to the input end of the electrical stimulator, so as to output the deep brain electrical stimulation sequence to the area to be stimulated through the electrical stimulator. Among them, the electrical stimulator can be a 3800-type stimulator, which generates a real electrical stimulation signal according to the analog pulse stimulation signal received at its input port and transmits it to the stimulation electrode implanted in the brain. In particular, the 3800-type stimulator has a stimulation intensity adjustment function, which can further amplify or reduce the pulse intensity.

[0079] In the above-mentioned method for generating a deep brain electrical stimulation sequence, a target pulse waveform is generated based on a target pulse width, a target pulse resolution, and a target pulse amplitude; a pulse time interval sequence is generated through a time interval generation function; a pulse electrical stimulation sequence is determined according to the target pulse waveform and the time interval sequence; a time-varying deep brain electrical stimulation sequence is determined according to the pulse electrical stimulation sequence, and the deep brain electrical stimulation sequence is output to the area to be stimulated. This solves the problem that electrical stimulator products can usually only generate a constant IPI electrical stimulation sequence, or a stimulation sequence that only meets certain specific needs, but cannot provide a variety of flexible time-varying electrical stimulation sequences for experimental research on brain disease treatment. The above-mentioned scheme uses various combinations of single-phase square wave pulses generated by a pulse generation function to generate a variety of different pulse forms, which are combined with a variety of pulse time interval sequences that vary with time to generate a variety of different time-varying pulse electrical stimulation sequences, and a deep brain electrical stimulation sequence is determined according to the generated pulse electrical stimulation sequence. The electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated, providing a more flexible and personalized solution for the research of deep brain electrical stimulation.

[0080] In one embodiment, the pulse time interval sequence includes a constant time interval sequence, a uniformly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, a gradually changing time interval sequence, and a clustered time interval sequence.

[0081] Among them, the constant time interval sequence is the time interval sequence in which the IPI remains constant. The constant time interval sequence is as follows: Figure 3 The uniformly distributed time interval sequence is a time interval sequence in which the IPI follows a uniform distribution within a preset time range, such as Figure 4 As shown, Figure 4 is a uniformly distributed time interval sequence in which IPI follows a uniform distribution in the range of (5,15) milliseconds. A normally distributed time interval sequence is a time interval sequence in which IPI follows a normal distribution, such as Figure 5 As shown, Figure 5 is a normal distribution time interval sequence in which IPI follows a normal distribution with a mean of 10 and a standard deviation of 2. The Poisson distribution time interval sequence is a time interval sequence in which IPI follows a Poisson distribution, such as Figure 6 As shown, Figure 6 is a time interval sequence in which the IPI follows a Poisson distribution with a mean of 10. A gradual time interval sequence is a time interval sequence in which the IPI changes linearly with time within a preset time range, such as Figure 7 As shown, Figure 7 is a time interval sequence in which the IPI increases from 5 milliseconds to 15 milliseconds based on a linear transformation. A clustered time interval sequence is a time interval sequence in which the IPI changes in a clustered trend. Figure 8 shown.

[0082] The above scheme ensures the integrity of the types of pulse time interval sequences, thereby ensuring the diversity of the deep brain electrical stimulation sequences subsequently acquired.

[0083] In one embodiment, Fig. 9 As shown, a pulse time interval sequence is generated by a time interval generation function, including:

[0084] S310, generating a target array through a uniform value array generation function, and generating a constant time interval sequence according to the target array and a constant pulse coefficient.

[0085] The uniform value array generation function is the ones() function, which is a function in MATLAB used to generate a matrix or array of all 1s. The target array is an array of all 1s generated by the ones() function.

[0086] Specifically, an array of all 1s is generated as a target array through the ones() function, and a constant time interval sequence is generated according to the target array and the constant pulse coefficient based on Formula 1.

[0087] S = i × ones (1, N) (1)

[0088] Where S is a constant time interval sequence, i is a constant pulse coefficient, the value of i can be set according to the reagent requirements, and N is the number of time intervals. By using formula (1), a constant time interval sequence with a constant IPI of i and N time intervals can be generated.

[0089] S320 , generating a randomly distributed time interval sequence based on the random pulse time interval by using a random number generation function.

[0090] The random number generation function is the rand() function, which is a random function that generates random numbers. The random pulse time interval is the IPI range.

[0091] Exemplarily, the calculation formula of the randomly distributed time interval sequence is shown in formula (2):

[0092] M = a + (ba)×rand(1, N) (2)

[0093] Where M is a randomly distributed time interval sequence, and the random pulse time interval can be expressed as (a, b). Formula (2) can generate a randomly distributed time interval sequence with an IPI range of (a, b) and containing N time intervals.

[0094] S330 , generating a normally distributed time interval sequence based on the time interval mean and time interval standard deviation corresponding to the normally distributed pulse time interval by using a normally distributed data generating function.

[0095] Among them, the normal distribution data generation function is the randn() function, which is a function that generates random numbers or matrices of standard normal distribution and belongs to MATLAB function. The time interval mean is the IPI mean, and the time interval standard deviation is the IPI standard deviation. The time interval mean and time interval standard deviation are determined according to the preset IPI.

[0096] Exemplarily, the calculation method of the normally distributed time interval sequence is shown in formula (3):

[0097] Q= mu + sigma×randn(1, N) (3)

[0098] Where Q is a normally distributed time interval sequence, mu is the mean of the time interval, and sigma is the standard deviation of the time interval.

[0099] S340 , generating a Poisson distribution time interval sequence based on the rate parameter of the Poisson distribution pulse time interval by using a Poisson distribution data generation function.

[0100] The Poisson distribution data generation function is the poissrnd() function, which is used to generate Poisson distribution random numbers. The Poisson distribution pulse time interval is the IPI that obeys the Poisson distribution.

[0101] For example, the calculation method of the Poisson distribution time interval sequence is shown in formula (4):

[0102] P = poissrnd(lambda, 1, N) (4)

[0103] Where lambda is the rate parameter of the Poisson distribution pulse time interval.

[0104] S350 , generating a gradually changing time interval sequence based on a gradually changing range of gradually changing time interval pulses through a gradually changing data generating function.

[0105] The gradient data generation function is the linspace() function, which is an average calculation instruction in Matlab and is used to generate a linear vector of N points between x1 and x2.

[0106] Exemplarily, the calculation formula for the gradually changing time interval sequence is shown in formula (5):

[0107] G = linspace(x1:x2:N) (5)

[0108] Formula (5) can be used to generate a gradually changing time interval sequence in which the pulse interval gradually changes from x1 to x2 and includes N time intervals.

[0109] S360, generating a clustered time interval sequence according to the constant time interval sequence, the randomly distributed time interval sequence, the normally distributed time interval sequence, the Poisson distributed time interval sequence and the gradually changing time interval sequence.

[0110] Specifically, the amplitude corresponding to the constant time interval sequence is determined, and a numerical value greater than the amplitude corresponding to the constant time interval sequence is inserted into the constant time interval sequence, so as to obtain a clustered time interval sequence corresponding to the constant time interval sequence; the amplitude corresponding to the normally distributed time interval sequence is determined, and a numerical value greater than the amplitude corresponding to the normally distributed time interval sequence is inserted into the normally distributed time interval sequence, so as to obtain a clustered time interval sequence corresponding to the normally distributed time interval sequence; the amplitude corresponding to the Poisson distribution time interval sequence is determined, and a numerical value greater than the amplitude corresponding to the Poisson distribution time interval sequence is inserted into the Poisson distribution time interval sequence, so as to obtain a clustered time interval sequence corresponding to the Poisson distribution time interval sequence; the amplitude corresponding to the gradually changing time interval sequence is determined, and a numerical value greater than the amplitude corresponding to the gradually changing time interval sequence is inserted into the gradually changing time interval sequence, so as to obtain a clustered time interval sequence corresponding to the gradually changing time interval sequence.

[0111] The above method provides a method for generating a constant time interval sequence, a uniformly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, a gradually changing time interval sequence and a clustered time interval sequence, which can improve the generation efficiency of the pulse time interval sequence and ensure the diversity of the pulse time interval sequence.

[0112] In one embodiment, the pulse electrical stimulation sequence is determined according to the target pulse waveform and the pulse time interval sequence, including:

[0113] The target pulse waveforms are sorted according to the acquisition cycles corresponding to the target pulse waveforms to determine the pulse waveform sequence; the pulse waveform sequence is filled based on the pulse time interval sequence to determine the pulse electrical stimulation sequence.

[0114] Specifically, the acquisition period corresponding to the target pulse waveform is determined, and the target pulse waveform is sorted based on the acquisition period to determine at least one pulse waveform sequence. It should be noted that the target pulse waveform with an early acquisition period is arranged in front of the pulse waveform sequence. Based on the pulse time interval sequence, the time interval between each target pulse waveform in the pulse waveform sequence is filled with preset filling data, and the pulse electrical stimulation sequence is determined according to the filling result. Among them, the preset filling data can be 0.

[0115] The above scheme provides a way to connect the target pulse waveforms, sort the target pulse waveforms according to their acquisition timing, determine the pulse waveform sequence, and then fill the time intervals between the target pulse waveforms in the pulse waveform sequence based on the pulse time interval sequence, so as to obtain a variety of pulse electrical stimulation sequences.

[0116] In one embodiment, Fig.10As shown, the pulse waveform sequence is filled based on the pulse time interval sequence to determine the pulse electrical stimulation sequence, including:

[0117] S410 , grouping target pulse waveforms based on the pulse waveform sequence to determine adjacent pulse groups.

[0118] The adjacent pulse group includes two target pulse waveforms that are adjacent to each other in the pulse waveform sequence.

[0119] S420. Determine, according to the pulse time interval sequence, a previous pulse time interval corresponding to a previous pulse waveform in adjacent pulse groups, and determine a previous pulse width corresponding to a previous pulse waveform in adjacent pulse groups.

[0120] The previous pulse time interval is the IPI of the previous pulse waveform in the adjacent pulse group, and the previous pulse width is the pulse width of the previous pulse waveform in the adjacent pulse group.

[0121] S430, determining the number of fills corresponding to adjacent pulse groups according to the previous pulse time interval, the previous pulse width and the target pulse resolution.

[0122] The number of fill numbers corresponding to adjacent pulse groups refers to the number of fill data required between two target pulse waveforms corresponding to adjacent pulse groups. The target pulse resolution refers to the resolution corresponding to the target pulse waveform. The target pulse resolution refers to the frequency range of the target pulse waveform. The target pulse resolutions corresponding to the target pulse waveforms in the same pulse waveform sequence are the same.

[0123] Specifically, the difference between the previous pulse time interval and the previous pulse width is determined, and the target pulse resolution corresponding to the target pulse waveform in the adjacent pulse group is multiplied by the difference between the previous pulse time interval and the previous pulse width to determine the filling number corresponding to the adjacent pulse group.

[0124] S440, filling the adjacent pulse time intervals of adjacent pulse groups in the pulse waveform sequence based on the filling number, and determining the pulse electrical stimulation sequence.

[0125] Specifically, based on the determined filling numbers corresponding to each adjacent pulse group, each adjacent pulse group in the pulse waveform sequence is filled with preset filling data, and the pulse electrical stimulation sequence is determined according to the filling result.

[0126] The above scheme provides a method of combining the target pulse waveform and the pulse time interval sequence to determine the pulse electrical stimulation sequence, which can ensure the continuity of the pulse electrical stimulation sequence.

[0127] In one embodiment, the single-phase square wave pulse includes a single-phase positive pulse and a single-phase negative pulse, and generating a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude includes:

[0128] Through the pulse signal generation function, a single-phase positive pulse is generated based on the preset target pulse width, target pulse resolution and target pulse amplitude, and the single-phase positive pulse is inverted to determine the single-phase negative pulse; a biphase square wave pulse is generated based on the single-phase positive pulse and the single-phase negative pulse.

[0129] The pulse signal generating function can be a square(t,duty) function of MATLAB. The biphasic square wave pulse includes a biphasic symmetrical pulse and a biphasic asymmetrical pulse. The biphasic symmetrical pulse includes a biphasic symmetrical pulse without interval and a biphasic symmetrical pulse with interval; the biphasic asymmetrical pulse includes a biphasic asymmetrical pulse without interval and a biphasic asymmetrical pulse with interval.

[0130] Specifically, a single-phase positive pulse is generated based on the preset target pulse width, target pulse resolution and target pulse amplitude through the square(t, duty) function of MATLAB. For example, if t=0:fs:1, duty=100, a single-phase positive pulse with a target pulse resolution of fs Hz, a target pulse width of 1 second and a target pulse amplitude of 1 can be obtained through the square(t, duty) function. The single-phase positive pulse is inverted to determine the single-phase negative pulse.

[0131] Exemplarily, a single-phase positive pulse is combined with a single-phase negative pulse of the same pulse width and the same amplitude to obtain a two-phase symmetrical pulse. When the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse of the same pulse width and the same amplitude are the same, a symmetrical two-phase positive-first-then-negative pulse or a symmetrical two-phase negative-first-then-positive pulse can be obtained; when the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse of the same pulse width and the same amplitude are different, a two-phase symmetrical pulse with a phase interval can be obtained.

[0132] Exemplarily, a single-phase positive pulse is combined with a single-phase negative pulse of different pulse width and amplitude to obtain a biphasic asymmetric pulse. When the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse of different pulse width and amplitude are the same, an asymmetric biphasic positive-first-then-negative pulse or an asymmetric biphasic negative-first-then-positive pulse can be obtained; when the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse of different pulse width and amplitude are different, a biphasic asymmetric pulse with a phase interval can be obtained.

[0133] The above scheme provides a method for generating single-phase square wave pulses and bidirectional square wave pulses, which improves the efficiency of obtaining the target pulse waveform and improves the diversity of the target pulse waveform.

[0134] For example, Fig.11 This is an example diagram of a constant time interval sequence with an IPI of 10 milliseconds, which is composed of a single-phase positive pulse with a target pulse width of 1 millisecond when the target resolution is 1000 Hz; Fig.12 This is an example diagram of a gradually changing time interval sequence consisting of a biphasic positive-first-negative-last pulse with a target pulse width of 1 millisecond when the target resolution is 1000 Hz; Fig.13 This is an example diagram of a clustered time interval sequence consisting of biphasic positive-first-negative-last pulses with a target resolution of 1000 Hz and a target pulse width of 1 millisecond.

[0135] Exemplarily, determining a time-varying deep brain electrical stimulation sequence according to a pulse electrical stimulation sequence, and outputting the deep brain electrical stimulation sequence to an area to be stimulated, includes:

[0136] A target electrical stimulation sequence is determined from a pulse electrical stimulation sequence according to an electrical stimulation sequence selection instruction; a discrete digital signal corresponding to the target electrical stimulation sequence is converted into a continuous analog signal to determine a time-varying deep brain electrical stimulation sequence; and the deep brain electrical stimulation sequence is transmitted to an electrical stimulator so that the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated via stimulation electrodes.

[0137] The electrical stimulation sequence selection instruction may be identification information of a target electrical stimulation sequence issued by a user, or may be demand information for a target electrical stimulation sequence issued by a user.

[0138] Specifically, if the electrical stimulation sequence selection instruction is the identification information of the target electrical stimulation sequence sent by the user, the target electrical stimulation sequence is determined from the pulse electrical stimulation sequence according to the identification information sent by the user. Since the pulse electrical stimulation sequence is a discrete digital signal, it is necessary to perform digital-to-analog conversion on the target electrical stimulation sequence, convert the target electrical stimulation sequence into a continuous analog signal, and use the obtained continuous analog signal as a time-varying deep brain electrical stimulation sequence. The deep brain electrical stimulation sequence is transmitted to the electrical stimulator so that the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated via the stimulation electrode.

[0139] Exemplarily, if the electrical stimulation sequence selection instruction is demand information for a target electrical stimulation sequence issued by a user, keywords can be determined based on the demand information issued by the user, candidate electrical stimulation sequences can be determined based on the keywords, the candidate electrical stimulation sequences can be sent to the client, and the target electrical stimulation sequence can be determined from the candidate electrical stimulation sequences based on the user selection instruction fed back by the client.

[0140] The above scheme can determine the target electrical stimulation sequence from the pulse electrical stimulation sequence according to the electrical stimulation sequence selection instruction issued by the user, determine the time-varying deep brain electrical stimulation sequence required by the user according to the target electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated, thereby providing a more flexible and personalized solution for the research on deep brain electrical stimulation and the treatment of brain diseases.

[0141] In one embodiment, the method for generating the deep brain stimulation sequence further includes:

[0142] Through the square(t, duty) function of MATLAB, a single-phase positive pulse is generated based on the preset target pulse width, target pulse resolution and target pulse amplitude, and the single-phase positive pulse is negated to determine the single-phase negative pulse. A biphasic square wave pulse can be obtained by combining a single-phase positive pulse with a single-phase negative pulse of the same pulse width and the same amplitude. When the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse of the same pulse width and the same amplitude are the same, a symmetrical biphasic positive-first-then-negative pulse or a symmetrical biphasic negative-first-then-positive pulse can be obtained; when the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse of the same pulse width and the same amplitude are different, a biphasic symmetrical pulse with a phase interval can be obtained. A single-phase positive pulse is combined with a single-phase negative pulse of different pulse widths and different amplitudes to obtain a biphasic asymmetric pulse. When the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse with different pulse width and amplitude are the same, an asymmetric two-phase positive-first-negative-then pulse or an asymmetric two-phase negative-first-positive-then pulse can be obtained; when the phase offset and pulse width of the above-mentioned combined single-phase positive pulse and the single-phase negative pulse with different pulse width and amplitude are different, a two-phase asymmetric pulse with a phase interval can be obtained.

[0143] Generate an array of all 1s as the target array through the ones() function, and generate a constant time interval sequence based on the target array and the constant pulse coefficient based on formula 1. Generate a randomly distributed time interval sequence based on the random pulse time interval through the rand() function. Generate a normally distributed time interval sequence based on the mean and standard deviation of the time interval corresponding to the normally distributed pulse time interval through the randn() function. Generate a Poisson distributed time interval sequence based on the rate parameter of the Poisson distributed pulse time interval through the poissrnd() function. Generate a gradually changing time interval sequence based on the gradually changing range of the gradually changing time interval pulse through the linspace() function. Generate a clustered time interval sequence based on the constant time interval sequence, the randomly distributed time interval sequence, the normally distributed time interval sequence, the Poisson distributed time interval sequence, and the gradually changing time interval sequence.

[0144] Determine the acquisition period corresponding to the target pulse waveform, and sort the target pulse waveform based on the acquisition period to determine at least one pulse waveform sequence. It should be noted that the target pulse waveform with an early acquisition period is arranged in front of the pulse waveform sequence. Group the target pulse waveform based on the pulse waveform sequence to determine adjacent pulse groups; determine the previous pulse time interval corresponding to the previous pulse waveform in the adjacent pulse group according to the pulse time interval sequence, and determine the previous pulse width corresponding to the previous pulse waveform in the adjacent pulse group; determine the difference between the previous pulse time interval and the previous pulse width, multiply the target pulse resolution corresponding to the target pulse waveform in the adjacent pulse group by the difference between the previous pulse time interval and the previous pulse width, and determine the number of fillings corresponding to the adjacent pulse groups; based on the determined number of fillings corresponding to each adjacent pulse group, use preset filling data to fill each adjacent pulse group in the pulse waveform sequence, and determine the pulse electrical stimulation sequence according to the filling result.

[0145] If the electrical stimulation sequence selection instruction is the identification information of the target electrical stimulation sequence sent by the user, the target electrical stimulation sequence is determined from the pulse electrical stimulation sequence according to the identification information sent by the user. Since the pulse electrical stimulation sequence is a discrete digital signal, it is necessary to perform digital-to-analog conversion on the target electrical stimulation sequence, convert the target electrical stimulation sequence into a continuous analog signal, and use the obtained continuous analog signal as a time-varying deep brain electrical stimulation sequence. The deep brain electrical stimulation sequence is transmitted to the electrical stimulator so that the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated via the stimulation electrode.

[0146] The above scheme generates a target pulse waveform based on the target pulse width, target pulse resolution and target pulse amplitude; generates a pulse time interval sequence through a time interval generation function; determines a pulse electrical stimulation sequence according to the target pulse waveform and the time interval sequence; determines a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and outputs the deep brain electrical stimulation sequence to the area to be stimulated. This solves the problem that electrical stimulator products can usually only generate a constant IPI electrical stimulation sequence, or a stimulation sequence that only meets certain specific needs, but cannot provide a variety of flexible time-varying electrical stimulation sequences for experimental research on brain disease treatment. The above scheme uses various combinations of single-phase square wave pulses generated by a pulse generation function to generate a variety of different pulse forms, which are combined with a variety of pulse time interval sequences that vary with time to generate a variety of different time-varying pulse electrical stimulation sequences, determine a deep brain electrical stimulation sequence according to the generated pulse electrical stimulation sequence, and the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated, providing a more flexible and personalized solution for the research on deep brain electrical stimulation.

[0147] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0148] Based on the same inventive concept, the embodiment of the present application also provides a device for generating a deep brain electrical stimulation sequence for implementing the method for generating a deep brain electrical stimulation sequence involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more devices for generating deep brain electrical stimulation sequences provided below can refer to the limitations of the method for generating deep brain electrical stimulation sequences above, and will not be repeated here.

[0149] In one embodiment, Fig.14 As shown, a device for generating a deep brain electrical stimulation sequence is provided, comprising: a pulse waveform generating module 501, a time series generating module 502, a stimulation sequence generating module 503 and an electrical stimulation output module 504, wherein:

[0150] A pulse waveform generating module 501 is used to generate a target pulse waveform based on a target pulse width, a target pulse resolution and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0151] A time series generation module 502 is used to generate a pulse time interval sequence through a time interval generation function;

[0152] A stimulation sequence generation module 503 is used to determine a pulse electrical stimulation sequence according to a target pulse waveform and a pulse time interval sequence;

[0153] The electrical stimulation output module 504 is used to determine a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated.

[0154] Exemplarily, the pulse time interval sequence includes a constant time interval sequence, a uniformly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, a gradually changing time interval sequence, and a clustered time interval sequence.

[0155] Exemplarily, the time series generation module 502 is specifically used for:

[0156] Generate a target array by using a uniform value array generation function, and generate a constant time interval sequence according to the target array and a constant pulse coefficient;

[0157] Generate a randomly distributed time interval sequence based on the random pulse time interval by a random number generation function;

[0158] Generate a normally distributed time interval sequence based on the time interval mean and time interval standard deviation corresponding to the normally distributed pulse time interval by using a normally distributed data generating function;

[0159] Generate a Poisson distribution time interval sequence based on a rate parameter of a Poisson distribution pulse time interval by using a Poisson distribution data generating function;

[0160] Generate a gradual time interval sequence based on a gradual range of the gradual time interval pulse by a gradual data generation function;

[0161] Generate a clustered time interval sequence based on a constant time interval sequence, a randomly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, and a gradually changing time interval sequence.

[0162] Exemplarily, the stimulation sequence generation module 503 is specifically used for:

[0163] The target pulse waveforms are sorted according to the acquisition periods corresponding to the target pulse waveforms to determine the pulse waveform sequence;

[0164] The pulse waveform sequence is filled based on the pulse time interval sequence to determine the pulse electrical stimulation sequence.

[0165] Exemplarily, the stimulation sequence generation module 503 is further specifically configured to:

[0166] grouping the target pulse waveforms based on the pulse waveform sequence to determine adjacent pulse groups;

[0167] Determine the previous pulse time interval corresponding to the previous pulse waveform in the adjacent pulse group according to the pulse time interval sequence, and determine the previous pulse width corresponding to the previous pulse waveform in the adjacent pulse group;

[0168] Determine the number of fills corresponding to adjacent pulse groups according to the previous pulse time interval, the previous pulse width and the target pulse resolution;

[0169] Adjacent pulse time intervals of adjacent pulse groups in the pulse waveform sequence are filled based on the filling number to determine the pulse electrical stimulation sequence.

[0170] Exemplarily, the pulse waveform generating module 501 is specifically used for:

[0171] Generate a single-phase positive pulse based on a preset target pulse width, target pulse resolution and target pulse amplitude through a pulse signal generation function, and invert the single-phase positive pulse to determine a single-phase negative pulse;

[0172] A biphasic square wave pulse is generated from a monophasic positive pulse and a monophasic negative pulse.

[0173] Exemplarily, the above-mentioned device for generating a deep brain electrical stimulation sequence further includes:

[0174] The digital-to-analog conversion module is used to determine the target electrical stimulation sequence from the pulse electrical stimulation sequence according to the electrical stimulation sequence selection instruction; convert the discrete digital signal corresponding to the target electrical stimulation sequence into a continuous analog signal to determine the time-varying deep brain electrical stimulation sequence; transmit the deep brain electrical stimulation sequence to the electrical stimulator, so that the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated via the stimulation electrode.

[0175] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.15 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for generating a deep brain electrical stimulation sequence is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0176] Those skilled in the art will understand that Fig.15The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0177] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0178] Step 1: Generate a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0179] Step 2: Generate a pulse time interval sequence by using a time interval generation function;

[0180] Step 3: Determine the pulse electrical stimulation sequence according to the target pulse waveform and pulse time interval sequence;

[0181] Step 4: Determine a time-varying deep brain electrical stimulation sequence based on the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated.

[0182] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0183] Step 1: Generate a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0184] Step 2: Generate a pulse time interval sequence by using a time interval generation function;

[0185] Step 3: Determine the pulse electrical stimulation sequence according to the target pulse waveform and pulse time interval sequence;

[0186] Step 4: Determine a time-varying deep brain electrical stimulation sequence based on the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated.

[0187] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0188] Step 1: Generate a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse;

[0189] Step 2: Generate a pulse time interval sequence by using a time interval generation function;

[0190] Step 3: Determine the pulse electrical stimulation sequence according to the target pulse waveform and pulse time interval sequence;

[0191] Step 4: Determine a time-varying deep brain electrical stimulation sequence based on the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated.

[0192] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0193] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0194] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0195] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating a deep brain stimulation sequence, It is characterized in that include: generating a target pulse waveform based on a target pulse width, a target pulse resolution, and a target pulse amplitude; The target pulse waveform includes a monophasic square wave pulse and a biphasic square wave pulse; Generate a pulse time interval sequence by using a time interval generating function; Determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence; Determining a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and outputting the deep brain electrical stimulation sequence to the area to be stimulated; Determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence includes: Sorting the target pulse waveforms according to the acquisition periods corresponding to the target pulse waveforms to determine a pulse waveform sequence; Filling the pulse waveform sequence based on the pulse time interval sequence to determine a pulse electrical stimulation sequence; Filling the pulse waveform sequence based on the pulse time interval sequence to determine a pulse electrical stimulation sequence includes: Grouping the target pulse waveforms based on the pulse waveform sequence to determine adjacent pulse groups; Determine, according to the pulse time interval sequence, a previous pulse time interval corresponding to a previous pulse waveform in the adjacent pulse group, and determine a previous pulse width corresponding to a previous pulse waveform in the adjacent pulse group; Determining the number of fills corresponding to the adjacent pulse groups according to the previous pulse time interval, the previous pulse width and the target pulse resolution; Adjacent pulse time intervals of adjacent pulse groups in the pulse waveform sequence are filled based on the filling number to determine a pulse electrical stimulation sequence.

2. The method according to claim 1, It is characterized in that The pulse time interval sequence includes a constant time interval sequence, a uniform distribution time interval sequence, a normal distribution time interval sequence, a Poisson distribution time interval sequence, a gradual change time interval sequence and a clustered time interval sequence.

3. The method according to claim 2, It is characterized in that Generate a pulse time interval sequence through a time interval generation function, including: Generate a target array by using a uniform value array generation function, and generate a constant time interval sequence according to the target array and a constant pulse coefficient; Generate a randomly distributed time interval sequence based on the random pulse time interval by a random number generation function; Generate a normally distributed time interval sequence based on the time interval mean and time interval standard deviation corresponding to the normally distributed pulse time interval by using a normally distributed data generating function; Generate a Poisson distribution time interval sequence based on a rate parameter of a Poisson distribution pulse time interval by using a Poisson distribution data generating function; Generate a gradual time interval sequence based on a gradual range of the gradual time interval pulse by a gradual data generation function; Generate a clustered time interval sequence based on a constant time interval sequence, a randomly distributed time interval sequence, a normally distributed time interval sequence, a Poisson distributed time interval sequence, and a gradually changing time interval sequence.

4. The method according to claim 1, It is characterized in that The single-phase square wave pulse includes a single-phase positive pulse and a single-phase negative pulse, and the target pulse waveform is generated based on the target pulse width, the target pulse resolution and the target pulse amplitude, including: Generate a single-phase positive pulse based on a preset target pulse width, target pulse resolution and target pulse amplitude through a pulse signal generation function, and invert the single-phase positive pulse to determine a single-phase negative pulse; A biphasic square wave pulse is generated according to the single-phase positive pulse and the single-phase negative pulse.

5. The method according to claim 1, It is characterized in that Determining a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and outputting the deep brain electrical stimulation sequence to the area to be stimulated, comprising: determining a target electrical stimulation sequence from the pulse electrical stimulation sequence according to the electrical stimulation sequence selection instruction; Converting a discrete digital signal corresponding to the target electrical stimulation sequence into a continuous analog signal to determine a time-varying deep brain electrical stimulation sequence; The deep brain electrical stimulation sequence is transmitted to the electrical stimulator, so that the electrical stimulator outputs the deep brain electrical stimulation sequence to the area to be stimulated via the stimulation electrodes.

6. A device for generating a deep brain electrical stimulation sequence, It is characterized in that The device for generating the deep brain electrical stimulation sequence comprises: A pulse waveform generation module, used to generate a target pulse waveform based on a target pulse width, a target pulse resolution and a target pulse amplitude; the target pulse waveform includes a single-phase square wave pulse and a bi-phase square wave pulse; A time series generation module, used for generating a pulse time interval sequence through a time interval generation function; A stimulation sequence generation module, used for determining a pulse electrical stimulation sequence according to the target pulse waveform and the pulse time interval sequence; An electrical stimulation output module, used to determine a time-varying deep brain electrical stimulation sequence according to the pulse electrical stimulation sequence, and output the deep brain electrical stimulation sequence to the area to be stimulated; The stimulation sequence generation module is further used to sort the target pulse waveforms according to the acquisition period corresponding to the target pulse waveforms to determine a pulse waveform sequence; fill the pulse waveform sequence based on the pulse time interval sequence to determine a pulse electrical stimulation sequence; The stimulation sequence generation module is further used to group the target pulse waveforms based on the pulse waveform sequence to determine adjacent pulse groups; Determine, according to the pulse time interval sequence, a previous pulse time interval corresponding to a previous pulse waveform in the adjacent pulse group, and determine a previous pulse width corresponding to a previous pulse waveform in the adjacent pulse group; Determining the number of fills corresponding to the adjacent pulse groups according to the previous pulse time interval, the previous pulse width and the target pulse resolution; Adjacent pulse time intervals of adjacent pulse groups in the pulse waveform sequence are filled based on the filling number to determine a pulse electrical stimulation sequence.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

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