Multi-channel electroencephalogram signal-based ST segment classification model training method

Through the ST segment extraction of multi-channel electrocardiogram signals and the training of channel-weighted convolutional neural network model, the problem of low accuracy in ST segment signal classification in the single-lead detection method is solved, and more accurate and rapid myocardial ischemia detection is achieved.

CN119867780APending Publication Date: 2025-04-25INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311385964.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing myocardial ischemia detection method based on single leads has a low classification accuracy of ST segment signals due to the loss of information from other leads.

Method used

The training method of the ST segment classification model based on multi-channel electroencephalogram signals is adopted. By obtaining multi-channel electrocardiogram signals, the ST segment signals of each channel are extracted, the training sample set is constructed, and a channel-weighted convolutional neural network model is constructed for training, to obtain the ST segment classification model based on multi-channel electroencephalogram signals.

Benefits of technology

Through the extraction of multi-channel signals and the training of channel-weighted convolutional neural network model, the ST segment signal characteristics can be extracted more accurately, improving the accuracy and rapidity of ST segment classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119867780A_ABST
    Figure CN119867780A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-channel electroencephalogram signal-based ST segment classification model training method, belongs to the technical field of electrocardiosignal processing, and solves the problem of inaccurate ST segment classification in the prior art. The method comprises the following steps: acquiring multi-channel electrocardiosignals, and respectively extracting ST-segment signals of the electrocardiosignals of each channel; constructing a training sample set based on ST-segment signals of the electrocardiosignals of each channel; constructing a channel weighted convolutional neural network model, wherein the channel weighted convolutional neural network comprises a plurality of residual modules which are connected in sequence; the main branch of each residual module is used for feature extraction, and the residual branch is used for weight calculation; multiplying the weights and the features according to channels to obtain an output feature of each residual module; and training the channel weighted convolutional neural network based on a training sample set to obtain an ST segment classification model based on the multi-channel electroencephalogram signals. The multi-channel electroencephalogram signal-based ST segment classification model for rapidly and accurately performing ST segment classification can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrocardiogram monitoring, and in particular to a training method for an ST segment classification model based on multi-channel electroencephalogram signals. Background Art

[0002] Myocardial ischemia (MI) is one of the common cardiovascular diseases, which means that the myocardium cannot support the normal functioning of the heart. With the improvement of people's living standards, the prevalence of myocardial ischemia in my country is currently increasing year by year. It has become a common and frequently-occurring disease among middle-aged and elderly people, and more and more young people are also showing symptoms of myocardial ischemia. Severe myocardial ischemia may also cause myocardial infarction or large-area myocardial necrosis, thereby endangering life safety. Therefore, early diagnosis and prevention are very important for patients with myocardial ischemia. Dynamic electrocardiogram is the most commonly used and most important examination to clarify myocardial ischemia. Hospitals usually use equipment such as Holter monitors to monitor dynamic electrocardiograms. Dynamic electrocardiograms can continuously capture or monitor electrocardiogram signals for several hours, and record the potential changes on the human body surface in the form of dynamic curves. Doctors can provide some diagnostic clues through the electrocardiogram waveform. Each cardiac cycle in the electrocardiogram waveform is composed of waveforms such as P waves, QRS waves and T waves, corresponding to different electrocardiogram activities during the heart's excitation process. Generally, the dynamic electrocardiogram ST segment level changes are analyzed to determine whether myocardial ischemia occurs, which is of great significance for the judgment of asymptomatic myocardial ischemia.

[0003] At present, researchers have established quite accurate analysis methods and algorithms for the detection of R wave abnormalities in arrhythmias, heart rhythm variability and atrial fibrillation, but the detection of ST wave abnormalities in myocardial ischemia is still at the research level. At present, most myocardial ischemia detection is performed by professionals through computer-assisted ECG signal visual inspection, such as ST segment trend graph. In recent years, researchers have proposed more and more algorithms for the analysis and diagnosis of myocardial ischemia for the automated detection system of ischemic heart disease. The current method of ST segment classification based on a single lead still has a low accuracy rate in the classification of ST segment signals due to the loss of information from other leads. Summary of the invention

[0004] In view of the above analysis, an embodiment of the present invention aims to provide a training method for an ST segment classification model based on multi-channel EEG signals, so as to solve the problem of inaccurate ST segment classification results based on a single lead.

[0005] On the one hand, an embodiment of the present invention provides a method for training an ST segment classification model based on a multi-channel EEG signal, comprising the following steps:

[0006] Acquire multi-channel ECG signals, and extract ST segment signals of the ECG signals of each channel respectively; construct a training sample set based on the ST segment signals of the ECG signals of each channel;

[0007] Constructing a channel-weighted convolutional neural network model, wherein the channel-weighted convolutional neural network includes a plurality of residual modules connected in sequence; the main branch of each residual module is used for feature extraction, and the residual branch is used for weight calculation; the weight and the feature are multiplied by channel to obtain the output feature of each residual module;

[0008] The channel-weighted convolutional neural network is trained based on a training sample set to obtain an ST segment classification model based on multi-channel electroencephalogram signals.

