PPG signal processing method, device and storage medium
By synchronously checking, filtering and decomposing the PPG signal and ACC signal in the wearable device, combined with peak and valley detection and double Gaussian function model, the problem of weak signal and large interference of the PPG signal in the wearable device is solved, and the PWV is improved. The prediction accuracy of the value enhances the reliability of blood vessel health detection.
Patent Information
- Application Number
- CN202410516782.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-04-28
AI Technical Summary
In the scenario of wearable devices, the PPG signal is weak and has large interference. As a result, the PPG signal of some people cannot be directly used to predict blood oxygen saturation, heart rate and other indicators, affecting the accuracy of PWV values.
By acquiring PPG signals and ACC signals collected by wearable devices, time stamp synchronization verification, packet loss detection and filtering are performed, combined with peak and valley detection and double Gaussian function model decomposition, to improve the accuracy of signal decomposition, and use linear least squares The regression algorithm fits Gaussian waves, simplifying the computational complexity and improving the accuracy of signal decomposition.
It improves the decomposition accuracy of PPG signals and the accuracy of signal processing, enhances the prediction accuracy of PWV values, reduces errors caused by wearing position and individual differences, and improves the reliability of vascular health detection.
Smart Images

Figure CN118078234B
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal devices, and in particular to a PPG signal processing method, device and storage medium. Background Art
[0002] Photoplethysmography (PPG) is a non-invasive detection method that uses photoelectric means to detect changes in blood volume in living tissue. Since the intensity of reflected light is related to blood flow velocity, and blood flow velocity is affected by periodic heart rate, blood oxygen saturation (SPO2), heart rate, blood pressure, etc. can be measured based on PPG signals.
[0003] However, in the wearable device scenario, the PPG signals collected are usually weak and have greater interference, resulting in the PPG signals of a part of the population being unable to be directly used for the prediction of relevant indicators. Summary of the invention
[0004] The embodiments of the present application provide a PPG signal processing method, device and storage medium, which aim to improve the accuracy of PPG signal decomposition, thereby improving the accuracy of PWV value prediction when the decomposed PPG signal is used for subsequent PWV calculation.
[0005] In a first aspect, an embodiment of the present application provides a PPG signal processing method, the method comprising: acquiring a photoplethysmogram (PPG) signal and an acceleration (ACC) signal collected by a wearable device; preprocessing the PPG signal to obtain a filtered signal, the preprocessing comprising performing a timestamp synchronization check on the PPG signal based on the ACC signal, performing packet loss detection based on the timestamps of adjacent data packets of the PPG signal, and filtering the PPG signal; performing peak and valley detection on the filtered signal, performing secondary processing on the filtered signal based on the detection result to obtain a single-cycle PPG signal set, the secondary processing comprising performing a single-cycle signal interception on the filtered signal based on the detection result. , align the start and end points of the intercepted signal set and normalize the amplitude; match each single-cycle PPG signal in the single-cycle PPG signal set with each template signal in the preset template signal set, and set the template signal with the highest number of successful matches as the single-cycle PPG main signal, and the preset template signal set contains at least one template signal; decompose the single-cycle PPG main signal based on a double Gaussian function model to obtain a parameter set; fit the parameter set based on a linear least squares regression iterative algorithm to obtain a first Gaussian wave and a second Gaussian wave, wherein the first Gaussian wave is the main wave of the PPG signal, and the second Gaussian wave is the dicrotic wave of the PPG signal.
[0006] Exemplarily, the sampling frequencies of the PPG signal and the ACC signal can both be set to 100 Hz, and the signals can be grouped and uploaded in 100 ms data packets.
[0007] The filtering of the PPG signal may be filtering the PPG signal through a filter. Exemplarily, the filter may be a second-order Butterworth filter of 0.5-4 Hz.
[0008] Among them, by performing a timestamp synchronization check on the PPG signal based on the ACC signal, that is, performing a time alignment check on the two, it is possible to prevent the PPG signal and the ACC signal from being misaligned, thereby reducing the risk of misjudgment of the user status.
[0009] Among them, the timestamps of adjacent data packets of the PPG signal are used to detect packet loss of the PPG signal, thereby preventing the loss of the PPG signal and affecting the accuracy of subsequent analysis results.
[0010] Therefore, timestamp synchronization check and packet loss detection are performed based on the ACC signal and the PPG signal. If the ACC signal and the PPG signal are not synchronized, the PPG and ACC signal unsynchronized error code is returned; if the timestamps of adjacent data packets of the PPG signal are greater than the specified threshold, it is considered that the PPG signal data packet has been lost, and the PPG packet loss error code is returned. In the case that there is no packet loss in the PPG signal, the PPG signal is band-pass filtered to obtain a filtered signal. Peak and valley detection is performed on the filtered signal, and the filtered signal is secondary processed based on the detection result to obtain a single-cycle PPG signal set; the single-cycle PPG signal is matched with the preset template signal to obtain a single-cycle PPG main signal; then the single-cycle PPG main signal is decomposed and fitted based on the double Gaussian function model and the least squares regression iterative algorithm to obtain the first Gaussian wave and the second Gaussian wave, which simplifies the computational complexity of the PPG signal decomposition and improves the accuracy of the PPG signal decomposition.
[0011] According to the first aspect, the acquiring of the photoplethysmogram (PPG) signal and the acceleration (ACC) signal acquired by the wearable device includes: acquiring the PPG signal and the ACC signal acquired by the wearable device in the same state and the same period.
[0012] Therefore, by setting the ACC signal and the PPG signal to be in the same state and in the same period for data collection, it is possible to detect the motion state through the ACC signal, and then determine whether the PPG signal has motion artifacts.
[0013] According to the first aspect, or any implementation manner of the first aspect above, the ACC signal includes an AccX signal along the X-axis, an AccY signal along the Y-axis, and an AccZ signal along the Z-axis; after acquiring the photoelectric volumetric pulse wave (PPG) signal and the acceleration ACC signal collected by the wearable device, the method further includes: performing modulus calculation, differential and absolute processing on the AccX signal, the AccY signal, and the AccZ signal in sequence to obtain a differential modulus AccSDiff; based on the AccX signal, the AccY signal, and the AccZ signal, calculating the number of non-standard three-axis orientations and the number of slope mutations within a preset period; based on the differential modulus AccSDiff, calculating the average value, maximum value, and variance within the preset period; when the number of non-standard three-axis orientations, the number of slope mutations, the average value, the maximum value, and the variance meet a preset termination condition, reacquiring the PPG signal and the ACC signal.
[0014] The preset period may be set according to actual needs, and may usually be set to 1 second.
[0015] Exemplarily, based on the differential modulus value AccSDiff, the step of calculating the average value, maximum value and variance within a preset period may be to slide a non-overlapping sliding window on the differential modulus value and calculate the average value per second for the data in the window. AccSMean i , maximum value per second AccSMaxVal i and the variance per second AccSVar i , until the calculation is completed to obtain the eigenvalue array of N consecutive seconds. The sliding window size is 1 second.
[0016] According to the first aspect, or any implementation manner of the first aspect above, the preset termination condition includes: when the number of times the three-axis orientation fails to meet the standard is greater than a preset orientation failure threshold, reacquiring the PPG signal and the ACC signal; when the number of slope mutations is greater than a preset mutation threshold, reacquiring the PPG signal and the ACC signal; acquiring a first number whose average value is greater than a first preset threshold, a second number whose maximum value is greater than a second preset threshold, and a third number whose variance is greater than a third preset threshold; when the first number is greater than a first number threshold and the second number is greater than a second number threshold, reacquiring the PPG signal and the ACC signal; when the first number is greater than a third number threshold and the third number is greater than a fourth number threshold, reacquiring the PPG signal and the ACC signal.
[0017] For example, if the cumulative number of times the three-axis orientation fails to meet the standard DirectCount>5, it is determined that the current wearing posture of the wearable device does not meet the wearing requirements, the detection is terminated, and the user is prompted to wear the device correctly through the wearable device or mobile phone.
[0018] For example, if the cumulative number of slope mutations is MaxSlopeCount >8, the user's current physical state is determined to be not in a static state, the test is terminated, and the user is prompted to remain still through the wearable device or mobile phone.
[0019] For example, get the eigenvalue array AccSMean i >0.01G number C1, AccSMaxVal i >0.04G number C2, AccSVar i >0.5G number C3. When C1>3 and C2>5, or C1>5 and C3>4, it is determined that the user's current physical state does not meet the static state, the detection is terminated, and the user is prompted to remain still through the wearable device or mobile phone.
[0020] According to the first aspect, or any one of the implementations of the first aspect above, the single-cycle signal interception of the filtered signal based on the detection result to obtain the single-cycle signal set S1 includes: based on two adjacent valley points in the filtered signal, the single-cycle signal interception of the filtered signal to obtain the single-cycle signal set S1.
[0021] Exemplarily, the peak-valley value detection is performed on the filtered signal to obtain the peak-valley value corresponding to each heartbeat cycle, and two adjacent valley value points are used as starting points to perform single-cycle signal interception on the filtered signal to obtain a single-cycle signal set S1. The schematic diagram of the screenshot is shown below Fig. 9 .
[0022] According to the first aspect, or any implementation manner of the first aspect above, before matching each single-cycle PPG signal in the single-cycle PPG signal set with each template signal in the preset template signal set, setting the template signal with the highest number of successful matches as the single-cycle PPG main signal, and including at least one template signal in the preset template signal set, the method also includes: sequentially calculating the skewness index and the kurtosis index of each single-cycle PPG signal in the single-cycle PPG signal set; filtering the single-cycle PPG signal set based on the skewness index and the kurtosis index of each single-cycle PPG signal to obtain the filtered single-cycle PPG signal set; and creating or updating the preset template signal set based on the filtered single-cycle PPG signal set.
[0023] According to the first aspect, or any implementation manner of the first aspect above, the creating the preset template signal set based on the filtered single-cycle PPG signal set includes: obtaining the number of templates in the preset template signal set; when the number of templates is equal to 0, setting the first single-cycle PPG signal in the filtered single-cycle PPG signal set as the first template signal, and adding it to the preset template signal set; when the number of templates is less than a preset template number threshold, sequentially calculating the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set, and when any of the similarities is greater than the first similarity threshold, setting the corresponding single-cycle PPG signal as the second template signal, and adding it to the preset template signal set.
[0024] Exemplarily, the similarity calculation is evaluated using DTW distance, and the smaller the distance is, the more similar the signals are.
[0025] Exemplarily, the above-mentioned preset template quantity threshold can be set according to actual needs, and can usually be set to 3.
[0026] Exemplarily, the first similarity may be set according to actual needs, and may generally be set to 0.3.
[0027] Specifically, when the above similarity is greater than the first similarity threshold, the corresponding single-cycle PPG signal is set as the template signal and added to the preset template signal set.
[0028] According to the first aspect, or any implementation manner of the first aspect above, the creating the preset template signal set based on the filtered single-cycle PPG signal set further includes: when the number of templates is greater than or equal to the preset template number threshold, and all of the similarities are greater than the first similarity threshold, setting the corresponding single-cycle PPG signal as a potential template signal, and adding the potential template signal to the preset template signal set; wherein each single-cycle PPG signal in the filtered single-cycle PPG signal set is matched with each template signal in the preset template signal set, and when the number of successful matches of the potential template signal is greater than any other template signal in the preset template signal set, replacing its corresponding template signal with the potential template signal, and clearing the potential template signals in the preset template signal set.
[0029] Specifically, the potential template signal is a special type of preset template signal, the number of which generally does not exceed 1, and is used to supplement the detection of possible template signals when the single-cycle PPG signal morphology is changeable.
[0030] According to the first aspect, or any implementation manner of the first aspect above, the updating of the preset template signal set based on the filtered single-cycle PPG signal set includes: sequentially calculating the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set; when the similarity is less than the first similarity threshold, adding 1 to the number of successful matches of the current template signal; when the similarity is less than the second similarity threshold, using its corresponding single-cycle PPG signal to update the current template signal until all single-cycle PPG signals in the filtered single-cycle PPG signal set are matched.
[0031] Exemplarily, the above-mentioned use of the single-cycle PPG signal to update the template signal may be to merge the single-cycle PPG signal and the template signal based on the mean method, and use the merged signal as a new template signal to update the original template signal.
[0032] For example, the above average method can be referred to as follows Fig.11 The data correspondence rule in (3) is a method of performing point-by-point averaging of a single-cycle PPG signal and a template signal.
[0033] Specifically, the first similarity threshold is greater than the second similarity threshold. The second similarity threshold can be set to 0.1.
[0034] According to the first aspect, or any implementation manner of the first aspect above, when the similarity is less than a second similarity threshold, after using its corresponding single-cycle PPG signal to update the current template signal, it also includes: calculating the similarity between the updated template signal and other template signals in a preset template signal set, and when any of the similarities is less than the second similarity threshold, merging the two corresponding template signals, merging the number of successful matches of the two template signals, and deleting the updated template signal.
[0035] According to the first aspect, or any implementation manner of the first aspect above, the decomposing the single-cycle PPG main signal based on the double Gaussian function model to obtain a parameter set includes: based on the maximum value S4Max and the first position S4MaxLoc of the single-cycle PPG main signal, obtaining the second position S4MaxEndLoc with an amplitude of S4Max / 5 on the right side of the first position; differentiating the single-cycle PPG main signal to obtain a differential signal, and obtaining the zero-crossing position S5ZeroLoc of the differential signal; based on the maximum value S4Max, the first position S4MaxLoc, the second position S4MaxEndLoc and the zero-crossing position S5ZeroLoc, calculating the initial parameters of the single-cycle PPG main signal in the double Gaussian function model; decomposing the single-cycle PPG main signal based on the initial parameters and the double Gaussian function model to obtain a parameter set.
[0036] According to the first aspect, or any implementation of the first aspect above, after fitting the parameter set based on the linear least squares regression iterative algorithm to obtain the first Gaussian wave and the second Gaussian wave, it includes: performing feature calculations on the single-cycle PPG main signal, the first Gaussian wave and the second Gaussian wave, and training a preset PWV regression model with the obtained feature set.
[0037] Exemplarily, the feature set obtained above includes S4 total duration T, first Gaussian wave rise time T1, double wave interval ∆T, reflection index RI, enhancement index AI, heart rate interval RR, K value (mean(PPG) / max(PPG)). And the extended feature set first Gaussian wave online time ratio T1 / T, hardening index SI=Height / ∆T, normalized hardening index SI / RR, BMI index Weight / Height 2 wait.
[0038] Specifically, the preset PWV regression model may be obtained by training based on a machine learning algorithm or a multivariate regression algorithm.
[0039] Exemplarily, the above machine learning algorithms may include SVM, logistic regression, or mainstream decision tree models, such as random forest algorithm, iterative algorithm (AdaBoost), optimized distributed gradient boosting library (XGBoost), gradient boosting machine learning algorithm (CatBoost), gradient boosting decision tree model (LightGBM), etc.
[0040] In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes instructions of the method in the first aspect or any possible implementation of the first aspect.
[0041] In a third aspect, an embodiment of the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0042] In a fourth aspect, an embodiment of the present application provides a computer program, which includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0043] In a fifth aspect, an embodiment of the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Schematic diagram of PWV measurement using a multi-point method;
[0045] Figure 2 This is a schematic diagram showing the comparison of PPG signals for different age groups;
[0046] Figure 3 is a schematic diagram of a wearable device shown as an example;
[0047] Figure 4 The figure is a schematic diagram of a PWV measurement scenario of a wearable device shown as an example;
[0048] Figure 5 A schematic diagram of an exemplary user interface;
[0049] Figure 6 Schematic diagram of an exemplary PPG signal processing flow;
[0050] Figure 7 is a schematic diagram of ACC signal quality assessment shown as an example;
[0051] Figure 8 Schematic diagram of PPG signal peak and valley identification shown as an example;
[0052] Fig. 9 Schematic diagram of PPG signal segmentation shown as an example;
[0053] Fig.10 Schematic diagram of secondary processing of PPG signals shown as an example;
[0054] Fig.11 Schematic diagram of similarity calculation of DTW method shown as an example;
[0055] Fig.12 is a schematic diagram of an exemplary PPG signal processing result;
[0056] Fig.13 A schematic diagram of the software structure of an electronic device is shown as an example;
[0057] Fig.14 The figure is a schematic diagram of the hardware structure of an electronic device shown as an example. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0059] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0060] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0061] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0062] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0063] Pulse wave velocity (PWV) is an important indicator for evaluating vascular health. Based on PWV, the risk of arteriosclerosis can be assessed and graded. In the field of wearable health monitoring, PWV detection is one of the hot topics.
[0064] At present, the industry mainly uses the electrocardiogram (ECG) + PPG solution to calculate PWV, thereby obtaining the results of arteriosclerosis risk assessment. Among them, ECG is a method of recording the electrophysiological activity of the heart in units of time through the chest cavity. When testing, electrodes need to be attached to the skin surface of the human heart; PPG is a non-invasive detection method that uses photoelectric means to detect changes in blood volume in living tissues. When testing, corresponding sensors need to be set at the detected site.
[0065] For example, see Figure 1 , Figure 1 Schematic diagram of PWV detection for ECG+PPG scheme. Figure 1 The signals of the human wrist, arm and heart are collected respectively to obtain ECG signals and PPG signals, and then the PWV index is calculated based on the ECG signals and PPG signals.
[0066] However, ECG measurement requires electrodes to be placed on the skin surface of the user's chest and requires the user to actively trigger it, making this solution inconvenient to implement.
[0067] Therefore, in some possible implementations, a pure PPG solution for PWV detection is also provided, wherein the pure PPG solution is further divided into a multi-point PPG solution and a single-point PPG solution.
[0068] For example, the multi-point PPG solution usually sets sensors at two points of the neck or ankle of the detected human body to collect PPG signals at multiple points. Since data collection needs to be performed at two or more detection points that are far apart, the implementation of this solution is also relatively complex.
[0069] Therefore, the single-point PPG scheme has become the mainstream direction of current research. It is understandable that the single-point PPG scheme is based on the detection of the main wave and dicrotic wave in the PPG signal and the analysis of related characteristics to calculate PWV, thereby obtaining the risk assessment results of human arteriosclerosis.
[0070] For example, see Figure 2 , Figure 2 This is a schematic diagram of the comparative analysis of typical PPG signals of different age groups collected through wearable devices.
[0071] from Figure 2As can be seen from the figure, young people have excellent physical functions, and their blood vessels contract and expand significantly with each heartbeat. Wearable devices can clearly collect PPG signals and distinguish the main wave and dicrotic wave in the PPG signal, so the PWV index can be accurately calculated. However, the physical functions of the elderly are poor, and the PPG signals collected by wearable devices are weak and have great interference, or even there is no obvious dicrotic wave in the PPG signal, resulting in large errors in the calculation of the PWV index.
[0072] In view of this, an embodiment of the present application provides a PPG signal processing method, which collects the PPG signal of the human body through a wearable device, performs data processing and feature calculation on the PPG signal, and uses the calculated features to predict the PWV index, thereby improving the calculation accuracy of the PWV index.
[0073] At present, in order to accurately monitor the human body's PWV, heart rate, blood oxygen concentration, blood pressure, etc. in real time, wearable devices (such as smart watches) usually have a surface that contacts the user's skin, such as Figure 3 A PPG sensor is set on the back as shown in the figure, and based on the information collected by the PPG sensor, the PWV algorithm, heart rate algorithm, blood oxygen concentration algorithm, blood pressure algorithm, etc. are used to accurately monitor the human body's PWV, heart rate, blood oxygen concentration, blood pressure, etc. in real time.
[0074] The PPG sensor includes a light emitting diode (LED) and a receiver. For ease of explanation, the measurement of PWV is taken as an example. Figure 4 , for example, when the user Figure 3 The smartwatch including the PPG sensor is shown worn on the arm, and the vascular health detection function is turned on. In one possible implementation, in order to improve the user experience, a vascular detection picture and a text message of "measuring" can be displayed on the user interface of the smartwatch, such as Figure 4 As shown in (1).
[0075] Exemplarily, when the user interface of the smart watch is in Figure 4 When the style shown in (1) is used, the LED in the PPG sensor in the smart watch will continuously project light onto the skin. The light passes through the skin tissue and is absorbed by the blood. At the same time, the receiver receives the reflected light signal. When the reflected light signal is converted into an electrical signal, due to the pulsation of blood in the artery, the absorption of light will also change, so an AC signal can be obtained. The PPG signal can be obtained by extracting the AC signal. By analyzing the PPG characteristics, the user's PWV can be determined. Finally, the measured PWV index can be displayed on the user interface of the smart watch, such as Figure 4 As shown in (2).
[0076] It should be noted that, under ideal conditions, the collected PPG signal can accurately detect the PWV index of the human body at each moment. However, due to complex scenarios such as hardware, temperature, and motion, the real signal of the PPG is distorted, which greatly restricts the accuracy of the PWV calculation. Since the PPG signal is particularly sensitive to motion, that is, the PPG signal is prone to motion artifacts, the PPG signal is interfered and difficult to process, resulting in inaccurate prediction results. Therefore, a PPG signal processing method is provided in an embodiment of the present application to process the PPG signal, and the processed PPG signal is used for subsequent PWV index prediction, so as to obtain an accurate PWV index.
[0077] In one possible implementation, in order to further improve the user experience, the PPG data detected by the smart watch and the calculated PWV index can also be sent to the user's mobile phone in the embodiment of the present application for the user to review.
[0078] For example, when a user clicks on a vascular health application on a mobile phone, the mobile phone responds to the operation and displays a vascular health detection interface, such as Figure 5 The interface 10a of (1) in FIG. 10a includes a pulse wave display area 10a-1 and a detection countdown display area 10a-2. At this time, the smart watch starts blood vessel detection, and the display interface is as follows: Figure 4 When the interface shown in (1) is displayed, the smart watch sends the collected PPG data to the mobile phone in real time. The mobile phone updates the pulse wave display area 10a-1 with the PPG data received in the interface 10a, and updates the display area 10a-2 according to the remaining detection time.
[0079] After the smart watch completes PPG data collection and obtains the PWV index, and sends the PWV index to the mobile phone, the mobile phone displays the vascular health test result interface 10b, such as Figure 5 As shown in (2), the interface 10b includes an arteriosclerosis risk level control 10b-1 and a PWV index control 10b-2.
[0080] Exemplarily, after receiving the PWV indicator, the mobile phone updates the control 10b-2 according to the PWV indicator, and updates the control 10b-1 according to the risk level corresponding to the PWV indicator.
[0081] At this point, the embodiment of the present application collects the PPG signal in the human body through the PPG sensor, and processes the PPG signal based on the PPG signal processing method provided in the embodiment of the present application, and uses the processed PPG signal for PWV index prediction, thereby obtaining an accurate PWV index and improving the calculation accuracy of the PWV index.
[0082] In order to better understand the processing flow of the PPG signal by the PPG signal processing method provided in the embodiment of the present application, the following embodiment still takes the smart watch 100 as an example. Figures 6 to 12 The PPG signal processing flow is described.
[0083] For example, Figure 6 As shown, the PPG signal processing method in the embodiment of the present application can be divided into four stages (such as data acquisition stage, data preprocessing stage, data processing stage and feature calculation stage) during the implementation process, and corresponding five modules (such as signal acquisition module, signal preprocessing module, peak and valley detection module, single-cycle signal extraction module, single-cycle signal decomposition module and feature extraction module).
[0084] See also Figure 6 , exemplarily, in the data collection stage, data of the human body is collected through the data collection module in the wearable device, and the collected data includes but is not limited to accelerometer (ACC) signals and PPG signals.
[0085] During the data collection process of the wearable device, motion artifacts may be generated due to the possibility of human body movement or shaking. Motion artifacts will make it impossible to accurately determine the single-cycle PPG signal during the subsequent data use process, so it is necessary to identify such interference signals and terminate data collection.
[0086] For example, if the wearable device is not worn properly, such as being worn loosely or with the dial facing downward resulting in a gap, the PPG signal may also be interfered.
[0087] For example, see Figure 7 ,exist Figure 7 When the user is in motion, the three-axis ACC signal and PPG signal show obvious irregular fluctuations; when the user stops exercising and enters a static state, the ACC signal and PPG signal show regular fluctuations. Therefore, when the user is in motion, the PPG signal cannot be used for subsequent PWV index calculations and the detection needs to be terminated; after the user enters a static state, the PPG signal can truly reflect the user's PWV index and can be detected.
[0088] In the embodiment of the present application, the ACC signal is synchronously collected during the PPG signal collection process, and the obtained ACC signal is used to detect the motion state of the human body, so that the detection result is used as the condition for whether to terminate the PPG signal.
[0089] This is the end of the introduction to the data collection stage. For technical details not recorded in detail in the data collection stage, please refer to the existing implementation plan for collecting sensor signals, which will not be repeated here.
[0090] Continue to see Figure 6 Exemplarily, the operations in the data preprocessing stage include performing packet loss detection on the PPG signal through a signal preprocessing module in the wearable device, and performing bandpass filtering on the original PPG signal to obtain a filtered signal S1.
[0091] In a possible implementation, the sampling frequency of the ACC signal and the PPG signal are both set to 100 Hz, and are uploaded in 100 ms packets. After the motion state detection of the ACC signal is passed, the PPG signal needs to be preprocessed, including timestamp verification and bandpass filtering.
[0092] Among them, the timestamp check is used to: 1. Determine whether the PPG signal and ACC signal are synchronized, 2. Determine whether the PPG data is lost.
[0093] For example, if the timestamp difference between the PPG signal data packet and the ACC signal data packet is greater than a preset threshold (the preset threshold can be set based on experience, and its value can be set to 200ms), it is determined that the PPG signal is not synchronized with the ACC signal, and the PPG signal is not synchronized with the ACC signal. Figure 4 Neutral (1) and Figure 5 The interface (1) prompts the user to re-test.
[0094] For example, if the timestamp difference between the current PPG signal data packet and the previous PPG signal data packet is greater than another preset threshold (the preset threshold can be set based on experience, and its value can be set to 150ms), it is determined that there is packet loss in the PPG signal, and the PPG signal is detected by Figure 4 Neutral (1) and Figure 5 The interface (1) prompts the user to re-test.
[0095] When there is no packet loss in the PPG signal, a filter is used to perform bandpass filtering on it, and finally a filtered signal PPGFilt is obtained. The filter can be a second-order Butterworth filter with a frequency of 0.5-4 Hz.
[0096] This is the end of the introduction to the data preprocessing stage. For detailed technical details of the bandpass filtering stage in the data preprocessing stage, please refer to the filtering implementation scheme of the existing filter, which will not be repeated here.
[0097] Continue to see Figure 6 Exemplarily, the operations in the data processing stage include performing peak and valley detection by a peak and valley detection module in the wearable device, performing single-cycle signal extraction by a single-cycle signal extraction module, and performing single-cycle signal decomposition by a single-cycle signal decomposition module.
[0098] After the PPG signal is filtered, the embodiment of the present application performs peak-valley detection on the filtered signal PPGFilt to obtain the peak-valley value corresponding to each heartbeat cycle. Based on the adjacent valley value points, single-cycle signal interception is performed on PPGFilt to obtain a corresponding set of multiple single-cycle PPG signals S1.
[0099] For example, see Figure 8 and Fig. 9 After performing peak-valley detection on PPGFilt, the peak-valley value of each heartbeat cycle can be obtained. According to two adjacent valley values, single-cycle signal interception is performed on PPGFilt to obtain multiple single-cycle PPG signal sets S1. Among them, the form of the single-cycle PPG signal set S1 can be found in Fig.10 In (1).
[0100] Since the PPG amplitude fluctuates during the wearable device detection process, it is also necessary to align the start and end points of each single-cycle PPG signal to obtain the signal set S2 (see Fig.10 (2)), and the normalized signal set S3 is obtained (see Fig.10 in (3).
[0101] In the scenario of wearable device detection, even if the user has no obvious movement or shaking, the PPG signal is still easily affected by factors such as wearing position, wearing tightness, arrhythmia or human body micro-movement, resulting in large differences in PPG signals in different cycles, and even single-cycle PPG signal recognition errors may occur.
[0102] Therefore, in the embodiment of the present application, a single-cycle signal extraction module is used to extract the main signal based on the signal set S3 to obtain a single-cycle PPG main signal S4.
[0103] After obtaining the main signal S4, it is necessary to decompose the main signal S4 to obtain Figure 2 The main wave and the dicrotic wave shown in (1).
[0104] Exemplarily, after obtaining the main signal S4, the double Gaussian function model is used to decompose the main signal S4, and then the least squares method (LM algorithm) is used to fit it to obtain the first Gaussian wave S6 and the second Gaussian wave S7, wherein the first Gaussian wave is the main wave and the second Gaussian wave is the dicrotic wave.
[0105] Continue to see Figure 6 Exemplarily, the operation in the feature extraction stage is to perform feature calculation in the feature extraction module in the wearable device based on the obtained main signal S4, the first Gaussian wave, the second Gaussian wave and the basic information of the user.
[0106] Exemplarily, feature calculation is performed based on the main signal S4, the first Gaussian wave and the second Gaussian wave to obtain the first feature; the first feature includes but is not limited to the total duration T of S4, the rise time T1 of the first Gaussian wave, the double-wave interval ∆T, the reflection index RI, the enhancement index AI, the heart rate interval RR, and the K value.
[0107] Exemplarily, basic features are obtained according to the basic information, and the basic features include but are not limited to height, age, and weight.
[0108] Exemplarily, a combined feature (hereinafter referred to as the second feature) is derived from the first feature and the basic feature. The second feature includes but is not limited to the proportion of the first Gaussian wave online time, the hardening index SI, the normalized hardening index, the BMI index, etc.
[0109] Continue to see Figure 6 For example, the PPG signals collected from different users are processed based on the PPG signal processing method of the embodiment of the present application to form a PPG feature set, and then the PPG feature set is subjected to feature screening, and the screened feature set is trained as a PWV regression model using a machine learning algorithm or a multivariate linear regression algorithm to obtain a PWV regression model for predicting the PWV index. The PWV regression model can be sent to each smart wearable device, so that the smart wearable device can detect the PWV index based on the PWV regression model to improve the accuracy of PWV.
[0110] Exemplarily, the step of performing feature screening may be to screen out a feature set having a correlation coefficient between the reference PWV and the calculated feature greater than 0.1 based on Pearson correlation analysis.
[0111] Exemplarily, the above machine learning algorithms may include SVM, logistic regression, or mainstream decision tree models, such as random forest algorithm, iterative algorithm (AdaBoost), optimized distributed gradient boosting library (XGBoost), gradient boosting machine learning algorithm (CatBoost), gradient boosting decision tree model (LightGBM), etc.
[0112] Thus, through continuous iterative training, a PWV regression model is finally obtained. The PWV regression model in the embodiment of the present application can reduce the problem of pulse wave characteristics being unable to be calculated due to individual differences or wearing positions, and greatly improves the accuracy of the PWV index.
[0113] based on Figure 6 The description of the four stages of PPG signal processing shown in the figure, the implementation process of the PPG signal processing method provided in the embodiment of the present application may include:
[0114] S101, obtaining a photoplethysmogram (PPG) signal and an acceleration (ACC) signal collected by a wearable device.
[0115] The ACC signal is a three-axis ACC signal, specifically including an AccX signal along the X axis, an AccY signal along the Y axis, and an AccZ signal along the Z axis. Figure 7 In (1), curves Accx, Accy and Accz are the collected three-axis ACC signals.
[0116] Exemplarily, the sampling frequencies of the PPG signal and the ACC signal can both be set to 100 Hz, and the signals can be grouped and uploaded in 100 ms data packets.
[0117] For example, the PPG signal may be collected by a PPG sensor in a wearable device. Regarding the location of the PPG sensor, it may be located on the side in contact with the user's skin, such as Figure 3 The back side of the smartwatch is shown.
[0118] Exemplarily, the ACC signal may be collected by an ACC sensor integrated in the wearable device.
[0119] It should be noted that the PPG signal and ACC signal collected by the wearable device are collected by the wearable device in the same state and the same period.
[0120] In a possible implementation, since the ACC signal and the PPG signal are signals collected in the same state and the same period, the signal quality of the ACC signal can also be used to evaluate the signal quality of the PPG signal.
[0121] The quality evaluation process of the ACC signal may include:
[0122] S001, performing modulus calculation, differential and absolutization processing on the AccX signal, the AccY signal and the AccZ signal in sequence to obtain a differential modulus value AccSDiff;
[0123] Among them, the ACC signal modulus AccS is:
[0124] ;
[0125] Among them, the differential modulus value AccSDiff is:
[0126] ;
[0127] in, , N is the number of ACC signal module values.
[0128] For example, see Figure 7 In (2) and (3), the curve AccSDiff is the calculated differential mode signal, and the curve PPG signal is the collected PPG signal. By comparing the differential mode signal with the PPG signal, it can be seen that the PPG signal shows significant differences under different ACC signal states. Therefore, the motion detection of the wearable device can be performed based on the ACC signal, and the quality of the PPG signal can be evaluated based on the detection results.
[0129] S002, calculating the number of non-standard orientations of the three axes and the number of slope mutations within a preset period based on the AccX signal, the AccY signal and the AccZ signal;
[0130] Among them, the number of times the three-axis orientation does not meet the standard DirectCount and slope mutation times MaxSlopeCount It is used to identify whether the watch face is facing upward when the user wears the watch, meeting the tight wearing requirement, thereby reducing the situation where the PPG signal quality is reduced due to incorrect wearing posture.
[0131] For example, the number of times the three-axis orientation fails to meet the standard within the preset period may be the number of times the three-axis orientation fails to meet the standard within one second, where the judgment condition for failure to meet the standard may be Abs(mean(AccX j ))<0.5G, and Abs(mean(AccY j ))<0.5G, and Abs(mean(AccZ j ))>0.8G, j is the ACC data index of each axis corresponding to the i-th second. When the AccX signal, AccY signal and AccZ signal do not meet the above conditions at the same time, it is determined that the three-axis ACC signal does not meet the positive wearing condition in the current time, and the number of times the three-axis orientation does not meet the standard per second is increased by 1. Among them, G represents 1 gravitational acceleration, G=9.8m / s 2 .
[0132] For example, the number of slope mutations within the preset period can be that if any maximum or minimum slope value of the three-axis ACC signal within one second is greater than a preset slope threshold, it is determined that the ACC signal has a mutation within the current time, and the number of slope mutations within one second is increased by 1. The preset slope threshold can be set to 0.05G.
[0133] S003, based on the differential modulus AccSDiff , calculate the average value, maximum value and variance within the preset period;
[0134] Specifically, a non-overlapping sliding window is used to slide on the differential modulus value AccSDiff, and the average value per second is calculated for the data in the window. AccSMean i , maximum value per second AccSMaxVal i and the variance per second AccSVar i , until the calculation is completed to obtain the eigenvalue array of N consecutive seconds. The sliding window size is 1 second.
[0135] S004, when the number of non-standard changes in the three-axis orientations, the number of slope mutations, the average value, the maximum value, and the variance meet preset termination conditions, reacquiring the PPG signal and the ACC signal.
[0136] Specifically, the above-mentioned suspension conditions include:
[0137] Condition 1: If the cumulative number of times the three-axis orientation does not meet the standard DirectCount >5, it is determined that the current wearing posture of the wearable device does not meet the wearing requirements, the detection is terminated, and the user is prompted to wear the device correctly through the wearable device or mobile phone.
[0138] Condition 2: If the cumulative number of slope mutations MaxSlopeCount >8, the user's current physical state is determined to be not in a static state, the test is terminated, and the user is prompted to remain still through the wearable device or mobile phone.
[0139] Condition 3, get the upper eigenvalue array AccSMean i >0.01G number C1, AccSMaxVal i >0.04G number C2, AccSVar i >0.5G number C3. When C1>3 and C2>5, or C1>5 and C3>4, it is determined that the user's current physical state does not meet the static state, the detection is terminated, and the user is prompted to remain still through the wearable device or mobile phone.
[0140] In the embodiment of the present application, the quality of the PPG signal is predicted based on the quality evaluation result of the ACC signal, thereby avoiding the problem of being unable to accurately locate the single-cycle PPG signal in the subsequent calculation process.
[0141] S102, preprocessing the PPG signal to obtain a filtered signal, wherein the preprocessing includes performing a timestamp synchronization check on the PPG signal based on the ACC signal, performing packet loss detection based on timestamps of adjacent data packets of the PPG signal, and filtering the PPG signal.
[0142] Specifically, the timestamp of the PPG signal is verified with the timestamp of the ACC signal to determine whether the PPG signal is synchronized with the ACC data, and whether the PPG signal is lost is determined according to the timestamp of the necklace data packet of the PPG signal.
[0143] Exemplarily, if the timestamp difference between the PPG signal and the ACC signal is greater than 200 ms, it is considered that the PPG signal and the ACC signal are not synchronized, a data abnormality prompt is returned, and the PPG signal and the ACC signal are re-collected.
[0144] Exemplarily, if the timestamp difference between adjacent PPG signal data packets is greater than 150 ms, it is considered that there is packet loss in the PPG data, a data abnormality prompt is returned, and the PPG signal and ACC signal are re-collected.
[0145] When it is determined that there is no packet loss in the PPG signal, a second-order Butterworth filter with a frequency of 0.5-4 Hz is used for band-pass filtering, and finally the filtered signal PPGFilt is obtained.
[0146] S103, performing peak and valley detection on the filtered signal, and performing secondary processing on the filtered signal based on the detection result to obtain a single-cycle PPG signal set, wherein the secondary processing includes performing single-cycle signal interception on the filtered signal based on the detection result, aligning the start and end points of the intercepted signal set, and normalizing the amplitude.
[0147] Exemplarily, the peak-valley detection is performed on the above-mentioned filtered signal PPGFilt to obtain the peak-valley value corresponding to each heartbeat cycle, such as Figure 8 shown.
[0148] Exemplarily, according to the peak-valley value corresponding to each heartbeat cycle of the above-mentioned filtered signal PPGFilt, two adjacent valley value points are used as starting points to perform single-cycle signal interception (for an example, see Fig. 9 ), multiple single-cycle PPG signal sets S1 are obtained, and an example thereof can be seen in Fig.10 In (1).
[0149] Since the PPG amplitude fluctuates during the wearing process of the wearable device, it is necessary to align the start and end points of each single-cycle PPG signal S1 to obtain signal S2. The waveform of S2 is shown in Fig.10 As shown in (2).
[0150] Exemplarily, the alignment processing method is: take a single-cycle signal S with a length of N:
[0151] .
[0152] set up:
[0153] ,
[0154] Then modify the signal in S1 point by point to obtain signal S2, where each element in S2 is:
[0155] .
[0156] Exemplarily, N may be the number of signal points in signal S1.
[0157] Then the amplitude of the signal S2 after the alignment process is normalized to [0, 1] to obtain a single-cycle PPG signal set S3, where the waveform of S3 is shown in Fig.10 In (3).
[0158] Among them, each element in the signal set S3 is:
[0159] .
[0160] in, , N is the length of a single-cycle signal, data Min is the minimum value in the signal set S3, data Max is the maximum value in the signal set S3.
[0161] S104, matching each single-cycle PPG signal in the single-cycle PPG signal set with each template signal in a preset template signal set, setting the template signal with the highest number of successful matches as the single-cycle PPG main signal, wherein the preset template signal set includes at least one template signal.
[0162] Specifically, the template signal in the above-mentioned preset template signal set may be pre-set, or may be set according to the above-mentioned single-cycle PPG signal S3.
[0163] During the signal acquisition process of the wearable device, even if the user does not move or shake significantly, the PPG signal is still easily affected by factors such as the wearing position, tightness, arrhythmia or micro-movement of the human body, resulting in large differences in PPG signals in different cycles, and even single-cycle PPG signal recognition errors. Therefore, the embodiment of the present application also provides a single-cycle PPG main signal extraction process, and the specific implementation steps are as follows:
[0164] S401, sequentially calculating the skewness index and the kurtosis index of each single-cycle PPG signal in the single-cycle PPG signal set.
[0165] Among them, the skewness index Skew The calculation formula is as follows:
[0166] .
[0167] Among them, the kurtosis index Kur The calculation formula is as follows:
[0168] .
[0169] in, μ and σ Respectively represent the mean and variance of a single-cycle PPG signal, N is the number of elements in the single-cycle PPG signal set, PPG i The serial number is i A single-cycle PPG signal.
[0170] S402, filtering the single-cycle PPG signal set based on the skewness index and the kurtosis index of each single-cycle PPG signal to obtain the filtered single-cycle PPG signal set.
[0171] Among them, the above filtering condition is that when the skewness index and the kurtosis index simultaneously meet the preset threshold combination, it is determined that the current single-cycle PPG signal is not a noise signal, otherwise, it is set as a noise signal and filtered out.
[0172] Exemplarily, the above preset threshold combination is 0.28≥ Skew ≥-0.13, and 2.23≥ Kur ≥0.15.
[0173] S403: Create or update the preset template signal set based on the filtered single-cycle PPG signal set.
[0174] The step of creating a template signal in a preset template signal set based on the filtered single-cycle PPG signal set includes:
[0175] S4031, obtaining the number of templates in the preset template signal set;
[0176] Exemplarily, after the update is completed, the preset template signal set may include 4 template signals, which are 3 single-cycle template signals and 1 potential template signal.
[0177] S4032: When the number of templates is equal to 0, the first single-cycle PPG signal in the filtered single-cycle PPG signal set is set as the first template signal, and is added to the preset template signal set.
[0178] Specifically, when there is no template signal in the above preset template signal set, the first element in the filtered single-cycle PPG signal set is set as the first template signal and added to the preset template signal set.
[0179] S4033, when the number of templates is less than the preset template number threshold, the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set is calculated in sequence, and when any of the similarities is greater than the first similarity threshold, the corresponding single-cycle PPG signal is set as the second template signal, and it is added to the preset template signal set.
[0180] Specifically, if there are one or more template signals in the preset template signal set at this time, and the number of template signals is less than 3, the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set is calculated, and when the similarities are all greater than a first preset similarity threshold, the corresponding single-cycle PPG signal is set as a new template signal and added to the preset template signal set.
[0181] For example, since the peak and valley points of the PPG signal in different periods are not completely aligned, and the lengths of the PPG signals in different periods are not completely consistent, a dynamic time warping algorithm (DTW) is used in an embodiment of the present application to calculate the similarity between the single-period PPG signal and the template signal.
[0182] For example, in order to further simplify the complexity of similarity calculation, the embodiment of the present application uses the absolute distance method to calculate the distance between two points during the DTW distance calculation process. Fig.11 , where {B i} and {T j} are the sample points of the two PPG sequences (that is, the sample points corresponding to the above-mentioned single-cycle PPG signal and template signal). Then the distance between the two points D(B i , T j )=|B i -T j |, and obtain the DTW distance of the two groups of signals.
[0183] Exemplarily, the first preset similarity threshold may be set according to demand, and its value may be set to 0.3.
[0184] Furthermore, the step of creating a template signal in a preset template signal set based on the filtered single-cycle PPG signal set further includes:
[0185] S4034, when the number of templates is greater than or equal to the preset template number threshold, and all the similarities are greater than the first similarity threshold, setting the corresponding single-cycle PPG signal as a potential template signal, and adding the potential template signal to the preset template signal set.
[0186] Specifically, when the number of templates is greater than or equal to 3 and the similarity is greater than 0.3, the corresponding single-cycle PPG signal is set as a potential template signal and added to the preset template signal set to participate in the similarity calculation.
[0187] Exemplarily, each single-cycle PPG signal in the filtered single-cycle PPG signal set is matched with each template signal in the preset template signal set. When the number of matches of the potential template signal is greater than that of any other template signal in the preset template signal set, its corresponding template signal is replaced by the potential template signal, and the potential template signals in the preset template signal set are cleared.
[0188] In the embodiment of the present application, after the preset template signal set is constructed, the step of updating and matching the elements in the single-cycle PPG signal set with the elements in the preset template signal set is also included, including:
[0189] S404, sequentially calculating the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set.
[0190] S405: When the similarity is less than the first similarity threshold, the number of successful matches of the current template signal is increased by 1.
[0191] S406, when the similarity is less than the second similarity threshold, use the corresponding single-cycle PPG signal to update the current template signal until all the single-cycle PPG signals in the filtered single-cycle PPG signal set are matched.
[0192] Specifically, the step of updating the template signal using the single-cycle PPG signal may be to calculate the single-cycle PPG signal and the template signal using the mean method. Fig.11 According to the data correspondence rule in (3), the single-cycle PPG signal and the template signal are averaged point by point, and the calculated signal is set as a new template signal to replace the above template signal.
[0193] Exemplarily, the first similarity threshold is greater than the second similarity threshold.
[0194] Exemplarily, the second similarity threshold may be set according to requirements, and its value may be set to 0.1.
[0195] Furthermore, after the above step of updating the template signal based on the single-cycle PPG signal, the method further includes:
[0196] S407, calculating the similarity between the updated template signal and other template signals in the preset template signal set, and when any of the similarities is less than the second similarity threshold, merging the two corresponding template signals, merging the number of successful matches of the two template signals, and deleting the updated template signal.
[0197] Specifically, the updated template signal is compared with other template signals in the preset template signal set for similarity. When any similarity is less than the second similarity threshold, it means that the updated template signal and the other template signals corresponding to the similarity can be identified as the same template signal, and the two template signals are merged using the mean method, and the number of successful matches between the two are also merged, and the updated template signal is deleted.
[0198] Further, after completing the matching of all elements in the two sets, the template signal with the largest number of matches is set as the single-cycle PPG main signal S4 for this detection.
[0199] The embodiment of the present application adopts the template method combined with the DTW method to extract the single-cycle PPG main signal. Compared with the traditional Pearson correlation coefficient method, it reduces the complexity of PPG main signal extraction and improves the adaptability in the similarity judgment of signals of unequal length.
[0200] S105, decomposing the single-cycle PPG main signal based on a double Gaussian function model to obtain a parameter set.
[0201] Specifically, after obtaining the PPG main signal S4, the embodiment of the present application uses a double Gaussian function model to decompose the PPG main signal S4 to obtain a parameter set, and the double Gaussian function model is defined as follows:
[0202] .
[0203] Among them, A1 and A2 are the heights of a single Gaussian function curve, µ1 and µ2 are the peak positions of a single Gaussian function curve, and σ1 and σ2 are the widths of a single Gaussian function curve.
[0204] In order to further reduce the amount of parameter search calculations in subsequent links, the initial parameter values can also be set for the single-cycle PPG signal. The specific process is as follows:
[0205] S501, identifying the maximum value S4Max and the first position S4MaxLoc of the PPG main signal S4, and obtaining a second position S4MaxEndLoc with an amplitude of S4Max / 5 to the right of the first position;
[0206] S502, performing differentiation on the single-cycle PPG main signal to obtain a differential signal, and obtaining a zero-crossing position S5ZeroLoc of the differential signal;
[0207] S503, calculating initial parameters of the single-cycle PPG main signal in the double Gaussian function model based on the maximum value S4Max, the first position S4MaxLoc, the second position S4MaxEndLoc and the zero-crossing position S5ZeroLoc;
[0208] Specifically, set the starting value of [A1, µ1, σ1] to [S4Max / 2, S4MaxLoc / 3, S4MaxLoc-2*S5ZeroLoc]. Set the starting value of [A2, µ1, σ2] to [0, S4MaxLoc / 2, 2*(S4MaxLoc-2*S5ZeroLoc)].
[0209] The PPG main signal S4 is decomposed based on the initial parameters and the double Gaussian function model to obtain a parameter set.
[0210] S106, fitting the parameter set based on a linear least squares regression iterative algorithm to obtain a first Gaussian wave and a second Gaussian wave, wherein the first Gaussian wave is the main wave of the PPG signal, and the second Gaussian wave is the dicrotic wave of the PPG signal.
[0211] Specifically, the best parameter set is found in the above parameter set based on the LM (Levenberg-Marquardt) algorithm. The LM algorithm is a nonlinear least squares fitting algorithm that fits the data by minimizing the residual sum of squares. After fitting, the first Gaussian wave S6 and the second Gaussian wave S7 are obtained, and within a certain deviation range, S4=S6+S7.
[0212] For example, the first Gaussian wave S6 and the second Gaussian wave S7 after fitting are shown in FIG. Fig.12 (1) and (2). Fig.12 It can be seen that even when there is no obvious dicrotic wave in the PPG signal, the embodiment of the present application can still decompose it to obtain accurate main wave (first Gaussian wave S6) and dicrotic wave (second Gaussian wave S7).
[0213] In a possible implementation, after obtaining the first Gaussian wave S6 and the second Gaussian wave S7, the embodiment of the present application further provides a feature extraction method and a PWV regression model training method, including:
[0214] Step S107, performing feature calculation on the single-cycle PPG main signal, the first Gaussian wave, and the second Gaussian wave, and using the obtained feature set to train a preset PWV regression model.
[0215] Specifically, feature calculation is performed based on the PPG main signal S4, the first Gaussian wave S6 and the second Gaussian wave S7 to obtain a feature set, which includes but is not limited to the total duration T of S4, the rise time T1 of the first Gaussian wave, the double-wave interval ∆T, the reflection index RI, the enhancement index AI, the heart rate interval RR, and the K value (mean(PPG) / max(PPG)).
[0216] At the same time, based on the basic features of the user's height, age and weight, the derived combined features are calculated: the first Gaussian wave online time ratio T1 / T, the hardening index SI=Height / ∆T, the normalized hardening index SI / RR, and the BMI index Weight / Height 2 wait.
[0217] The calculated feature components are combined, and then feature screening is performed, and the screened feature set is trained using a machine learning algorithm or a multivariate linear regression algorithm to obtain a PWV regression model. The trained PWV regression model is used to predict the user's PWV value.
[0218] Exemplarily, the feature screening may be performed by screening out a feature set whose correlation coefficient between the reference PWV and the calculated feature is greater than 0.1 based on the Pearson correlation coefficient method.
[0219] Exemplarily, the above machine learning algorithms may include SVM, logistic regression, or mainstream decision tree models, such as random forest algorithm, iterative algorithm (AdaBoost), optimized distributed gradient boosting library (XGBoost), gradient boosting machine learning algorithm (CatBoost), gradient boosting decision tree model (LightGBM), etc.
[0220] Thus, through continuous iterative training, the PWV regression model is finally obtained. Based on the PWV regression model in the embodiment of the present application, the problem of pulse wave characteristics being unable to be calculated due to individual differences or wearing positions can be reduced, greatly improving the accuracy of the PWV index. Compared with the traditional wave-by-wave PPG decomposition, the embodiment of the present application uses a single-cycle PPG main signal to obtain a PPG decomposition waveform through an LM algorithm with an initial value, further simplifying the complexity of the operation, and the decomposed waveform is also closer to the real physiological waveform.
[0221] In addition, in order to better understand the technical solution provided by the embodiments of the present application, taking a wearable device as a smart watch as an example, based on the relationship between the software structure and hardware of the smart watch, the functional modules, hardware, and the interaction between the functional modules and hardware involved in implementing the PPG signal processing method provided by the embodiments of the present application are explained.
[0222] Before describing the software structure of the wearable device, the architecture that can be adopted by the software system of the wearable device is described first.
[0223] Specifically, in practical applications, the software system of wearable devices can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
[0224] In addition, it is understandable that the software systems used by the current mainstream wearable devices include but are not limited to Windows systems, Android systems and iOS systems. For ease of explanation, the embodiment of the present application takes the Android system of layered architecture as an example to exemplify the software structure of the wearable device.
[0225] In addition, it should be understood that the subsequent PPG signal processing method provided in the embodiments of the present application is also applicable to other systems in specific implementations.
[0226] See also Fig.13 , which is a block diagram of the software structure and hardware structure of the wearable device according to an embodiment of the present application.
[0227] like Fig.13 As shown in the figure, the layered architecture of wearable devices divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some implementations, the Android system can be divided into five layers, from top to bottom, namely the application layer / application layer (Applications) belonging to the application part, the framework layer / application framework layer (Application Framework, FWK) belonging to the core part, the runtime (Runtime) and the system library, and the hardware abstraction layer (HAL) and Linux kernel (Linux Kernel) layer belonging to the bottom layer.
[0228] The application layer can include a series of application packages. Fig.13 As shown, the application package may include camera, game, vascular health, setting and other applications, which are not listed here one by one and are not limited in this application.
[0229] Among them, the vascular health application can be an application specially provided for enabling the vascular health detection function.
[0230] It is understandable that, in actual applications, the functions implemented by the vascular health application can also be integrated into a sports health application that manages various sports information, or can also be integrated into a setting application, and this application does not impose any restrictions on this.
[0231] The framework layer can provide application programming interfaces (APIs) and programming frameworks for the application layer applications. In some implementations, these programming interfaces and programming frameworks can be described as functions. Fig.13 As shown, the framework layer may include functions such as content provider, window manager, view system, resource manager, etc., which are not listed here one by one and are not limited in this application.
[0232] It should be noted that the window manager located in the framework layer is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0233] In addition, it should be noted that the view system located in the framework layer includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, Figure 4 The display interface including the vascular health detection picture / icon shown in (1) and (2) may include a view for displaying text and a view for displaying a picture.
[0234] Continue to see Fig.13 ,Exemplarily, the runtime, specifically the Android runtime (Android Runtime) may include a core library and a virtual machine, which is mainly responsible for the scheduling and management of the Android system.
[0235] The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0236] Continue to see Fig.13 , exemplarily, the system library may include multiple functional modules, such as: surface manager, media library, three-dimensional (3D) graphics processing library (such as: OpenGL ES), two-dimensional (2D) graphics engine (such as: SGL), etc.
[0237] Continue to see Fig.13 ,Exemplarily, the HAL layer is an interface layer between the operating system kernel (kernel layer) and the hardware circuit, and its purpose is to isolate the FWK from the kernel so that Android does not overly rely on the kernel, so that the development of FWK can be carried out without considering the driver.
[0238] Continue to see Fig.13 For example, the HAL layer may include various interfaces, such as audio and video interface, GPS interface, call interface, WiFi interface, etc., which are not listed here one by one and are not limited in this application.
[0239] Continue to see Fig.13 , exemplary, the kernel layer in the Android system is a layer between hardware and software. The kernel layer may include various processes / threads, power management, various drivers, such as WiFi drivers, etc.
[0240] This is the end of the introduction to the software structure of wearable devices. It can be understood that: Fig.13 The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the wearable device. In other embodiments of the present application, the wearable device may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited by the present application.
[0241] based on Fig.13 The software structure of the wearable device shown in the figure, when the user triggers the vascular health detection operation through the vascular health application / setting application installed in the application layer, the wearable device responds to the operation, and the PPG sensor and ACC sensor of the hardware part will synchronously collect PPG signals and ACC signals, and then hand them over to the processor. The processor performs preprocessing and feature extraction on the sensor signal according to the program instructions stored in the internal memory, such as program instructions for preprocessing and feature extraction of the collected sensor signal, and then inputs the feature information of the extracted sensor signal into the PWV regression model (program) stored in the memory storage for PWV prediction, so that an accurate PWV value can be obtained. Finally, the user's vascular health is detected based on the PWV value.
[0242] For the specific logic of the PPG signal processing method provided in the embodiment of the present application, please refer to Figure 6 , I will not go into details here.
[0243] In order to better understand the technical solution provided in the embodiments of the present application, the wearable device is still taken as a smart watch as an example. Fig.14 , the specific structure of the smart watch and the devices involved in implementing the embodiments of the present application are specifically described.
[0244] See also Fig.14The wearable device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0245] Specifically, in the technical solution provided in the embodiment of the present application, in order to realize PPG signal processing, the sensor module 180 needs to include a PPG sensor 180A and an ACC sensor 180B. Among them, the PPG sensor can be used to collect PPG signals, and the ACC sensor can be used to collect ACC signals.
[0246] Continue to see Fig.14 For example, since both the PPG sensor 180A and the ACC sensor 180B are in communication with the processor 110, the PPG signal and the ACC signal collected by the PPG sensor 180A and the ACC sensor 180B are transmitted to the processor 110 according to Figure 6 The processing flow shown in the illustrated embodiment is used to obtain a feature set of a single-cycle PPG signal, thereby achieving accurate measurement of vascular health.
[0247] In addition, it should be noted that in actual applications, according to business needs and the scenarios in which the wearable device is applicable, the sensor 180 may also include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed one by one here and the present application does not impose any restrictions on this.
[0248] In addition, it should be noted that the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0249] Continue to see Fig.14 Exemplarily, the charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0250] Continue to see Fig.14 , exemplarily, the wireless communication function of the wearable device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0251] Specifically, in the technical solution provided in the embodiment of the present application, the characteristic information obtained after the wearable device processes the PPG signal can be sent to the cloud server, and the PWV regression model is trained by an electronic device with powerful processing capabilities such as a PC according to the characteristic information, and the trained PWV regression model is sent to the wearable device 100. In this way, the wearable device 100 can communicate with the cloud server through the mobile module 150 or the wireless communication module 160, and then obtain the PWV regression model.
[0252] Exemplarily, in some other possible implementations, the PWV regression model constructed by an electronic device such as a PC may also be transmitted to the wearable device 100 via the USB interface 130 .
[0253] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0254] Continue to see Fig.14, exemplarily, the display screen 194 is used to display images, videos, etc. In some implementations, the wearable device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
[0255] Continue to see Fig.14 , illustratively, camera 193 is used to capture still images or video.
[0256] Continue to see Fig.14 Exemplarily, the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the wearable device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
[0257] Continue to see Fig.14 Exemplarily, the internal memory 121 can be used to store computer executable program codes, which include instructions. In this way, the processor 110 executes various functional applications and data processing of the wearable device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the wearable device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0258] Specifically in the technical solution provided in the embodiment of the present application, the PWV regression model can be pre-downloaded into the internal memory 121.
[0259] The hardware structure of the wearable device 100 is introduced here. It should be understood that: Fig.14 The wearable device 100 shown is only an example. In a specific implementation, the wearable device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different component configuration. Fig.14 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0260] In addition, it is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0261] In addition, it should be noted that the PPG signal processing method provided by the above embodiments implemented by the electronic device in the actual application scenario can also be performed by a chip system included in the electronic device, wherein the chip system may include a processor. The chip system can be coupled to the memory so that the chip system calls the computer program stored in the memory when it is running to implement the steps performed by the above electronic device. The processor in the chip system can be an application processor or a processor other than an application processor.
[0262] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the PPG signal processing method in the above-mentioned embodiment.
[0263] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the PPG signal processing method in the above-mentioned embodiment.
[0264] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the PPG signal processing method in the above-mentioned embodiment, so as to control the receiving pin to receive the signal, so as to control the sending pin to send the signal.
[0265] In addition, it can be seen from the above description that the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0266] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A PPG signal processing method, It is characterized in that The method comprises: Obtain the photoplethysmogram (PPG) signal and acceleration (ACC) signal collected by the wearable device; Preprocessing the PPG signal to obtain a filtered signal, wherein the preprocessing includes performing a timestamp synchronization check on the PPG signal based on the ACC signal, performing packet loss detection based on timestamps of adjacent data packets of the PPG signal, and filtering the PPG signal; Performing peak and valley detection on the filtered signal, and performing secondary processing on the filtered signal based on the detection result to obtain a single-cycle PPG signal set, wherein the secondary processing includes performing single-cycle signal interception on the filtered signal based on the detection result, aligning the start and end points of the intercepted signal set, and normalizing the amplitude; Match each single-cycle PPG signal in the single-cycle PPG signal set with each template signal in the preset template signal set, and set the template signal with the highest number of successful matches as the single-cycle PPG main signal, wherein the preset template signal set includes at least one template signal, wherein the step of creating or updating the preset template signal set includes: sequentially calculating the skewness index and the kurtosis index of each single-cycle PPG signal in the single-cycle PPG signal set; filtering the single-cycle PPG signal set based on the skewness index and the kurtosis index of each single-cycle PPG signal to obtain the filtered single-cycle PPG signal set; and creating or updating the preset template signal set based on the filtered single-cycle PPG signal set; Decomposing the single-cycle PPG main signal based on a double Gaussian function model to obtain a parameter set; The parameter set is fitted based on a linear least squares regression iterative algorithm to obtain a first Gaussian wave and a second Gaussian wave, wherein the first Gaussian wave is the main wave of the PPG signal, and the second Gaussian wave is the dicrotic wave of the PPG signal.
2. The method according to claim 1, It is characterized in that The method of obtaining the photoplethysmogram (PPG) signal and the acceleration (ACC) signal collected by the wearable device includes: The PPG signal and the ACC signal collected by the wearable device in the same state and the same period are obtained.
3. The method according to claim 2, It is characterized in that The ACC signal includes an AccX signal along the X-axis, an AccY signal along the Y-axis, and an AccZ signal along the Z-axis; After acquiring the photoplethysmogram (PPG) signal and the acceleration (ACC) signal collected by the wearable device, the method further includes: Performing module value calculation, differential and absolute processing on the AccX signal, the AccY signal and the AccZ signal in sequence to obtain a differential module value AccSDiff; Based on the AccX signal, the AccY signal and the AccZ signal, the number of non-standard orientations of the three axes and the number of slope mutations within a preset period are calculated; Based on the differential modulus value AccSDiff, calculating the average value, maximum value and variance within the preset period; When the number of non-standard changes in the three-axis directions, the number of slope mutations, the average value, the maximum value, and the variance meet preset termination conditions, the PPG signal and the ACC signal are reacquired.
4. The method according to claim 3, It is characterized in that The preset termination conditions include: When the number of times the three-axis orientation fails to meet the standard is greater than a preset orientation failure threshold, reacquiring the PPG signal and the ACC signal; When the number of slope mutations is greater than a preset mutation threshold, reacquiring the PPG signal and the ACC signal; Obtain a first number whose average value is greater than a first preset threshold, a second number whose maximum value is greater than a second preset threshold, and a third number whose variance is greater than a third preset threshold; When the first number is greater than a first number threshold and the second number is greater than a second number threshold, reacquiring the PPG signal and the ACC signal; When the first number is greater than the third number threshold, and the third number is greater than the fourth number threshold, the PPG signal and the ACC signal are reacquired.
5. The method according to claim 1, It is characterized in that The performing single-cycle signal interception on the filtered signal based on the detection result to obtain a single-cycle signal set S1 includes: Based on two adjacent valley points in the filtered signal, single-cycle signal interception is performed on the filtered signal to obtain the single-cycle signal set S1.
6. The method according to claim 1, It is characterized in that The creating the preset template signal set based on the filtered single-cycle PPG signal set includes: Obtaining the number of templates in the preset template signal set; When the number of templates is equal to 0, the first single-cycle PPG signal in the filtered single-cycle PPG signal set is set as the first template signal, and is added to the preset template signal set; When the number of templates is less than the preset template number threshold, the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set is calculated in sequence. When any of the similarities is greater than the first similarity threshold, the corresponding single-cycle PPG signal is set as the second template signal and added to the preset template signal set.
7. The method according to claim 6, It is characterized in that The creating the preset template signal set based on the filtered single-cycle PPG signal set also includes: When the number of templates is greater than or equal to the preset template number threshold, and all the similarities are greater than the first similarity threshold, setting the corresponding single-cycle PPG signal as a potential template signal, and adding the potential template signal to the preset template signal set; Among them, each single-cycle PPG signal in the filtered single-cycle PPG signal set is matched with each template signal in the preset template signal set. When the number of successful matches of the potential template signal is greater than that of any other template signal in the preset template signal set, its corresponding template signal is replaced by the potential template signal, and the potential template signal in the preset template signal set is cleared.
8. The method according to claim 1, It is characterized in that The updating of the preset template signal set based on the filtered single-cycle PPG signal set includes: Sequentially calculating the similarity between each single-cycle PPG signal in the filtered single-cycle PPG signal set and each template signal in the preset template signal set; When the similarity is less than the first similarity threshold, the number of successful matches of the current template signal is increased by 1; When the similarity is less than the second similarity threshold, the current template signal is updated using its corresponding single-cycle PPG signal until all single-cycle PPG signals in the filtered single-cycle PPG signal set are matched, wherein the first similarity threshold is greater than the second similarity threshold.
9. The method according to claim 8, wherein when the similarity is less than the second similarity threshold, after using the corresponding single-cycle PPG signal to update the current template signal, further include: Calculate the similarity between the updated template signal and other template signals in the preset template signal set. When any of the similarities is less than the second similarity threshold, merge the two corresponding template signals, merge the number of successful matches of the two template signals, and delete the updated template signal.
10. The method according to claim 1, It is characterized in that The single-cycle PPG main signal is decomposed based on the double Gaussian function model to obtain a parameter set, including: Based on the maximum value S4Max of the single-cycle PPG main signal and the first position S4MaxLoc, obtaining a second position S4MaxEndLoc with an amplitude of S4Max / 5 to the right of the first position; Differentiating the single-cycle PPG main signal to obtain a differential signal, and acquiring a zero-crossing position S5ZeroLoc of the differential signal; Based on the maximum value S4Max, the first position S4MaxLoc, the second position S4MaxEndLoc and the zero-crossing position S5ZeroLoc, calculating the initial parameters of the single-cycle PPG main signal in the double Gaussian function model; The single-cycle PPG main signal is decomposed based on the initial parameters and the double Gaussian function model to obtain a parameter set.
11. The method according to claim 1, It is characterized in that After fitting the parameter set based on the linear least squares regression iterative algorithm to obtain the first Gaussian wave and the second Gaussian wave, the method further comprises: Features are calculated for the single-cycle PPG main signal, the first Gaussian wave, and the second Gaussian wave, and a preset PWV regression model is trained using the obtained feature set.
12. An electronic device, It is characterized in that The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the PPG signal processing method according to any one of claims 1 to 11.
13. A computer-readable storage medium, It is characterized in that It comprises a computer program, and when the computer program is run on an electronic device, the electronic device executes the PPG signal processing method according to any one of claims 1 to 11.
