A method and device for detecting anesthesia state based on neural spike coding

By converting EEG signals into sparse pulse sequences and using mimic neural network coding, combined with logistic regression models, the problem of poor anesthesia state detection in the existing technology is solved, and more accurate and efficient anesthesia state detection is achieved.

CN118452838BActive Publication Date: 2024-10-15NEUROFLUX (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410909883.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-15
Estimated Expiration
2044-07-09

Smart Images

  • Figure CN118452838B_ABST
    Figure CN118452838B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for detecting anesthesia state based on neural spike coding, which solves the problem of poor effect of existing anesthesia state detection. By processing EEG signals into pulses and integrating the temporal dynamics of signals using the neuromorphic modeling method, there is no need to sample specific brain areas, which greatly improves the progress and effectiveness of anesthesia state detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of anesthesia state detection, and in particular to an anesthesia state detection method and device based on neural spike coding. Background Art

[0002] General anesthesia is the use of anesthetic drugs during surgery to render the patient completely unconscious and insensitive, preventing them from feeling pain or having any memory of the surgery. Intraoperative monitoring of anesthetic status is critical to minimizing patient discomfort and improving the overall quality of surgery. In clinical settings, the Observer Assessment of Alertness / Sedation (OAA / S) scale is often used to quantify the depth of anesthesia by assessing the patient's response to external stimuli.

[0003] Currently, EEG-based anesthesia staging methods mainly analyze the frequency energy or entropy of EEG signals and input them into convolutional neural networks (CNNs) for classification. However, these methods ignore the temporal properties of the signals and require uniform sampling of brain regions from different individuals. In addition, the effectiveness of these methods is greatly affected by the quality of the data, which makes it difficult to describe the complex dynamic features present in the brain. Summary of the invention

[0004] The present invention provides a method and device for detecting an anesthetic state based on neural spike coding, so as to solve the problem of poor effect of the existing anesthetic state detection.

[0005] In a first aspect, the present invention provides a method for detecting anesthesia state based on neural spike coding, which specifically comprises the following steps:

[0006] Step S1: converting EEG signals into sparse pulse trains;

[0007] Step S2: encoding the sparse pulse sequence through a mimetic neural network to form a neural spike pulse;

[0008] Step S3: inputting the nerve spike pulse into a logistic regression model, calculating the predicted value of the nerve spike pulse through the logistic regression model, and judging the anesthesia state according to the predicted value of the nerve spike pulse.

[0009] Preferably, before step S1, the method further comprises the following steps:

[0010] Step S01: using the EEG signals collected in real time by the EEG collection device to obtain n channels of original EEG signals;

[0011] Step S02: performing data preprocessing on the obtained n channels of original EEG signals.

[0012] Wherein, n is a positive integer.

[0013] Preferably, in step S02, data preprocessing is performed on the obtained original EEG signals of the n channels, including preprocessing methods such as bipolar re-referencing, normalization and filtering.

[0014] Preferably, the bipolar re-reference processing method includes subtracting the signals between two adjacent electrodes or a single electrode and a reference electrode to remove interference.

[0015] Preferably, the normalization processing method includes subtracting the mean of the brain signal of each channel and dividing it by the standard deviation, so that the signal amplitudes of all channels are within a uniform range.

[0016] Preferably, the filtering processing method includes performing detrending processing through a Hz high-pass filter and filtering out interference of bHz power frequency and its harmonics with a notch filter, so as to eliminate electrical interference and improve signal quality.

[0017] Among them, a <b。

[0018] Preferably, in step S1, the EEG signal includes stereo electroencephalogram (SEEG), cortical electroencephalogram (ECoG), scalp electroencephalogram (EEG), and other signals that can directly reflect the electrical activities of brain neurons.

[0019] Preferably, in step S1, converting the EEG signal into a sparse pulse sequence specifically includes the following steps:

[0020] Step S101, segmenting the EEG signal;

[0021] Step S102: normalizing the EEG signal samples after segmentation;

[0022] Step S103: Generate a sparse pulse sequence based on the segmented and normalized EEG signal.

[0023] Preferably, in step S101, the EEG signal is divided into a plurality of samples along the time axis according to a preset time window.

[0024] The dimension of the sample is the number of channels n of the EEG signal multiplied by the sample length, and the sample length is the time window multiplied by the EEG signal sampling frequency (for example: the preset time window is 5 seconds, the EEG signal sampling rate is 200Hz, then the sample length of a single channel obtained by segmentation is 200×5=1000. Assuming there are 50 channel data, the dimension of a single sample is 50×1000).

[0025] Preferably, in step S102, the average value of the EEG signal value of each channel in each sample is calculated. and standard deviation , subtract the mean value from the value of each sampling point of each channel , and then divided by the standard deviation , to achieve sample normalization, the calculation formula is as follows:

[0026]

[0027] Where k is a positive integer, x k Represents the kth sample in a channel Represents x k Samples after normalization.

[0028] Preferably, in step S103, the value of each sampling point in each sample after normalization is compared with 1, the value of the sample sampling point greater than 1 is set to 1, and the value of the sample sampling point less than 1 is set to 0, so as to form a sparse pulse sequence, as shown in the following formula:

[0029]

[0030] Preferably, in step S2, the sparse pulse sequence is encoded by a mimetic neural network to form a neural spike pulse, which specifically includes the following steps:

[0031] Step S201: constructing a mimetic neuron, and constructing a mimetic neural network through the mimetic neuron;

[0032] Step S202: determining the firing threshold of the mimetic neuron;

[0033] Step S203: setting the lateral inhibition condition of the mimetic neuron;

[0034] Step S204: adjusting the synaptic weights of the mimetic neural network through spike timing dependent plasticity (STDP).

[0035] Preferably, in step S201, the mimetic neuron is constructed by an integrate-and-fire (IF) model, and the calculation formula for the accumulation of the surface membrane potential of the mimetic neuron is as follows:

[0036]

[0037] Among them, i and j are both positive integers; It means that when time t=t i The impulse function at time w ij represents the synaptic weight between the i-th mimetic neuron and the j-th mimetic neuron, V j represents the membrane potential of the jth mimetic neuron. When the jth mimetic neuron receives the spike emitted by the upstream i-th mimetic neuron, the membrane potential of the jth mimetic neuron changes according to the spike emission time t of the upstream i-th mimetic neuron. i Change has occurred.

[0038] Preferably, in step S201, the network structure of the mimetic neural network is greater than or equal to three layers, and the mimetic neural network includes a plurality of mimetic neurons (in the present invention, the "plurality" specifically refers to 2 or more).

[0039] Preferably, the number of simulated neurons in the simulated neural network input layer is the same as the dimension of the signal channel, and the number of simulated neurons in the simulated neural network output layer is greater than or equal to 2.

[0040] Preferably, in step S202, the threshold value P is issued thred Determined in an adaptive manner.

[0041] More preferably, by setting the sum of the firing counts of the upstream mimetic neurons as the firing threshold P thred , realize the simulated neuron firing threshold P thred of adaptation.

[0042] Preferably, when the membrane potential V of the j-th mimetic neuron j Accumulated to be higher than the release threshold P thred When V j Set to V j Subtract the voltage constant V D , the calculation formula is as follows:

[0043]

[0044] Among them, V D The voltage constant representing the membrane potential of the simulated neuron, V j Time t after the update is completed ref Internal membrane potential V j Will not be updated again.

[0045] Wherein, the refractory period t ref It represents the time constant of the neuron firing cycle. When a neuron fires, it needs to wait for this time constant before the membrane potential can change.

[0046] Preferably, the purpose of step S203 is to adjust the discharge direction of the mimetic neurons in the system and prevent over-activation by setting lateral inhibition conditions, that is, when one mimetic neuron discharges, the discharge of all other mimetic neurons in the same layer of the mimetic neural network is inhibited, for example, the membrane potential of other mimetic neurons in the same layer is set to a very small value P min .

[0047] Preferably, in step S204, adjusting the synaptic weights of the mimetic neural network by STDP specifically includes the following steps:

[0048] Step S204a, calculating the STDP reinforcement learning curve by the time interval between the activation of upstream and downstream neurons, the calculation formula is as follows:

[0049]

[0050] in, represents the learning curve, A + and A _ represents the amplitude of the learning curve, and Indicates the decay factor of the order of front and back releases, t i and t j represents the firing time of two neurons.

[0051] Step S204b: updating the synaptic weights by using the STDP reinforcement learning curve. The updated weight calculation of the synaptic weights is as follows:

[0052]

[0053] in, represents the updated synaptic weight, represents the adjustment factor, w max and w min is the pre-set weight boundary, and the above formula is used to keep the synaptic weight within an acceptable range.

[0054] Preferably, during the forward simulation of the mimetic neural network, the synaptic weights are updated according to the firing order of the interlayer neurons until the mimetic neural network reaches a stable state.

[0055] Preferably, the prediction model in step S3 is a logistic regression model.

[0056] More preferably, the logistic regression model is an L2 regular model, and the calculation formula of the L2 regular model is as follows:

[0057]

[0058] Where N represents the number of training samples, y i represents the true value of the sample (also called the true label), represents the predicted value of the sample (i.e., the predicted value of the sample calculated by the logistic regression model), w represents the updated weight, represents the regularization parameter, || || represents the second norm, and J(w) represents the loss function of the L2 regularization model, that is, the target of weight update during model optimization. By inputting the neural spike pulse into the prediction model, the predicted value of the neural spike pulse is obtained.

[0059] Preferably, in step S3, the anesthesia state is determined according to the predicted value of the nerve spike pulse, and the specific calculation formula is as follows:

[0060]

[0061] Wherein, x represents the predicted value of the neural spike pulse, and w represents the updated weight. If P≥0.5, the patient is in an anesthetized state, and if P<0.5, the patient is in an awake state.

[0062] In a second aspect, the present invention further provides a device for detecting anesthesia state based on neural spike coding, which specifically includes the following modules:

[0063] An EEG signal conversion module, used for converting EEG signals into sparse pulse trains;

[0064] A sparse pulse sequence encoding module, used for encoding the sparse pulse sequence through a mimetic neural network to form a neural spike pulse;

[0065] The anesthesia state detection module is used to input the nerve spike pulse into a logistic regression model, calculate the predicted value of the nerve spike pulse through the logistic regression model, and judge the anesthesia state according to the predicted value of the nerve spike pulse.

[0066] Preferably, before the conversion module acts, the following modules are also connected:

[0067] A signal acquisition module is used to obtain n channels of original EEG signals according to the EEG signals collected in real time by the EEG acquisition device;

[0068] The data preprocessing module is used to perform data preprocessing on the original EEG signals of the n channels obtained to form EEG signals.

[0069] Preferably, in the data preprocessing module, data preprocessing of the obtained original EEG signals of the n channels includes preprocessing methods such as bipolar re-referencing, normalization and filtering.

[0070] Preferably, the bipolar re-reference processing method includes subtracting the signals between two adjacent electrodes or a single electrode and a reference electrode to remove interference.

[0071] Preferably, the normalization processing method includes subtracting the mean of the brain signal of each channel and dividing it by the standard deviation, so that the signal amplitudes of all channels are within a uniform range.

[0072] Preferably, the filtering processing method includes performing detrending processing through a Hz high-pass filter and filtering out interference of bHz power frequency and its harmonics with a notch filter, so as to eliminate electrical interference and improve signal quality.

[0073] Among them, a <b。

[0074] Preferably, in the EEG signal conversion module, the EEG signals include stereo EEG, cortical EEG, scalp EEG and other signals that can directly reflect the electrical activities of brain neurons.

[0075] Preferably, the EEG signal conversion module includes the following submodules:

[0076] A segmentation processing submodule is used to segment and process the EEG signal;

[0077] A normalization processing submodule is used to perform normalization processing on the EEG signal samples after segmentation processing;

[0078] The sparse pulse sequence generation submodule is used to generate a sparse pulse sequence according to the segmented and normalized EEG signal.

[0079] Preferably, in the segmentation processing submodule, the EEG signal is segmented into multiple samples along the time axis according to a preset time window.

[0080] The dimension of the sample is the number of channels n of the EEG signal multiplied by the sample length, and the sample length is the time window multiplied by the EEG signal sampling frequency.

[0081] Preferably, in the normalization processing submodule, the average value of the EEG signal value of each channel in each sample is calculated. and standard deviation , subtract the mean value from the value of each sampling point of each channel , and then divided by the standard deviation , to achieve sample normalization, the calculation formula is as follows:

[0082]

[0083] Where k is a positive integer, x k Represents the kth sample in a channel Represents x k Samples after normalization.

[0084] Preferably, in the sparse pulse sequence generation submodule, the value of each sampling point in each sample after normalization is compared with 1, the value of the sample sampling point greater than 1 is set to 1, and the value of the sample sampling point less than 1 is set to 0, so as to form a sparse pulse sequence, as shown in the following formula:

[0085]

[0086] Preferably, the sparse pulse sequence encoding module specifically includes the following submodules:

[0087] A mimetic neural network construction submodule is used to construct mimetic neurons and construct a mimetic neural network through mimetic neurons;

[0088] A firing threshold determination submodule, used to determine the firing threshold of the mimetic neuron;

[0089] The lateral inhibition condition setting submodule is used to set the lateral inhibition condition of the mimetic neuron;

[0090] The synaptic weight update submodule is used to adjust the synaptic weights of the mimetic neural network through STDP update.

[0091] Preferably, in the mimetic neural network construction submodule, the mimetic neuron is constructed by an IF model, and the calculation formula for the accumulated size of the surface membrane potential of the mimetic neuron is as follows:

[0092]

[0093] Among them, i and j are both positive integers; It means that when time t=t i The impulse function at time w ij represents the synaptic weight between the i-th mimetic neuron and the j-th mimetic neuron, V j represents the membrane potential of the jth mimetic neuron. When the jth mimetic neuron receives the spike emitted by the upstream i-th mimetic neuron, the membrane potential of the jth mimetic neuron changes according to the spike emission time t of the upstream i-th mimetic neuron. i Change has occurred.

[0094] Preferably, in the emission threshold determination submodule, the network structure of the mimetic neural network is greater than or equal to three layers, and the mimetic neural network includes a plurality of mimetic neurons.

[0095] Preferably, the number of simulated neurons in the simulated neural network input layer is the same as the dimension of the signal channel, and the number of simulated neurons in the simulated neural network output layer is greater than or equal to 2.

[0096] Preferably, in the issuing threshold determination submodule, the issuing threshold P thred Determined in an adaptive manner.

[0097] More preferably, by setting the sum of the firing counts of the upstream mimetic neurons as the firing threshold P thred , realize the simulated neuron firing threshold P thred of adaptation.

[0098] Preferably, when the membrane potential V of the j-th mimetic neuron j Accumulated to be higher than the release threshold P thred When V jSet to V j Subtract the voltage constant V D , the calculation formula is as follows:

[0099]

[0100] Among them, V D The voltage constant representing the membrane potential of the simulated neuron, V j Time t after the update is completed ref Internal membrane potential V j Will not be updated again.

[0101] Wherein, the refractory period t ref It represents the time constant of the neuron firing cycle. When a neuron fires, it needs to wait for this time constant before the membrane potential can change.

[0102] Preferably, the synaptic weight updating submodule includes the following submodules:

[0103] The reinforcement learning curve calculation module is used to calculate the STDP reinforcement learning curve through the time interval between the activation of upstream and downstream neurons. The calculation formula is as follows:

[0104]

[0105] in, represents the learning curve, A + and A _ represents the amplitude of the learning curve, and Indicates the decay factor of the order of front and back releases, t i and t j represents the firing time of two neurons.

[0106] The synaptic weight update calculation module is used to update the synaptic weight through the STDP reinforcement learning curve. The update weight calculation of the synaptic weight is as follows:

[0107]

[0108] in, represents the updated synaptic weight, represents the adjustment factor, w max and w min is the pre-set weight boundary, and the above formula is used to keep the synaptic weight within an acceptable range.

[0109] Preferably, during the forward simulation of the mimetic neural network, the synaptic weights are updated according to the firing order of the interlayer neurons until the mimetic neural network reaches a stable state.

[0110] Preferably, the prediction model in step S3 is a logistic regression model.

[0111] More preferably, the logistic regression model is an L2 regular model, and the calculation formula of the L2 regular model is as follows:

[0112]

[0113] Where N represents the number of training samples, y i represents the true value of the sample (also called the true label), represents the predicted value of the sample (i.e., the predicted value of the sample calculated by the logistic regression model), w represents the updated weight, represents the regularization parameter, || || represents the second norm, and J(w) represents the loss function of the L2 regularization model, that is, the target of weight update during model optimization. By inputting the neural spike pulse into the prediction model, the predicted value of the neural spike pulse is obtained.

[0114] Preferably, in step S3, the anesthesia state is determined according to the predicted value of the nerve spike pulse, and the specific calculation formula is as follows:

[0115]

[0116] Wherein, x represents the predicted value of the neural spike pulse, and w represents the updated weight. If P≥0.5, the patient is in an anesthetized state, and if P<0.5, the patient is in an awake state.

[0117] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for detecting an anesthetic state based on neural spike coding as described in any one of the first aspects of the present application.

[0118] In a fourth aspect, the present invention further provides an electronic device, comprising: a memory storing a computer program; and a processor communicatively connected to the memory, for executing a method for detecting an anesthetic state based on neural spike coding as described in any one of the first aspects of the present application when the computer program is called.

[0119] Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant advantages:

[0120] The present invention provides a method and device for detecting anesthesia state based on neural spike coding, which solves the problem of poor effect of existing anesthesia state detection. By processing EEG signals into pulses and integrating the temporal dynamics of signals using the neuromorphic modeling method, there is no need to sample specific brain areas, which greatly improves the progress and effectiveness of anesthesia state detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0121] The accompanying drawings, which constitute part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention. In the accompanying drawings:

[0122] Figure 1 It is a flow chart of a method for detecting anesthesia state based on neural spike coding according to a preferred embodiment of the present invention.

[0123] Figure 2 The present invention is a flowchart of the collection and preprocessing of EEG signals in a method for detecting anesthesia state based on neural spike coding in a preferred embodiment of the present invention.

[0124] Figure 3 It is a flowchart of converting EEG signals into sparse pulse sequences in a method for detecting anesthesia state based on neural spike coding in a preferred embodiment of the present invention.

[0125] Figure 4 It is a flowchart of encoding the sparse pulse sequence through a mimetic neural network in a method for detecting anesthesia state based on neural spike coding in a preferred embodiment of the present invention.

[0126] Figure 5 It is a flow chart of adjusting the synaptic weights of a mimetic neural network by STDP in a method for detecting an anesthetic state based on neural spike coding in a preferred embodiment of the present invention.

[0127] Figure 6 It is a schematic diagram of the structure of a device for detecting anesthesia state based on neural spike coding according to a preferred embodiment of the present invention.

[0128] Figure 7 It is a schematic diagram of the structure of an EEG signal acquisition and preprocessing module of an anesthesia state detection device based on neural spike coding according to a preferred embodiment of the present invention.

[0129] Figure 8 It is a structural schematic diagram of an EEG signal conversion module in a device for anesthesia state detection based on neural spike coding in a preferred embodiment of the present invention.

