Detailed Description
Referring to fig. 1, a non-contact diagnosis apparatus for intestinal diseases of the present invention includes:
a data acquisition module, which acquires radar echo signals by using a non-contact vital sign monitoring radar, as shown in fig. 2;
the preprocessing module is used for preprocessing the radar echo signal x (t), acquiring a human body vital sign signal, filtering interference, and acquiring a preprocessed signal f (t), as shown in fig. 3, wherein the acquired human body vital sign signal comprises a heartbeat signal, a respiration signal, a gastric motility signal and an intestinal motility signal, and specifically comprises:
the radar echo signal x (t) is subjected to band-pass filtering, and three band-pass filters h are introduced1(n)、h2(n) and h3(n) wherein h1(n) the frequency range is 0.025-0.12 Hz, which includes the common intestinal motility and gastric motility frequency bands; h is2(n) the frequency range is 0.2-0.4 Hz, and the frequency range is a basic breathing frequency band; h is3(n) the frequency range is 1-1.33 Hz, and the frequency range is a basic heartbeat frequency band; will pass through a band-pass filter h1(n)、h2(n) and h3(n) adding the filtered signals to obtain a preprocessed signal f (t);
the signal separation module is used for processing the preprocessed signals by adopting a signal separation algorithm to separate intestinal motility signals, gastric motility signals, respiration signals and heartbeat signals of the human body, and the signal separation module is shown in fig. 4; the method comprises the following specific steps:
step 3-1, performing fast Fourier transform on the preprocessed signal f (t) to obtain a frequency spectrum of the preprocessed signal
Omega is frequency;
step 3-2, the frequency spectrum of the preprocessed signal
Performing spectrum detection, sequencing and normalizing local maximum values in the detected spectrum in a descending manner to obtain a maximum value sequence, wherein the maximum value sequence is
Step 3-3, in maximum value sequence
In (1), setting a threshold value M
min+α(M
max-M
min) Wherein M is
minIs the minimum value in the maximum sequence, M
maxIs the maximum value in the maximum value sequence, alpha is a constant, the number which is larger than the threshold value in the maximum value sequence is reserved, and the number M of the maximum value sequences is obtained at the moment
NA selected number of modes N-M for separating respiration, heartbeat, intestinal movement and gastric movement signals
N+D,D≥4;
Step 3-4, after determining the number of modes N, carrying out frequency spectrum treatment on the preprocessed signal
Performing spectrum detection, and limiting the spectrum range to [0, pi ] according to Shannon's theorem]Dividing the frequency spectrum into N adjacent regions to generate N +1 boundary lines omega
nN is the nth, N is more than or equal to 0 and less than or equal to N, and a transition interval T is defined around each boundary line
nWidth of 2 τ
n;
Step 3-5, determining a segmentation interval ^
n=[ω
n-1,ω
n]Adding wavelet window coefficients
Obtaining a wavelet empirical scale function
Empirical wavelet
Step 3-6, determining detail coefficient
In the formula F
-1Representing an inverse fourier transform;
step 3-7, determining approximation coefficient
In the formula F
-1Representing an inverse fourier transform;
step 3-8, decomposing the preprocessed signal f (t) obtained in the step 2 into N inherent modal components through empirical wavelet transform, and expressing the modal function of each frequency scale decomposed by the preprocessed signal f (t) as
And 3-9, performing descending order arrangement on the N modal time domain functions obtained by the empirical wavelet transform algorithm according to the energy size, and selecting the first four modes with the maximum energy, namely a respiratory signal, a heartbeat signal, a gastric motility signal and an intestinal motility signal.
The characteristic extraction module is used for carrying out characteristic extraction on the separated intestinal motility signals and extracting characteristic parameters of intestinal movement, and comprises:
(1) average frequency: reflecting the speed of the intestinal motility signal;
(2) average amplitude value: reflecting the amplitude of the waveform;
(3) percentage of intestinal rhythm disorder: percentage of time of occurrence of arrhythmic signals;
(4) wave reaction area: reflecting the magnitude of the signal power;
(5) waveform main frequency: the frequency corresponding to the highest amplitude in the spectrum;
(6) coefficient of variation of dominant frequency: the ratio of the standard deviation of the average dominant frequency to the average dominant frequency is used for evaluating the stability of the dominant frequency of the intestinal motility signal;
(7) coefficient of variation of main power: the ratio of the standard deviation of the average main power to the average main power is used for evaluating the stability of the main power of the intestinal tract signal;
(8) percentage of main power: the percentage of main power to total power;
(9) intestinal motility cycle IC: the difference between the first peak point of the autocorrelation function curve of the intestinal motility signal power spectrum and the abscissa value of the origin in a certain time period;
(10) intestinal motility times IPF: adding one to the number of peak points of an autocorrelation function curve of the power spectrum of the intestinal motility signal in a certain time period,
IPFi=Npeak+1
in the formula NpeakThe number of peak points of an autocorrelation function curve of the intestinal motility signal power spectrum;
(11) intestinal motility energy difference accumulation: accumulating the difference values of the kinetic energy of all the two adjacent intestines within a certain time period;
the machine learning module inputs the extracted characteristic parameters and the corresponding labels into machine learning, and determines a mapping model between the intestinal diseases and the characteristic parameters by a machine learning method, specifically comprising the following steps:
(1) randomly dividing characteristic data of the intestinal motility signals into two mutually exclusive sets, wherein one set is a training set S, and the other set is a cross check set CV, and classifying the data;
(2) training set S { (F)1,L1),(F2,L2),…(Fi,Li) Inputting the feature matrix of {0,1,2,3, …, N } into the machine learning method, wherein Fi=(Fi1,Fi2,Fi3,…Fi11) Respectively extracting 11 intestinal motility signal characteristics from the characteristic extraction module; l isiThe method comprises the following steps of (1) obtaining a category label corresponding to an ith sample, wherein the label 0 is normal intestinal tract, the label N represents intestinal tract disease N, and N is more than or equal to 1 and less than or equal to N;
(3) randomly extracting sp1 samples from the training set, then performing feature sampling on sp1 samples, extracting the same sp2 features from each sample to obtain a sampling set, repeating for T times, and totally obtaining T sampling sets. Training a classification-based learner and a secondary learner of the intestinal diseases for each sampling set, and forming a mapping Model1 by using a voting method through the T classification-based learners and the secondary learner;
(4) and further performing parameter adjustment and optimization on the mapping Model1 between the intestinal diseases and the characteristic parameters by using a cross test set CV to obtain a mapping Model 2.
The intestinal disease classification base learner trained in the machine learning module is a multi-class classification SVM, and specifically comprises the following steps:
(1) setting samples containing z categories in each sampling set, dividing the z categories for v times, wherein v is larger than z, dividing one part of categories into positive categories and marking as (+1) by random division each time, dividing the other part of categories into negative categories and marking as (-1), and taking the positive and negative categories corresponding to each group as a training set; generating v training sets in total;
(2) training the SVM respectively by the generated v training sets to obtain v SVM learners, inputting data of each class into the v SVM learners to obtain corresponding codes to form a z x v code matrix;
(3) and predicting the test samples by utilizing v classifiers respectively, forming a code by the prediction marks, comparing the code with the respective code of each class, and returning the class with the minimum distance as a final prediction result, wherein the v SVM classifiers form a multi-class classified SVM learner.
The intestinal disease classification secondary learner trained in the machine learning module is a decision tree, and specifically comprises the following steps:
(1) traversing each feature, and calculating the Keyny value of the feature, wherein the formula is as follows:
wherein, the data set a is a sampling matrix of sp1 × sp2, Gini (a) represents the Keyni index of the data set a, r represents that r samples exist in the data set, and r representsiRepresenting the proportion of the ith type sample in the data set a;
wherein A is 11 intestinal motility signal characteristics obtained from the characteristic extraction module, GiniA(a) The expression is a Gini index divided according to the characteristic A, k represents that the data set a is divided into k parts under the characteristic A, ajRepresenting the j-th data set after the division;
ΔGini(A)=Gini(a)-GiniA(a)
wherein Δ gini (a) represents the gain value of the kini index before and after the division according to the characteristic a; selecting the characteristic with the maximum gain value of the Gini index as a splitting condition of the node to generate a new node;
(2) and repeating the process by taking the generated node as a root node, selecting new intestinal motility signal characteristics as splitting conditions, and completely dividing the data a.
The parameter adjustment optimization in the machine learning module specifically comprises the following steps:
(1) determining parameters of a classification base learner and a secondary learner of the intestinal diseases, wherein the parameters of a decision tree comprise a maximum characteristic number max _ feature, a maximum depth max _ depth and a minimum sample number min _ samples _ split required by splitting, which are involved in judgment during splitting of a decision number; the parameters of the multi-class classification SVM are a punishment parameter c and a kernel function parameter gamma of the SVM;
(2) performing linear search on each parameter, training a base learner and a secondary learner by utilizing a CV set, and calculating the gradient between the model performance and each parameter;
(3) selecting a parameter with the maximum gradient value as a current tuning parameter according to the performance of the model and the gradient between the parameters, and tuning the current tuning parameter by using a gradient descent method;
(4) repeating the two steps until the gradient of all the parameters is less than a threshold value, which is a positive number close to 0;
(5) adjusting the number T1 of the classified bases of the intestinal diseases and the number T2 of the secondary learners, which is specifically as follows: and respectively calculating gradients between the model performance and the number T1 of the base learners and the number T2 of the secondary learners, and respectively optimizing T1 and T2 by using a gradient descent method to obtain the final number T1 of the intestinal disease classification base learners and the final number T2 of the secondary learners.
And the intestinal disease judgment module judges the intestinal diseases according to the mapping model.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the functions of the following modules in a non-contact intestinal disease diagnosis device when executing the computer program:
the preprocessing module is used for preprocessing radar echo signals acquired by the non-contact vital sign monitoring radar to acquire human vital sign signals, and then filtering interference to obtain preprocessed signals, wherein the acquired human vital sign signals comprise heartbeat signals, respiration signals, gastric dynamic signals and intestinal dynamic signals;
the signal separation module is used for processing the preprocessed signals by adopting a signal separation algorithm to separate intestinal motility signals of the human body;
the characteristic extraction module is used for extracting the characteristics of the separated intestinal motility signals and extracting the characteristic parameters of the intestinal movement;
the machine learning module is used for inputting the extracted characteristic parameters and the corresponding labels into machine learning and determining a mapping model between the intestinal diseases and the characteristic parameters by a machine learning method;
and the intestinal disease judgment module judges the intestinal diseases according to the mapping model.
A computer-readable storage medium on which a computer program is stored, which, when being executed by a processor, implements functions of the following modules in a noncontact enteric disease diagnosis apparatus:
the preprocessing module is used for preprocessing radar echo signals acquired by the non-contact vital sign monitoring radar to acquire human vital sign signals, and then filtering interference to obtain preprocessed signals, wherein the acquired human vital sign signals comprise heartbeat signals, respiration signals, gastric dynamic signals and intestinal dynamic signals;
the signal separation module is used for processing the preprocessed signals by adopting a signal separation algorithm to separate intestinal motility signals of the human body;
the characteristic extraction module is used for extracting the characteristics of the separated intestinal motility signals and extracting the characteristic parameters of the intestinal movement;
the machine learning module is used for inputting the extracted characteristic parameters and the corresponding labels into machine learning and determining a mapping model between the intestinal diseases and the characteristic parameters by a machine learning method;
and the intestinal disease judgment module judges the intestinal diseases according to the mapping model.
The device can extract characteristic parameters beneficial to judging the intestinal tract movement condition; the device selects proper characteristic parameters to represent the intestinal motion condition, and trains a model capable of distinguishing different intestinal diseases by a machine learning method. Therefore, the intestinal disease can be judged through the characteristic parameters of the intestinal motility signals.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.