Method based on pulse wave sleep stageTechnical field
The invention belongs to multi-crossed disciplines technical fields, are related to Photoelectric Detection, biomedicine, big data and machine learning etc.Technical field, and in particular to a method of sleep stage is carried out based on pulse wave property.
Background technology
It sleeps and has great importance for recovery, the growth of body.Sleep insufficiency, poor sleeping quality will directly affect peoplePsychology and physiological health.Modern is since life stress is big, and sleep quality is worse and worse.
But since existing Sleep Evaluation standard needs to carry out sleep detection using complicated sleep study equipment, thisLimit possibility of the wider sleep study with ordinary people for Analysis of sleeping quality.And existing bracelet sleep analysisTechnology can only roughly use body movement information, this information very inaccurate, it is easy to generate erroneous judgement, can not be carried out to sleepQuantitative description.
Based on above-mentioned background, the present invention proposes a kind of novel sleep stage method, and this method only needs use to refer to folderFormula photoelectric sphyg wave detecting devices can carry out quantitative analysis to sleep, reach best sleep stage with minimum sleep interferenceDetection result.
Invention content
The present invention provides a kind of based on pulse wave progress sleep stage to solve the problems, such as sleep stage in sleep detectionNew method.The present invention can carry out real-time sleep detection, and can be carried out in the case of small as possible to body effectQuantitative sleep stage, to be slept by this sleep stage as a result, subsequent scientific research, medical research and record can be carried outState etc..
The present invention solves technical problem by the following technical programs:
A kind of method based on pulse wave sleep stage proposed by the present invention, includes the following steps:
Step 1, the change information for collecting the transmitted light power that sleep quality period generates since pulse is beaten, and turnIt is changed to electric signal;
Step 2 establishes finger blood flow mathematical model, is integrated according to langbobier law and blood flow modelAnalysis, obtains physiological signal noise source, and be filtered analysis to the raw electrical signal described in step 1, after obtaining denoisingPulse waveform information;
Step 3, the physiological property according to people carry out physiology letter to the pulse waveform information after the denoising described in step 2Breath extraction;
The physiologic information of multiple dimensions described in step 3 is formed one group of multi-C vector, and passes through the main compositions of PCA by step 4Analysis method carries out principal component analysis, obtains the principal component analysis orthogonal matrix of low-dimensional;
Step 5 carries out principal component analysis orthogonal matrix described in step 4 using the unsupervised machine learning algorithms of K-meansClustering, wherein K are selected as 3 or 4 according to classics sleep theory and obtain Clustering Model;
Step 6 repeats the dormant data of multigroup people step 1- steps 5 this five steps, respectively obtains a group cluster mouldType data take weighted average to obtain final sleep stage model all Clustering Model data.
Further, the acquisition pulse is beaten and the equipment of the change information of the transmitted light power of generation uses and refers to folderTransmission type photoelectric pulse wave collecting device.
Further, the step 2 is to the Filtering Analysis of original signal, using based on the low of human body signal characteristic analysisLogical cut-off filter, first carries out time-domain and frequency-domain conversion using Fourier transformation, is filtered in frequency domain, then pass through inverse FuIn leaf transformation, the signal after filtering is transformed into time domain, obtains the pulse waveform figure for removing high-frequency noise.
Further, fundamental frequency filtering removal human motion is also carried out by fundamental frequency cut-off filter and systematic entirety floatsThe artefact drift that shipper pole comes, obtains fundamental frequency pulse waveform figure.
Further, motion artifacts can also be removed by the removal of extremely low frequency well and systematic entirety drifts aboutInformation may finally obtain stable using 0 datum line as the oscillogram of distribution of mean value.
Further, step 3 physiologic information extraction algorithm, wherein extracting pulse frequency and stablizing for ejection rate describedUsing 0 datum line as the oscillogram of distribution of mean value carried out in accordance with the following steps on the basis of pulse frequency is extracted:
3.1 obtain difference waveform figure by first-order difference;
3.2, by local tip detection algorithm, obtain the local maximum of the difference diagram in each pulse wave cycle, andBy minimum range limit algorithm, the maximum of pulse wave secondary peak is excluded, obtains each penetrating unique maximum in the blood periodThe value and location information of point;
3.3 using the value of maximum as the ejection rate for each penetrating the blood period, by the adjacent maximum position for penetrating the blood periodInstantaneous pulse rate of the difference as current period, and by can be in the hope of the average pulse rate in a period of time by poor method.
Further, to the processing method of multidimensional characteristic vectors composition and dimensionality reduction in the step 4:Described in step 3Physiologic information in the various dimensions information arrangement such as mean value, variance and pulse frequency at one group of multi-C vector, by PCA algorithms to multiple dimensionsDegree carries out correlation analysis, obtains the information of several dimensions before accounting maximum, several orthogonal before taking using 95% principal component analysisDimension obtains the principal component analysis orthogonal matrix of low-dimensional as PCA handling results.
Further, the step 5 uses the unsupervised machines of K-means to principal component analysis orthogonal matrix described in step 4Device learning algorithm carries out clustering method, is as follows:
5.1 normalize orthogonal matrix according to its dimension weighted value, then randomly select initial cluster center, use cum rightsThe Euclidean distance of weight is as cluster foundation;
5.2 then, continues to randomly select cluster centre, repeats cluster process, record each cluster centre convergence as a result,Finally each secondary cluster centre is weighted averagely, obtains the sleep stage stable model of this group of dormant data, in this, as thisThe sleep stage model of group data.
Further, the Weighted Average Algorithm that the step 6 uses the sleep stage model that multi-group data obtains:It pressesAccording to dormant data duration as the average weighted weighted value of model single.Further, the photoelectric sphyg wave collecting device isTransmission-type blood oxygen probe, the method for acquisition human pulse wave are to convert pulse strong and weak signals to telecommunications according to spectroscopy principleNumber and be further converted to digital signal.
This method compares existing sleep stage method, and advantage is:Existing Sleep Evaluation standard needs to useComplicated sleep study equipment carries out sleep detection, and which limits wider sleep studies and ordinary people for sleep qualityThe possibility of analysis.And existing bracelet sleep analysis technology, it can only roughly use body movement information, this information very inaccurateReally, it is easy to generate erroneous judgement, quantitative description can not be carried out to sleep.
The drawbacks of for the existing sleep detection means, invention of the present invention only needs pulse wave on sleep stage, thisThe information of one single dimension, compared to leading hypnotic instrument sleep stage more, the sleep of people is influenced it is much smaller, in modern to matter of sleepingMeasuring desired promotion and sleep monitor etc. has great practical significance, and sleep detection Module-embedding can be used as to variousAmong civil small-scaleization sleep auxiliary, detection device.Meanwhile the present invention utilizes intelligent analysis algorithm, it can be by sleep qualityStatus information is showed by the evaluation measures of scientific quantification.
Description of the drawings
Fig. 1 is the algorithm flow chart of the present invention;
Fig. 2 is the process for using figure of the present invention.
Specific implementation
A kind of method based on pulse wave sleep stage proposed by the present invention, it is characterised in that include the following steps:
Step 1 presss from both sides transmission type photoelectric pulse wave collecting device by finger, collects sleep quality period in real time due to pulseThe change information of the transmitted light power of beating and generation, and raw electrical signal is recorded by photoelectric conversion circuit.Wherein photoelectricityPulse wave collecting device is transmission-type blood oxygen probe, and the method for acquisition human pulse wave is according to spectroscopy principle that pulse is strongWeak signal is converted into electric signal and is further converted to digital signal.
Step 2 establishes finger blood flow mathematical model, is integrated according to langbobier law and blood flow modelAnalysis, obtains physiological signal noise source, and is filtered point to raw electrical signal described in step 1 by means such as Fourier transformationsAnalysis, to obtain the pulse waveform information after denoising.
Step 3, the physiological property according to people carry out physiology letter to the pulse waveform information after the denoising described in step 2Breath extraction, extracts the physiologic information of multiple dimensions such as its mean value, variance, pulse frequency respectively.
The physiologic information of multiple dimensions described in step 3 is formed one group of multi-C vector by step 4, is denoted as Ix, described oneGroup multi-C vector IxCan be sequence or out of order, to this, result does not impact by stages for sequence.
And by the principal component analysis of PCA principal component analysis methods progress 95%, the principal component analysis for obtaining low-dimensional is orthogonalMatrix is denoted as Iy.Principal component analysis orthogonal matrix IyIt can be the orthogonal matrix for being arbitrarily not more than total dimension.
Step 5, to principal component analysis orthogonal matrix I described in step 4yUsing the unsupervised machine learning algorithms of K-means intoRow clustering, wherein K can be selected as 3 or 4 (corresponding to different sleep accuracy models) according to classics sleep theory, obtainClustering Model M1.The unsupervised machine learning algorithms of the K-means, initial cluster center can be manually set, can alsoIt is random selected, and final result should be worth to according to the most suitable matching result of model, and it is initial to give up apparent deviation pointError caused by center
Step 6 repeats the dormant data of multigroup people step 1- steps 5 this five steps, respectively obtains Clustering Model Mi,Wherein i is data group number, to all MiWeighted average (according to the length of i group data as weight proportion) is taken, is obtained finalSleep stage model M.
Sleep quality state is divided into several different periods according to the method for pulse wave information analysis sleep quality state,And result by stages can be 3 periods include lucid interval, it is shallow sleep phase, sound sleep phase, it includes awake that can also be divided into 4 periodsPhase shallow sleeps phase, sound sleep phase, rapid eye movement phase;Its foundation by stages includes that the features such as pulse frequency, power, peak value are realized.
Wherein, Filtering Analysis algorithm of the step 2 to original signal.The maximum that original signal as described in step 1 includes is made an uproarSound is Hz noise information, needs to be filtered with low-pass filter, and the present invention is cut using the low pass based on human body signal characteristic analysisOnly frequency filter first carries out time-domain and frequency-domain conversion using Fourier transformation, is filtered in frequency domain, then passes through inverse FourierTransformation, is transformed into time domain by the signal after filtering, obtains the pulse waveform figure W for removing high-frequency noise1.Meanwhile in order to moreThe artefact drift that human motion and systematic entirety drift are brought is removed well, and fundamental frequency filter is carried out by fundamental frequency cut-off filterWave obtains fundamental frequency pulse waveform figure W2.Motion artifacts can be removed well and system is whole by the removal of extremely low frequencyBody drift information may finally obtain stable using 0 datum line as the oscillogram W of distribution of mean value, wherein W=W1-W2。
Wherein extraction algorithm of the step 3 to pulse frequency, ejection rate.Being be unable to do without to the stable extraction of pulse frequency and ejection rate hasThe data prediction of effect, it is described using 0 datum line as the oscillogram W of distribution of mean value be pulse frequency extraction basis.Oscillogram W'sOn the basis of, difference waveform figure W ' is obtained by first-order difference;Then, it by local tip detection algorithm, obtains in each pulseThe local maximum of difference diagram W ' in wave period, and by minimum range limit algorithm, the maximum of pulse wave secondary peak is arrangedIt removes, can be obtained by each value and location information for penetrating unique maximum point in the blood period in this way;Finally, by the value of maximumAs each ejection rate for penetrating the blood period, using the adjacent maximum position difference for penetrating the blood period as the instantaneous arteries and veins of current periodRate, and by can be in the hope of the average pulse rate in a period of time by poor method.
Wherein processing scheme of the step 4 to multidimensional characteristic vectors composition and dimensionality reduction.By the mean value described in step 3, variance, arteries and veinsThe physiologic information of multiple dimensions such as rate is arranged in order into one group of six-vector Ix.Multiple dimensions are carried out by PCA algorithms relatedProperty analysis, obtain the information of several dimensions before accounting maximum, the present invention uses 95% acceptance, takes the first two orthogonal dimensions conductPCA handling results obtain the principal component analysis orthogonal matrix I of low-dimensionaly。
Step 5 is to principal component analysis orthogonal matrix I described in step 4yIt is carried out using the unsupervised machine learning algorithms of K-meansClustering method.By orthogonal matrix IyIt is normalized according to its dimension weighted value (each dimension weight accounting that PCA is analyzed),Then initial cluster center is randomly selected, using the Euclidean distance of Weight as cluster foundation;Then, continue to randomly select poly-Class center repeats cluster process, records each cluster centre convergence as a result, being finally weighted to each secondary cluster centre flat, the sleep stage stable model for obtaining this group of dormant data, in this, as the sleep stage model M of this group of datai。
The sleep stage model M that step 6 obtains multi-group dataiThe Weighted Average Algorithm of use.Present invention use according toDormant data duration formulates foundation and is to have fully considered people's sleep period as the average weighted weighted value of model singlePhysiological property, for macrocyclic sleep, sleep procedure has more stability, therefore can give the weighted value of bigger.
By taking four stage sleep stages as an example, entire sleep procedure can be divided with 100 minute marks in stage sleep state set of regaining consciousnessBe distributed in 0-20 point, shallow sleep integrated distribution divides in 21-52, deep sleep integrated distribution in 53-63, rapid eye movement phase integrated distribution in64-100。
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, anyThe change or replacement expected without creative work, should be covered by the protection scope of the present invention.Therefore, of the inventionProtection domain should be determined by the scope of protection defined in the claims.