[0130] Fig. 9 It is a schematic diagram of the structure of a sparse pulse sequence encoding module in a device for anesthesia state detection based on neural spike coding in a preferred embodiment of the present invention.

[0131] Fig.10 It is a schematic diagram of the structure of a synaptic weight updating submodule in a device for anesthesia state detection based on neural spike coding according to a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0132] The present invention provides a method and device for detecting anesthesia state based on neural spike coding. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0133] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0134] Embodiment 1:

[0135] like Figure 1-Figure 5 As shown, the method for detecting anesthesia state based on neural spike coding described in this embodiment specifically includes the following steps.

[0136] Step S1: Convert the EEG signal into a sparse pulse train.

[0137] Optionally, before the step S1 is implemented, the steps S01 and S02 are also included, and the steps S01 and S02 are as follows: Figure 2 shown.

[0138] Step S01: using the EEG signals collected in real time by an EEG collection device, obtaining n channels of original EEG signals.

[0139] Step S02: performing data preprocessing on the obtained n channels of original EEG signals.

[0140] Optionally, in step S02, data preprocessing is performed on the obtained original EEG signals of the n channels, including bipolar re-referencing, normalization, filtering and other preprocessing methods.

[0141] Optionally, the bipolar re-reference processing method includes subtracting the signals between two adjacent electrodes or a single electrode and a reference electrode to remove interference.