[0009] Based on the further improvement of the above method, the residual branch of each residual module includes a channel weighted unit or a backlog excitation unit; the residual module of the channel-weighted convolutional neural network alternately uses the channel weighted unit and the backlog excitation unit.

[0010] Based on the further improvement of the above method, the main branch of the residual module of the channel weighted unit is used to extract features of the input data through the convolution layer; the channel weighted unit extracts the weight of each ECG channel through the sequentially connected one-dimensional convolution layer, fully connected layer, Softmax layer and average pooling layer; the weight is multiplied by the extracted feature according to the ECG channel to obtain the output data of the residual module.

[0011] Based on the further improvement of the above method, the main branch of the residual module of the backlog excitation unit is used to extract features of the input data through the convolution layer; the backlog excitation unit extracts the weight of each network channel through the global pooling, the first fully connected layer, the ReLU activation layer, the second fully connected layer and the Sigmoid layer connected in sequence; the weight is multiplied by the extracted features according to the network channel to obtain the output data of the residual module.

[0012] Based on the further improvement of the above method, a training sample set is constructed based on the ST segment signal of the ECG signal of each channel, including:

[0013] Detecting the ECG signal of the first channel to obtain an R wave in the ECG signal of the first channel, and removing R wave segments with low confidence in the ECG signal of the first channel based on the detection confidence to obtain a preprocessed ECG signal;

[0014] Determine the positions of the S wave and the T wave in the first channel based on the preprocessed ECG signal, and extract the ST segment ECG signal of the first channel;

[0015] The ST segment ECG signals of other channels are extracted based on the ST segment ECG signals of the first channel; a corresponding group of ST segment ECG signals of multiple channels are spliced, and the types corresponding to the spliced ​​ST segment signals constitute a training sample to obtain a training sample set.

[0016] Based on the further improvement of the above method, the R wave segment with low confidence in the ECG signal of the first channel is eliminated based on the detection confidence to obtain the preprocessed ECG signal, including:

[0017] Taking each R wave in the ECG signal of the first channel as the current R wave in turn, if the confidence of the current R wave is less than the first threshold, deleting the signal point between the current R wave peak and the previous R wave peak;

[0018] The ECG signal obtained after removing the R wave with low confidence is filtered, the R wave is re-detected on the filtered ECG signal to obtain the R wave position, the corresponding position of the ECG signal before filtering is marked as the R wave, and the pre-processed ECG signal is obtained.

[0019] Based on the further improvement of the above method, the positions of the S wave and the T wave in the first channel are determined based on the preprocessed ECG signal, and the ST segment ECG signal of the first channel is extracted, including:

[0020] For the preprocessed ECG signal, perform the following steps for each R wave in order from right to left, traverse all R waves, determine the positions of S waves and T waves, and extract the ST segment ECG signal:

[0021] From the R wave peak to the left, the second maximum slope point is the center of the P wave, and the third maximum slope point is the center of the T wave.

[0022] From the center point of the T wave, traverse to the left and find the first maximum slope point, which is the center point of the S wave;

[0023] The starting point of the T wave is found according to the center point of the T wave, and the signal from the center point of the S wave to the starting point of the T wave is extracted as the ST segment ECG signal of the first channel.

[0024] Based on the further improvement of the above method, the confidence of the R wave segment in the ECG signal of the first channel is calculated in the following way:

[0025] Performing differential conversion on the ECG signal of the first channel to obtain an ECG differential signal; constructing a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal;

[0026] The confidence of each R wave segment of the first channel is calculated based on the standard R wave differential waveform corresponding to each type of R wave.

[0027] Based on the further improvement of the above method, the confidence of each R wave segment of the first channel is calculated based on the standard R wave differential waveform corresponding to each type of R wave, including:

[0028] Perform integral reduction on each type of standard R wave differential waveform to obtain a standard R wave reduction waveform;

[0029] For each type of standard R wave, extract each R wave segment corresponding to the type in the ECG differential signal, perform integral restoration, and use the restored R wave segment as the target R wave;

[0030] Calculate the ratio of each type of standard R wave restoration waveform to the corresponding signal point in each target R wave of the corresponding type to construct a similarity ratio set;

[0031] Calculate the similarity confidence interval of each type based on the set of all similarity ratios corresponding to each type;

[0032] The confidence of each target R wave corresponding to the type in the first channel is calculated according to the similarity confidence interval of the type.

[0033] Based on the further improvement of the above method, the standard R wave differential waveform corresponding to each type of R wave is constructed based on the ECG differential signal, including:

[0034] For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal;

[0035] A bidirectional sliding window is used to synchronously slide all such R wave segments, and the boundary differential waveform of the standard R wave corresponding to this type of R wave is obtained according to the differential mean value of the R wave in each sliding window;

[0036] The standard vertebral R wave differential waveform corresponding to this type of R wave is obtained according to the central differential waveform and the boundary differential waveform of the standard R wave corresponding to this type of R wave.

