A method and device for detecting deep brain spike potential signals based on deep learning
By directly extracting the spike time series from the original recorded signal of deep brain electrical stimulation using a method based on deep learning, the problem of cumbersome high-pass filtering and false detection in the existing technology is solved, and more accurate and efficient detection is achieved.
Patent Information
- Application Number
- CN202410704467.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-03
AI Technical Summary
Existing deep brain spike signal detection methods require cumbersome high-pass filtering operations, and high-pass filtering will introduce small interference, leading to false detection problems.
A method based on deep learning is used to construct and train a deep learning model by obtaining the original recording signal of deep brain electrical stimulation, and use the training data set to predict the time series of spike potentials, avoiding the high-pass filtering step.
The detection process is simplified, false detections are reduced, and the accuracy and efficiency of spike potential signal detection are improved.
Smart Images

Figure CN118266949B
Abstract
Description
Technical Field
[0001] The present application relates to the field of electroencephalogram (EEG) signal detection, and in particular to a method and device for detecting deep brain spike potential signals based on deep learning. Background Art
[0002] Deep Brain Stimulation (DBS) is a neuromodulatory technology that has shown good results and has been widely used in the treatment of brain diseases such as Parkinson's disease, epilepsy, and refractory depression. However, the mechanism of DBS in treating these brain diseases is still unclear. Researchers evaluate the effects of DBS by analyzing the discharge activity of neuronal groups or single neurons, and then explore its potential mechanism of action. Therefore, how to detect and extract the spike potential of single neuron discharge in deep brain electrical signals is very important for studying the mechanism of action of DBS.
[0003] The action potential generated by the discharge of a single neuron is a spike in the extracellular recording. The amplitude of the spike is usually very small, about a few hundred microvolts, and it is usually submerged in the broadband local field potential with an amplitude of about a few millivolts, making it difficult to distinguish directly. In addition, due to the fluctuations caused by the low-frequency components in the local field potential, it is difficult to directly use the threshold method to detect the spike on the original signal. The conventional method for detecting deep brain spike signals first high-pass filters the broadband signal to filter out the interference of the low-frequency signal, and then uses threshold detection and other methods to detect the spike in the high-pass filtered signal. This method has many steps and is relatively cumbersome. In addition, high-pass filtering of deep brain electrical signals will amplify the tiny interference in the original signal, thereby causing false detection of spike signals. Summary of the invention
[0004] Based on this, it is necessary to provide a method and device for detecting deep brain spike potential signals based on deep learning, which can avoid tedious operations such as high-pass filtering and the possible interference introduced by them, in order to address the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a method for detecting deep brain spike potential signals based on deep learning, the method for detecting deep brain spike potential signals based on deep learning comprising:
[0006] Obtain the original recorded signals of deep brain stimulation;
[0007] Train pre-built deep learning models;
[0008] Inputting the original recorded signal into the trained deep learning model;
[0009] Obtain a time series of spike potentials in the original recorded signal output by the deep learning model.
[0010] In one embodiment, the training of the pre-built deep learning model includes:
[0011] Acquire an EEG signal segment with known spike position information, and use the EEG signal segment as a training data set;
[0012] Importing the training data set into a deep learning model to obtain a detection result output by the deep learning model;
[0013] A loss function is constructed based on the detection results and the known spike potential position information, and a deep learning model is trained based on the loss function.
[0014] In one embodiment, obtaining EEG signal segments with known spike position information as training data sets includes:
[0015] Obtain a spike potential waveform template;
[0016] The spike potential waveform template is superimposed on preset data at a preset position to obtain an EEG signal segment containing the spike potential position information, and the EEG signal segment is used as a training data set.
[0017] In one embodiment, when the spike waveform template is obtained from experimental data, the spike waveform template is superimposed with the preset data at a preset position to obtain an EEG signal segment containing the spike position information, and the EEG signal segment is used as a training data set, including:
[0018] Taking the trough in the spike potential waveform template as the midpoint, intercepting the data between the first mark before the midpoint and the second mark after the midpoint as the target data;
[0019] The target data and the local field potential signal that does not contain the spike potential in the preset data are repeatedly superimposed to obtain an electroencephalogram signal segment, and the electroencephalogram signal segment is used as a training data set.
[0020] In one embodiment, when the spike waveform template is generated based on a fitting formula, the spike waveform template is superimposed with preset data at a preset position to obtain an EEG signal segment containing the spike position information, and the EEG signal segment is used as a training data set, including:
[0021] The spike potential waveform template is repeatedly superimposed with the Gaussian white noise in the preset data to obtain an electroencephalogram signal segment, and the electroencephalogram signal segment is used as a training data set.
[0022] In one embodiment, the step of importing the training data set into a deep learning model to obtain a detection result output by the deep learning model includes:
[0023] The training data set is divided into N sequence segments, each of which is provided with M detection windows, and each detection window includes an offset of a left end point of the sequence segment to which it belongs and a width value of the detection window;
[0024] Based on Formula 1, the probability of each detection window containing a spike potential and the confidence C of the preset accuracy of the detection window are calculated:
[0025] , formula 1;
[0026] If a spike occurs in the sequence segment to which the detection window belongs, then The value of is 1, otherwise it is 0, corresponding to the intersection and union ratio of the predicted position of the spike potential and the actual position The calculation process is shown in Formula 2:
[0027] , formula 2.
[0028] In one embodiment, constructing a loss function based on the detection result and the spike position information, and training a deep learning model based on the loss function includes:
[0029] Based on formula 3, construct the loss function loss:
[0030] , Formula 3;
[0031] Where the first two items are the predictions of the coordinate positions. To judge the i The first j Whether the detection window contains a spike potential, if yes, it takes 1, otherwise it takes 0. , Indicates the two coordinate positions of the current detection window regression, , represents the coordinate position corresponding to the true spike potential; the last two items are the confidence predictions including and excluding the spike potential, respectively. Represents the confidence of the current detection window, Indicates whether the real spike potential exists or not, if it exists, it takes 1, otherwise it takes 0.
[0032] In a second aspect, the present application further provides a deep brain spike signal detection device based on deep learning, the deep brain spike signal detection device based on deep learning comprising:
[0033] A signal recording module, used to obtain the original recording signal of deep brain electrical stimulation;
[0034] Model training module, used to train pre-built deep learning models;
[0035] A data input module, used for inputting the original recorded signal into the trained deep learning model;
[0036] The result acquisition module is used to obtain the time series of the spike potential in the original recorded signal output by the deep learning model.
[0037] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0038] Obtain the original recorded signals of deep brain stimulation;
[0039] Train pre-built deep learning models;
[0040] Inputting the original recorded signal into the trained deep learning model;
[0041] Obtain a time series of spike potentials in the original recorded signal output by the deep learning model.
[0042] In a fourth aspect, the present application further provides a computer-readable storage medium. 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] Obtain the original recorded signals of deep brain stimulation;
[0044] Train pre-built deep learning models;
[0045] Inputting the original recorded signal into the trained deep learning model;
[0046] Obtain a time series of spike potentials in the original recorded signal output by the deep learning model.
[0047] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0048] Obtain the original recorded signals of deep brain stimulation;
[0049] Train pre-built deep learning models;
[0050] Inputting the original recorded signal into the trained deep learning model;
[0051] Obtain a time series of spike potentials in the original recorded signal output by the deep learning model.
[0052] The above-mentioned deep learning-based deep brain spike potential signal detection method, device, computer equipment, storage medium and computer program product obtain the original signal in deep brain electrical stimulation, input the original signal segment to be detected by spike potential into the trained deep learning model, and obtain the time series of spike potential through model prediction and reasoning, which solves the problems of cumbersome process and false detection caused by slight interference in related technologies that require high-pass filtering before spike potential detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a diagram of an application environment of a method for detecting deep brain spike potential signals based on deep learning in one embodiment;
[0054] Figure 2 1 is a flow chart of a method for detecting deep brain spike potential signals based on deep learning in one embodiment;
[0055] Figure 3 is a flow chart of step S40 in one embodiment;
[0056] Figure 4 is a schematic diagram of the process of step S42 in one embodiment;
[0057] Figure 5 is a structural block diagram of step S44 in one embodiment;
[0058] Figure 6 A schematic diagram of obtaining a time series in a deep learning model in one embodiment;
[0059] Figure 7 is a structural block diagram of a deep brain spike signal detection device based on deep learning in one embodiment;
[0060] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] 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.
[0062] The present application provides a method for detecting deep brain spike potential signals based on deep learning, which can be applied to Figure 1In 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. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, 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 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0063] In one embodiment, Figure 2 As shown, a method for detecting deep brain spike potential signals based on deep learning is provided. Figure 1 The terminal in is used as an example to illustrate, including the following steps:
[0064] Step S20, obtaining the original recorded signal of deep brain electrical stimulation.
[0065] Among them, a deep brain stimulation (DBS) device is used to obtain the original recorded signal collected from the specific brain area of the patient or experimental animal according to the standard operating procedure. The original recorded signal is converted into digital form, and the sampling frequency is set to fs to ensure that the subtle changes in the spike potential waveform of a single neuron can be captured. In this embodiment, fs is set to 20,000 Hz.
[0066] Step S40: training the pre-built deep learning model.
[0067] The key to this embodiment is to use a deep learning model to process the original recorded signal, obtain the time when the spike potential appears in the original recorded signal, and summarize multiple times to obtain the time series of the spike potential. However, the pre-built deep learning model cannot be directly used for processing the original recorded signal due to the problem of imperfect internal parameters, so it is necessary to train the pre-built deep learning model using a training data set.
[0068] Step S60: input the original recorded signal into the trained deep learning model.
[0069] Among them, after the deep learning model is trained based on the training data set, many internal parameters have become perfect and can more realistically reflect the actual processing situation. Therefore, the trained deep learning model can process the input original recorded signal.
[0070] Step S80, obtaining the time series of the spike potential in the original recorded signal output by the deep learning model.
[0071] Among them, in the trained deep learning model, after performing confidence detection, normalization and other processing on the original recorded signal, the time information of the occurrence of the spike potential in the original recorded signal is output, and the time series of the occurrence of the spike potential is obtained by summarizing.
[0072] Specifically, the process of predicting and inferring the spike potential time series by the deep learning model includes the following steps:
[0073] (1) Perform deduplication processing on the original recorded signal. In the same sequence segment of the original recorded signal, only the detection window with the highest confidence is retained as the window where the spike potential exists.
[0074] (2) In the detection window, find the lowest point of the voltage data value, that is, the trough point of the spike potential, as the time value of the spike potential.
[0075] (3) Summarize the obtained time values to obtain the spike potential time series.
[0076] The above-mentioned deep learning-based method for detecting deep brain spike potential signals obtains the original signal from deep brain electrical stimulation, inputs the original signal segment to be detected by spike potential into the trained deep learning model, and obtains the time series of spike potential through model prediction and reasoning, thus solving the problems of cumbersome procedures and false detection caused by slight interference in related technologies, which require high-pass filtering before spike potential detection.
[0077] In one embodiment, step S40 involves the operation of training the deep model, such as Figure 3 As shown, including:
[0078] Step S42, obtaining an EEG signal segment with known spike potential position information, and using the EEG signal segment as a training data set.
[0079] In the implementation, the basis for constructing the training data set is the EEG signal segment with known spike position information. In the EEG signal segment, the time of occurrence of each spike is known. Therefore, the EEG signal segment with known spike position information can be input into the deep learning model, and the deep learning model is iteratively trained with the help of the known time of occurrence of the spike. However, in this embodiment, the deep learning model is not trained directly using the spike waveform template, but the spike waveform template is superimposed on the preset data to form an EEG signal segment, and the EEG signal segment is used as the training data set to train the deep learning model. The specific process is described later.
[0080] Step S44: import the training data set into the deep learning model to obtain the detection result output by the deep learning model.
[0081] In implementation, after the obtained training data set is imported into the deep learning model, it needs to undergo preprocessing processes of feature extraction and detection head processing in sequence. The former is performed in the temporal convolutional network (TCN) and the latter is performed in the convolutional neural network (CNN). Then the confidence detection calculation process is performed to finally obtain the detection result of the deep learning model.
[0082] Step S46, constructing a loss function based on the detection result and the known spike potential position information, and training the deep learning model based on the loss function.
[0083] In implementation, the termination condition for deep learning model training is to satisfy the constructed loss function. When the loss value between the detection result and the known spike potential position information in the EEG signal segment is lower than the set loss function value, or when the set number of iterations (such as 100 or 500) is reached, the training of the deep learning model is terminated.
[0084] In one embodiment, the aforementioned step S42, such as Figure 4 As shown, specifically including:
[0085] Step S422, obtaining a spike waveform template.
[0086] Step S424, superimposing the spike waveform template with the preset data at the preset position to obtain an EEG signal segment containing the spike position information, and using the EEG signal segment as a training data set.
[0087] In practice, there are two ways to obtain the spike waveform template, one is to obtain it from experimental data, and the other is to generate it based on a fitting formula. The experimental data of the former is extracted from the real experimental signal, and the latter is constructed based on a fitting function as shown in Formula 4:
[0088] , Formula 4;
[0089] Wherein, coefficients a, b, c are adjustment constants, and t is a time variable. Different spike potential waveform templates can be obtained by adjusting the above parameters.
[0090] Relying on the above two methods of generating spike waveform templates, the spike waveform template is superimposed with the preset data at the preset position to obtain a training data set containing spike position information, which is also divided into two implementation methods, as follows:
[0091] 1) The spike waveform template is obtained from experimental data:
[0092] Taking the trough in the spike potential waveform template as the midpoint, intercepting the data between the first mark before the midpoint and the second mark after the midpoint as the target data;
[0093] The target data and the local field potential signal that does not contain the spike potential in the preset data are repeatedly superimposed to obtain an electroencephalogram signal segment, and the electroencephalogram signal segment is used as a training data set.
[0094] In implementation, after obtaining the spike potential waveform template, the trough containing the spike potential is taken as the midpoint, a first mark is generated in front of the midpoint, and a second mark is generated behind the midpoint. The data between the first mark and the second mark is intercepted as target data, and the target data is superimposed with the preset data to generate a training data set.
[0095] The preset data contains multiple types of data, and the local field potential signal without spike potential is used here. The reason for using the signal without spike potential here is to ensure that the generated training data set only contains a single spike potential with a certain occurrence position, so that when the generated training data set is used to train the deep learning model, the deep learning model can be accurately trained under the premise that the occurrence time of the spike potential is known.
[0096] 2) The spike waveform template is generated based on the fitting formula:
[0097] The spike potential waveform template and the Gaussian white noise in the preset data are repeatedly superimposed to obtain an electroencephalogram signal segment, and the electroencephalogram signal segment is used as a training data set.
[0098] In the implementation, after the spike waveform template is obtained according to the fitting formula shown in Formula 4, unlike the previous use of the local field potential signal that does not contain the spike, the Gaussian white noise in the preset data is directly superimposed with the obtained spike waveform template. The principle is similar to the previous one, in order to ensure that the generated training data set only contains a single spike with a determined occurrence position, so that when the deep learning model is trained using the generated training data set, the deep learning model can be accurately trained on the premise that the spike occurrence time is known.
[0099] In one embodiment, if Figure 5 As shown, the aforementioned step S44 includes:
[0100] Step S442, dividing the training data set into N sequence segments, each of which is provided with M detection windows, each of which includes an offset of the left end point of the sequence segment to which it belongs and a width value of the detection window.
[0101] Step S444: Based on Formula 1, calculate the probability of each detection window containing a spike potential and the confidence C of the preset accuracy of the detection window.
[0102] , formula 1;
[0103] If a spike occurs in the sequence segment to which the detection window belongs, then The value of is 1, otherwise it is 0, corresponding to the intersection and union ratio of the predicted position of the spike potential and the actual position The calculation process is shown in Formula 2:
[0104] , formula 2.
[0105] In implementation, Figure 6 As shown, a signal data segment is divided into sequence segments 1, 2, 3…N, a total of N sequence segments, where 10ms refers to the time scale of the EEG signal segment, 0.2mV refers to the amplitude scale of the EEG signal segment, and in the detection window, 1ms refers to the time scale of the EEG signal segment. If a spike potential falls in this sequence segment, the current sequence segment is responsible for predicting the position of this spike potential. M detection windows are predicted in each sequence segment. The width of each detection window is random and can overlap with each other, and each detection window may detect a spike potential trough point. Each detection window must regress two of its own coordinate positions and a confidence level; the two coordinate positions are the offset between the center point of the detection window and the left endpoint of the current sequence segment. x and the width of the detection window w , x and w They are all normalized relative to the length of the current sequence segment; the confidence C represents two pieces of information: the probability of the predicted detection window containing a spike potential and the accuracy of the prediction of this detection window.
[0106] In one embodiment, the aforementioned step S46 includes:
[0107] Based on formula 3, construct the loss function loss:
[0108] , Formula 3;
[0109] Where the first two items are the predictions of the coordinate positions. To judge the i The first j Whether the detection window contains a spike potential, if yes, it takes 1, otherwise it takes 0. , Indicates the two coordinate positions of the current detection window regression, , represents the coordinate position corresponding to the true spike potential; the last two items are the confidence predictions including and excluding the spike potential, respectively. Represents the confidence of the current detection window, Indicates whether the real spike potential exists or not, if it exists, it takes 1, otherwise it takes 0.
[0110] In implementation, the loss function constructed here is applied in the training phase of the deep learning model. After the deep learning model is trained and the original recorded signal is input, the trained deep learning model performs confidence detection, normalization and other processing on the original recorded signal in turn, outputs the time information of the spike potential in the original recorded signal, and summarizes it to obtain the time series of the spike potential.
[0111] 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.
[0112] Based on the same inventive concept, the embodiment of the present application also provides a deep learning-based deep brain spike signal detection device for implementing the deep learning-based deep brain spike signal detection method 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 one or more deep learning-based deep brain spike signal detection device embodiments provided below can refer to the limitations of the deep learning-based deep brain spike signal detection method above, and will not be repeated here.
[0113] In one embodiment, Figure 7 As shown, a deep brain spike signal detection device 70 based on deep learning is provided, comprising:
[0114] The signal recording module 72 is used to obtain the original recording signal of deep brain electrical stimulation.
[0115] Among them, a deep brain stimulation (DBS) device is used to obtain the original recorded signal collected from the specific brain area of the patient or experimental animal according to the standard operating procedure. The original recorded signal is converted into digital form, and the sampling frequency is set to fs to ensure that the subtle changes in the spike potential waveform of a single neuron can be captured. In this embodiment, fs is set to 20,000 Hz.
[0116] The model training module 74 is used to train the pre-built deep learning model.
[0117] The key to this embodiment is to use a deep learning model to process the original recorded signal, obtain the time when the spike potential appears in the original recorded signal, and summarize multiple times to obtain the time series of the spike potential. However, the pre-built deep learning model cannot be directly used for processing the original recorded signal due to the problem of imperfect internal parameters, so it is necessary to train the pre-built deep learning model using a training data set.
[0118] The data input module 76 is used to input the original recorded signal into the trained deep learning model.
[0119] Among them, after the deep learning model is trained based on the training data set, many internal parameters have become perfect and can more realistically reflect the actual processing situation. Therefore, the trained deep learning model can process the input original recorded signal.
[0120] The result acquisition module 78 is used to obtain the time series of the spike potential in the original recorded signal output by the deep learning model.
[0121] Among them, in the trained deep learning model, after performing confidence detection, normalization and other processing on the original recorded signal, the time information of the occurrence of the spike potential in the original recorded signal is output, and the time series of the occurrence of the spike potential is obtained by summarizing.
[0122] Specifically, the process of predicting and inferring the spike potential time series by the deep learning model includes the following steps:
[0123] (1) Perform deduplication processing on the original recorded signal. In the same sequence segment of the original recorded signal, only the detection window with the highest confidence is retained as the window where the spike potential exists.
[0124] (2) In the detection window, find the lowest point of the voltage data value, that is, the trough point of the spike potential, as the time value of the spike potential.
[0125] (3) Summarize the obtained time values to obtain the spike potential time series.
[0126] The above-mentioned deep learning-based method for detecting deep brain spike potential signals obtains the original signal from deep brain electrical stimulation, inputs the original signal segment to be detected by spike potential into the trained deep learning model, and obtains the time series of spike potential through model prediction and reasoning, thus solving the problems of cumbersome procedures and false detection caused by slight interference in related technologies, which require high-pass filtering before spike potential detection.
[0127] Each module in the above-mentioned deep brain spike signal detection device based on deep learning can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0128] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data in the calculation process. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting deep brain spike potential signals based on deep learning is implemented.
[0129] Those skilled in the art will understand that Figure 8 The 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.
[0130] 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:
[0131] Step S20, obtaining the original recorded signal of deep brain electrical stimulation.
[0132] Among them, a deep brain stimulation (DBS) device is used to obtain the original recorded signal collected from the specific brain area of the patient or experimental animal according to the standard operating procedure. The original recorded signal is converted into digital form, and the sampling frequency is set to fs to ensure that the subtle changes in the spike potential waveform of a single neuron can be captured. In this embodiment, fs is set to 20,000 Hz.
[0133] Step S40: training the pre-built deep learning model.
[0134] The key to this embodiment is to use a deep learning model to process the original recorded signal, obtain the time when the spike potential appears in the original recorded signal, and summarize multiple times to obtain the time series of the spike potential. However, the pre-built deep learning model cannot be directly used for processing the original recorded signal due to the problem of imperfect internal parameters, so it is necessary to train the pre-built deep learning model using a training data set.
[0135] Step S60: input the original recorded signal into the trained deep learning model.
[0136] Among them, after the deep learning model is trained based on the training data set, many internal parameters have become perfect and can more realistically reflect the actual processing situation. Therefore, the trained deep learning model can process the input original recorded signal.
[0137] Step S80, obtaining the time series of the spike potential in the original recorded signal output by the deep learning model.
[0138] Among them, in the trained deep learning model, after performing confidence detection, normalization and other processing on the original recorded signal, the time information of the occurrence of the spike potential in the original recorded signal is output, and the time series of the occurrence of the spike potential is obtained by summarizing.
[0139] Specifically, the process of predicting and inferring the spike potential time series by the deep learning model includes the following steps:
[0140] (1) Perform deduplication processing on the original recorded signal. In the same sequence segment of the original recorded signal, only the detection window with the highest confidence is retained as the window where the spike potential exists.
[0141] (2) In the detection window, find the lowest point of the voltage data value, that is, the trough point of the spike potential, as the time value of the spike potential.
[0142] (3) Summarize the obtained time values to obtain the spike potential time series.
[0143] The above-mentioned deep learning-based method for detecting deep brain spike potential signals obtains the original signal from deep brain electrical stimulation, inputs the original signal segment to be detected by spike potential into the trained deep learning model, and obtains the time series of spike potential through model prediction and reasoning, thus solving the problems of cumbersome procedures and false detection caused by slight interference in related technologies, which require high-pass filtering before spike potential detection.
[0144] 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:
[0145] Step S20, obtaining the original recorded signal of deep brain electrical stimulation.
[0146] Among them, a deep brain stimulation (DBS) device is used to obtain the original recorded signal collected from the specific brain area of the patient or experimental animal according to the standard operating procedure. The original recorded signal is converted into digital form, and the sampling frequency is set to fs to ensure that the subtle changes in the spike potential waveform of a single neuron can be captured. In this embodiment, fs is set to 20,000 Hz.
[0147] Step S40: training the pre-built deep learning model.
[0148] The key to this embodiment is to use a deep learning model to process the original recorded signal, obtain the time when the spike potential appears in the original recorded signal, and summarize multiple times to obtain the time series of the spike potential. However, the pre-built deep learning model cannot be directly used for processing the original recorded signal due to the problem of imperfect internal parameters, so it is necessary to train the pre-built deep learning model using a training data set.
[0149] Step S60: input the original recorded signal into the trained deep learning model.
[0150] Among them, after the deep learning model is trained based on the training data set, many internal parameters have become perfect and can more realistically reflect the actual processing situation. Therefore, the trained deep learning model can process the input original recorded signal.
[0151] Step S80, obtaining the time series of the spike potential in the original recorded signal output by the deep learning model.
[0152] Among them, in the trained deep learning model, after performing confidence detection, normalization and other processing on the original recorded signal, the time information of the occurrence of the spike potential in the original recorded signal is output, and the time series of the occurrence of the spike potential is obtained by summarizing.
[0153] Specifically, the process of predicting and inferring the spike potential time series by the deep learning model includes the following steps:
[0154] (1) Perform deduplication processing on the original recorded signal. In the same sequence segment of the original recorded signal, only the detection window with the highest confidence is retained as the window where the spike potential exists.
[0155] (2) In the detection window, find the lowest point of the voltage data value, that is, the trough point of the spike potential, as the time value of the spike potential.
[0156] (3) Summarize the obtained time values to obtain the spike potential time series.
[0157] The above-mentioned deep learning-based method for detecting deep brain spike potential signals obtains the original signal from deep brain electrical stimulation, inputs the original signal segment to be detected by spike potential into the trained deep learning model, and obtains the time series of spike potential through model prediction and reasoning, thus solving the problems of cumbersome procedures and false detection caused by slight interference in related technologies, which require high-pass filtering before spike potential detection.
[0158] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0159] Step S20, obtaining the original recorded signal of deep brain electrical stimulation.
[0160] Among them, a deep brain stimulation (DBS) device is used to obtain the original recorded signal collected from the specific brain area of the patient or experimental animal according to the standard operating procedure. The original recorded signal is converted into digital form, and the sampling frequency is set to fs to ensure that the subtle changes in the spike potential waveform of a single neuron can be captured. In this embodiment, fs is set to 20,000 Hz.
[0161] Step S40: training the pre-built deep learning model.
[0162] The key to this embodiment is to use a deep learning model to process the original recorded signal, obtain the time when the spike potential appears in the original recorded signal, and summarize multiple times to obtain the time series of the spike potential. However, the pre-built deep learning model cannot be directly used for processing the original recorded signal due to the problem of imperfect internal parameters, so it is necessary to train the pre-built deep learning model using a training data set.
[0163] Step S60: input the original recorded signal into the trained deep learning model.
[0164] Among them, after the deep learning model is trained based on the training data set, many internal parameters have become perfect and can more realistically reflect the actual processing situation. Therefore, the trained deep learning model can process the input original recorded signal.
[0165] Step S80, obtaining the time series of the spike potential in the original recorded signal output by the deep learning model.
[0166] Among them, in the trained deep learning model, after performing confidence detection, normalization and other processing on the original recorded signal, the time information of the occurrence of the spike potential in the original recorded signal is output, and the time series of the occurrence of the spike potential is obtained by summarizing.
[0167] Specifically, the process of predicting and inferring the spike potential time series by the deep learning model includes the following steps:
[0168] (1) Perform deduplication processing on the original recorded signal. In the same sequence segment of the original recorded signal, only the detection window with the highest confidence is retained as the window where the spike potential exists.
[0169] (2) In the detection window, find the lowest point of the voltage data value, that is, the trough point of the spike potential, as the time value of the spike potential.
[0170] (3) Summarize the obtained time values to obtain the spike potential time series.
[0171] The above-mentioned deep learning-based method for detecting deep brain spike potential signals obtains the original signal from deep brain electrical stimulation, inputs the original signal segment to be detected by spike potential into the trained deep learning model, and obtains the time series of spike potential through model prediction and reasoning, thus solving the problems of cumbersome procedures and false detection caused by slight interference in related technologies, which require high-pass filtering before spike potential detection.
[0172] 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.
[0173] 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.
[0174] The technical features of the above embodiments may be arbitrarily combined. 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.
[0175] 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 construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications 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 detecting deep brain spike potential signals based on deep learning, characterized in that: The deep learning-based method for detecting deep brain spike potential signals comprises: Obtain the original recorded signals of deep brain stimulation; Train pre-built deep learning models; Inputting the original recorded signal into the trained deep learning model; Obtain a time series of spike potentials in the original recorded signal output by the deep learning model.
2. The method for detecting deep brain spike potential signals based on deep learning according to claim 1, characterized in that: The training of the pre-built deep learning model includes: Acquire an EEG signal segment with known spike position information, and use the EEG signal segment as a training data set; Importing the training data set into a deep learning model to obtain a detection result output by the deep learning model; A loss function is constructed based on the detection results and the known spike potential position information, and a deep learning model is trained based on the loss function.
3. The method for detecting deep brain spike potential signals based on deep learning according to claim 2, characterized in that: The step of obtaining an EEG signal segment whose spike position information is known and using the EEG signal segment as a training data set includes: Obtain a spike potential waveform template; The spike potential waveform template is superimposed with preset data at a preset position to obtain an EEG signal segment containing the spike potential position information, and the EEG signal segment is used as a training data set.
4. The method for detecting deep brain spike potential signals based on deep learning according to claim 3, when the spike potential waveform template is obtained from experimental data, it is characterized in that: The spike waveform template is superimposed with preset data at a preset position to obtain an EEG signal segment containing the spike position information, and the EEG signal segment is used as a training data set, including: Taking the trough in the spike potential waveform template as the midpoint, intercepting the data between the first mark before the midpoint and the second mark after the midpoint as the target data; The target data and the local field potential signal that does not contain the spike potential in the preset data are repeatedly superimposed to obtain an electroencephalogram signal segment, and the electroencephalogram signal segment is used as a training data set.
5. The method for detecting deep brain spike potential signals based on deep learning according to claim 3, when the spike potential waveform template is generated based on a fitting formula, it is characterized in that: The spike waveform template is superimposed with preset data at a preset position to obtain an EEG signal segment containing the spike position information, and the EEG signal segment is used as a training data set, including: The spike potential waveform template and the Gaussian white noise in the preset data are repeatedly superimposed to obtain an electroencephalogram signal segment, and the electroencephalogram signal segment is used as a training data set.
6. The method for detecting deep brain spike potential signals based on deep learning according to claim 2, characterized in that: The step of importing the training data set into the deep learning model to obtain the detection result output by the deep learning model includes: The training data set is divided into N sequence segments, each of which is provided with M detection windows, and each detection window includes an offset of a left end point of the sequence segment to which it belongs and a width value of the detection window; Based on Formula 1, the probability of each detection window containing a spike potential and the confidence C of the preset accuracy of the detection window are calculated: , Formula 1; If a spike occurs in the sequence segment to which the detection window belongs, then The value of is 1, otherwise it is 0, corresponding to the intersection and union ratio of the predicted position of the spike potential and the actual position The calculation process is shown in Formula 2: , formula 2.
7. The method for detecting deep brain spike potential signals based on deep learning according to claim 2, characterized in that: The step of constructing a loss function based on the detection result and the spike position information, and training a deep learning model based on the loss function, comprises: Based on formula 3, construct the loss function loss: , Formula 3; In the formula, the first two items are the predictions of the coordinate positions, To judge the i The first j Whether the detection window contains a spike potential, if yes, it takes 1, otherwise it takes 0. , Indicates the two coordinate positions of the current detection window regression, , represents the coordinate position corresponding to the true spike potential; the last two items are the confidence predictions including and excluding the spike potential, respectively. Represents the confidence of the current detection window, Indicates whether the real spike potential exists or not, if it exists, it takes 1, otherwise it takes 0.
8. A deep brain spike signal detection device based on deep learning, characterized in that: The deep brain spike signal detection device based on deep learning includes: A signal recording module, used to obtain the original recording signal of deep brain electrical stimulation; Model training module, used to train pre-built deep learning models; A data input module, used for inputting the original recorded signal into the trained deep learning model; The result acquisition module is used to obtain the time series of the spike potential in the original recorded signal output by the deep learning model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, 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 7 are implemented.