[0142] Optionally, the normalization processing method includes subtracting the mean of the brain signal of each channel and dividing it by the standard deviation, so that the signal amplitudes of all channels are within a uniform range.

[0143] Optionally, the filtering processing method includes performing detrending processing through a 0.5 Hz high-pass filter and filtering out interference from 50 Hz power frequency and its harmonics with a notch filter, etc., so as to eliminate electrical interference and improve signal quality.

[0144] Optionally, in step S1, the EEG signal includes stereo electroencephalogram (SEEG), cortical electroencephalogram (ECoG), scalp electroencephalogram (EEG), and other signals that can directly reflect the electrical activities of brain neurons.

[0145] Optionally, the step S1 specifically includes steps S101 to S103, and steps S101 to S103 are as follows: Figure 3 shown.

[0146] Step S101, segmenting the EEG signal.

[0147] Optionally, in step S101, the EEG signal is divided into multiple samples along the time axis according to a preset time window.

[0148] The dimension of the sample is the number of channels n of the EEG signal multiplied by the sample length, and the sample length is the time window multiplied by the EEG signal sampling frequency.

[0149] Step S102: normalizing the segmented EEG signal samples.

[0150] Optionally, in step S102, the average value of the EEG signal value of each channel in each sample is calculated. and standard deviation , subtract the mean value from the value of each sampling point of each channel , and then divided by the standard deviation , to achieve sample normalization, the calculation formula is as follows:

[0151]

[0152] Where k is a positive integer, x k Represents the kth sample in a channel Represents x k Samples after normalization.

[0153] Step S103: Generate a sparse pulse sequence based on the segmented and normalized EEG signal.

[0154] Optionally, in step S103, the value of each sampling point in each sample after normalization is compared with 1, the value of the sample sampling point greater than 1 is set to 1, and the value of the sample sampling point less than 1 is set to 0, to form a sparse pulse sequence, as shown in the following formula:

[0155]

[0156] Step S2: Encode the sparse pulse sequence through a morphic neural network to form neural spike pulses.

[0157] Optionally, the step S2 specifically includes steps S201 to S204, and steps S201 to S204 are as follows: Figure 4 shown.

[0158] Step S201: construct a mimetic neuron, and construct a mimetic neural network through the mimetic neuron.

[0159] Optionally, in step S201, the mimetic neuron is constructed by an integrate-and-fire (IF) model, and the calculation formula for the accumulation of the surface membrane potential of the mimetic neuron is as follows:

[0160]

[0161] Among them, i and j are both positive integers; It means that when time t=t i The impulse function at time w ij represents the synaptic weight between the i-th mimetic neuron and the j-th mimetic neuron, V j represents the membrane potential of the jth mimetic neuron. When the jth mimetic neuron receives the spike emitted by the upstream i-th mimetic neuron, the membrane potential of the jth mimetic neuron changes according to the spike emission time t of the upstream i-th mimetic neuron. i Change has occurred.

[0162] Optionally, in step S201, the network structure of the mimetic neural network is greater than or equal to three layers, and the mimetic neural network includes a plurality of mimetic neurons.

[0163] Optionally, the number of simulated neurons in the simulated neural network input layer is the same as the dimension of the signal channel, and the number of simulated neurons in the simulated neural network output layer is greater than or equal to 2.

[0164] Step S202: Determine the firing threshold of the mimetic neuron.

[0165] Optionally, in step S202, the threshold P is issued thred Determined in an adaptive manner.

[0166] Optionally, the sum of the firing counts of the upstream mimetic neurons is set to the firing threshold P thred , realize the simulated neuron firing threshold P thred of adaptation.

[0167] Optionally, when the membrane potential V jAccumulated to be higher than the release threshold P thred When V j Set to V j Subtract the voltage constant V D , the calculation formula is as follows:

[0168]

[0169] Among them, V D The voltage constant representing the membrane potential of the simulated neuron, V j Time t after the update is completed ref Internal membrane potential V j Will not be updated again.

[0170] Wherein, the refractory period t ref It represents the time constant of the neuron firing cycle. When a neuron fires, it needs to wait for this time constant before the membrane potential can change.

[0171] Step S203: Setting the lateral inhibition condition of the mimetic neuron.

[0172] The purpose of setting the lateral inhibition condition of the mimetic neurons is to adjust the discharge direction of the mimetic neurons in the system and prevent over-activation. That is, when one mimetic neuron discharges, the discharge of all other mimetic neurons in the same layer of the mimetic neural network is inhibited. For example, the membrane potential of other mimetic neurons in the same layer is set to a very small value P. min .

[0173] Step S204: adjusting the synaptic weights of the mimetic neural network through STDP.

[0174] Optionally, the step S204 specifically includes steps S204a and S204b, where steps S204a and S204b are as follows: Figure 5 shown.

[0175] Step S204a, calculating the STDP reinforcement learning curve by the time interval between the activation of upstream and downstream neurons, the calculation formula is as follows:

[0176]

[0177] in, represents the learning curve, A + and A _ represents the amplitude of the learning curve, and Indicates the decay factor of the order of front and back releases, t i and t j represents the firing time of two neurons.

[0178] Step S204b: updating the synaptic weights by using the STDP reinforcement learning curve. The updated weight calculation of the synaptic weights is as follows:

[0179]

[0180] in, represents the updated synaptic weight, represents the adjustment factor, w max and w min is the pre-set weight boundary, and the above formula is used to keep the synaptic weight within an acceptable range.

[0181] Optionally, during the forward simulation of the simulated neural network, the synaptic weights are updated according to the firing order of the interlayer neurons until the simulated neural network reaches a stable state.

[0182] Step S3: inputting the nerve spike pulse into a logistic regression model, calculating the predicted value of the nerve spike pulse through the logistic regression model, and judging the anesthesia state according to the predicted value of the nerve spike pulse.

[0183] Optionally, the prediction model in step S3 is a logistic regression model.

[0184] Optionally, the logistic regression model is an L2 regularized model, and the calculation formula of the L2 regularized model is as follows:

[0185]

[0186] Where N represents the number of training samples, y i represents the true value of the sample (also called the true label), represents the predicted value of the sample (i.e., the predicted value of the sample calculated by the logistic regression model), w represents the updated weight, represents the regularization parameter, || || represents the second norm, and J(w) represents the loss function of the L2 regularization model, that is, the target of weight update during model optimization. By inputting the neural spike pulse into the prediction model, the predicted value of the neural spike pulse is obtained.

[0187] Preferably, in step S3, the anesthesia state is determined according to the predicted value of the nerve spike pulse, and the specific calculation formula is as follows:

[0188]

[0189] Wherein, x represents the predicted value of the neural spike pulse, and w represents the updated weight. If P≥0.5, the patient is in an anesthetized state, and if P<0.5, the patient is in an awake state.

[0190] A verification experiment was conducted according to the method for detecting anesthesia state based on neural spike coding described in this embodiment.

[0191] Six patients (3 females and 3 males) aged between 27 and 35 years old were included. The EEG signals of the subjects were monitored using the NatusQuantum LTM EEG system from Natus Neurology Incorporated and the EEG monitoring system (EEG-1200C) from Nihon Kohden, Tokyo, Japan, equipped with SDE-X electrodes from Beijing Sinovation Medical Technology Co., Ltd.

[0192] The sampling rate of electrophysiological data of the Natus system was 2048 Hz, and the sampling rate of the Nihon system was 1000 Hz. The patient received propofol anesthesia induction in the operating room, and propofol was injected intravenously through the catheter using target-controlled infusion. The concentration started from 1 μg / ml and gradually increased in increments of 0.5 μg / ml. The time for the patient to reach complete anesthesia was 23-37 minutes. At the same time, OAA / S and bispectral index systems were used to evaluate the patient's degree of consciousness.

