Electrode shedding detection method and device based on feature engineering
By obtaining and processing the voltage values in the electrode shedding and unshed states, multiple judgment conditions for judging electrode shedding are extracted, which solves the subjectivity and limitations of manual extraction characteristics in the prior art, and improves the accuracy and efficiency of electrode shedding detection.
Patent Information
- Application Number
- CN202411591314.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
AI Technical Summary
The existing electrode shed detection methods rely on manual extraction of features, which have subjectivity and limitations, making it difficult to adapt to the differences between different data sets, resulting in inaccurate detection.
By obtaining the positive sample subset and the negative sample subset, that is, the voltage values in the electrode shed and unshed states, the characteristic processing is performed to obtain multiple judgment conditions for judging the electrode shed, reducing manual intervention and improving the degree of automation of detection.
It improves the accuracy and efficiency of electrode shedding detection, reduces misdiagnosis and misdiagnosis, enhances the generalization ability of detection methods, and adapts to electrode shedding in different populations and environments.
Smart Images

Figure CN119537902A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of bioelectrical impedance imaging, and in particular to a method and device for detecting electrode detachment based on feature engineering. Background Art
[0002] At present, electrode detachment detection technology usually involves manually extracting the characteristics of the electrical signal when the electrode is detached and classifying it through a model. This method includes manually extracting statistical results from the electrical signal, such as the root mean square (RMS) value, or extracting feature vectors from the frequency domain of the electrical signal, and then using a data-driven model for classification or detection. This method has low computational complexity, fast calculation speed, and is easy to understand and operate.
[0003] However, manually extracted features are subjective and limited, and are difficult to adapt to the differences between different data sets. This is because feature extraction relies on human judgment and there are differences between different data sets, making it difficult to further improve recognition accuracy. Summary of the invention
[0004] One purpose of an embodiment of the present invention is to provide an electrode detachment detection method and device based on feature engineering, so as to solve the technical problem that inaccurate features are manually extracted during electrode detachment detection, resulting in inaccurate electrode detachment detection.
[0005] In a first aspect, an embodiment of the present invention provides an electrode detachment detection method based on feature engineering, the method comprising:
[0006] Acquire a target data set for electrode detachment detection, wherein the target data set includes a positive sample subset in a first state and a negative sample subset in a second state, wherein the positive sample subset and the negative sample subset are obtained by voltage values between multiple pairs of two adjacent electrodes;
[0007] Performing feature processing according to the target data set to obtain a plurality of judgment conditions for judging electrode detachment;
[0008] Obtaining the test data of the person to be tested;
[0009] The detection data is judged according to the multiple judgment conditions to obtain a target detection value of the person to be detected, and the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain the detection result of the person to be detected.
[0010] In a second aspect, an embodiment of the present invention provides an electrode detachment detection device based on feature engineering, the device comprising:
[0011] An acquisition unit, used for acquiring a target data set for electrode detachment detection, wherein the target data set includes a positive sample subset in a first state and a negative sample subset in a second state, wherein the positive sample subset and the negative sample subset are obtained by voltage values between multiple pairs of two adjacent electrodes;
[0012] A processing unit, used for performing feature processing according to the target data set to obtain a plurality of judgment conditions for judging electrode detachment;
[0013] The acquisition unit is also used to acquire the detection data of the person to be detected;
[0014] A judgment unit is used to judge the detection data according to the multiple judgment conditions to obtain a target detection value of the person to be detected, and the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain the detection result of the person to be detected.
[0015] In a third aspect, an embodiment of the present invention provides a computer device, including:
[0016] at least one processor; and,
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.
[0019] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method as described in the first aspect.
[0020] In the scheme implemented by the above-mentioned electrode detachment detection method, device, equipment and storage medium based on feature engineering, this method can more accurately capture the characteristic changes when the electrode detaches by acquiring a positive sample subset and a negative sample subset, that is, the voltage values in the electrode detachment state and the non-detachment state, thereby improving the accuracy of electrode detachment detection; further extracting multiple judgment conditions for judging electrode detachment from the target data set, reducing the subjectivity and limitations of manual feature extraction, and improving the degree of automation of the detection process; since the target data set includes samples in various states, this method can better adapt to the electrode detachment situations of different populations and different measurement environments, and improves the generalization ability of the detection method; therefore, by applying multiple pre-set judgment conditions to the detection data of the person to be detected, this method can quickly obtain the target detection value, thereby improving the efficiency and accuracy of electrode detachment detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0022] Figure 1 It is a flow chart of an electrode detachment detection method based on feature engineering in one embodiment of the present invention;
[0023] Figure 2 It is a structural schematic diagram of an electrode detachment detection device based on feature engineering in one embodiment of the present invention;
[0024] Figure 3 It is a schematic diagram of the structure of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0026] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, all within the scope of protection of the present invention. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present invention do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0027] The technical solution of the present application can be applied to various electrode detachment detection scenarios.
[0028] In view of this, the present application proposes an electrode detachment detection method based on feature engineering to solve the above problems, which is described in detail below.
[0029] See also Figure 2 , Figure 2 A schematic flow chart of an electrode detachment detection method based on feature engineering provided in an embodiment of the present invention, the method comprising the following steps:
[0030] S10. Obtain a target data set for electrode detachment detection, wherein the target data set includes a positive sample subset in a first state and a negative sample subset in a second state, wherein the positive sample subset and the negative sample subset are obtained by voltage values between multiple pairs of two adjacent electrodes.
[0031] The positive sample subset refers to those samples where the electrode has fallen off. The samples are obtained by measuring the voltage values between multiple pairs of adjacent electrodes when the electrode has fallen off. The positive sample data should cover different types of electrode falling off, such as partial falling off, complete falling off, etc., as well as different falling off locations, to ensure that the model can learn multiple characteristics of electrode falling off.
[0032] Among them, the negative sample subset refers to the samples when the electrodes are working normally. When the electrodes are connected normally and not detached, the voltage values between multiple pairs of adjacent electrodes are measured to obtain the samples. The negative sample data should contain normal voltage values at different time points, different individuals, and different measurement conditions to ensure that the model can identify the normal working conditions of the electrodes.
[0033] Among them, all positive sample data and negative sample data are merged to form a target data set. The target data set will be used to train the machine learning model so that it can distinguish the normal working state and the detached state of the electrode, or to extract features based on the target data set to obtain the true value corresponding to the predicted value output by the machine learning model.
[0034] It can be seen that in this embodiment, the voltage data between electrodes can be analyzed to obtain a target data set, which contains a large number of samples and includes a variety of situations, thereby enriching the content and dimension of the data set.
[0035] In one embodiment, the method of obtaining a target data set for electrode detachment detection includes: obtaining a control signal for controlling a multi-way analog switch, wherein the control signal connects the output current of the first end of a voltage-controlled current source to a corresponding electrode pair to achieve excitation of adjacent electrode pairs; according to the control signal, injecting an excitation current into two adjacent electrodes in turn to obtain a voltage between the two adjacent electrodes; and sequentially collecting voltages of multiple people to be collected to obtain a target data set.
[0036] The control signal is used to select which electrode pair will be excited.
[0037] Furthermore, according to the control signal, an excitation current is injected into two adjacent electrodes in sequence to establish a sensitive field, and after the excitation current is injected, the voltage between the two adjacent electrodes is measured.
[0038] Specifically, the adjacent injection method is used to construct a sensitive field by alternately selecting adjacent electrode pairs for excitation and measuring the voltage on the non-excitation electrode pairs. Taking a 16-electrode cylindrical conductor as an example, the specific steps are as follows: select electrode 1 and electrode 2 as excitation electrodes, measure the voltage between electrode 3 and electrode 4, electrode 4 and electrode 5, ..., until electrode 15 and electrode 16, and obtain 13 measurement values; select electrode 2 and electrode 3 as excitation electrodes, repeat the above measurement process, and obtain another 13 measurement values; continue this process, select electrode 3 and electrode 4, electrode 4 and electrode 5, ..., until electrode 16 and electrode 1 as excitation electrodes, and measure the voltage of other adjacent electrode pairs each time; finally, 13 (measurement value / each excitation) x 16 (number of electrode pair rotations) = 208 measurement values will be obtained.
[0039] Furthermore, the above-mentioned measurement values constitute a target data set for electrode detachment detection, which includes a positive sample subset (data in the electrode detachment state) and a negative sample subset (data in the electrode normal working state).
[0040] Optionally, the data in the target data set may be randomly combined, that is, the data in the data set are not in a one-to-one correspondence.
[0041] It can be seen that in this embodiment, through the above voltage acquisition process, it can be ensured that the voltage response of each electrode pair under different stimulation conditions is recorded, thereby providing comprehensive data support for electrode detachment detection.
[0042] S20, performing feature processing according to the target data set to obtain a plurality of judgment conditions for judging electrode detachment.
[0043] Feature processing refers to extracting attributes or indicators that have a significant impact on the electrode detachment state from the original data (target data set). These features can be statistical features, frequency domain features, time domain features, or any other quantity that can characterize the electrode state. The purpose of feature processing is to convert the original voltage data into a form that is easier to analyze and model, thereby improving the efficiency and accuracy of electrode detachment detection.
[0044] Specifically, the process of feature processing can be described as follows: a. Data preprocessing, cleaning the original voltage data, such as removing outliers, noise, etc., standardizing or normalizing the data to eliminate the dimensional influence of the measured values between different electrode pairs; b. Feature extraction, calculating the statistical characteristics of each voltage sample, such as mean, standard deviation, root mean square (RMS), peak-to-peak value, etc., performing frequency domain analysis, extracting spectral features, such as power spectrum density, main frequency components, etc., and may also include time domain analysis, such as autocorrelation function, waveform shape analysis, etc.; c. Feature selection, from the many extracted features, select the most discriminative features for the electrode shedding state, and methods such as correlation analysis, principal component analysis (PCA), and feature importance evaluation can be used to select features; d. Feature dimensionality reduction, if the feature dimension is too high, it may be necessary to use dimensionality reduction techniques (such as linear discriminant analysis, t-SNE, etc.) to reduce the number of features while retaining the most useful information. The above processing process only describes a few of the cases and is not a unique limitation.
[0045] Furthermore, the above-processed features are used to determine the judgment conditions, and multiple judgment conditions for judging electrode detachment are obtained. The judgment conditions can be threshold judgments or complex classification models (such as decision trees, support vector machines, neural networks, etc.). The judgment conditions are used to distinguish between the states of normal electrode contact and electrode detachment. For example, when the judgment condition is a threshold, if the voltage feature of a certain electrode pair exceeds this threshold, it is judged that the electrode is detached.
[0046] It can be seen that in this embodiment, by processing the features of the target data set, the reliability and accuracy of the judgment conditions are ensured, thereby improving the accuracy of electrode detachment detection.
[0047] S30, obtaining the test data of the person to be tested;
[0048] The detection data refers to the voltage data collected from people undergoing electrical impedance imaging or other electrophysiological tests during the electrode detachment detection process. The detection data will be used for analysis to determine whether the electrode is in normal working condition or has fallen off.
[0049] Among them, before obtaining the test data of the person to be tested, ensure that the electrodes of the person to be tested are correctly placed and fixed in the appropriate position to reduce motion artifacts and measurement errors, check the contact quality between the electrode and the skin, ensure that there is good electrical contact between the electrode and the skin, prepare data acquisition equipment, such as multi-channel analog switches, voltage-controlled current sources, voltage measurement equipment, etc., to ensure that all equipment is working properly.
[0050] Furthermore, during the acquisition process, a control signal is used to activate a multi-way analog switch to output the current of the voltage-controlled current source to the selected electrode pair to apply an excitation current. The excitation current will flow between the selected electrode pair to establish an electric field. While the excitation current is being applied, the voltage difference between other adjacent electrode pairs is measured, which usually involves selecting different electrode pairs as excitation electrodes in turn and measuring the voltages of all possible adjacent electrode pairs. The measured voltage values are recorded, and these values will constitute the detection data of the person to be detected. The detection data should include a timestamp so that time changes can be taken into account in subsequent analysis.
[0051] It can be seen that the detection data of the person to be detected collected in real time in this embodiment further ensures the accuracy and reliability of technologies such as electrical impedance imaging.
[0052] S40. Judging the detection data according to the multiple judgment conditions to obtain a target detection value of the person to be detected, wherein the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain a detection result of the person to be detected.
[0053] Among them, in the process of judging the detection data according to the multiple judgment conditions, the collected data is first cleaned, such as removing noise, correcting deviation, etc., and then key features are extracted from the preprocessed data. These features are related to the electrode detachment status. Finally, the extracted features are compared with the judgment conditions to evaluate the status of the electrode.
[0054] Among them, the target detection value is the result obtained by applying the judgment condition to the detection data. The target detection value may be a direct classification result (such as electrode detachment or non-detachment), or a probability value or score, indicating the possibility of electrode detachment, or TRUE / FALSE, where TRUE indicates the positive class (electrode detachment) and FALSE indicates the negative class (normal operation). There is no unique limitation here.
[0055] Specifically, in the process where the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain the detection result of the person to be detected, the comparison can be performed through the following confusion matrix table:
[0056]
[0057] As shown in the above table, the true value represents the target detection value, which includes TRUE / FALSE; the predicted value is the predicted value of the person to be detected obtained by the model in the electrode detachment detection, which includes TRUE / FALSE.
[0058] Specifically, in the table, the true positives (TP) are those whose true values are positive (electrode detachment) and the model prediction is also positive, indicating that the model correctly identifies the samples with electrode detachment; the false positives (FP) are those whose true values are negative (normal operation) but the model prediction is positive, indicating that the model mistakenly identifies the samples with normal operation as those with electrode detachment; the true negatives (TN) are those whose true values are negative (normal operation) and the model prediction is negative, indicating that the model correctly identifies the samples with normal operation; the false negatives (FN) are those whose true values are positive (electrode detachment) but the model prediction is negative, indicating that the model mistakenly identifies the samples with electrode detachment as those with normal operation.
[0059] Therefore, the target detection value is compared with the predicted value to verify the accuracy of the detection result. If the target detection value is consistent with the predicted value, it indicates that the electrode detachment detection model correctly identifies the state of the electrode. If not, further verification or adjustment of the model may be required.
[0060] It can be seen that this embodiment can significantly improve the accuracy of electrode detachment detection and reduce misdiagnosis and missed diagnosis through precise judgment conditions and feature comparison, and by continuously comparing target detection values and predicted values, it can optimize the judgment conditions, improve the efficiency of data analysis and processing, and further improve data quality.
[0061] By acquiring a subset of positive samples and a subset of negative samples, namely, the voltage values in the electrode-detached and non-detached states, the method can more accurately capture the characteristic changes when the electrode detaches, thereby improving the accuracy of electrode detachment detection; further, multiple judgment conditions for judging electrode detachment are extracted from the target data set, thereby reducing the subjectivity and limitations of manual feature extraction and improving the degree of automation of the detection process; since the target data set includes samples in a variety of states, the method can better adapt to the electrode detachment situations of different populations and different measurement environments, thereby improving the generalization ability of the detection method; therefore, by applying a plurality of pre-set judgment conditions to the detection data of the person to be detected, the method can quickly obtain the target detection value, thereby improving the efficiency and accuracy of electrode detachment detection.
[0062] In one embodiment, the multiple judgment conditions include a first judgment condition, and the feature processing is performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, including: obtaining a negative sample subset in the target data set, the negative sample subset contains multiple negative samples and data points corresponding to each negative sample; calculating the data points corresponding to each negative sample to obtain the root mean square value corresponding to each negative sample; sorting the root mean square value corresponding to each negative sample according to a preset arrangement order to obtain a root mean square value sequence corresponding to the negative sample subset; performing quartile calculation on the root mean square value sequence corresponding to the negative sample subset to obtain a first value and a second value; obtaining a first judgment condition according to the first value and the second value, the first judgment condition including determining the person to be detected as a negative sample when the first root mean square value is greater than the first value and less than the second value, or determining the person to be detected as a positive sample when the first root mean square value is less than or equal to the first value, or determining the person to be detected as a positive sample when the first root mean square value is greater than or equal to the second value.
[0063] Among them, the root mean square value is a commonly used indicator to measure signal energy and can reflect the stability of the voltage signal.
[0064] Among them, the above-mentioned preset arrangement order can be to arrange the root mean square values in order from small to large, and there is no unique limitation here.
[0065] The first value refers to the second quartile, and the second value refers to the third quartile.
[0066] In the process of calculating the data points corresponding to each negative sample to obtain the root mean square value corresponding to each negative sample, the calculation can be performed using the following formula:
[0067]
[0068] Among them, Xi represents the i-th data point of each negative sample, and N represents the total number of data points in each negative sample.
[0069] Furthermore, in the process of performing quartile calculation on the root mean square value sequence corresponding to the negative sample subset to obtain the first value and the second value, the RMS values of all negative samples are arranged in ascending order to calculate the quartiles (Q1, Q2, Q3), wherein the first quartile (Q1), also known as the smaller quartile, is equal to the 25th% number of all the values in the sample arranged from small to large; the second quartile (Q2), also known as the median, is equal to the 50th% number of all the values in the sample arranged from small to large; the third quartile (Q3), also known as the larger quartile, is equal to the 75th% number of all the values in the sample arranged from small to large.
[0070] Specifically, the calculation of quartiles can be performed using the following formula:
[0071]
[0072] where n is the total number of negative samples, and p is the percentage value (e.g., 25%, 50%, 75%); the quartiles are determined according to the value of L p Case 1: If L p is an integer, then take the average of the L p th and the (L p +1)th; Case 2: If L p is not an integer, then take the next nearest integer (e.g., if L p = 1.2, then take 2).
[0073] Furthermore, according to the calculated first value (Q2) and the second value (Q3), a first judgment condition is obtained, that is: if Q2 < X < Q3, then it is judged as normal (negative sample); if X <= Q2 or X >= Q3, then it is judged as dropped (positive sample), where X is the root mean square value calculated from the test data of the person to be tested.
[0074] It should be noted that in the calculation of quartiles, the second quartile (Q2) and the third quartile (Q3) are usually used as judgment criteria because these two values can more effectively reflect the central tendency and upper limit of the data. However, the first quartile (Q1) can also be part of the judgment criteria, specifically depending on the data distribution and application scenarios, and there is no unique limitation here.
[0075] For example, assume there are 5 negative samples, and the data points of each negative sample are: A[1, 2, 3], B[2, 3, 4], C[3, 4, 5], D[4, 5, 6], E[5, 6, 7]. The calculated root mean square values of A, B, C, D, and E are 2.16, 3.11, 4.08, 5.07, and 6.06 respectively; arrange the calculated RMS values in ascending order: 2.16, 3.11, 4.08, 5.07, 6.06. Calculate the quartiles. According to the above formula, Q1 is 3.11, Q2 is 4.08, and Q3 is 5.07; since we can obtain the first judgment criterion as 4.08 < X < 5.07, it is judged as normal (negative sample); if X <= 4.08 or X >= 5.07, then it is judged as dropped (positive sample). At this time, there is a person to be tested A with a root mean square value of X = 4.5. Comparing it with the first judgment criterion, it is found that the root mean square value of the person to be tested A falls within 4.08 < X < 5.07, and then it is judged that the test data of the person to be tested A is normal (negative sample).
[0076] It can be seen that the first judgment condition in this embodiment provides a statistically based threshold judgment method for electrode detachment detection, which can effectively distinguish the normal working state and detachment state of the electrode, further consider the distribution characteristics of the data, and improve the robustness and accuracy of the detection.
[0077] In one embodiment, the multiple judgment conditions include a second judgment condition, and the feature processing is performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, including: obtaining a preset first autocorrelation coefficient, a preset second autocorrelation coefficient, and a preset third autocorrelation coefficient; determining the second judgment condition according to the preset first autocorrelation coefficient, the preset second autocorrelation coefficient, and the preset third autocorrelation coefficient, and the second judgment condition includes when the first autocorrelation coefficient of the person to be tested is greater than the preset first autocorrelation coefficient and less than the preset second autocorrelation coefficient, determining it as a negative sample, or, when the first autocorrelation coefficient is less than or equal to the preset first autocorrelation coefficient and greater than the preset third autocorrelation coefficient, determining it as a positive sample.
[0078] Among them, the autocorrelation coefficient reflects the relationship between a data point and its previous time point and is used to detect the periodicity or trend of the data.
[0079] Among them, the above-mentioned preset first autocorrelation coefficient, preset second autocorrelation coefficient and preset third autocorrelation coefficient can be obtained according to empirical values or set manually, and are not limited here. The value of the autocorrelation coefficient is usually between -1 and 1, where 1 represents a complete positive correlation, -1 represents a complete negative correlation, and 0 represents no linear correlation, so we can assume that the preset first autocorrelation coefficient is set to 0.8, the preset second autocorrelation coefficient is 1, and the preset third autocorrelation coefficient is -1.
[0080] Therefore, the second judgment condition is as follows:
[0081]
[0082] Wherein, X is the autocorrelation coefficient of the person A to be detected.
[0083] It can be seen that the second judgment condition in this embodiment provides a method based on time series analysis for electrode detachment detection, which can help identify abnormal changes in electrode signals, thereby improving the accuracy of detection.
[0084] In one embodiment, the multiple judgment conditions include a third judgment condition, and the feature processing is performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, including: performing Fourier processing on the positive sample subset and the negative sample subset in the target data set respectively to obtain the first frequency component and the corresponding first amplitude of the positive sample subset, and the second frequency component and the corresponding second amplitude of the negative sample subset; obtaining the first difference frequency according to the first frequency component and the second frequency component; determining the first amplitude corresponding to the first difference frequency as the amplitude threshold according to the first amplitude corresponding to the first difference frequency; determining the third judgment condition according to the amplitude threshold, the third judgment condition includes determining it as a positive sample when the third amplitude corresponding to the third frequency component of the person to be detected is greater than the amplitude threshold, or determining it as a negative sample when the third amplitude corresponding to the third frequency component of the person to be detected is less than the amplitude threshold, and the third frequency component is obtained from the positive sample data of the person to be detected.
[0085] Among them, Fourier processing is a signal processing technology used to convert time domain signals into frequency domain signals. In this process, the signal is decomposed into different frequency components, each of which has its corresponding amplitude and phase. For the positive sample subset, the first frequency component of each sample and its corresponding first amplitude are obtained by Fourier transform. For the negative sample subset, the second frequency component of each sample and its corresponding second amplitude are also obtained by Fourier transform.
[0086] The first difference frequency refers to the frequency where the main difference between the positive sample and the negative sample in the frequency domain is located. This is usually determined by comparing the frequency components of the positive sample and the negative sample.
[0087] Specifically, an amplitude threshold may be set according to the first amplitude corresponding to the first difference frequency, and the threshold is used to distinguish the amplitude difference between the positive sample and the negative sample at a specific frequency component.
[0088] Therefore, the third judgment condition is determined based on the amplitude threshold. Specifically, it includes the following steps:
[0089] When the third amplitude corresponding to the third frequency component of the person to be detected is greater than the amplitude threshold, it is determined as a positive sample, which indicates that the electrode may be detached; when the third amplitude corresponding to the third frequency component of the person to be detected is less than the amplitude threshold, it is determined as a negative sample, which indicates that the electrode is working normally.
[0090] For example, if the positive sample contains frequency components of 20 kHz and 1 MHz, and the negative sample contains only the frequency component of 20 kHz, and the amplitude of 1 MHz is very small (close to the white noise level), then 1 MHz can be used as the first difference frequency.
[0091] It can be seen that in this embodiment, through Fourier processing, the characteristics related to electrode detachment can be more clearly identified in the frequency domain, thereby improving the detection accuracy; further using the difference frequency component as the judgment basis can more accurately identify the electrode detachment state, reduce misjudgment, and thus be able to adapt to electrode detachment detection under different electrode characteristics and different human body conditions.
[0092] In one embodiment, judging the detection data according to the multiple judgment conditions to obtain the target detection value of the person to be detected includes: performing the feature processing on the detection data to obtain a second root mean square value, a second autocorrelation coefficient and a fourth amplitude corresponding to a fourth frequency component; judging the second root mean square value according to a first judgment condition among the multiple judgment conditions to obtain a first detection value; judging the second autocorrelation coefficient according to a second judgment condition among the multiple judgment conditions to obtain a second detection value; judging the fourth amplitude corresponding to the fourth frequency component according to a third judgment condition among the multiple judgment conditions to obtain a third detection value; and weighting the first detection value, the second detection value and the third detection value to obtain the target detection value of the person to be detected.
[0093] The second root mean square value is used to evaluate the strength of the voltage signal. The calculation of the second root mean square value is as described above and will not be repeated here.
[0094] Among them, the second autocorrelation coefficient is used to measure the similarity of the signal under different time lags. The calculation of the second autocorrelation coefficient is as described in the previous section and will not be repeated here.
[0095] The fourth frequency component and its corresponding fourth amplitude are used to analyze the characteristics of the signal at a specific frequency. The fourth frequency component is as described above and will not be repeated here.
[0096] Among them, weight processing can be a simple weighted average or a more complex algorithm, such as a machine learning model, to ensure that the impact of each feature on the final test result is appropriate. The weight can be determined based on historical data, expert knowledge, or obtained through an optimization algorithm. Through weight processing, the three test values are combined to obtain a final target test value. This value will serve as the final basis for judging whether the electrode has fallen off.
[0097] It can be seen that in this embodiment, by combining multiple features and judgment conditions, the accuracy and reliability of electrode detachment detection are improved, and further weight processing enables the influence of different features on the detection results to be reasonably distributed, thereby enhancing the flexibility and accuracy of the decision-making process.
[0098] In one embodiment, the feature processing of the detection data to obtain a second autocorrelation coefficient includes: acquiring a sampling frequency and a signal frequency corresponding to the detection data; obtaining a target lag order corresponding to the detection data based on the sampling frequency and the signal frequency corresponding to the detection data; and performing autocorrelation calculation on the detection data and the target lag order to obtain a second autocorrelation coefficient of the person to be detected.
[0099] The sampling frequency refers to the number of times data is collected per second, usually in Hertz (Hz). It is an important parameter of the data acquisition system, ensuring that the signal is fully captured without losing information. The signal frequency refers to the frequency of repeated periodic changes in the signal, also in Hertz (Hz).
[0100] The target lag order refers to the time lag between data points when performing autocorrelation calculations.
[0101] Specifically, in obtaining the target lag order corresponding to the detection data according to the sampling frequency corresponding to the detection data and the signal frequency, the following formula may be used:
[0102]
[0103] Where k is the target lag order, F c is the sampling frequency, and F is the signal frequency.
[0104] In the process of performing autocorrelation calculation on the detection data and the target lag order to obtain the second autocorrelation coefficient of the person to be detected, the specific steps are as follows:
[0105] The first step is to calculate the mean:
[0106]
[0107] in, is the mean, Xi represents the i-th data point of each negative sample, and n represents the total number of negative samples.
[0108] The second step is to calculate the covariance:
[0109]
[0110] Where Cov(k) represents the covariance.
[0111] The third step is to calculate the variance:
[0112]
[0113] Among them, Var is the variance.
[0114] The fourth step is to calculate the autocorrelation coefficient:
[0115]
[0116] Among them, ρ k is the second autocorrelation coefficient of the person to be detected.
[0117] It can be seen that in this embodiment, by accurately obtaining the sampling frequency and the signal frequency, it is ensured that the time characteristics of the signal can be correctly reflected when analyzing the electrode signal, thereby improving the accuracy of electrode detachment detection; further, by calculating the target lag order, the autocorrelation calculation can be performed on the specific periodic characteristics of the signal, which helps to more accurately identify the periodic patterns in the signal, thereby improving the sensitivity and specificity of the detection; the introduction of the second autocorrelation coefficient provides an additional judgment basis for electrode detachment detection, which can reveal the correlation of the signal under a specific time lag, and help to distinguish the signal changes before and after the electrode falls off. Therefore, combining the information of the sampling frequency and the signal frequency can make the detection method more robust, able to adapt to the changes in the electrode signal under different conditions and environments, and reduce false detections and missed detections.
[0118] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.
[0119] As another aspect of the embodiment of the present application, the embodiment of the present application provides an electrode detachment detection device based on feature engineering. The electrode detachment detection device based on feature engineering can be a software module, which includes several instructions stored in a memory, and the processor can access the memory and call the instructions for execution to complete the electrode detachment detection method based on feature engineering described in the above-mentioned various embodiments.
[0120] See also Figure 2 , Figure 2 Schematic diagram of the structure of an electrode detachment detection device based on feature engineering provided in an embodiment of the present application. Figure 2 As shown, the electrode detachment detection device 200 based on feature engineering includes:
[0121] An acquisition unit 201 is used to acquire a target data set for electrode detachment detection, wherein the target data set includes a positive sample subset in a first state and a negative sample subset in a second state, wherein the positive sample subset and the negative sample subset are obtained by voltage values between multiple pairs of two adjacent electrodes;
[0122] A processing unit 202 is used to perform feature processing according to the target data set to obtain multiple judgment conditions for judging electrode detachment;
[0123] The acquisition unit 201 is also used to acquire the detection data of the person to be detected;
[0124] The judgment unit 203 is used to judge the detection data according to the multiple judgment conditions to obtain the target detection value of the person to be detected, and the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain the detection result of the person to be detected.
[0125] By acquiring a subset of positive samples and a subset of negative samples, namely, the voltage values in the electrode-detached and non-detached states, the method can more accurately capture the characteristic changes when the electrode detaches, thereby improving the accuracy of electrode detachment detection; further, multiple judgment conditions for judging electrode detachment are extracted from the target data set, thereby reducing the subjectivity and limitations of manual feature extraction and improving the degree of automation of the detection process; since the target data set includes samples in a variety of states, the method can better adapt to the electrode detachment situations of different populations and different measurement environments, thereby improving the generalization ability of the detection method; therefore, by applying a plurality of pre-set judgment conditions to the detection data of the person to be detected, the method can quickly obtain the target detection value, thereby improving the efficiency and accuracy of electrode detachment detection.
[0126] In one embodiment, in the process of performing feature processing on the target data set to obtain multiple judgment conditions for judging electrode detachment, the processing unit 202 is further used to: obtain a negative sample subset in the target data set, wherein the negative sample subset includes multiple negative samples and data points corresponding to each negative sample; calculate the data points corresponding to each negative sample to obtain a root mean square value corresponding to each negative sample; sort the root mean square values corresponding to each negative sample according to a preset arrangement order to obtain a root mean square value sequence corresponding to the negative sample subset; perform quartile calculation on the root mean square value sequence corresponding to the negative sample subset to obtain a first value and a second value; obtain a first judgment condition based on the first value and the second value, wherein the first judgment condition includes determining the person to be detected as a negative sample when the first root mean square value is greater than the first value and less than the second value, or determining the person to be detected as a positive sample when the first root mean square value is less than or equal to the first value, or determining the person to be detected as a positive sample when the first root mean square value is greater than or equal to the second value.
[0127] In one embodiment, in the feature processing performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, the processing unit 202 is also used to: obtain a preset first autocorrelation coefficient, a preset second autocorrelation coefficient and a preset third autocorrelation coefficient; determine a second judgment condition according to the preset first autocorrelation coefficient, the preset second autocorrelation coefficient and the preset third autocorrelation coefficient, the second judgment condition including when the first autocorrelation coefficient of the person to be tested is greater than the preset first autocorrelation coefficient and less than the preset second autocorrelation coefficient, determining it as a negative sample, or, when the first autocorrelation coefficient is less than or equal to the preset first autocorrelation coefficient and greater than the preset third autocorrelation coefficient, determining it as a positive sample.
[0128] In one embodiment, in the process of performing feature processing on the target data set to obtain multiple judgment conditions for judging electrode detachment, the processing unit 202 is further used to: perform Fourier processing on the positive sample subset and the negative sample subset in the target data set respectively to obtain a first frequency component and a corresponding first amplitude of the positive sample subset, and a second frequency component and a corresponding second amplitude of the negative sample subset; obtain a first difference frequency according to the first frequency component and the second frequency component; determine the first amplitude corresponding to the first difference frequency as an amplitude threshold according to the first amplitude corresponding to the first difference frequency; determine the third judgment condition according to the amplitude threshold, the third judgment condition including determining the person to be detected as a positive sample when the third amplitude corresponding to the third frequency component is greater than the amplitude threshold, or determining the person to be detected as a negative sample when the third amplitude corresponding to the third frequency component is less than the amplitude threshold, and the third frequency component is obtained from the positive sample data of the person to be detected.
[0129] In one embodiment, in the process of judging the detection data according to the multiple judgment conditions to obtain the target detection value of the person to be detected, the judgment unit 203 is further used to: perform the feature processing on the detection data to obtain a second root mean square value, a second autocorrelation coefficient and a fourth amplitude corresponding to a fourth frequency component; judge the second root mean square value according to a first judgment condition among the multiple judgment conditions to obtain a first detection value; judge the second autocorrelation coefficient according to a second judgment condition among the multiple judgment conditions to obtain a second detection value; judge the fourth amplitude corresponding to the fourth frequency component according to a third judgment condition among the multiple judgment conditions to obtain a third detection value; and perform weight processing on the first detection value, the second detection value and the third detection value to obtain the target detection value of the person to be detected.
[0130] In one embodiment, in the process of performing the feature processing on the detection data to obtain the second autocorrelation coefficient, the judgment unit 203 is further used to: obtain a sampling frequency and a signal frequency corresponding to the detection data; obtain a target lag order corresponding to the detection data based on the sampling frequency and the signal frequency corresponding to the detection data; and perform autocorrelation calculation on the detection data and the target lag order to obtain a second autocorrelation coefficient of the person to be detected.
[0131] In one embodiment, in the acquisition of the target data set for electrode detachment detection, the acquisition unit 201 is used to: acquire a control signal for controlling a multi-way analog switch, the control signal connects the output current of the first end of the voltage-controlled current source to the corresponding electrode pair to achieve excitation of the adjacent electrode pair; according to the control signal, inject an excitation current into two adjacent electrodes in turn to obtain a voltage between the two adjacent electrodes; and sequentially collect voltages from multiple people to be collected to obtain a target data set.
[0132] It should be noted that the above-mentioned electrode detachment detection device based on feature engineering can execute the electrode detachment detection method based on feature engineering provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the electrode detachment detection device based on feature engineering, please refer to the electrode detachment detection method based on feature engineering provided in the embodiment of the present application.
[0133] See also Figure 3 , Figure 3 3 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device includes one or more processors 31 and a memory 32. The memory 32 is connected to the one or more processors 31, for example, connected to the processor 31 via a bus.
[0134] The processor 31 is configured to support the computer device to perform the corresponding functions in the method in the above method embodiment. The processor 31 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0135] The memory 32 is used to store program codes, etc. The memory 32 may include a volatile memory (VM), such as a random access memory (RAM); the memory 32 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 32 may also include a combination of the above-mentioned types of memories.
[0136] The memory 32 can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the electrode detachment detection method based on feature engineering in the embodiment of the present application. The processor 31 executes various functional applications and data processing of the electrode detachment detection method based on feature engineering and the electrode detachment detection device based on feature engineering by running the non-volatile software programs, instructions and modules stored in the memory 32, that is, realizes the functions of each module or unit of the electrode detachment detection method based on feature engineering and the electrode detachment detection device based on feature engineering provided in the above method embodiment.
[0137] The memory 32 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function. The data storage area may store data created based on the use of the electrode detachment detection device based on feature engineering, etc. In some embodiments, the memory 32 may optionally include a memory 32 remotely arranged relative to the processor 31, and these remote memories 32 may be connected to the electrode detachment detection device based on feature engineering via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0138] The one or more modules are stored in the memory 32, and when executed by the one or more processors 31, the electrode detachment detection method based on feature engineering in any of the above-mentioned method embodiments is executed, for example, the method steps described in the above-mentioned method embodiments are executed to realize the functions of the modules described in the above-mentioned device embodiments.
[0139] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.
[0140] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0141] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. An electrode detachment detection method based on feature engineering, characterized in that: include: Acquire a target data set for electrode detachment detection, wherein the target data set includes a positive sample subset in a first state and a negative sample subset in a second state, wherein the positive sample subset and the negative sample subset are obtained by voltage values between multiple pairs of two adjacent electrodes; Performing feature processing according to the target data set to obtain a plurality of judgment conditions for judging electrode detachment; Obtaining the test data of the person to be tested; The detection data is judged according to the multiple judgment conditions to obtain a target detection value of the person to be detected, and the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain the detection result of the person to be detected.
2. The method according to claim 1, characterized in that The multiple judgment conditions include a first judgment condition, and the feature processing is performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, including: Obtain a negative sample subset in the target data set, wherein the negative sample subset includes multiple negative samples and data points corresponding to each negative sample; Calculate the data points corresponding to each negative sample to obtain a root mean square value corresponding to each negative sample; Sorting the root mean square value corresponding to each negative sample according to a preset arrangement order to obtain a root mean square value sequence corresponding to the negative sample subset; Performing quartile calculation on the root mean square value sequence corresponding to the negative sample subset to obtain a first value and a second value; A first judgment condition is obtained based on the first value and the second value. The first judgment condition includes determining the person to be detected as a negative sample when the first root mean square value is greater than the first value and less than the second value, or determining the person to be detected as a positive sample when the first root mean square value is less than or equal to the first value, or determining the person to be detected as the positive sample when the first root mean square value is greater than or equal to the second value.
3. The method according to claim 1, characterized in that: The multiple judgment conditions include a second judgment condition, and the feature processing is performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, including: Obtaining a preset first autocorrelation coefficient, a preset second autocorrelation coefficient, and a preset third autocorrelation coefficient; A second judgment condition is determined based on the preset first autocorrelation coefficient, the preset second autocorrelation coefficient and the preset third autocorrelation coefficient. The second judgment condition includes determining it as a negative sample when the first autocorrelation coefficient of the person to be tested is greater than the preset first autocorrelation coefficient and less than the preset second autocorrelation coefficient, or determining it as a positive sample when the first autocorrelation coefficient is less than or equal to the preset first autocorrelation coefficient and greater than the preset third autocorrelation coefficient.
4. The method according to claim 1, characterized in that: The multiple judgment conditions include a third judgment condition, and the feature processing is performed according to the target data set to obtain multiple judgment conditions for judging electrode detachment, including: Performing Fourier processing on the positive sample subset and the negative sample subset in the target data set respectively to obtain a first frequency component and a corresponding first amplitude of the positive sample subset, and a second frequency component and a corresponding second amplitude of the negative sample subset; Obtaining a first difference frequency according to the first frequency component and the second frequency component; According to the first amplitude corresponding to the first difference frequency, determining the first amplitude corresponding to the first difference frequency as an amplitude threshold; According to the amplitude threshold, the third judgment condition is determined, and the third judgment condition includes determining it as a positive sample when the third amplitude corresponding to the third frequency component of the person to be detected is greater than the amplitude threshold, or determining it as a negative sample when the third amplitude corresponding to the third frequency component of the person to be detected is less than the amplitude threshold, and the third frequency component is obtained from the positive sample data of the person to be detected.
5. The method according to claim 1, characterized in that The step of judging the detection data according to the multiple judgment conditions to obtain the target detection value of the person to be detected includes: Performing the feature processing on the detection data to obtain a second root mean square value, a second autocorrelation coefficient, and a fourth amplitude corresponding to a fourth frequency component; Judging the second root mean square value according to a first judging condition among the multiple judging conditions to obtain a first detection value; Judging the second autocorrelation coefficient according to a second judging condition among the multiple judging conditions to obtain a second detection value; Judging the fourth amplitude corresponding to the fourth frequency component according to a third judging condition among the multiple judging conditions to obtain a third detection value; The first detection value, the second detection value and the third detection value are weighted to obtain a target detection value of the person to be detected.
6. The method according to claim 5, characterized in that The performing the feature processing on the detection data to obtain a second autocorrelation coefficient includes: Obtaining a sampling frequency and a signal frequency corresponding to the detection data; Obtaining a target lag order corresponding to the detection data according to a sampling frequency corresponding to the detection data and the signal frequency; An autocorrelation calculation is performed on the detection data and the target lag order to obtain a second autocorrelation coefficient of the person to be detected.
7. The method according to claim 1, characterized in that The step of acquiring a target data set for electrode detachment detection includes: Acquire a control signal for controlling the multi-channel analog switch, wherein the control signal connects the output current of the first end of the voltage-controlled current source to the corresponding electrode pair to realize the excitation of the adjacent electrode pair; According to the control signal, injecting excitation current into two adjacent electrodes in sequence to obtain a voltage between the two adjacent electrodes; The voltage of multiple people to be collected is collected in sequence to obtain the target data set.
8. An electrode detachment detection device based on feature engineering, the device comprising: An acquisition unit, used for acquiring a target data set for electrode detachment detection, wherein the target data set includes a positive sample subset in a first state and a negative sample subset in a second state, wherein the positive sample subset and the negative sample subset are obtained by voltage values between multiple pairs of two adjacent electrodes; A processing unit, used for performing feature processing according to the target data set to obtain a plurality of judgment conditions for judging electrode detachment; The acquisition unit is also used to acquire the detection data of the person to be detected; A judgment unit is used to judge the detection data according to the multiple judgment conditions to obtain a target detection value of the person to be detected, and the target detection value is used to compare the predicted value of the person to be detected in the electrode detachment detection to obtain the detection result of the person to be detected.
9. A computer device, comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory, and when the processor executes the one or more computer programs, the computer device implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.