[0037] The present invention constructs training samples by extracting the ST segments of multi-channel electrocardiogram signals, so that the trained model is more accurate. A channel-weighted convolutional neural network model using a plurality of sequentially connected residual modules is constructed to weight the features of different channels, so that the model learns features that are more conducive to ST segment signal classification. An ST segment classification model based on multi-channel electroencephalogram signals is obtained by training the channel-weighted convolutional neural network model, so that more accurate features are extracted from signals of multiple channels. The obtained ST segment classification model of the multi-channel electroencephalogram signals can realize fast and accurate classification of ST segments.

[0038] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;

[0040] Figure 1 Flow chart of the training method of the ST segment classification model based on multi-channel EEG signals according to an embodiment of the present invention

[0041] Figure 2 A schematic diagram of an abnormal ST segment signal waveform according to an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of a normal ST segment signal waveform according to an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of the structure of a channel-weighted convolutional neural network model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0045] A specific embodiment of the present invention discloses a training method for an ST segment classification model based on multi-channel EEG signals, such as Figure 1 As shown, the following steps are included:

[0046] S1. Obtain multi-channel ECG signals, extract the ST segment signals of the ECG signals of each channel respectively; construct a training sample set based on the ST segment signals of the ECG signals of each channel;

[0047] S2. Construct a channel-weighted convolutional neural network model, wherein the channel-weighted convolutional neural network includes a plurality of residual modules connected in sequence; the main branch of each residual module is used for feature extraction, and the residual branch is used for weight calculation; the weight and the feature are multiplied by channel to obtain the output feature of each residual module;

[0048] S3. Training the channel-weighted convolutional neural network based on the training sample set to obtain an ST segment classification model based on multi-channel EEG signals.

[0049] During implementation, abnormal ST segments were divided into four types: horizontal depression of the ST segment, upsloping depression of the ST segment, downward elevation of the ST segment, tombstoning elevation of the ST segment, and normal ST segment, such as Figure 2 As shown, Figure 2 (a) is horizontal depression of the ST segment, (b) is upward depression of the ST segment, (c) is downward elevation of the ST segment, and (d) is tombstone elevation of the ST segment. Figure 3Therefore, there are 5 types of ST segments.

[0050] During implementation, the multi-channel ECG signal is an ECG signal collected through multiple leads, such as limb leads Ⅰ, II, and III, and chest leads V1-V6.

[0051] The present invention constructs training samples by extracting the ST segments of multi-channel electrocardiogram signals, so that the trained model is more accurate. A channel-weighted convolutional neural network model using a plurality of sequentially connected residual modules is constructed to weight the features of different channels, so that the model learns features that are more conducive to ST segment signal classification. An ST segment classification model based on multi-channel electroencephalogram signals is obtained by training the channel-weighted convolutional neural network model, so that more accurate features are extracted from signals of multiple channels. The obtained ST segment classification model of the multi-channel electroencephalogram signals can realize fast and accurate classification of ST segments.

[0052] Specifically, a training sample set is constructed based on the ST segment signal of the ECG signal of each channel, including:

[0053] S11, detecting the ECG signal of the first channel to obtain an R wave in the ECG signal of the first channel, and removing the R wave segment with low confidence in the ECG signal of the first channel based on the detection confidence to obtain a preprocessed ECG signal;

[0054] S12, determining the positions of the S wave and the T wave in the first channel based on the preprocessed ECG signal, and extracting the ST segment ECG signal in the first channel;

[0055] S13, extracting ST segment ECG signals of other channels based on the ST segment ECG signals of the first channel; splicing a corresponding group of ST segment ECG signals of multiple channels, and the types corresponding to the spliced ​​ST segment signals constitute a training sample to obtain a training sample set.

[0056] Since limb lead I is not easily interfered, limb lead I is used as the first channel to extract the ST segment signal.

[0057] During implementation, step S11 can use the Pan&Tomskins algorithm to detect the ECG signal of the first channel to obtain the R wave of the ECG signal, that is, mark the position of the R wave peak, and classify the R wave by clustering, for example, into 3 categories, and then mark the type corresponding to each R wave.

[0058] The confidence of the R wave segment in the ECG signal of the first channel is calculated in the following way:

[0059] S111, performing differential conversion on the ECG signal of the first channel to obtain an ECG differential signal; constructing a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal;

[0060] S112. Calculate the confidence of each R wave segment of the first channel based on the standard R wave differential waveform corresponding to each type of R wave.