[0193] First, the EEG signal is pulsed. 50 channels of the subject's EEG signal are randomly extracted, and the EEG signal is divided into samples according to a 5s time window, which is further converted into a sparse pulse train.

[0194] The sparse pulse sequence is input into a 3-layer mimetic neural network. The number of mimetic neurons in the input layer is consistent with the dimension of the signal channel (i.e., 50), the middle layer uses 64 mimetic neurons, and the output layer uses 4 mimetic neurons.

[0195] The synaptic weights of the mimetic neural network are adjusted through pulse time-dependent plasticity, and additional restrictions such as variable thresholds and lateral inhibition are introduced to enhance the response of the most active neurons to specific samples. The fine-tuned mimetic neural network parameters are shown in the following table.

[0196]

[0197] Finally, logistic regression was used to assess the difference between awake and anesthetized states. The accuracy of classifying the EEG signals of each subject exceeded 90%. The results confirmed that the anesthesia state detection method based on neural spike coding is reliable in assessing anesthesia state.

[0198] Embodiment 2:

[0199] like Figure 6-Figure 10 As shown, the device for detecting anesthesia state based on neural spike coding described in this embodiment specifically includes the following modules.

[0200] The EEG signal conversion module is used to convert the EEG signal into a sparse pulse train.

[0201] Optionally, before the conversion module acts, a signal acquisition module and a data preprocessing module are also connected, such as Figure 7 shown.

[0202] The signal acquisition module is used to obtain n channels of original EEG signals based on the EEG signals collected in real time by the EEG acquisition device.

[0203] The data preprocessing module is used to perform data preprocessing on the original EEG signals of the n channels obtained to form EEG signals.

[0204] Optionally, in the data preprocessing module, data preprocessing is performed on the obtained original EEG signals of the n channels, including preprocessing methods such as bipolar re-referencing, normalization and filtering.

[0205] Optionally, the bipolar re-reference processing method includes subtracting the signals between two adjacent electrodes or a single electrode and a reference electrode to remove interference.

[0206] Optionally, the normalization processing method includes subtracting the mean of the brain signal of each channel and dividing it by the standard deviation, so that the signal amplitudes of all channels are within a uniform range.

[0207] Optionally, the filtering processing method includes performing detrending processing through a 0.5 Hz high-pass filter and filtering out interference from 50 Hz power frequency and its harmonics with a notch filter, etc., so as to eliminate electrical interference and improve signal quality.

[0208] Optionally, in the EEG signal conversion module, the EEG signal includes stereo EEG, cortical EEG, scalp EEG and other signals that can directly reflect the electrical activities of brain neurons.

[0209] Optionally, the EEG signal conversion module includes the following submodules: Figure 8 shown.

[0210] The segmentation processing submodule is used to segment the EEG signal.

[0211] Optionally, in the segmentation processing submodule, the EEG signal is segmented into multiple samples along the time axis according to a preset time window.

[0212] The dimension of the sample is the number of channels n of the EEG signal multiplied by the sample length, and the sample length is the time window multiplied by the EEG signal sampling frequency.

[0213] The normalization processing submodule is used to normalize the EEG signal samples after segmentation processing.

[0214] Optionally, in the normalization processing submodule, the average value of the EEG signal value of each channel in each sample is calculated and standard deviation , subtract the mean value from the value of each sampling point of each channel , and then divided by the standard deviation , to achieve sample normalization, the calculation formula is as follows:

[0215]

[0216] Where k is a positive integer, x k Represents the kth sample in a channel Represents x k Samples after normalization.

[0217] The sparse pulse sequence generation submodule is used to generate a sparse pulse sequence according to the segmented and normalized EEG signal.

[0218] Optionally, in the sparse pulse sequence generation submodule, the value of each sampling point in each sample after normalization is compared with 1, the value of the sample sampling point greater than 1 is set to 1, and the value of the sample sampling point less than 1 is set to 0, to form a sparse pulse sequence, as shown in the following formula.

[0219]

[0220] The sparse pulse sequence encoding module is used to encode the sparse pulse sequence through a mimetic neural network to form neural spike pulses.

[0221] Optionally, the sparse pulse sequence encoding module specifically includes the following submodules: Fig. 9 shown.

[0222] The mimetic neural network construction submodule is used to construct mimetic neurons and construct a mimetic neural network through mimetic neurons.

[0223] Optionally, in the mimetic neural network construction submodule, the mimetic neuron is constructed by an IF model, and the calculation formula for the accumulation size of the surface membrane potential of the mimetic neuron is as follows.

[0224]

[0225] Among them, i and j are both positive integers; It means that when time t=t i The impulse function at time w ij represents the synaptic weight between the i-th mimetic neuron and the j-th mimetic neuron, V jrepresents the membrane potential of the jth mimetic neuron. When the jth mimetic neuron receives the spike emitted by the upstream i-th mimetic neuron, the membrane potential of the jth mimetic neuron changes according to the spike emission time t of the upstream i-th mimetic neuron. i Change has occurred.

[0226] Optionally, in the emission threshold determination submodule, the network structure of the mimetic neural network is greater than or equal to three layers, and the mimetic neural network includes a plurality of mimetic neurons.

[0227] Optionally, the number of simulated neurons in the simulated neural network input layer is the same as the dimension of the signal channel, and the number of simulated neurons in the simulated neural network output layer is greater than or equal to 2.

[0228] The firing threshold determination submodule is used to determine the firing threshold of the mimetic neuron.

