Anesthesia depth detection method based on machine learning
By analyzing the three-dimensional power spectrum of the EEG data sequence, calculating the aliasing degree and adjusting the learning rate, combining FIR filters and artificial neural networks, the problem of cross-interference between electromyography and EEG signals is solved, and the depth of anesthesia detection is improved accuracy and signal filtering accuracy.
Patent Information
- Application Number
- CN202411245909.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-06
AI Technical Summary
In anesthesia monitoring, the frequency ranges of the electromyography signal and the electroencephalography signal are similar, resulting in misjudgment and reduced filtering accuracy. The existing adaptive filtering methods are difficult to adapt to changing anesthesia depth conditions, affecting the accuracy of anesthesia depth detection.
By obtaining the three-dimensional power spectrum diagram of the EEG data sequence, calculate the aliasing degree of electromyography and EEG signals, dynamically adjust the learning rate of the LMS filter, and combine it with FIR filter and artificial neural network to improve signal filtering accuracy and detection accuracy sex.
It effectively reduces the interference of electromyography signals on EEG signals, improves the accuracy of anesthesia depth detection and the scale of signal acquisition, and achieves excellent filtering effect.
Smart Images

Figure CN119097281A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an anesthesia depth detection method based on machine learning. Background Art
[0002] In the medical field, anesthesia is an indispensable step in many surgical procedures, and accurate monitoring of the depth of anesthesia is crucial to the success of the operation and the safety of the patient. At present, the EEG index is a commonly used method to evaluate the patient's anesthesia depth by analyzing the EEG signal. However, there is a key problem, that is, in anesthesia monitoring, the frequency range of the EMG signal is 30 to 300 Hz, and the frequency range of the EEG signal is 0.5 to 30 Hz, so the lower limit of the EMG signal is very close to the upper limit of the frequency range of the EEG signal, so the lower EMG signal may be mistaken for a high EEG signal, resulting in a high EEG index value, which mistakenly thinks that the patient is awake or lightly anesthetized.
[0003] Existing problem: When facing cross-interference between EEG and EMG signals, filtering is needed to process them. Traditional filtering methods usually use LMS filters to filter low-frequency signals as target signals to achieve the effect of adaptive filtering. However, this method uses a fixed learning rate, which is difficult to adapt to the changing anesthesia depth conditions and may reduce the response efficiency and accuracy of adaptive filtering, thereby reducing the accuracy of anesthesia depth detection based on machine learning. Summary of the invention
[0004] The present invention provides an anesthesia depth detection method based on machine learning to solve the existing problems.
[0005] The anesthesia depth detection method based on machine learning of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides a method for detecting anesthesia depth based on machine learning, the method comprising the following steps:
[0007] Acquire several EEG data sequences corresponding to the patient; record any EEG data sequence as a target sequence; perform filtering operation on the target sequence to obtain an expected signal of the target sequence;
[0008] Obtain a three-dimensional power spectrum diagram of the target sequence, and obtain the standard electromyographic signal frequency, electromyographic signal strength, standard electroencephalographic signal frequency and electroencephalographic signal strength at each moment according to the power size in different frequency intervals at the same moment in the three-dimensional power spectrum diagram; the horizontal axis of the three-dimensional power spectrum diagram represents time, the vertical axis represents frequency and the vertical axis represents power;
[0009] According to the strength of the electromyographic signal and the electroencephalographic signal at each moment in the three-dimensional power spectrum diagram, as well as the power between the standard electroencephalographic signal frequency and the standard electromyographic signal frequency, the degree of aliasing between the electromyographic signal and the electroencephalographic signal at each moment is obtained;
[0010] According to the degree of aliasing between the electromyographic signal and the electroencephalographic signal at all times in the three-dimensional power spectrum diagram, the learning rate of the target sequence is obtained;
[0011] According to the learning rate and expected signal of the target sequence, the anesthesia depth detection result of the patient is obtained.
[0012] Furthermore, the filtering operation is performed on the target sequence to obtain the expected signal of the target sequence, and the specific steps include the following:
[0013] Use FIR filter to filter the target sequence to obtain a filtered data sequence of the target sequence;
[0014] The filtered data sequence of the target sequence is recorded as the expected signal of the target sequence.
[0015] Furthermore, the three-dimensional power spectrum of the target sequence is obtained, and the standard EMG signal frequency, EMG signal strength, standard EEG signal frequency and EEG signal strength at each moment are obtained according to the power size in different frequency intervals at the same moment in the three-dimensional power spectrum. The specific steps include the following:
[0016] Perform Fourier transform on the target sequence to obtain a three-dimensional power spectrum of the target sequence;
[0017] According to the power in the preset electromyographic signal frequency range at the same time in the three-dimensional power spectrum diagram, the standard electromyographic signal frequency at each moment is obtained;
[0018] In the preset EMG signal frequency range at the same time in the three-dimensional power spectrum diagram, the EMG signal strength at each moment is obtained according to the difference between the power corresponding to different frequencies and the standard EMG signal frequency;
[0019] In the preset EEG signal frequency range, the standard EEG signal frequency and EEG signal strength at each moment are obtained according to the method of obtaining the standard EMG signal frequency and EMG signal strength at each moment.
[0020] Furthermore, the method of obtaining the standard electromyographic signal frequency at each moment according to the power in the preset electromyographic signal frequency interval at the same moment in the three-dimensional power spectrum diagram includes the following specific steps:
[0021] In the three-dimensional power spectrum diagram of the target sequence, the maximum value of the power corresponding to the frequency corresponding to the kth moment and all frequencies within M is counted, and the frequency corresponding to the maximum value is recorded as the standard electromyographic signal frequency at the kth moment; M is a preset electromyographic signal frequency interval.
[0022] Furthermore, in the preset electromyographic signal frequency interval at the same time in the three-dimensional power spectrum diagram, according to the difference between the power corresponding to different frequencies and the standard electromyographic signal frequency, the specific calculation formula corresponding to the electromyographic signal strength at each moment is obtained as follows:
[0023]
[0024] SoM k is the strength of the electromyographic signal at the kth moment, M is the preset electromyographic signal frequency interval, S is the difference between the maximum value and the minimum value in the preset electromyographic signal frequency interval, and P k (i) is the power corresponding to the frequency i at the kth moment in the three-dimensional power spectrum, P k (MAM) is the power corresponding to the standard EMG signal frequency at the kth moment in the three-dimensional power spectrum diagram.
[0025] Further, the degree of aliasing between the electromyographic signal and the electroencephalogram signal at each moment is obtained according to the electromyographic signal strength, the electroencephalogram signal strength and the power between the standard electroencephalogram signal frequency and the standard electromyographic signal frequency in the three-dimensional power spectrum diagram, and the specific steps include the following:
[0026] Get the frequency at the kth moment in the three-dimensional power spectrum that belongs to the interval [MAG k ,MAM k ] corresponds to the fitted power of each frequency;
[0027] At the kth moment in the three-dimensional power spectrum, according to the intensity of the electromyographic signal, the intensity of the electroencephalographic signal, and the frequency, the interval [MAG k ,MAM k The difference between the power corresponding to each frequency in ] and the fitted power is used to obtain the degree of aliasing between the EMG signal and the EEG signal at the kth moment; where MAM k is the standard myoelectric signal frequency at the kth moment, MAG k is the standard EEG signal frequency at the kth moment.
[0028] Furthermore, the frequency at the kth moment in the three-dimensional power spectrum map is obtained to belong to the interval [MAG k ,MAM k The fitting power corresponding to each frequency in ] includes the following specific steps:
[0029] At the kth moment in the three-dimensional power spectrum, the least squares method is used to find the frequency range [MAG k ,MAM k ], and the power corresponding to all frequencies in the interval [MAG k ,MAM k ] corresponds to the fitted power for each frequency in ].
[0030] Furthermore, at the kth moment in the three-dimensional power spectrum diagram, according to the intensity of the electromyographic signal, the intensity of the electroencephalographic signal and the frequency, the interval [MAG k ,MAM k The specific calculation formula for the aliasing degree between the EMG signal and the EEG signal at the kth moment is:
[0031]
[0032] Among them, O k is the degree of aliasing between the EMG signal and the EEG signal at the kth moment, SoM k is the electromyographic signal strength at the kth moment, SoG k is the EEG signal strength at the kth moment, P k ′ ,j is the power corresponding to the frequency j at the kth moment in the three-dimensional power spectrum, P k ′,′ j is the fitted power corresponding to the frequency j at the kth moment in the three-dimensional power spectrum diagram, || is the absolute value function, and exp() is an exponential function with a natural constant as the base.
[0033] Furthermore, the learning rate of the target sequence is obtained according to the degree of aliasing between the electromyographic signal and the electroencephalographic signal at all times in the three-dimensional power spectrum diagram, and the specific steps include the following:
[0034] Calculate the normalized value of the aliasing degree between the EMG signal and the EEG signal at each moment, then calculate the mean of the normalized values of the aliasing degree between the EMG signal and the EEG signal at all moments in the three-dimensional power spectrum diagram, then calculate the difference between 1 and the mean, and multiply the difference by the preset learning rate, which is recorded as the learning rate of the target sequence.
[0035] Furthermore, the method of obtaining the anesthesia depth detection result of the patient according to the learning rate and the expected signal of the target sequence includes the following specific steps:
[0036] According to the learning rate and expected signal of the target sequence, the target sequence is filtered using an LMS filter to obtain a filtered EEG data sequence;
[0037] The trained artificial neural network is used to perform calculations based on the filtered EEG data sequences of all EEG data sequences corresponding to the patient to obtain the patient's anesthesia depth detection result.
[0038] The beneficial effects of the technical solution of the present invention are:
[0039] In an embodiment of the present invention, several EEG data sequences corresponding to the patient and the expected signal of the EEG data sequence are obtained, and a three-dimensional power spectrum diagram of the EEG data sequence is obtained, so as to obtain the standard EMG signal frequency, EMG signal strength, standard EEG signal frequency and EEG signal strength at each moment, thereby determining the strength performance of the EMG signal and the EEG signal at different moments through the power performance within the EEG and EMG signal frequency range, thereby judging the degree of aliasing between the EMG signal and the EEG signal through this indicator, making the judgment of the aliasing degree between the signals more accurate, and adjusting the learning rate of the LMS algorithm. The degree of aliasing between the EMG signal and the EEG signal at each moment is obtained, thereby obtaining the learning rate of the EEG data sequence, thereby obtaining a more appropriate learning rate through the aliasing degree between the signals, thereby ensuring the effect of data filtering. According to the learning rate and the expected signal of the EEG data sequence, the patient's anesthesia depth detection result is obtained, thereby using an appropriate learning rate to improve the accuracy of the detection result. At this point, the present invention uses an LMS filter to filter the data through an adaptive learning rate, thereby improving the filtering accuracy, minimizing the interference of the electromyographic signal on the electroencephalographic signal, and improving the sampling scale of the electroencephalographic signal when the electromyographic signal interference is weak, thereby achieving excellent filtering effect, thereby obtaining an accurate and reliable filtered electroencephalographic data sequence, thereby improving the accuracy of the patient's anesthesia depth detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 The present invention is a flowchart of the steps of the anesthesia depth detection method based on machine learning;
[0042] Figure 2 This is a flow chart for obtaining the anesthesia depth detection result of the patient in this embodiment. DETAILED DESCRIPTION
[0043] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the anesthesia depth detection method based on machine learning proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0045] The specific scheme of the anesthesia depth detection method based on machine learning provided by the present invention is described in detail below with reference to the accompanying drawings.
[0046] See also Figure 1 , which shows a flowchart of a method for detecting depth of anesthesia based on machine learning provided by an embodiment of the present invention, the method comprising the following steps:
[0047] Step S001: Acquire several EEG data sequences corresponding to the patient; record any EEG data sequence as a target sequence; perform filtering operation on the target sequence to obtain an expected signal of the target sequence.
[0048] When monitoring the depth of anesthesia, it is necessary to collect the patient's EEG signals and calculate various indicators of the depth of anesthesia through the EEG signals. First, multiple electrodes are fixed on the patient's scalp to collect the patient's EEG signal data, that is, the EEG signal. Thus, an EEG data sequence corresponding to each electrode fixed on the patient's scalp is obtained.
[0049] It should be noted that: in the EEG signal collection, each electrode sheet represents a measurement point on the scalp surface, and each electrode sheet will record the voltage value that changes over time. In this embodiment, the frequency of signal collection is 500 Hz, which is used as an example for description. In other implementations, it can be set to other values, which are not limited in this embodiment.
[0050] Among the EEG data sequences corresponding to the multiple electrodes fixed on the patient's scalp, any one EEG data sequence is recorded as a target sequence.
[0051] When monitoring the patient's electroencephalogram (EEG) signal, the more obvious the patient's electromyographic signal is, the more refined the filtering is needed, that is, the smaller the learning rate of the LMS filter is, so that the output signal is closer to the expected signal, thereby reducing the interference of the electromyographic signal on the EEG signal. When the patient's electromyographic signal is weaker, the patient's electromyographic signal and the EEG signal are less likely to be confused, and a larger learning rate is needed to retain the information of the EEG signal at more frequency scales as much as possible. Among them, LMS filtering is a well-known technology, and the specific method is not introduced here. The learning rate and the expected signal are parameters in the LMS filtering process. The Chinese name of the LMS (Least Mean Squares) filter is the minimum mean square filter.
[0052] When performing LMS filtering on the patient's EEG signal, it is necessary to obtain the low-frequency signal component of the EEG signal, take the low-frequency signal component as the desired output signal of the signal, take the original signal as input, and perform LMS filtering to achieve the effect of low-pass filtering. Therefore, it is necessary to first obtain the low-frequency signal of the signal.
[0053] Therefore, an FIR filter is used to operate the target sequence to obtain a filtered data sequence of the target sequence, and the filtered data sequence of the target sequence is recorded as the expected signal of the target sequence.
[0054] It should be noted that: FIR filter is a well-known technology, and the specific method is not introduced here. The Chinese name of FIR (Finite Impulse Response) filter is finite impulse response filter. In this embodiment, the order of FIR filter is set to 5, so that the filtered target sequence is a low-frequency signal, which is used as the expected signal of the target sequence. This example is used for description, and other implementations can be set to other values, which are not limited in this embodiment.
[0055] Step S002: Obtain a three-dimensional power spectrum diagram of the target sequence, and obtain the standard electromyographic signal frequency, electromyographic signal strength, standard electroencephalographic signal frequency and electroencephalographic signal strength at each moment according to the power size in different frequency intervals at the same moment in the three-dimensional power spectrum diagram; the horizontal axis of the three-dimensional power spectrum diagram represents time, the vertical axis represents frequency and the vertical axis represents power.
[0056] In the EEG signal, the patient does not always have a large myoelectric signal. Similarly, a large myoelectric signal will not necessarily be confused with the EEG signal. Therefore, this embodiment needs to first determine the strength of the myoelectric signal and the possibility of confusion with the EEG signal.
[0057] It is known that the frequency range of the electromyogram signal is 30 to 300 Hz, and the frequency range of the electroencephalogram signal is 0.5 to 30 Hz. The main frequency distribution ranges of the two signals do not conflict. Therefore, the strength of the electromyogram signal can be reflected by the signal strength performance within the frequency range of the electromyogram signal in the electroencephalogram signal. The greater the signal power within the frequency range of the electromyogram signal, the greater the electromyogram signal strength of the patient in the collected electroencephalogram signal.
[0058] In addition, considering that the performance of electromyographic signals is often caused by muscle contraction, and the electromyographic signals caused by muscle contraction are often similar, and similar electromyographic signals often show aggregation, the stronger the power distribution aggregation within the frequency, the more the electromyographic signal is caused by muscle contraction rather than data noise. Therefore, the stronger the aggregation, the greater the electromyographic signal intensity.
[0059] Therefore, a Fourier transform is performed on the target sequence to obtain a three-dimensional power spectrum diagram of the target sequence, wherein the horizontal axis of the three-dimensional power spectrum diagram represents time, the vertical axis represents frequency, and the vertical axis represents power.
[0060] It should be noted that Fourier transform is a well-known technology and the specific method will not be introduced here. Fourier transform converts time domain signals into frequency domain signals. The obtained spectrum represents the energy distribution of the signal at different frequencies, that is, each frequency corresponds to a power.
[0061] The preset myoelectric signal frequency interval M in this embodiment is [30,300], and the preset EEG signal frequency interval G is [0.5,30]. This is used as an example for description. In other implementations, if necessary for some special cases, they can be set to other values, which are not limited in this embodiment.
[0062] In the three-dimensional power spectrum of the target sequence, taking the kth moment as an example, the frequency corresponding to the kth moment is counted as the maximum value of the power corresponding to all frequencies in M, and the frequency corresponding to the maximum value is recorded as the standard electromyographic signal frequency MAM at the kth moment. k .
[0063] What needs to be explained is that: in the three-dimensional power spectrum diagram, each moment corresponds to a two-dimensional diagram composed of frequency and power. In this two-dimensional diagram, when the frequency belongs to the preset electromyographic signal frequency range, the maximum power is selected, that is, when the signal strength is the maximum, the corresponding frequency is the standard electromyographic signal frequency at that moment. If there are multiple maximum powers, the maximum frequency corresponding to these multiple maximum powers is taken as the standard electromyographic signal frequency.
[0064] It can be seen that the calculation formula for the strength of the electromyographic signal at the kth moment in the three-dimensional power spectrum of the target sequence is:
[0065]
[0066] SoM k is the strength of the electromyographic signal at the kth moment, M is the preset electromyographic signal frequency interval, S is the difference between the maximum value and the minimum value in the preset electromyographic signal frequency interval, and P k (i) is the power corresponding to the frequency i at the kth moment in the three-dimensional power spectrum, P k (MAM) is the power corresponding to the standard EMG signal frequency at the kth moment in the three-dimensional power spectrum diagram.
[0067] What needs to be explained is: P is the mean of all powers corresponding to the frequency M at the kth moment in the power spectrum three-dimensional diagram. The larger the mean, the greater the power of the patient within the frequency range of the electromyographic signal at the kth moment, and the greater the strength of the patient's electromyographic signal. k (i)-P k (MAM) is the power difference at frequency i at the kth moment in the three-dimensional power spectrum diagram, which reflects the difference between the power of each frequency within the frequency range of the electromyographic signal and the highest power. It reflects the standard deviation of the power of each frequency within the frequency range of the electromyographic signal relative to the highest power. The larger the standard deviation, the more concentrated the distribution of the electromyographic signal and the greater the strength of the electromyographic signal. represents the strength of the electromyographic signal at the kth moment, SoM k The larger it is, the stronger the EMG signal is.
[0068] Still taking the kth moment in the three-dimensional power spectrum of the target sequence as an example, according to the standard electromyographic signal frequency MAM at the kth moment k The acquisition method is to obtain the standard EEG signal frequency MAG at the kth moment. k , according to the electromyographic signal strength SoM at the kth moment k The acquisition method is to obtain the EEG signal strength SoG at the kth moment. k .
[0069] It should be noted that: in this embodiment, the preset EEG signal frequency interval G is [0.5, 30], and MAG k and SoG k , that is, in MAM k and SoM k In the process of obtaining, replace M with G and obtain MAG k and SoG k .
[0070] According to the above method, in the three-dimensional diagram of the power spectrum of the target sequence, the standard EMG signal frequency, the standard EEG signal frequency, the EMG signal strength and the EEG signal strength at each moment are obtained.
[0071] Step S003: According to the strength of the electromyographic signal and the electroencephalographic signal at each moment in the three-dimensional power spectrum diagram, and the power between the standard electroencephalographic signal frequency and the standard electromyographic signal frequency, the degree of aliasing between the electromyographic signal and the electroencephalographic signal at each moment is obtained.
[0072] Therefore, the power performance within the frequency range of the electromyographic signal is used to determine the strength of the electromyographic signal and the electroencephalographic signal at different times. This indicator is used to judge the degree of aliasing between the electromyographic signal and the electroencephalographic signal, and thus the step size of the LMS algorithm is adjusted. The step size is the learning rate, which allows for more accurate judgment of the degree of aliasing between signals and more personalized adjustment of the step size.
[0073] The greater the difference between the power distribution within the frequency range of the electromyographic signal and the frequency distribution within the range of the electroencephalographic signal in the electroencephalographic signal, the lower the degree of confusion between the electromyographic signal and the electroencephalographic signal.
[0074] The specific difference is that within the frequency range of the EMG signal and the frequency range of the EEG signal, the closer the peak power distribution is, and the less obvious the power trough between the peaks is, the greater the degree of confusion between the EMG signal and the EEG signal. At this time, the degree of confusion is also related to the strength of the EMG signal. The greater the signal strength of the EMG signal, the greater the degree of confusion between the EMG signal and the EEG signal.
[0075] Still taking the kth moment in the three-dimensional power spectrum of the target sequence as an example, at the kth moment in the three-dimensional power spectrum of the target sequence, the least squares method is used to find the frequencies belonging to the interval [MAG k ,MAM k ], and the power corresponding to all frequencies in the interval [MAG k ,MAM k The fitting power corresponding to each frequency in ]. The least square method is a well-known technology and will not be described here.
[0076] What needs to be explained is: Known MAG k Belongs to interval G, that is, [0.5,30], MAM k Belongs to M, that is, within [30,300], when MAG k Equal to MAM k When, in this embodiment, MAG k Equal to MAG k -1, let MAM k Equal to MAM k +1 for describing this as an example.
[0077] The actual power value is compared with the fitted power line. The greater the difference in the comparison result, the greater the difference between the two power points.
[0078] Therefore, the calculation formula for the degree of aliasing between the electromyographic signal and the electroencephalographic signal at each moment is:
[0079]
[0080] Among them, O k is the degree of aliasing between the EMG signal and the EEG signal at the kth moment, SoM k is the electromyographic signal strength at the kth moment, SoG k is the EEG signal strength at the kth moment, MAM k is the standard myoelectric signal frequency at the kth moment, MAG k is the standard EEG signal frequency at the kth moment, P k ′ ,j is the power corresponding to the frequency j at the kth moment in the three-dimensional power spectrum, P k ′,′ j is the fitted power corresponding to the frequency j at the kth moment in the three-dimensional power spectrum diagram, || is the absolute value function, exp() is an exponential function with a natural constant as the base, and this embodiment uses exp(-) to present the inverse proportional relationship and normalization processing. The implementer can set the inverse proportional function and normalization function according to the actual situation.
[0081] What needs to be explained is: is the signal strength comparison result between the EMG signal and the EEG signal at the kth moment. The larger the value, the greater the strength of the EMG signal, which means that the influence of the aliasing between the EMG signal and the EEG signal is greater, indicating that the aliasing degree of the two signals is greater. k When SoG is 0, this embodiment sets k Equal to SoG k +0.1, to prevent the denominator from being 0, is used as an example for description. Indicates that the frequency belongs to the interval [MAG k ,MAM k ], the difference between the actual power change and the linear fitting power change. The larger the value, the greater the power difference between the two power points. The more obvious the power difference between the two power points, the smaller the aliasing degree between the two signals. The exp(-) correction logic is used. Indicates the degree of aliasing between the EMG signal and the EEG signal at the kth moment.
[0082] According to the above method, the aliasing degree between the electromyographic signal and the electroencephalographic signal at each moment in the three-dimensional power spectrum diagram of the target sequence is obtained.
[0083] Step S004: Obtain the learning rate of the target sequence according to the degree of aliasing between the electromyographic signal and the electroencephalographic signal at all times in the three-dimensional power spectrum diagram.
[0084] Therefore, the overall signal aliasing situation is judged by the power distribution difference between different data segments of the electromyographic signal and the electroencephalographic signal and the overall signal strength comparison, so as to adjust the step size of the LMS algorithm, make the aliasing degree between signals more accurate, and make the step size adjustment more personalized.
[0085] The above obtains the degree of signal aliasing between the EEG signal and the EMG signal at different times. The higher the degree of signal aliasing, the less obvious the difference between the two signals is. At this time, more precise filtering is needed to avoid errors. At this time, the learning rate of the LMS filter should be smaller, so that the filtered signal is closer to the ideal signal, reducing the interference of the EMG signal on the EEG signal. When the degree of signal aliasing is smaller, a larger learning rate of the LMS filter can be set to relax the error between the output signal and the ideal signal, thereby capturing EEG signals of more scales.
[0086] The calculation formula for obtaining the learning rate by the degree of signal aliasing at different times is:
[0087]
[0088] Among them, R ′ is the learning rate of the target sequence, O k is the degree of aliasing between the electromyographic signal and the electroencephalographic signal at the kth moment, K is the number of moments in the three-dimensional power spectrum diagram, R is the preset learning rate, Norm() is a linear normalization function, which normalizes the data value to the interval [0,1]. In this embodiment, R is 0.6. This is used as an example for description. It can be set to other values in other implementation modes, and this embodiment is not limited.
[0089] According to the learning rate of the target sequence and the expected signal of the target sequence, the target sequence is operated using the LMS filtering algorithm to obtain a filtered EEG data sequence.
[0090] According to the above method, a filtered EEG data sequence corresponding to each electrode patch fixed on the patient's scalp is obtained.
[0091] Step S005: Obtain the patient's anesthesia depth detection result according to the learning rate and expected signal of the target sequence.
[0092] According to the filtered EEG data sequence corresponding to all the electrodes fixed on the patient's scalp, this embodiment uses an artificial neural network to analyze and obtain the patient's anesthesia depth detection result. The process of obtaining the patient's anesthesia depth detection result is as follows: Figure 2 shown.
[0093] The specific process is: the input of the neural network is the filtered EEG data sequence corresponding to all the electrodes fixed on the patient's scalp, and the output of the neural network is the patient's anesthesia depth detection result. It should be noted that the neural network model in this embodiment is a bidirectional recurrent neural network (Bidirectional RNN), and other models can be used in other embodiments, which are not limited in this embodiment.
[0094] The training set is obtained by obtaining a large number of filtered EEG data sequences corresponding to all electrodes fixed on the scalp of the patient, and the patient's anesthesia depth is used as the label of the sample, such as the awake state is labeled as 1, mild anesthesia is labeled as 2, moderate anesthesia is labeled as 3, and high anesthesia is labeled as 4. The neural network is trained using the above-obtained data set, and the loss function used is the cross entropy loss function. The specific training process is well known and will not be described in detail in this embodiment.
[0095] It should be noted that: the filtered EEG data sequence is input into the trained artificial neural network model, which generally first calculates the EEG index and then distinguishes the depth of anesthesia according to the size of the EEG index.
[0096] So far, the present invention is completed.
[0097] In summary, in an embodiment of the present invention, several EEG data sequences corresponding to the patient are obtained, any one EEG data sequence is recorded as a target sequence, a filtering operation is performed on the target sequence, and the desired signal of the target sequence is obtained, and the power spectrum three-dimensional graph of the target sequence is obtained, and the power size in different frequency intervals at the same time in the power spectrum three-dimensional graph is respectively obtained, and the standard electromyographic signal frequency, electromyographic signal intensity, standard electroencephalographic signal frequency and electroencephalographic signal intensity at each moment are obtained, and the power size between the electromyographic signal intensity, electroencephalographic signal intensity and the standard electromyographic signal frequency at each moment in the power spectrum three-dimensional graph is obtained, and the aliasing degree between the electromyographic signal and the electroencephalographic signal at each moment is obtained, and the aliasing degree between the electromyographic signal and the electroencephalographic signal at all moments in the power spectrum three-dimensional graph is obtained, and the learning rate of the target sequence is obtained, and the anesthesia depth detection result of the patient is obtained according to the learning rate and the desired signal of the target sequence. The present invention uses an LMS filter to filter the data through an adaptive learning rate, and obtains an accurate and reliable filtered electroencephalographic data sequence, thereby improving the accuracy of the anesthesia depth detection result of the patient.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting depth of anesthesia based on machine learning, characterized in that: The method comprises the following steps: Acquire several EEG data sequences corresponding to the patient; record any EEG data sequence as a target sequence; perform filtering operation on the target sequence to obtain an expected signal of the target sequence; Obtain a three-dimensional power spectrum diagram of the target sequence, and obtain the standard electromyographic signal frequency, electromyographic signal strength, standard electroencephalographic signal frequency and electroencephalographic signal strength at each moment according to the power size in different frequency intervals at the same moment in the three-dimensional power spectrum diagram; the horizontal axis of the three-dimensional power spectrum diagram represents time, the vertical axis represents frequency and the vertical axis represents power; According to the strength of the electromyographic signal and the electroencephalographic signal at each moment in the three-dimensional power spectrum diagram, as well as the power between the standard electroencephalographic signal frequency and the standard electromyographic signal frequency, the degree of aliasing between the electromyographic signal and the electroencephalographic signal at each moment is obtained; According to the degree of aliasing between the electromyographic signal and the electroencephalographic signal at all times in the three-dimensional power spectrum diagram, the learning rate of the target sequence is obtained; According to the learning rate and expected signal of the target sequence, the anesthesia depth detection result of the patient is obtained.
2. The method for detecting depth of anesthesia based on machine learning according to claim 1, characterized in that: The filtering operation is performed on the target sequence to obtain the expected signal of the target sequence, and the specific steps include the following: Use FIR filter to filter the target sequence to obtain a filtered data sequence of the target sequence; The filtered data sequence of the target sequence is recorded as the expected signal of the target sequence.
3. The method for detecting depth of anesthesia based on machine learning according to claim 1, characterized in that: The three-dimensional power spectrum of the target sequence is obtained, and the standard EMG signal frequency, EMG signal strength, standard EEG signal frequency and EEG signal strength at each moment are obtained according to the power size in different frequency intervals at the same moment in the three-dimensional power spectrum. The specific steps include the following: Perform Fourier transform on the target sequence to obtain a three-dimensional power spectrum of the target sequence; According to the power in the preset electromyographic signal frequency range at the same time in the three-dimensional power spectrum diagram, the standard electromyographic signal frequency at each moment is obtained; In the preset EMG signal frequency range at the same time in the three-dimensional power spectrum diagram, the EMG signal strength at each moment is obtained according to the difference between the power corresponding to different frequencies and the standard EMG signal frequency; In the preset EEG signal frequency range, the standard EEG signal frequency and EEG signal strength at each moment are obtained according to the method of obtaining the standard EMG signal frequency and EMG signal strength at each moment.
4. The method for detecting depth of anesthesia based on machine learning according to claim 3, characterized in that: The specific steps of obtaining the standard electromyographic signal frequency at each moment according to the power in the preset electromyographic signal frequency interval at the same moment in the three-dimensional power spectrum diagram are as follows: In the three-dimensional power spectrum diagram of the target sequence, the maximum value of the power corresponding to the frequency corresponding to the kth moment and all frequencies within M is counted, and the frequency corresponding to the maximum value is recorded as the standard electromyographic signal frequency at the kth moment; M is a preset electromyographic signal frequency interval.
5. The method for detecting depth of anesthesia based on machine learning according to claim 3, characterized in that: In the preset EMG signal frequency range at the same time in the three-dimensional power spectrum diagram, the specific calculation formula corresponding to the EMG signal strength at each moment is obtained according to the difference between the power corresponding to different frequencies and the standard EMG signal frequency: SoM k is the myoelectric signal strength at the kth moment, M is the preset myoelectric signal frequency interval, S is the difference between the maximum value and the minimum value in the preset myoelectric signal frequency interval, and P k (i) is the power corresponding to the frequency i at the kth moment in the three-dimensional power spectrum, P k (MAM) is the power corresponding to the standard EMG signal frequency at the kth moment in the three-dimensional power spectrum diagram.
6. The method for detecting depth of anesthesia based on machine learning according to claim 1, characterized in that: The method of obtaining the degree of aliasing between the electromyographic signal and the electroencephalogram signal at each moment according to the electromyographic signal strength, the electroencephalogram signal strength and the power between the standard electroencephalogram signal frequency and the standard electromyographic signal frequency in the three-dimensional power spectrum diagram at each moment includes the following specific steps: Get the frequency at the kth moment in the three-dimensional power spectrum that belongs to the interval [MAG k ,MAM k ] corresponds to the fitted power of each frequency; At the kth moment in the three-dimensional power spectrum, according to the intensity of the electromyographic signal, the intensity of the electroencephalographic signal, and the frequency, the interval [MAG k ,MAM k The difference between the power corresponding to each frequency in ] and the fitted power is used to obtain the degree of aliasing between the EMG signal and the EEG signal at the kth moment; where MAM k is the standard myoelectric signal frequency at the kth moment, MAG k is the standard EEG signal frequency at the kth moment.
7. The method for detecting depth of anesthesia based on machine learning according to claim 6, characterized in that: The frequency at the kth moment in the obtained power spectrum three-dimensional graph belongs to the interval [MAG k ,MAM k The fitting power corresponding to each frequency in ] includes the following specific steps: At the kth moment in the three-dimensional power spectrum, the least squares method is used to find the frequency range [MAG k ,MAM k ], and the power corresponding to all frequencies in the interval [MAG k ,MAM k ] corresponds to the fitted power for each frequency in ].
8. The method for detecting depth of anesthesia based on machine learning according to claim 6, characterized in that: At the kth moment in the three-dimensional power spectrum diagram, according to the intensity of the electromyographic signal, the intensity of the electroencephalographic signal and the frequency, the interval [MAG k ,MAM k The specific calculation formula for the aliasing degree between the EMG signal and the EEG signal at the kth moment is: Among them, O k is the degree of aliasing between the EMG signal and the EEG signal at the kth moment, SoM k is the electromyographic signal strength at the kth moment, SoG k is the EEG signal strength at the kth moment, P k ′ ,j is the power corresponding to the frequency j at the kth moment in the three-dimensional power spectrum, P k ′,′ j is the fitted power corresponding to the frequency j at the kth moment in the three-dimensional power spectrum diagram, || is the absolute value function, and exp() is an exponential function with a natural constant as the base.
9. The method for detecting depth of anesthesia based on machine learning according to claim 1, characterized in that: The specific steps of obtaining the learning rate of the target sequence according to the degree of aliasing between the electromyographic signal and the electroencephalographic signal at all times in the three-dimensional power spectrum diagram are as follows: Calculate the normalized value of the aliasing degree between the EMG signal and the EEG signal at each moment, then calculate the mean of the normalized values of the aliasing degree between the EMG signal and the EEG signal at all moments in the three-dimensional power spectrum diagram, then calculate the difference between 1 and the mean, and multiply the difference by the preset learning rate, which is recorded as the learning rate of the target sequence.
10. The method for detecting depth of anesthesia based on machine learning according to claim 1, characterized in that: The method of obtaining the anesthesia depth detection result of the patient according to the learning rate and the expected signal of the target sequence includes the following specific steps: According to the learning rate and expected signal of the target sequence, the target sequence is filtered using an LMS filter to obtain a filtered EEG data sequence; The trained artificial neural network is used to perform calculations based on the filtered EEG data sequences of all EEG data sequences corresponding to the patient to obtain the patient's anesthesia depth detection result.
Citation Information
Patent Citations
Electrocerebral-relaxing-degree recognition method and device
CN106805968A
Electroencephalogram and myoelectricity information synchronization system and method for accurately capturing motion intention
CN113741691A
Perioperative anesthesia depth monitoring system based on deep learning
CN116982937A
Robot natural control method based on electromyographic signal and error electroencephalographic potential
WO2022099807A1