[0061] For example, the original ECG signal of the first channel is represented by X = {x0, x1, x2, ..., x N The first signal point d1 after conversion is calculated by (x1-x0)×f, and the second signal point d2 after conversion is calculated by (x2-x1)×f. And so on, the ECG differential signal D={d1,d2,…,d N}, where N represents the total number of signal points in the ECG signal segment. Since the first signal point x0 in the original ECG signal has no differential value, it is deleted and the original ECG signal is represented by X = {x1, x2, …, x N}. Where f represents the sampling frequency.

[0062] By differentiating the waveform at each point, the dynamic information of all original ECG data is retained, the AC component of the ECG in the low-frequency band is emphasized, the DC component and baseline drift component are weakened, which is conducive to highlighting the ECG characteristics.

[0063] A standard R wave differential waveform corresponding to each type of R wave is constructed based on the ECG differential signal. Specifically, step S111 includes:

[0064] S1111. For each type of R wave, obtain a central differential waveform of a standard R wave corresponding to the type of R wave according to a differential mean value of the type of R wave in the electrocardiographic differential signal;

[0065] S1112, using a bidirectional sliding window to synchronously slide all such R wave segments, and obtaining a boundary differential waveform of a standard R wave corresponding to such R wave according to a differential mean value of the R wave in each sliding window;

[0066] S1113. Obtain a standard R wave differential waveform corresponding to this type of R wave based on the central differential waveform and the boundary differential waveform of the standard R wave corresponding to this type of R wave.

[0067] The construction of the standard R wave differential waveform includes the construction of the central part waveform and the construction of the boundary waveform.

[0068] For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal, including:

[0069] For each signal point of the central differential waveform of the standard R wave, the differential mean of all sampling points corresponding to the signal point in this type of R wave is calculated as the value of the signal point; and the central differential waveform of the standard R wave is obtained.

[0070] Since the original ECG signal X and the ECG differential signal D are of equal length and correspond one to one, the R wave marker in the original signal can find the corresponding position in the ECG differential signal.

[0071] For example, to construct the central differential waveform of the standard R wave, it is necessary to first determine the width of the central differential waveform of the standard R wave. According to the beating law of the heart, the R wave is generally greater than 60ms. If the sampling interval is 1ms during implementation, the central waveform width can be set to 60 sampling intervals, with the R wave peak as the center, and the left and right widths are 30 sampling intervals respectively, that is, there are 30 signal points on the left and right.

[0072] For each signal point of the central differential waveform of the standard R wave, the differential mean of all sampling points corresponding to the signal point in this type of R wave is calculated as the value of the signal point in the standard R wave.

[0073] For example, the first signal point on the left side of the center position of the central differential waveform of the normal standard R wave is extracted, and the differential value corresponding to the first sampling point on the left side of each normal R wave mark point in the ECG differential signal is calculated, and the average value is calculated to obtain the value of the first signal point on the left side of the center position of the central differential waveform of the standard R wave. Similarly, after constructing the value of each signal point in the central wave differential shape, the central waveform is obtained, which is expressed as S i ={s i-k ,…,s i-1 ,s i1 ,…,s ik}. Among them, s i-1 is the first signal point on the left side of the center position of the central differential waveform of the i-th type of standard R wave, s i1 is the first signal point to the right of the center position of the central differential waveform of the i-th type of standard R wave, and 2k is the width of the central differential waveform.

[0074] After the central differential waveform is constructed, it is necessary to construct the boundary waveform of the standard R wave differential waveform.

[0075] Specifically, a bidirectional sliding window is used to synchronously slide all such R wave segments, and a boundary differential waveform of a standard R wave corresponding to such R wave is obtained according to the differential mean value of the R wave in each sliding window, including:

[0076] S11121, determining a left initial position corresponding to the left sliding window and a right initial position corresponding to the right sliding window respectively according to the width of the central differential waveform of the standard R wave;

[0077] S11122, using a left sliding window to slide leftward from the left initial position in all such R wave segments, and determining a left boundary differential waveform of a standard R wave corresponding to such R wave according to a differential mean value of the R wave in each left sliding window;

[0078] S11123, using a right sliding window to slide rightward from the right initial position in all such R wave segments, and determining the right boundary differential waveform of the standard R wave corresponding to this type of R wave according to the differential mean of the R wave in each right sliding window.

[0079] First, the initial position of the left sliding window is determined based on half the width of the standard R wave center differential waveform. For example, the width of the center waveform is 60 signal points, that is, 30 signal points on the left and right of the peak. The left initial position is the position of the 31st sampling point on the left side of the R mark point, and the right initial position is the position of the 31st sampling point on the right side of the R mark point.

[0080] The process of determining the left boundary differential waveform and the right boundary differential waveform of the standard R wave is the same, the difference lies in the sliding direction, and the following is explained by taking the construction of the left boundary differential waveform as an example.

[0081] When using a sliding window, you must first determine the window size and sliding step size. During implementation, you can determine the size based on computational efficiency and accuracy. For example, if the sliding window size is determined to be 10 sampling intervals, each sliding window corresponds to 10 sampling points, and the sliding step size is 1 sampling interval, then one sampling point is slid to the left each time.

[0082] Specifically, in step S11122, the left boundary differential waveform of the standard R wave corresponding to the type of R wave is determined in the following manner:

[0083] S111221, taking each left sliding window at the left initial position as the current sliding window; calculating the differential mean of each sampling point in the current sliding window as the value of the signal point corresponding to the left boundary differential waveform of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set; sliding the current sliding window to the left by the first step length as the current sliding window;

[0084] S111222, calculating the differential mean of each sampling point in the current sliding window as the value of the corresponding signal point in the differential waveform of the left boundary of the standard R wave; the mean of each sampling point in the current sliding window constitutes a first set, and the positive and negative signs corresponding to the current sliding window are obtained according to the positive and negative signs of each value in the first set;

[0085] S111223. If the positive and negative signs corresponding to the current sliding window are different from those corresponding to the previous sliding window, stop sliding the window to obtain the left boundary differential waveform of the standard R wave; otherwise, slide the current sliding window to the left by the first step length as the current sliding window, and return to step S111222.

[0086] For example, the left initial position is the 31st sampling point on the left side of the R wave marker, and the sequence D = {d1, d2, …, d N} at a certain position R dThere is an R wave marker (the R marker point may be between two sampling points or at a certain sampling point), and the type is normal. The first sampling point to the left of the marker point is d i , then the left sliding window is initially positioned at the marked point R d The 31st to 40th sampling points on the left (counting from right to left), the data in the sliding window is d i-30 ~d i-39 .

[0087] Extract the data of the 31st to 40th sampling points on the left side of each normal R wave mark point, and calculate the mean of each sampling point, that is, calculate the mean of the values ​​of the 31st sampling point on the left side of the normal R wave peak as the value of the 31st signal point on the left side of the standard R wave peak, calculate the mean of the values ​​of the 32nd sampling point on the left side of the normal R wave peak as the value of the 32nd signal point on the left side of the standard R wave peak, and so on. These means constitute the first set.

[0088] The positive and negative signs of the current window are determined according to the positive and negative signs of the means in the first set. If the ratio of the number of positive values ​​in the first set to the total number of values ​​in the first set exceeds the first threshold, the current sliding window corresponds to a positive sign, otherwise the current sliding window corresponds to a negative sign.

[0089] After obtaining the sign of the first sliding window, slide the current sliding window to the left by the first step as the current sliding window; at this time, the data covered by the sliding window is the data of the 32nd to 41st sampling points on the left side of the R wave mark point, and the mean value at each moment is calculated according to the above process as the data of the 32nd to 41st signal points on the left side of the standard R wave peak (at this time, the 32nd to 40th sampling points have been calculated, so only the mean value of the 41st sampling point needs to be calculated), and the mean values ​​of the 32nd to 41st sampling points constitute a new first set, and the sign corresponding to the current window is determined according to the sign of these means in the new first set. If the sign corresponding to the current sliding window is different from the sign corresponding to the previous sliding window, stop sliding the window, obtain the left boundary waveform of the standard R wave, that is, obtain the value of the 31st to 41st signal points on the left side of the standard R wave, if the sign corresponding to the current sliding window is the same as the sign corresponding to the previous sliding window, slide the current sliding window to the left by the first step as the current sliding window, and return to step S112222.

[0090] The same process is used to obtain the right boundary differential waveform of the standard R wave. It should be noted that at this time, the sliding window starts to slide to the right from the 31st sampling point on the right side of the R wave mark point.

[0091] The center differential waveform, left boundary differential waveform, and right boundary differential waveform of the standard R wave are obtained, that is, the standard R wave differential waveform corresponding to the R wave type is obtained. The constructed standard R wave differential waveform excludes the influence of DC component and baseline drift; only the medium and low frequency AC component is retained, which is the dynamic information of the ECG waveform. It can make detection judgment more accurate.

[0092] After obtaining the standard R wave differential waveform, all ECG R waves of this type are similarly calculated with reference to the standard R wave. Specifically, step S112 calculates the confidence of each R wave segment of the first channel based on the standard R wave differential waveform corresponding to each type of R wave, including:

[0093] S1121, performing integral reduction on each type of standard R wave differential waveform to obtain a standard R wave reduction waveform;

[0094] S1122, for each type of standard R wave, extract each R wave segment corresponding to the type from the ECG differential signal, perform integral restoration, and use the restored R wave segment as the target R wave;

[0095] S1123, calculating the ratio of the standard R wave restoration waveform of each type to the corresponding signal point in each target R wave of the corresponding type to construct a similarity ratio set;

[0096] S1124, calculating the similarity confidence interval of each type according to all similarity ratio sets corresponding to the type;

[0097] S1123. Calculate the confidence of each target R wave corresponding to the type of the first channel according to the similarity confidence interval of the type.

[0098] Since the standard R wave is obtained based on the differential waveform, it is necessary to restore it, that is, to convert the standard R wave in the form of integration. The standard R wave differential waveform is represented by S i ={s i-m , ..., s i-1 ,s i1 , ..., s in}, where s i-1 is the first signal point on the left side of the center position of the ith type standard R wave differential waveform, s i1 is the first signal point on the right side of the center position of the i-th standard R-wave differential waveform, s i-m is the left boundary signal point of the i-th standard R-wave differential waveform, s in is the right boundary signal point of the i-th standard R wave differential waveform. The total number of sampling points in the standard R wave differential waveform is m+n.

[0099] Integral restoration is to use the following formula to calculate the corresponding integral restored value for each signal point in the standard R wave differential waveform:

[0100]

[0101] Among them, sr ip represents the value of the pth signal point in the i-th standard R-wave restoration waveform, s iq represents the value of the qth signal point in the i-th standard R-wave differential waveform, and r0 represents the preset baseline value. p∈[1, m+n]. During implementation, r0 takes a positive value so that each sr ip The standard R wave restoration waveform is expressed as SR i ={sr i-m , ..., sr i-1 , sr i1 , ..., sr in For the standard R wave of the i-th type, extract each R wave segment corresponding to the type in the ECG differential signal. That is, find an R wave marker of this type, extract its left m sampling points and right n sampling points to form an R wave segment of this type, and use the same method as above to perform integral reduction to obtain the target waveform, which is expressed as {xr i-m , ..., xr i-1 , xr i1 , ..., xr in}.

[0102] There are two differences between the standard R wave restoration waveform and the target R wave and the usual ECG wave: they are inverted and the difference in the baseline starting point is removed, thus avoiding the influence of baseline drift.

[0103] Construct the corresponding similarity ratio set as If there are M i-th type R waves, M similarity ratio sets will be constructed.

[0104] The data in the similarity ratio set are the shape ratios of the R waveform. The waveform of the R wave is affected by many random factors, including electrophysiology, muscle movement, external electromagnetic interference, and the characteristics of the sampling circuit itself. These random factors create a ratio set that obeys or approximately obeys a normal distribution.

[0105] Therefore, calculate the mean μ and variance σ of all values ​​in the M similarity ratio sets 2 , with the overall mean as μ and the variance as σ 2 The normal distribution of ECG energy distribution conforms to the half-normal distribution. The corresponding confidence interval is expressed as [μ-zσ,μ+zσ], where z represents the confidence scale corresponding to the confidence level. For example, the corresponding value of 94.5% confidence level is 2.

[0106] For each target R wave, the confidence of each target R wave is obtained according to the ratio of the number of elements in the corresponding similarity ratio set that fall within the confidence interval to the number of elements in the similarity ratio set.

[0107] For example, a target R wave and a standard R wave have the following similarity ratio sets:

[0108] {1.44, 1.22, 1.09, 1.33, 1.15, 1.29, 1.15, 1.27, 1.27, 1.13, 1.16, 1.15, 1.15, 1.19, 1.15, 1.3, 1.41, 1.2, 1.24, 1.22, 1.04, 1.25, 1.21, 1.01, 1.14, 1.25, 1.19, 1.2, 1.38, 1.21, 1.19, 1.09, 1.36, 1.17, 1.35, 1.1, 1.11, 1.1 9, 1.24, 1.29, 1.11, 1.18, 1.09, 1.08, 1.28, 1.36, 1.18, 1.19, 1.21, 1.11, 1.15, 1.27, 1.07, 1.15, 0.92, 1.24, 1.12, 1.24, 1.18, 1.32}; if μ=1.2, σ=0.05, and confidence scale z=2, then the number of ratios in the similarity ratio set that fall within the confidence interval is 45. Therefore, the confidence value of the target R wave is 45 / 60=75%.

[0109] Since the original ECG signal X and the ECG differential signal D are of equal length and correspond one to one, the target R wave and the R wave in the original ECG signal also correspond one to one, and the confidence of the target R wave is the confidence of the corresponding R wave in the original ECG signal.

[0110] After obtaining the confidence of each R wave, the R wave segments with low confidence are eliminated. Specifically, based on the detection confidence, the R wave segments with low confidence in the ECG signal of the first channel are eliminated to obtain the preprocessed ECG signal, including:

[0111] S114, taking each R wave in the electrocardiogram signal of the first channel as the current R wave in turn, and if the confidence of the current R wave is less than the first threshold, deleting the signal point between the current R wave peak and the previous R wave peak;

[0112] S115, filtering the ECG signal obtained after removing the R wave with low confidence, re-detecting the R wave on the filtered ECG signal to obtain the R wave position, marking the corresponding position of the ECG signal before filtering as the R wave, and obtaining the pre-processed ECG signal.

[0113] All signals from each R wave with low confidence in the ECG signal from its marked position to the marked position of the previous R wave are removed, so as to facilitate the subsequent accurate extraction of ST segment signals. The ECG signal after removing the R wave with low confidence is represented as X 1 ={d1,d2,…,d N}.

[0114] During implementation, the undecimated wavelet transform (UWT) is used to filter the ECG signal after removing the R wave with low confidence, so as to remove the high-frequency noise in the signal and facilitate more accurate detection. The filtered ECG signal is detected again to obtain the R wave marker, and the corresponding position of the ECG signal before filtering is marked as the R wave to obtain the pre-processed ECG signal, that is, the obtained R wave marker is placed on the ECG signal X after removing the R wave with low confidence. 1 ={d1,d2,…,d N} corresponding position.

[0115] Step S12 determines the positions of the S wave and the T wave in the first channel based on the preprocessed ECG signal, and extracts the ST segment ECG signal of the first channel, including:

[0116] S121. For the preprocessed ECG signal, perform the following steps for each R wave in order from right to left, traverse all R waves, determine the positions of S waves and T waves, and extract ST segment ECG signals: traverse from the R wave peak to the left to find the second slope maximum point as the P wave center point, and the third slope maximum point as the T wave center point;

[0117] S122, traverse from the center point of the T wave to the left and find the first slope maximum point as the center point of the S wave;

[0118] S123, finding the starting point of the T wave according to the center point of the T wave, and extracting the signal from the center point of the S wave to the starting point of the T wave as the ST segment electrocardiogram signal of the first channel.

[0119] During implementation, first traverse from right to left, that is, from back to front, each calibrated R wave is taken as the current R wave, and the extreme value method is used to determine the position of the P wave in reverse order, that is, from the R wave to the left, find the first slope maximum point as the Q wave, and the second slope maximum point as the center point of the P wave. After the center point of the P wave is verified, continue to look to the left for the next slope maximum point to obtain the center point of the T wave.

[0120] From the center point of the T wave, continue to traverse to the left to find the first slope maximum point, which is the center point of the S wave. From the center point of the T wave, traverse to the left to find the first slope 0 point, which is the starting point of the T wave. Extract the signal from the center point of the S wave to the starting point of the T wave as the ST segment ECG signal of the first channel.

[0121] Since the sampling points of each channel are one-to-one corresponding, after the ST segment in the first channel is determined, the ST segment ECG signals of other channels can be extracted based on the ST segment ECG signals of the first channel, that is, if the i-th to j-th sampling points in the first channel are ST segments, the i-th to j-th segments in other channels are also ST segments, thereby extracting the ST segment signals of all channels. A set of ST segment ECG signals corresponding to multiple channels are spliced, and the types corresponding to the spliced ​​ST segment signals constitute a training sample. For example, the first ST segment of multiple channels constitutes a two-dimensional matrix, and the label corresponding to the first ST segment constitutes a sample. The ST segment of each channel is a row in the matrix.

[0122] In order to extract more effective features, a channel-weighted convolutional neural network model is constructed. Figure 4 As shown, the channel-weighted convolutional neural network includes multiple residual modules connected in sequence; the main branch of each residual module is used for feature extraction, and the residual branch is used for weight calculation; the weight and feature are multiplied by channel to obtain the output feature of each residual module.

[0123] In order to extract the features of different ECG channels and the features of network dimensions, the residual branch of the residual module of the present invention includes a channel weighting unit or a backlog excitation unit; the residual module of the channel-weighted convolutional neural network alternately uses the channel weighting unit and the backlog excitation unit to capture the importance of features of different dimensions and improve the accuracy of classification.

[0124] During implementation, the main branch of each residual module uses two convolutional layers to extract features from the input data, and the residual branch is used to calculate the weights.

[0125] If the residual branch is a channel weighted unit, the channel weighted unit extracts the weight of each ECG channel through the sequentially connected one-dimensional convolution layer, fully connected layer, softmax layer and average pooling layer. For example, the input sample data is C1×T×C2, where T is the number of signal points of each ECG channel, C1 is the number of network channels (the input of the first module is 1, and the number of network channels increases after convolution), and C2 is the number of ECG signal channels. The channel weighted unit first uses a one-dimensional convolution to capture the global signal representation, maps the input to a vector of size S×C2, puts the vector into the fully connected layer, softmax layer, and average pooling to obtain an ECG channel weight vector of size 1×C2, and multiplies the weight with the extracted features according to the ECG channel, that is, the features of each ECG channel are multiplied by their corresponding weights to the output data of the residual module.

[0126] If the residual branch is a backlog excitation unit (SE-Block), the backlog excitation unit extracts the weight of each network channel through the global pooling, the first fully connected layer, the ReLU activation layer, the second fully connected layer and the Sigmoid layer connected in sequence. The backlog excitation unit obtains a 1×C1 network channel weight vector, and the weights are multiplied by the extracted features according to the network channel, that is, the features of each network channel are multiplied by their corresponding weights to the output data of the residual module.

[0127] The output data of the previous residual module is used as the input data of the next residual module. The output data of the last residual module is input into the classifier to obtain the predicted ST segment type. During implementation, the classifier can use a multi-layer perceptron.

[0128] The channel-weighted convolutional neural network is trained based on the training sample set, and the model parameters are updated by calculating the loss direction propagation until the number of iterations is reached or the loss reaches the preset accuracy requirement, thereby obtaining an ST segment classification model based on multi-channel EEG signals.

[0129] For extracting the ECG signal to be detected, the ST segment signal can be extracted according to the process of extracting the ST segment in step S1, and each ST segment signal is input into the trained ST classification model based on multi-channel EEG signals to obtain the corresponding ST segment type. According to the types of these ST segments, it can be judged whether there are symptoms of myocardial ischemia.

[0130] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0131] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A training method for an ST segment classification model based on multi-channel EEG signals, characterized in that: The following steps are involved: Acquire multi-channel ECG signals, and extract ST segment signals of the ECG signals of each channel respectively; construct a training sample set based on the ST segment signals of the ECG signals of each channel; Constructing a channel-weighted convolutional neural network model, wherein the channel-weighted convolutional neural network includes a plurality of residual modules connected in sequence; the main branch of each residual module is used for feature extraction, and the residual branch is used for weight calculation; the weight and the feature are multiplied by channel to obtain the output feature of each residual module; The channel-weighted convolutional neural network is trained based on a training sample set to obtain an ST segment classification model based on multi-channel electroencephalogram signals.

2. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 1, characterized in that: The residual branch of each residual module includes a channel weighting unit or a backlog excitation unit; the residual module of the channel-weighted convolutional neural network alternately uses the channel weighting unit and the backlog excitation unit.

3. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 2 is characterized in that: The main branch of the residual module using the channel weighted unit extracts features from the input data through a convolutional layer; the channel weighted unit extracts the weight of each ECG channel through a one-dimensional convolutional layer, a fully connected layer, a Softmax layer, and an average pooling layer connected in sequence; the weight is multiplied by the extracted features according to the ECG channel to obtain the output data of the residual module.

4. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 2, characterized in that: The main branch of the residual module using the backlog excitation unit extracts features of the input data through the convolution layer; the backlog excitation unit extracts the weight of each network channel through the global pooling, the first fully connected layer, the ReLU activation layer, the second fully connected layer and the Sigmoid layer connected in sequence; the weight is multiplied by the extracted features according to the network channel to obtain the output data of the residual module.

5. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 1, characterized in that: A training sample set is constructed based on the ST segment signal of the ECG signal of each channel, including: Detecting the ECG signal of the first channel to obtain an R wave in the ECG signal of the first channel, and removing R wave segments with low confidence in the ECG signal of the first channel based on the detection confidence to obtain a preprocessed ECG signal; Determine the positions of the S wave and the T wave in the first channel based on the preprocessed ECG signal, and extract the ST segment ECG signal of the first channel; The ST segment ECG signals of other channels are extracted based on the ST segment ECG signals of the first channel; a corresponding group of ST segment ECG signals of multiple channels are spliced, and the types corresponding to the spliced ​​ST segment signals constitute a training sample to obtain a training sample set.

6. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 5, characterized in that: Based on the detection confidence, the R wave segment with low confidence in the ECG signal of the first channel is eliminated to obtain the preprocessed ECG signal, including: Taking each R wave in the ECG signal of the first channel as the current R wave in turn, if the confidence of the current R wave is less than the first threshold, deleting the signal point between the current R wave peak and the previous R wave peak; The ECG signal obtained after removing the R wave with low confidence is filtered, the R wave is re-detected on the filtered ECG signal to obtain the R wave position, the corresponding position of the ECG signal before filtering is marked as the R wave, and the pre-processed ECG signal is obtained.

7. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 5, characterized in that: Determining the positions of the S wave and the T wave in the first channel based on the preprocessed ECG signal, and extracting the ST segment ECG signal of the first channel, including: For the preprocessed ECG signal, perform the following steps for each R wave in order from right to left, traverse all R waves, determine the positions of S waves and T waves, and extract the ST segment ECG signal: From the R wave peak to the left, the second maximum slope point is the center of the P wave, and the third maximum slope point is the center of the T wave. From the center point of the T wave, traverse to the left and find the first maximum slope point, which is the center point of the S wave; The starting point of the T wave is found according to the center point of the T wave, and the signal from the center point of the S wave to the starting point of the T wave is extracted as the ST segment ECG signal of the first channel.

8. The training method for the ST segment classification model based on multi-channel EEG signals according to claim 5, characterized in that: The confidence of the R wave segment in the ECG signal of the first channel is calculated in the following way: Performing differential conversion on the ECG signal of the first channel to obtain an ECG differential signal; constructing a standard R wave differential waveform corresponding to each type of R wave based on the ECG differential signal; The confidence of each R wave segment of the first channel is calculated based on the standard R wave differential waveform corresponding to each type of R wave.

9. The training method for the ST segment classification model based on multi-channel EEG signals according to claim 8, characterized in that: The confidence of each R wave segment of the first channel is calculated based on the standard R wave differential waveform corresponding to each type of R wave, including: Perform integral reduction on each type of standard R wave differential waveform to obtain a standard R wave reduction waveform; For each type of standard R wave, extract each R wave segment corresponding to the type in the ECG differential signal, perform integral restoration, and use the restored R wave segment as the target R wave; Calculate the ratio of each type of standard R wave restoration waveform to the corresponding signal point in each target R wave of the corresponding type to construct a similarity ratio set; Calculate the similarity confidence interval of each type based on the set of all similarity ratios corresponding to each type; The confidence of each target R wave corresponding to the type in the first channel is calculated according to the similarity confidence interval of the type.

10. The training method of the ST segment classification model based on multi-channel EEG signals according to claim 8, characterized in that: Based on the ECG differential signal, a standard R wave differential waveform corresponding to each type of R wave is constructed, including: For each type of R wave, the central differential waveform of the standard R wave corresponding to the type of R wave is obtained according to the differential mean value of the type of R wave in the ECG differential signal; A bidirectional sliding window is used to synchronously slide all such R wave segments, and the boundary differential waveform of the standard R wave corresponding to this type of R wave is obtained according to the differential mean value of the R wave in each sliding window; The standard vertebral R wave differential waveform corresponding to this type of R wave is obtained according to the central differential waveform and the boundary differential waveform of the standard R wave corresponding to this type of R wave.