[0229] Optionally, in the issuing threshold determination submodule, the issuing threshold P thred Determined in an adaptive manner.

[0230] Optionally, the sum of the firing counts of the upstream mimetic neurons is set to the firing threshold P thred , realize the simulated neuron firing threshold P thred of adaptation.

[0231] Optionally, when the membrane potential V j Accumulated to be higher than the release threshold P thred When V j Set to V j Subtract the voltage constant V D , the calculation formula is as follows:

[0232]

[0233] Among them, V D The voltage constant representing the membrane potential of the simulated neuron, V j Time t after the update is completed ref Internal membrane potential V j Will not be updated again.

[0234] Wherein, the refractory period t ref It represents the time constant of the neuron firing cycle. When a neuron fires, it needs to wait for this time constant before the membrane potential can change.

[0235] The lateral inhibition condition setting submodule is used to set the lateral inhibition conditions of the mimetic neurons.

[0236] The synaptic weight update submodule is used to adjust the synaptic weights of the mimetic neural network through STDP update.

[0237] Optionally, the synaptic weight update submodule includes the following submodules, such as Fig.10 shown.

[0238] The reinforcement learning curve calculation module is used to calculate the STDP reinforcement learning curve through the time interval between the activation of upstream and downstream neurons. The calculation formula is as follows.

[0239]

[0240] in, represents the learning curve, A + and A _ represents the amplitude of the learning curve, and Indicates the decay factor of the order of front and back releases, t i and t j represents the firing time of two neurons.

[0241] The synaptic weight update calculation module is used to update the synaptic weight through the STDP reinforcement learning curve. The update weight calculation of the synaptic weight is shown as follows.

[0242]

[0243] in, represents the updated synaptic weight, represents the adjustment factor, w max and w min is the pre-set weight boundary, and the above formula is used to keep the synaptic weight within an acceptable range.

[0244] Optionally, during the forward simulation of the simulated neural network, the synaptic weights are updated according to the firing order of the interlayer neurons until the simulated neural network reaches a stable state.

[0245] The anesthesia state detection module is used to input the nerve spike pulse into a logistic regression model, calculate the predicted value of the nerve spike pulse through the logistic regression model, and judge the anesthesia state according to the predicted value of the nerve spike pulse.

[0246] Optionally, the prediction model in step S3 is a logistic regression model.

[0247] Optionally, the logistic regression model is an L2 regularized model, and the calculation formula of the L2 regularized model is as follows:

[0248]

[0249] Where N represents the number of training samples, y irepresents the true value of the sample (also called the true label), represents the predicted value of the sample (i.e., the predicted value of the sample calculated by the logistic regression model), w represents the updated weight, represents the regularization parameter, || || represents the second norm, and J(w) represents the loss function of the L2 regularization model, that is, the target of weight update during model optimization. By inputting the neural spike pulse into the prediction model, the predicted value of the neural spike pulse is obtained.

[0250] Optionally, in step S3, the anesthesia state is determined according to the predicted value of the nerve spike pulse, and the specific calculation formula is as follows:

[0251]

[0252] Wherein, x represents the predicted value of the neural spike pulse, and w represents the updated weight. If P≥0.5, the patient is in an anesthetized state, and if P<0.5, the patient is in an awake state.

[0253] The specific embodiments of the present invention are described in detail above, but they are only examples, and the present invention is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions made to the present invention are also within the scope of the present invention. Therefore, the equalization changes and modifications made without departing from the spirit and scope of the present invention should be included in the scope of the present invention.

Claims

1. A method for detecting anesthesia state based on neural spike coding, characterized in that: The specific steps include: Step S1: converting EEG signals into sparse pulse trains; Step S2: encoding the sparse pulse sequence through a mimetic neural network to form a neural spike pulse; Step S3: inputting the nerve spike pulse into a logistic regression model, calculating the predicted value of the nerve spike pulse through the logistic regression model, and judging the anesthesia state according to the predicted value of the nerve spike pulse.

2. The method for detecting anesthesia state based on neural spike coding according to claim 1, characterized in that: Before step S1, the method further includes the following steps: Step S01: using the EEG signals collected in real time by the EEG collection device to obtain n channels of original EEG signals; Step S02: performing data preprocessing on the obtained original EEG signals of n channels; Wherein, n is a positive integer.

3. The method for detecting anesthesia state based on neural spike coding according to claim 2, characterized in that: In step S02, the data preprocessing method of the obtained n channels of original EEG signals includes bipolar re-reference processing, normalization processing and filtering processing; wherein, The bipolar re-reference processing method includes subtracting the signals between two adjacent electrodes or a single electrode and a reference electrode to remove interference; The normalization processing method includes subtracting the mean value of the brain signal of each channel and dividing it by the standard deviation, so that the signal amplitudes of all channels are within a uniform range; The filtering processing method includes performing detrending processing through a Hz high-pass filter and filtering out interference from b Hz power frequency and its harmonics with a notch filter to eliminate electrical interference and improve signal quality; wherein a <b。 4. The method for detecting anesthesia state based on neural spike coding according to claim 1, characterized in that: In step S1, the EEG signal includes stereo electroencephalogram (SEEG), cortical electroencephalogram (ECoG) and scalp electroencephalogram (EEG).

5. The method for detecting anesthesia state based on neural spike coding according to claim 1, characterized in that: In step S1, the EEG signal is converted into a sparse pulse sequence, which specifically includes the following steps: Step S101, segmenting the EEG signal; Step S102: normalizing the EEG signal samples after segmentation; Step S103: Generate a sparse pulse sequence based on the segmented and normalized EEG signal.

6. The method for detecting anesthesia state based on neural spike coding according to claim 1, characterized in that: In step S2, the sparse pulse sequence is encoded by a mimetic neural network to form a neural spike pulse, which specifically includes the following steps: Step S201: constructing a mimetic neuron, and constructing a mimetic neural network through the mimetic neuron; Step S202: determining the firing threshold of the mimetic neuron; Step S203: setting the lateral inhibition condition of the mimetic neuron; Step S204: adjusting the synaptic weights of the mimetic neural network through STDP.

7. The method for detecting anesthesia state based on neural spike coding according to claim 6, characterized in that: In step S201, the mimetic neuron is constructed by an IF model, and the calculation formula for the accumulation of the surface membrane potential of the mimetic neuron is as follows: Among them, i and j are both positive integers; It means that when time t=t i The impulse function at time w ij represents the synaptic weight between the i-th mimetic neuron and the j-th mimetic neuron, V j Represents the membrane potential of the j-th mimetic neuron.

8. The method for detecting anesthesia state based on neural spike coding according to claim 6, characterized in that: In step S201, the network structure of the mimetic neural network is greater than or equal to three layers, and the mimetic neural network includes a plurality of mimetic neurons; Among them, the number of simulated neurons in the simulated neural network input layer is the same as the dimension of the signal channel, and the number of simulated neurons in the simulated neural network output layer is greater than or equal to 2.

9. The method for detecting anesthesia state based on neural spike coding according to claim 6, characterized in that: When the membrane potential of the jth simulated neuron Accumulated to be higher than the release threshold P thred When V j Set to V j Subtract the voltage constant V D , the calculation formula is as follows: Among them, V D The voltage constant representing the membrane potential of the simulated neuron, V j Time t after the update is completed ref Internal membrane potential V j Will not be updated again.

10. The method for detecting anesthesia state based on neural spike coding according to claim 6, characterized in that: In step S204, the synaptic weights of the mimetic neural network are adjusted by STDP, which specifically includes the following steps: Step S204a, calculating the STDP reinforcement learning curve by the time interval between the activation of upstream and downstream neurons, the calculation formula is as follows: in, represents the learning curve, A + and A _ represents the amplitude of the learning curve, and Indicates the decay factor of the order of front and back releases, t i and t j represents the firing time of two neurons; Step S204b: updating the synaptic weights by using the STDP reinforcement learning curve. The updated weight calculation of the synaptic weights is as follows: in, represents the updated synaptic weight, represents the adjustment factor, w max and w min is the pre-set weight boundary, and the above formula is used to keep the synaptic weight within an acceptable range.

11. The method for detecting anesthesia state based on neural spike coding according to claim 10, characterized in that: In step S3, the logistic regression model includes an L2 regularization model, and the calculation formula of the L2 regularization model is as follows: Where N represents the number of training samples, y i represents the true value of the sample (also called the true label), represents the predicted value of the sample (i.e., the predicted value of the sample calculated by the logistic regression model), w represents the updated weight, represents the regularization parameter, || || represents the second norm, and J(w) represents the loss function of the L2 regular model, that is, the target of weight update during model optimization.

12. The method for detecting anesthesia state based on neural spike coding according to claim 11, characterized in that: In step S3, the anesthesia state is determined according to the predicted value of the nerve spike pulse, and the specific calculation formula is as follows: Wherein, x represents the predicted value of the neural spike pulse, and w represents the updated weight; if P≥0.5, the patient is in an anesthetized state, and if P<0.5, the patient is in an awake state.

13. A device for detecting anesthesia state based on neural spike coding, characterized in that: The modules include: An EEG signal conversion module, used for converting EEG signals into sparse pulse trains; A sparse pulse sequence encoding module, used for encoding the sparse pulse sequence through a mimetic neural network to form a neural spike pulse; The anesthesia state detection module is used to input the nerve spike pulse into a logistic regression model, calculate the predicted value of the nerve spike pulse through the logistic regression model, and judge the anesthesia state according to the predicted value of the nerve spike pulse.

14. The device for detecting anesthesia state based on neural spike coding according to claim 13, characterized in that: Before the conversion module works, the following modules are also connected: The signal acquisition module is used to collect EEG signals in real time according to the EEG acquisition device to obtain original EEG signals of n channels; The data preprocessing module is used to perform data preprocessing on the original EEG signals of the n channels obtained to form EEG signals.

15. The device for detecting anesthesia state based on neural spike coding according to claim 13, characterized in that: The EEG signal conversion module includes the following submodules: A segmentation processing submodule is used to segment and process the EEG signal; A normalization processing submodule is used to perform normalization processing on the EEG signal samples after segmentation processing; The sparse pulse sequence generation submodule is used to generate a sparse pulse sequence according to the segmented and normalized EEG signal.

16. The device for detecting anesthesia state based on neural spike coding according to claim 13, characterized in that: The sparse pulse sequence encoding module specifically includes the following submodules: A mimetic neural network construction submodule is used to construct mimetic neurons and construct a mimetic neural network through mimetic neurons; A firing threshold determination submodule, used to determine the firing threshold of the mimetic neuron; The lateral inhibition condition setting submodule is used to set the lateral inhibition condition of the mimetic neuron; The synaptic weight update submodule is used to adjust the synaptic weights of the mimetic neural network through STDP update.

17. The device for detecting anesthesia state based on neural spike coding according to claim 16, characterized in that: The synaptic weight update submodule includes the following submodules: The reinforcement learning curve calculation module is used to calculate the STDP reinforcement learning curve through the time interval between the activation of upstream and downstream neurons; The synaptic weight update calculation module is used to update the synaptic weights through the STDP reinforcement learning curve.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting an anesthetic state based on neural spike coding according to any one of claims 1 to 12 is implemented.

19. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method for detecting an anesthetic state based on neural spike coding as described in any one of claims 1 to 12 is implemented.