Physiological detection method based on wearable device and wearable device
By integrating multi-source sensors and ring buffers in wearable devices, the alignment processing of multi-source data is achieved, and the problems of low accuracy of PPG data and data time deviation in motion are solved, and the accuracy and reliability of physiological parameter detection are improved.
Patent Information
- Application Number
- CN202380063964.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-09-09
- Filing Date
- 2023-08-24
- Publication Date
- 2025-04-22
AI Technical Summary
When the wearer is in a state of motion, the physiological parameters collected only by photovoltaic pulse wave schema (PPG) are less accurate, and there may be time deviations between the data collected by different sensors, affecting the accuracy of physiological parameters detection.
The alignment of multi-source data is achieved by integrating multi-source sensors, including PPG sensors and motion sensors in wearable devices, and storing data using a ring buffer. The specific steps include: after collecting enough PPG data, obtaining motion data that meets the preset conditions based on its time stamp, thereby realizing multi-source data alignment during the data acquisition time period.
By aligning the multi-source data, we ensure the accuracy of physiological parameter calculations, improve the reliability of the wearer's physiological parameter detection results, and reduce the generation of memory fragments.
Smart Images

Figure CN119866192A_ABST
Abstract
Description
Physiological detection method based on wearable device and wearable device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 9, 2022, with application number 202211103402.5 and invention name “Physiological detection method and wearable device based on wearable device”, the entire contents of which are incorporated by reference in this application.
[0002] The present application relates to the technical field of wearable devices, and in particular to a physiological detection method based on a wearable device and a wearable device.
[0003] Wearable devices such as smart watches can detect the wearer's physiological parameters (such as heart rate, blood oxygen, etc.). At present, when detecting the wearer's physiological parameters, photoplethysmography (PPG) is generally used. It is based on LED light sources and detectors, measures the attenuated light after reflection and absorption by human blood vessels and tissues, records the pulsation state of blood vessels and measures pulse waves to obtain corresponding physiological parameters. However, due to certain reasons (such as the user is in motion during detection), the accuracy of physiological parameters determined only by PPG data collected by PPG sensors is low. Therefore, wearable devices can use the PPG data collected by PPG sensors as the core signal and combine it with the motion data collected by motion sensors (such as accelerometers), that is, by fusing data collected by multi-source sensors to determine the wearer's physiological parameters.
[0004] However, since there may be time deviations between the data collected by different sensors, in order to ensure the accuracy of physiological parameter detection, the wearable device needs to align the data collected by multi-source sensors before data fusion. Then, the wearable device fuses the aligned multi-source data to determine the wearer's physiological parameters using the fused multi-source data.
[0005]
[0006] In view of this, the present application provides a physiological detection method based on a wearable device and a wearable device to achieve alignment of multi-source data.
[0007] In a first aspect, the present application provides a physiological detection method based on a wearable device, wherein the wearable device includes a multi-source sensor, wherein the multi-source sensor includes a PPG sensor and one or more motion sensors. The electronic device, the wearable device, receives a first operation, wherein the first operation is used to trigger the wearable device to detect a physiological parameter of a wearer of the wearable device, wherein the physiological parameter includes at least one of the following: heart rate, blood oxygen, pulse, cardiovascular;
[0008] In response to the first operation, the wearable device collects PPG data through the PPG sensor, and saves the PPG data collected by the PPG sensor in a first buffer. And collects motion data through the motion sensor and saves the motion data collected by each motion sensor in one or more second buffers; wherein each piece of PPG data collected by the PPG sensor and each piece of motion data collected by the motion sensor respectively corresponds to a timestamp for recording the collection time of the corresponding data;
[0009] After M pieces of PPG data are collected in the first buffer, the wearable device obtains multiple pieces of motion data that meet the preset conditions from each second buffer according to the timestamps corresponding to the M pieces of PPG data; wherein M is a preset value, the multiple pieces of motion data that meet the preset conditions in each second buffer are continuously collected by the corresponding motion sensor, and the time recorded in the timestamps corresponding to the multiple pieces of motion data is after the time recorded in the first timestamp, and the time recorded in the timestamp corresponding to at least one piece of motion data is before the time recorded in the second timestamp, and the difference between the number of the multiple pieces of motion data and M is less than the first preset value; the first timestamp is the earliest timestamp recorded among the timestamps corresponding to the M pieces of PPG data, and the second timestamp is the latest timestamp recorded among the timestamps corresponding to the M pieces of PPG data;
[0010] The wearable device obtains and outputs a physiological detection result based on the M pieces of PPG data and a plurality of pieces of motion data satisfying preset conditions obtained from the one or more second buffers.
[0011] In the present application, after the wearable device collects M PPG data in the first buffer, it indicates that there are enough PPG data to meet the data volume required for the calculation of physiological parameters. Then, the wearable device obtains multiple motion data that meet the preset conditions from each second buffer based on the timestamps corresponding to the M PPG data, so as to obtain the motion data within the data collection time period corresponding to the M PPG data, and realize the determination of multi-source data in the same period, thereby realizing the alignment of multi-source data. Then, the wearable device performs physiological detection based on the aligned multi-source data (i.e., the M PPG data and the multiple motion data that meet the preset conditions in each second buffer), that is, calculates the physiological parameters of the wearer of the wearable device, and outputs the corresponding physiological detection results. Since the physiological parameters are calculated based on the aligned multi-source data, the accuracy of the calculation of the physiological parameters can be guaranteed, and the accurate detection of the wearer's physiological parameters can be achieved.
[0012] In a possible design, the first buffer and the second buffer are circular buffers. A circular buffer is a data structure of a fixed-size, head-to-tail connected buffer. When a data element in the circular buffer is used up, the remaining data elements do not need to move their storage locations, which can reduce memory allocation. Therefore, the present application stores data in a circular buffer, which can make full use of the allocated memory, reduce the use of memory allocation, and thus reduce the generation of memory fragmentation.
[0013] In a possible design, the process of obtaining multiple motion data that meet the preset conditions from each second buffer is as follows: after collecting the M PPG data in the first buffer, for each second buffer, the wearable device reads the motion data of the time interval corresponding to the first timestamp and the second timestamp from the second buffer; calculates the difference between the M and the number of motion data of the time interval corresponding to the first timestamp and the second timestamp, and if the difference is less than the first preset value corresponding to the second buffer, determines that the motion data of the time interval corresponding to the first timestamp and the second timestamp in the second buffer meets the preset conditions, thereby determining the motion data of the motion sensor in the same period, and at the same time, the amount of motion data of the motion sensor in the same period can also meet the physiological parameter calculation requirements, thereby realizing the alignment of the motion data of the motion sensor with the PPG data of the PPG sensor, that is, realizing the alignment processing of multi-source data.
[0014] In another possible design, the process of obtaining multiple pieces of motion data satisfying the preset conditions from each second buffer is as follows: after the M pieces of PPG data are collected in the first buffer, for each second buffer, the wearable device reads the motion data of the time interval corresponding to the first timestamp and the second timestamp from the second buffer, and determines the earliest timestamp recorded in the timestamps corresponding to the motion data of the time interval corresponding to the first timestamp and the second timestamp to obtain the third timestamp of the second buffer. And determines the latest timestamp recorded in the timestamps corresponding to the motion data of the time interval corresponding to the first timestamp and the second timestamp to obtain the fourth timestamp of the second buffer.
[0015] The wearable device calculates the difference between M and the number of motion data in the time interval corresponding to the first timestamp and the second timestamp, and calculates the first time difference between the third timestamp of the second buffer and the first timestamp, and calculates the second time difference between the fourth timestamp of the second buffer and the second timestamp.
[0016] If the difference is smaller than the first preset value corresponding to the second buffer, the first time difference is smaller than the first preset time difference, and the second time difference is smaller than the second preset time difference, then it is determined that the motion data in the time interval corresponding to the first timestamp and the second timestamp in the second buffer meet the preset conditions, and the acquisition time is accurately aligned, thereby achieving accurate determination of the motion data of the motion sensor in the same period. At the same time, the amount of motion data of the motion sensor in the same period can also meet the physiological parameter calculation requirements, thereby achieving accurate alignment of the motion data of the motion sensor and the PPG data of the PPG sensor, that is, achieving alignment processing of multi-source data.
[0017] In some implementations, if the difference between the M and the number of motion data in the time interval corresponding to the first timestamp and the second timestamp in the second buffer is greater than or equal to the first preset value corresponding to the second buffer, indicating that the motion data of the motion sensor corresponding to the second buffer in the same period is small and does not meet the physiological parameter calculation requirement, the wearable device sends a first prompt message, and the first prompt message is used to indicate that the wearable device is collecting physiological data.
[0018] In some implementations, if the difference between the M and the number of motion data in the time interval corresponding to the first timestamp and the second timestamp in the second buffer is greater than or equal to the first preset value corresponding to the second buffer, the wearable device can clear all motion data in the second buffer.
[0019] In some implementations, if the first time difference value of the second buffer is greater than or equal to the first preset time difference, indicating that there is a large difference between the first timestamp and the third timestamp of the second buffer, and a long time has passed after the first timestamp before the motion sensor corresponding to the second buffer collects motion data, then the wearable device can store all motion data in the second buffer.
[0020] In some implementations, if the second time difference value of the second buffer is greater than or equal to the second preset time difference, indicating that the motion sensor corresponding to the second buffer may not have reported the collected motion data in a timely manner, the wearable device continues to wait, that is, after a preset period of time, continues to obtain motion from the second buffer for alignment processing.
[0021] In one possible design, the frequency at which the PPG sensor collects PPG data is a first device frequency, and the frequency at which the one or more motion sensors collect motion data is one or more second device frequencies;
[0022] Among them, the first device frequency is the same as the one or more second device frequencies; or, the first device frequency is different from the one or more second device frequencies; the first preset value is determined by the difference between the first device frequency and the one or more second device frequencies, and the smaller the difference between the first device frequency and the one or more second device frequencies, the smaller the first preset value; the second device frequencies of different motion sensors for collecting motion data are the same or different.
[0023] In a possible design, before the PPG data collected by the PPG sensor is saved in the first buffer, the wearable device takes each P PPG data collected by the PPG sensor as a first data packet, and saves the first data packet and the timestamp of the first data packet in the third buffer; wherein the timestamp of the first data packet is the timestamp of one PPG data among the P PPG data, P is a first preset value, and the timestamp of the first data packet is used as the timestamp corresponding to each PPG data among the P PPG data;
[0024] The wearable device calculates a first actual frequency at which the PPG sensor collects PPG data according to the time and P recorded by the timestamps of the adjacent first data packets in the third buffer;
[0025] Wherein, the storing the collected PPG data in the first buffer includes:
[0026] If the difference between the first actual frequency and the first device frequency is less than a second preset value, the wearable device caches the first data packet in the third buffer to the first buffer;
[0027] Among them, M pieces of PPG data are collected in the first buffer, including: K first data packets are collected in the first buffer, M=K*P.
[0028] In the present application, in order to save power consumption, the PPG sensor can report the collected PPG data in the form of a data packet, that is, when P PPG data are collected, the P PPG data are reported as a first data packet. Since packet loss may occur in the process of the PPG sensor reporting the data packet, the wearable device can perform a frequency deviation check on the PPG sensor before the alignment process to determine whether the first data packet is lost, that is, the wearable device calculates the first actual frequency of the PPG sensor based on the timestamps of the adjacent first data packets in the third buffer and the number P of PPG data included in the first data packet. If the difference between the first actual frequency of the PPG sensor and the first device frequency of the PPG sensor is less than the second preset value, indicating that packet loss has not occurred, the wearable device can cache the first data packet in the third buffer into the above-mentioned first buffer.
[0029] In some implementations, if the difference between the first actual frequency and the first device frequency is less than a second preset value, indicating that packet loss has occurred, the wearable device sends a second prompt message, and the second prompt message is used to indicate that the physiological data of the wearable device is abnormal.
[0030] In one possible design, the one or more motion sensors include an acceleration sensor and a gyroscope; the one or more second buffers include an acceleration buffer for storing the first motion data collected by the acceleration sensor and a gyroscope buffer for storing the second motion data collected by the gyroscope. Accordingly, the wearable device can also perform frequency deviation calibration on the acceleration sensor and the gyroscope.
[0031] Exemplarily, the process of performing frequency deviation calibration on the acceleration sensor is as follows:
[0032] Before the motion data collected by each motion sensor is respectively saved in one or more second buffers, the wearable device uses each Q first motion data collected by the acceleration sensor as a second data packet, and saves the second data packet and the timestamp of the second data packet in the fourth buffer; wherein the timestamp of the second data packet is the timestamp corresponding to one first motion data in the Q first motion data, Q is a second preset value, and the timestamp of the second data packet is used as the timestamp corresponding to each motion data in the Q first motion data;
[0033] The wearable device calculates a second actual frequency at which the acceleration sensor collects the first motion data according to the time and Q recorded by the timestamp of the adjacent second data packet in the fourth buffer.
[0034] The acceleration buffer stores the first motion data, including:
[0035] If the difference between the second actual frequency and the second device frequency corresponding to the acceleration sensor is less than a third preset value, the wearable device caches the second data packet in the fourth buffer to the second buffer;
[0036] The plurality of first motion data satisfying the preset conditions include: W second data packets, N=W*Q, and N is the number of the first motion data in the plurality of first motion data satisfying the preset conditions.
[0037] In the present application, after the wearable device obtains a second data packet reported by the acceleration sensor, it calculates the actual frequency of the acceleration sensor collecting the second data packet based on the second data packet and the previous second data packet of the second data packet, that is, based on the timestamps of the two adjacent second data packets and the number Q of the first motion data included in the second data packet, that is, obtains the above-mentioned second actual frequency. The wearable device calculates the difference between the second actual frequency and the second device frequency corresponding to the acceleration sensor. If the difference is less than the third preset value, it indicates that the second actual frequency of the acceleration sensor is consistent with the standard frequency of the acceleration sensor, that is, it indicates that there is no lost second data packet between the two adjacent second data packets, that is, it indicates that the acceleration sensor has not lost a packet, and the second data packet can be used for alignment. Then, the wearable device can cache the second data packet to the second buffer corresponding to the acceleration sensor, so that the second buffer stores motion data that can be used for alignment processing, avoiding the accumulation of frequency deviation errors, and avoiding the interference of abnormal motion data, thereby ensuring the accuracy of alignment.
[0038] In a possible design, after the wearable device determines multiple pieces of motion data that meet the preset conditions according to the timestamps corresponding to the M pieces of PPG data, the M pieces of PPG data and the multiple pieces of motion data that meet the preset conditions are stored in a fifth buffer. That is, the fifth buffer stores the aligned multi-source data, so that the wearable device can directly read the aligned multi-source data from the fifth buffer, calculate the physiological parameters of the wearer of the wearable device according to the aligned multi-source data, and output the corresponding physiological detection results based on the physiological parameters, so as to realize the fast reading of the aligned multi-source data, improve the calculation efficiency of the physiological parameters, and thus improve the generation efficiency of the physiological detection results.
[0039] In a second aspect, the present application provides a wearable device, comprising a display screen, a memory, a multi-source sensor and one or more processors; the display screen, the multi-source sensor, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, the multi-source sensor comprises a PPG sensor and one or more motion sensors, the memory is used to store computer program code, and the computer program code comprises computer instructions; when the processor executes the computer instructions, the wearable device executes the method described above.
[0040] In a third aspect, the present application provides a computer storage medium comprising computer instructions, which, when executed on a wearable device, enables the wearable device to execute the method described above.
[0041] In a fourth aspect, the present application provides a computer program product, which, when executed on a wearable device, enables the wearable device to execute the method described above.
[0042] It can be understood that the beneficial effects that can be achieved by the wearable device described in the second aspect, the computer storage medium described in the third aspect, and the computer program product described in the fourth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here.
[0043] FIG1 is a schematic diagram of a physiological parameter display provided in an embodiment of the present application;
[0044] FIG2 is a schematic diagram of the hardware structure of a wearable device provided in an embodiment of the present application;
[0045] FIG3 is a schematic diagram of a software architecture of a wearable device provided in an embodiment of the present application;
[0046] FIG4 is a schematic diagram of a flow chart of a multi-source alignment method provided in an embodiment of the present application;
[0047] FIG5 is a schematic diagram of a trigger monitoring method provided in an embodiment of the present application;
[0048] FIG6 is a second schematic diagram of a trigger monitoring method provided in an embodiment of the present application;
[0049] FIG7 is a schematic diagram of displaying first prompt information provided by an embodiment of the present application;
[0050] FIG8 is a schematic diagram of displaying second prompt information provided by an embodiment of the present application;
[0051] FIG9 is a schematic diagram of a physiological test result calculation process provided in an embodiment of the present application;
[0052] FIG. 10 is a schematic diagram of a preprocessing and alignment process provided in an embodiment of the present application.
[0053] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0054] Wearable devices such as smart watches can detect the wearer's physiological parameters and display the physiological parameters (as shown in FIG. 1 , the wearable device displays the wearer's heart rate) so that the wearer can know the current physiological condition.
[0055] The wearable device can calculate the wearer's physiological parameters using the PPG signal (i.e., PPG data) collected by the PPG sensor. However, during the PPG signal collection period, the wearer may be in motion, that is, the wearable device may be in a non-stationary state. Since the noise of the motion will seriously interfere with the quality of the PPG signal, resulting in motion artifacts, PPG waveform changes and other problems, it is impossible to accurately calculate heart rate, blood oxygen, pulse, cardiovascular and other physiological parameters using only the PPG signal. In order to improve the accuracy of the determination of physiological parameters, the wearable device can first fuse the data collected by the multi-source sensors in the wearable device, that is, fuse the PPG data collected by the PPG sensor with the motion data collected by the motion sensor. Then, the wearable device can denoise the fused data (i.e., remove the motion noise) and extract the real PPG waveform, so that the real PPG waveform can be used to calculate the physiological parameters to ensure the accuracy of the physiological parameters.
[0056] Exemplarily, the motion sensor may include a gyroscope (gyro) sensor and / or an acceleration (acceleration, acc) sensor.
[0057] However, since multi-source sensors are different devices, the device frequencies of each sensor in the multi-source sensor are different, that is, the data are not reported at the same time, that is, the timestamps of the data reported by each sensor may be inconsistent, which makes the time deviation between the data received by the wearable device from different sensors large. For example, the timestamp of the PPG data received by the wearable device is 10:20:30, while the timestamp of the motion data is 10:21:40. The time difference between the two is large, and the data is not collected in the same time period. Therefore, the accuracy of the physiological parameters calculated based on the fused data of the two is low. And it may cause a large difference in the amount of data received from different sensors. For example, when the wearable device collects 100 PPG data, it only collects 60 motion data. The data volume of the two is very different, and it is impossible to fuse and denoise well, so the accuracy of the PPG waveform extracted from the fused and denoised data cannot be guaranteed, that is, the accuracy of the calculation of the physiological parameters cannot be guaranteed.
[0058] Therefore, in response to the above problems, the present application proposes a multi-source data alignment method based on a wearable device. The wearable device contains a multi-source sensor, a first buffer and a second buffer. The multi-source sensor includes a PPG sensor and a motion sensor, and the first buffer is used to store the PPG data collected by the PPG sensor. The number of the second buffers corresponds one-to-one to the type of the motion sensor. Each second buffer is used to store the motion data collected by the corresponding motion sensor. When the PPG data in the first buffer reaches a certain number, it indicates that the PPG data is sufficient and can be used to calculate physiological parameters. The wearable device can first determine the data collection time period according to the timestamp of the PPG data in the first buffer. Afterwards, the wearable device obtains the motion data with a timestamp within the data collection time period from each second buffer to achieve the acquisition of motion data within the same time period. Furthermore, if the motion data within the data collection period meets the requirements, indicating that the amount of motion data is slightly different from the amount of PPG data, the motion data can be used to calculate physiological parameters, and the alignment of multi-source data (i.e., motion data and PPG data) can be realized. After that, the wearable device can use the aligned multi-source data for fusion denoising, extract the real PPG waveform, and use the real PPG waveform to calculate the corresponding physiological parameters, thereby ensuring the accuracy of the physiological parameter calculation. At the same time, by storing data in the buffer, the allocated memory can be fully utilized, the use of memory allocation can be reduced, and the generation of memory fragmentation can be reduced.
[0059] Exemplarily, the wearable device is a device such as a smart watch or a smart bracelet that is in contact with the wearer and can collect the wearer's physiological parameters. In the following, the hardware structure of the wearable device will be described by taking the wearable device as a smart watch as an example in conjunction with FIG.
[0060] As shown in FIG2 , the smart watch 200 includes: a watch body and a wristband connected to each other, wherein the watch body may include a front shell (not shown in FIG2 ), a touch screen 210 (also called a touch panel), a display screen 220, a bottom shell (not shown in FIG2 ), and a processor 230, a micro control unit (MCU) 240, a memory 250, a microphone (MIC) 260, a Bluetooth (BT) module 270, a physiological parameter detection sensor 280, a power supply 291, and a power management system 292, etc. Although not shown, the smart watch may also include an antenna, a WiFi module, a GPS module, a speaker, an accelerometer, a gyroscope, an acceleration sensor, etc. Those skilled in the art will appreciate that the smart watch structure shown in FIG2 does not constitute a limitation on the smart watch, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0061] The functional components of the smart watch 200 are introduced below:
[0062] The touch panel 210, also known as a touchpad, can collect the touch operations of the watch user on it (such as the operation of the user using any suitable object or accessory such as a finger, stylus, etc. on the touch panel or near the touch panel), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 210 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 230, and can receive and execute the command sent by the processor 230. In addition, the touch panel can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 210, the smart watch can also include other input devices, which may include but are not limited to function keys (such as volume control buttons, switch buttons, etc.).
[0063] The display screen 220 can be used to display information input by the user or information provided to the user and various menus of the watch. Optionally, the display screen 220 can be configured in the form of LCD, OLED, etc. Further, the touch panel 210 can cover the display screen 220. When the touch panel 210 detects a touch operation on or near it, it is transmitted to the processor 230 to determine the type of touch event, and then the processor 230 provides a corresponding visual output on the display screen 220 according to the type of touch event. Although in Figure 2, the touch panel 210 and the display screen 220 are used as two independent components to realize the input and output functions of the watch, in some embodiments, the touch panel 210 and the display screen 220 can be integrated to realize the input and output functions of the watch.
[0064] The processor 230 is used to perform system scheduling, control the display screen, touch screen, support processing of the microphone 360, one or more film actuators, Bluetooth module 270, etc.
[0065] Bluetooth module 270, the smart watch can exchange information with other electronic devices (such as mobile phones, tablet computers, etc.) through the Bluetooth module 270.
[0066] The micro control unit 240 is used to control the sensor, perform calculations on sensor data, and communicate with the processor 230 .
[0067] The sensor may be a physiological parameter detection sensor 280, an air pressure sensor, a gravity sensor, a light sensor, a motion sensor or other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. As for other sensors that may be configured in the watch, such as an accelerometer, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be described in detail here.
[0068] The physiological parameter detection sensor 280 may include a PPG sensor or the like.
[0069] The memory 250 is used to store software programs and data. The processor 230 executes various functional applications and data processing of the watch by running the software programs and data stored in the memory. The memory 250 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created by using the watch (such as audio data, a phone book, etc.). In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0070] The smart watch 200 also includes a power source 291 (such as a battery) for supplying power to various components. Optionally, the power source 291 can be logically connected to the processor 230 through a power management system 292, so that the power management system 292 can manage functions such as charging, discharging, and power consumption management.
[0071] It should be understood that the illustrated smart watch 200 is only one example of a wearable device, and the smart watch 200 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration. The various components shown in FIG. 2 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.
[0072] FIG3 is a software structure diagram of a wearable device provided in an embodiment of the present application. The layered architecture of the wearable device divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, taking the wearable device as a smart watch as an example, as shown in FIG3, the operating system of the smart watch can include five layers, namely, from top to bottom, UI (User Interface) application layer, system service layer, algorithm layer, hardware abstraction layer, and kernel layer.
[0073] The UI application layer may include a series of application packages, such as watch faces, sports records, calls, exercises, etc.
[0074] The system service layer may include a series of system services. As shown in FIG3 , the system service layer may include a heart rate service, which may provide physiological parameter information of the smart watch wearer, such as heart rate, blood pressure, blood oxygen, pulse rate (referred to as pulse), respiratory rate and body temperature, and may also detect physiological parameter change information of the smart watch wearer. The system service layer may also include a step counting service, a calorie service and a heart health service.
[0075] The algorithm layer may include a series of algorithm models. As shown in FIG3 , the algorithm layer may include a heart rate algorithm model and a multi-source data alignment algorithm model. The heart rate algorithm model is used to calculate the physiological parameters of the wearer of the smart watch, and the multi-source data alignment algorithm model is used to align the data collected by multi-source sensors. The algorithm layer may also include a sleep algorithm model, a wearing algorithm model, a dimming algorithm model, and the like.
[0076] The hardware abstraction layer (HAL) is an interface layer between the operating system kernel and the hardware circuit. As shown in Figure 3, the HAL layer includes storage HAL, display HAL, touch HAL, Bluetooth HAL, and global positioning system (GPS) HAL. Among them, the storage HAL can be used to store and process the data collected by the sensor. The display HAL can be used to display information. The touch HAL can be used to detect user trigger operations. The Bluetooth HAL can be used to implement Bluetooth communication functions. The GPS HAL can be used to implement positioning functions. The HAL layer can be implemented through a C++ library.
[0077] As shown in FIG. 3 , the kernel layer includes at least an operating system kernel.
[0078] It is understood that the layers in the software structure shown in FIG3 and the components contained in each layer do not constitute a specific limitation on the smart watch. In other embodiments of the present application, the smart watch may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
[0079] The present application provides a multi-source data alignment method based on a wearable device. When the wearable device determines the physiological parameters of the wearer of the wearable device by means of multi-source data fusion, the PPG data collected by the PPG sensor is used as the core data, and the motion data collected by the motion sensor is integrated. However, since different sensors report data at different frequencies, in order to ensure the accuracy of physiological parameter calculation, the wearable device needs to align the multi-source data before fusing the multi-source data to obtain multiple multi-source data in the same time period. Then, the wearable device fuses and denoises the multiple multi-source data, extracts the real PPG waveform, and uses the real PPG waveform to calculate the corresponding physiological parameters, thereby avoiding the low accuracy of physiological parameter calculation due to motion noise.
[0080] The following will take the above-mentioned wearable device as a smart watch as an example, and combine the accompanying drawings to introduce in detail the multi-source data alignment method provided in the embodiment of the present application. As shown in Figure 4, the method includes the following steps:
[0081] S401: A smart watch receives a first operation, where the first operation is used to trigger the smart watch to detect a physiological parameter of a wearer of the smart watch.
[0082] The physiological parameters include one or more of heart rate, blood oxygen, pulse and cardiovascular. Exemplarily, the cardiovascular physiological parameter may be blood pressure, which is the lateral pressure of blood in a blood vessel on the blood vessel wall. The blood oxygen physiological parameter may be blood oxygen saturation.
[0083] Exemplarily, when a user wants the smart watch to perform a certain health monitoring, the health monitoring needs to detect the wearer's physiological parameters, and the user can click on the relevant health function control on the interface displayed by the smart watch. Here, the user clicks on the relevant health function control on the interface as the above-mentioned first operation. For example, as shown in Figures 5 and 6, there are a heart rate monitoring control 50 and a sleep monitoring control 60 on the interface displayed by the smart watch. When the user wants the smart watch to monitor the wearer's heart rate, he can click on the heart rate monitoring control 50 on the interface displayed by the smart watch (as shown in Figure 5). Here, the user clicks on the heart rate monitoring control as the first operation, and the first operation is used to trigger the smart watch to detect the wearer's heart rate, that is, the first operation is used to trigger the smart watch to implement the heart rate monitoring function. For another example, when the user wants the smart watch to monitor the wearer's sleep quality, the user can click on the sleep monitoring control 60 (as shown in Figure 6) on the interface displayed by the smart watch. Here, the operation of the user clicking on the sleep monitoring control is the first operation, and the first operation is used to trigger the smart watch to detect the wearer's physiological parameters so as to determine the wearer's sleep quality using the wearer's physiological parameters. In other words, the first operation is used to trigger the smart watch to implement a sleep quality monitoring function.
[0084] It should be understood that the first operation listed above is only an example, and the first operation may also be other types of operations, such as a user triggering specific hardware on a smart watch to trigger the smart watch to detect the physiological parameters of the wearer of the smart watch. This application does not limit the type of the first operation, as long as it can trigger the smart watch to detect the physiological parameters of the wearer of the smart watch.
[0085] S402: In response to the first operation, the smart watch collects PPG data through the PPG sensor and saves the PPG data collected by the PPG sensor in a first buffer. And for each motion sensor, the smart watch collects motion data through the motion sensor and saves the motion data collected by the motion sensor in a second buffer corresponding to the motion sensor.
[0086] Wherein, each piece of PPG data collected by the PPG sensor and each piece of motion data collected by the motion sensor respectively corresponds to a timestamp, which is used to record the collection time of the corresponding data;
[0087] Generally, the motion sensor includes an acceleration sensor and / or a gyroscope. The acceleration sensor is used to collect the acceleration of the smart watch, and the gyroscope is used to collect the angular velocity of the smart watch. Accordingly, the motion data collected by the motion sensor includes the acceleration data and / or angular velocity data of the smart watch. Of course, if other types of motion data are used when detecting the physiological parameters of the wearer of the smart watch, the motion sensor may also include a corresponding type of motion sensor, and this application does not limit the sensor type included in the motion sensor.
[0088] Among them, the motion sensor and PPG sensor in the above-mentioned smart watch collect and report data at a certain frequency. The smart watch can allocate a buffer (i.e., a first buffer) for the PPG sensor on the smart watch, and the first buffer is used to save the PPG data collected by the PPG sensor. And the smart watch can allocate a corresponding buffer (i.e., a second buffer) for each motion sensor on the smart watch, and the second buffer is used to save the motion data collected by the corresponding motion sensor. For example, the motion sensors used to detect physiological parameters include acceleration sensors and gyroscopes. Then the smart watch allocates a second buffer for the acceleration sensor, and allocates a second buffer for the gyroscope. The second buffer corresponding to the acceleration sensor is used to save the motion data collected by the acceleration sensor (such as the acceleration of the smart watch), and the second buffer corresponding to the gyroscope is used to save the motion data collected by the gyroscope (such as the angular velocity of the smart watch).
[0089] The buffer is a first-in-first-out queue. In one case, the first buffer and the second buffer are ring buffers. A ring buffer is a data structure used to represent a fixed-size, head-to-tail connected buffer. By storing the corresponding PPG data or motion data in the ring buffer, the allocated memory can be fully utilized, the use of memory allocation can be reduced, and thus the generation of memory fragmentation can be reduced.
[0090] In another case, the first buffer and the second buffer may also be linear buffers, and the data in the linear buffers are arranged and read sequentially. By storing the corresponding PPG data or sports data through the linear buffer, the smart watch may need to consider memory management, which may require frequent memory allocation, increase the system and increase memory fragmentation.
[0091] In the embodiment of the present application, after obtaining the PPG data collected by the PPG sensor, the smart watch can save the PPG data collected by the PPG sensor in the first buffer. And for each motion sensor, after obtaining the motion data collected by the motion sensor, the smart watch saves the motion data in the second buffer corresponding to the motion sensor.
[0092] S403: After collecting M pieces of PPG data in the first buffer, the smart watch obtains multiple pieces of motion data that meet preset conditions from each second buffer according to timestamps corresponding to the M pieces of PPG data.
[0093] Wherein, M is a preset value, and the multiple motion data satisfying the preset condition in each second buffer are that the timestamp corresponding to each motion data in the multiple motion data is after the first timestamp and before the second timestamp, and the difference between the number of the multiple motion data and M is less than the first preset value. The first timestamp is the earliest timestamp among the timestamps corresponding to the M PPG data, and the second timestamp is the latest timestamp among the timestamps corresponding to the M PPG data. The preset value can be a positive integer, which can be set according to actual needs. For example, the preset value is 100.
[0094] In the embodiment of the present application, when the number of PPG data stored in the first buffer is M, it indicates that enough PPG data has been stored, and the smart watch can use the M PPGs to detect physiological parameters. In order to improve the accuracy of physiological parameter detection, the smart watch first obtains the earliest timestamp recorded in the timestamps corresponding to the M PPG data, and uses it as the first timestamp, obtains the latest timestamp recorded in the timestamps corresponding to the M PPG data, and uses it as the second timestamp. In other words, the PPG data corresponding to the first timestamp is the earliest PPG data collected by the above PPG sensor in the M PPG data, and the PPG data corresponding to the second timestamp is the latest PPG data collected by the above PPG sensor in the M PPG data.
[0095] Afterwards, the smart watch uses the time interval corresponding to the first timestamp and the second timestamp as the data collection time period. For example, if the first timestamp is time point 1 and the second timestamp is time point 2, then the data collection time period is from time point 1 to time point 2.
[0096] Afterwards, for each second buffer, the smart watch obtains the motion data with a timestamp within the data collection time period from the second buffer to ensure that the collection time is aligned, and the smart watch counts the number of motion data within the data collection time period in the second buffer.
[0097] Afterwards, the smart watch calculates the difference between the above M and the number of motion data in the data collection time period in the second buffer, and obtains the data deviation of the motion sensor corresponding to the second buffer. Then, in one case, if the data deviation of the motion sensor corresponding to each second buffer is less than the first preset value corresponding to the motion sensor corresponding to each second buffer, it indicates that the motion data collected by the motion sensor stored in each second buffer is relatively large, and the data volume of the motion data in the data collection time period in each second buffer is aligned with the data volume of the above PPG data, that is, the data demand for physiological parameter detection has been met, then the smart watch can respectively use the motion data in the data collection time period in each second buffer as multiple motion data in each second buffer that meet the preset conditions, to achieve the determination of multiple motion data in the same period, thereby achieving the alignment of multi-source data.
[0098] In another case, for each second buffer, the smart watch obtains the earliest timestamp of the timestamp corresponding to the motion data in the data collection time period in the second buffer, and uses it as the third timestamp of the second buffer. That is to say, the motion data corresponding to the third timestamp of the second buffer is the earliest motion data collected by the motion sensor corresponding to the second buffer in the data collection time period in the second buffer. If the time difference between the first timestamp and the third timestamp of each second buffer is less than the first preset time difference, and the data deviation of the motion sensor corresponding to each second buffer is less than the first preset value corresponding to the motion sensor corresponding to each second buffer, it indicates that the start collection time corresponding to the above-mentioned PPG data is highly consistent with the start collection time corresponding to the motion data in the data collection time period in each second buffer, which ensures the alignment of the collection time to a certain extent, and also meets the data demand for physiological parameter detection, then the smart watch can use the motion data in the data collection time period in each second buffer as multiple motion data in each second buffer that meet the preset conditions.
[0099] In another case, for each second buffer, the smart watch obtains the timestamp with the latest recording time among the timestamps corresponding to the motion data in the data collection time period in the second buffer, and uses it as the fourth timestamp of the second buffer. That is to say, the motion data corresponding to the fourth timestamp of the second buffer is the motion data collected latest by the motion sensor corresponding to the second buffer in the data collection time period in the second buffer. If the time difference between the second timestamp and the fourth timestamp of each second buffer is less than the second preset time difference, and the data deviation of the motion sensor corresponding to each second buffer is less than the first preset value corresponding to the motion sensor corresponding to each second buffer, it indicates that the end collection time corresponding to the above-mentioned PPG data is highly consistent with the end collection time corresponding to the motion data in the data collection time period in each second buffer, which ensures the alignment of the collection time to a certain extent, and also meets the data demand for physiological parameter detection, then the smart watch can use the motion data in the data collection time period in each second buffer as multiple pieces of motion data in each second buffer that meet the preset conditions.
[0100] In another case, for each second buffer, the smart watch obtains the earliest timestamp recorded in the timestamps corresponding to the motion data in the data collection time period in the second buffer, and uses it as the third timestamp of the second buffer. And the smart watch obtains the latest timestamp recorded in the timestamps corresponding to the motion data in the data collection time period in the second buffer, and uses it as the fourth timestamp of the second buffer. That is to say, the motion data corresponding to the third timestamp of the second buffer is the earliest motion data collected by the motion sensor corresponding to the second buffer in the data collection time period in the second buffer, and the motion data corresponding to the fourth timestamp of the second buffer is the latest motion data collected by the motion sensor corresponding to the second buffer in the data collection time period in the second buffer. If the time difference between the first timestamp and the third timestamp of each second buffer is less than the first preset time difference, the time difference between the second timestamp and the fourth timestamp of each second buffer is less than the second preset time difference, and the data deviation of the motion sensor corresponding to each second buffer is less than the first preset value corresponding to the motion sensor corresponding to each second buffer, it indicates that the time interval corresponding to the third timestamp and the fourth timestamp of each second buffer is highly consistent with the data collection time period, that is, the collection time is more aligned, and the data demand for physiological parameter detection is also met. In this case, the smart watch can use the motion data in each second buffer as multiple motion data that meet the preset conditions, thereby improving the accuracy of multi-source data fusion, and further improving the accuracy of physiological parameter detection.
[0101] In addition, in the above situation, if the data deviation of the motion sensor corresponding to the second buffer is greater than or equal to the first preset value, it indicates that due to some reasons (such as abnormality of the motion sensor, etc.), the data volume of the PPG data in the first buffer is greatly different from the data volume of the motion data in the second buffer during the data collection period, that is, the motion data collected by the motion sensor stored in the second buffer is less, and the two cannot be well integrated, then the smart watch can determine that the motion data in the data collection period in the second buffer does not meet the preset conditions. In addition, the smart watch can clear the PPG data in the first buffer and all the motion data in the second buffers, wait for the PPG sensor and each motion sensor to re-collect data, and save the new PPG data collected by the PPG sensor to the first buffer, and save the new motion data collected by each motion sensor to the corresponding second buffer, so that the smart watch can continue to perform multi-source data alignment processing using the PPG data in the first buffer and the motion data in each second buffer. And / or, the smart watch can issue a first prompt message, which is used to indicate that the wearable device is collecting physiological data (as shown in Figure 7).
[0102] If the time difference between the first timestamp and the third timestamp of the second buffer is greater than or equal to the first preset time difference, it indicates that the first timestamp and the third timestamp of the second buffer differ greatly, and the motion sensor corresponding to the second buffer collects motion data after a long time after the first timestamp, which means that the start collection time corresponding to the M pieces of PPG data is less consistent with the start collection time corresponding to the motion data in the data collection time period in the second buffer, and the data collection times of the two are not aligned. Therefore, the smart watch determines that the motion data in the data collection time period in the second buffer does not meet the preset conditions, that is, the motion data in the data collection time period in the second buffer cannot be fused with the PPG data to achieve accurate detection of physiological parameters. In addition, the smart watch can clear the PPG data in the first buffer and the motion data in the second buffers, wait for the PPG sensor and the motion sensors to re-collect data, and save the new PPG data collected by the PPG sensor to the first buffer, and save the new motion data collected by the motion sensors to the corresponding second buffers.
[0103] If the time difference between the second timestamp and the fourth timestamp of the second buffer is greater than the second preset time difference, it indicates that the second timestamp and the fourth timestamp of the second buffer differ greatly, and the motion sensor corresponding to the second buffer did not collect motion data for a long time before the second timestamp, which means that the end collection time corresponding to the M pieces of PPG data is less consistent with the end collection time corresponding to the motion data in the data collection time period in the second buffer, and the data collection times of the two are not aligned. Therefore, the smart watch determines that the motion data in the data collection time period in the second buffer does not meet the preset conditions, that is, the motion data in the data collection time period in the second buffer cannot be fused with the PPG data to achieve accurate detection of physiological parameters. Moreover, this situation may be caused by the fact that the motion sensor corresponding to the second buffer does not report the collected motion data in time, so the smart watch can continue to wait for the motion sensor corresponding to the second buffer to report the collected motion data, so as to update the motion data in the data collection time period in the second buffer, so that the smart watch determines whether the updated motion data in the data collection time period in the second buffer meets the preset conditions.
[0104] In some embodiments, if the smart watch clears the data in the first buffer and the second buffer because the motion data in the second buffer during the above-mentioned data collection time period does not meet the preset conditions, resulting in the inability to use the data in the first buffer and the second buffer to detect physiological parameters, the smart watch cannot display the corresponding physiological parameters, or the physiological parameters displayed by the smart watch have not been updated.
[0105] In some embodiments, when the smart watch determines that the motion data in the upper data collection period in each second buffer meets the preset conditions, indicating that the motion data in the above data collection period in each second buffer is aligned with the above M PPG data, the smart watch can save the aligned motion data in the above data collection period and the above M PPG data in the buffer of the algorithm layer. The buffer of the algorithm layer can serve as a fifth buffer, so that the smart watch can directly read the data that can be used for physiological parameter detection from the fifth buffer, thereby improving the efficiency of acquiring the aligned multi-source data.
[0106] Exemplarily, the smart watch can save the motion data in the data collection period and the M PPG data in each aligned second buffer in a fifth buffer to reduce the number of buffers to be created. Of course, the smart watch can also save the motion data in the data collection period and the M PPG data in each aligned second buffer in different fifth buffers. For example, if the M PPG data are saved in a fifth buffer, the fifth buffer is the sensor corresponding to the PPG sensor, which is used to save the aligned PPG data. Each motion sensor has a corresponding fifth buffer. The fifth buffer corresponding to the motion sensor is used to store the motion data in the data collection period in the second buffer corresponding to the motion sensor after alignment.
[0107] In some embodiments, after saving the motion data in the data collection period and the M PPG data in each second buffer, the smart watch can delete the motion data in the data collection period in the corresponding second buffer and the M PPG data in the first buffer to save resources.
[0108] In some embodiments, in order to save smart watch system overhead and reduce power consumption, the data collected by the above-mentioned sensor is reported in the form of a data packet. Specifically, the PPG data collected by the above-mentioned PPG sensor is reported in the form of a data packet, that is, the smart watch caches the PPG data in the PPG data packet collected by the PPG sensor in the first buffer. Among them, the PPG data packet may include P PPG data, that is, the PPG sensor reports only after collecting P PPG data. The motion data collected by the above-mentioned motion sensor is also reported in the form of a data packet, that is, the smart watch caches the motion data in the motion data packet collected by the sensor in the second buffer. The motion data packet may include motion data of a preset value, that is, the motion sensor reports only after collecting the motion data of the preset value. For example, the motion sensor includes an acceleration sensor. Every time the acceleration sensor collects Q acceleration data, the Q acceleration data are reported as an acceleration data packet, that is, the acceleration data includes Q acceleration data. For another example, the motion sensor includes a gyroscope. Every time the gyroscope collects T angular velocity data, it reports the T angular velocity data as an angular velocity data packet, that is, the acceleration data includes T acceleration data.
[0109] Exemplarily, the number of data included in the data packet may be constant or variable. For example, P is a first preset value, and the first preset value may be a positive integer greater than 0. The first preset value may be constant, and the first preset value is the same when the smart watch is in different modes. Of course, in order to better save the system overhead of the smart watch and reduce power consumption, the first preset value may be variable, which is related to the mode in which the smart watch is located, and there are corresponding first preset values for different modes. For example, when the smart watch is in sports mode, the first preset value may be 10, that is, the PPG sensor reports every 10 PPG data collected. When the smart watch is in sleep mode, the first preset value may be 20, that is, the PPG sensor reports every 20 PPG data collected. Similarly, Q is a second preset value, and T is a third preset value. The second preset value may be constant or variable. The third preset value may be constant or variable.
[0110] In some embodiments, if the PPG sensor reports PPG data in the form of a data packet, then the timestamp of the above-mentioned PPG data is actually the timestamp of the PPG data packet containing the PPG data, that is, the timestamps of each PPG data in a PPG data packet are the same, and the timestamps of each PPG data are the timestamp of the PPG data packet.
[0111] Among them, the PPG data in the above-mentioned PPG data packet can be arranged in order from early to late in terms of collection time, and the earlier the collection time, the higher the ranking of the PPG data, and the later the collection time, the lower the ranking of the PPG data. The timestamp of the above-mentioned PPG data packet can be the timestamp of one PPG data in the PPG data packet. In one example, in order to ensure the accuracy of data alignment, the one PPG data can be the PPG data of the first preset order in the PPG data packet, and the first preset order can be taken from 1-P. For example, the first preset order is the first one, that is, the timestamp of each PPG data packet reported by the PPG sensor is the timestamp of the first collected PPG data in the corresponding data packet. For another example, the first preset order is the last one, that is, the timestamp of each PPG data packet reported by the PPG sensor is the timestamp of the last collected PPG data in the corresponding data packet.
[0112] In another example, since the PPG sensor collects data at a higher frequency and the collection time interval is shorter, the above-mentioned one PPG data may be any one of the PPG data in the PPG data packet. For example, the timestamp of one PPG data packet is the timestamp of the first collected PPG data in the PPG data packet; the timestamp of another PPG data packet is the timestamp of the third collected PPG data in the PPG data packet.
[0113] Similarly, if the motion sensor reports the motion data in the form of a data packet, the timestamp of the motion data is actually the timestamp of the motion data packet where the motion data is located, that is, the timestamps of the motion data in a motion data packet are the same, and the timestamps of the motion data packets are the timestamps of the motion data packet. The method for determining the timestamp of the motion data packet is similar to the method for determining the timestamp of the PPG data packet. For example, the motion sensor includes an acceleration sensor. Accordingly, the motion data includes acceleration data, and the motion data packet includes an acceleration data packet. The timestamp of the acceleration data packet may be the timestamp of one acceleration data in the acceleration data packet. In one example, in order to ensure the accuracy of data alignment, the one acceleration data may be the acceleration data of the second preset order in the acceleration data packet, and the second preset order may be taken from 1-Q. In another example, since the acceleration sensor collects data at a higher frequency and the collection time interval is shorter, the one acceleration data may be any one acceleration data in the acceleration data packet.
[0114] It should be noted that the value of M can be fixed, or it can be related to the health function implemented by the smart watch, that is, the value of M can be variable, and the smart watch can query the specific value of M corresponding to the implemented health function through the relevant data table. For example, when the first operation is used to trigger the smart watch to implement the heart rate monitoring function, the value of M can be 100. When the first operation is used to trigger the smart watch to implement the sleep quality monitoring function, the value of M can be 150.
[0115] From the above introduction, it can be determined that the PPG sensor and each motion sensor in the above smart watch collect corresponding data at a certain frequency, that is, at a certain time interval. In other words, the PPG sensor and each motion sensor have corresponding frequencies for collecting data. For the convenience of description, the present application may use the frequency of the PPG sensor as the first device frequency, and the frequency of each motion sensor as the second device frequency of each motion sensor. The first device frequency and the second device frequency may be the same or different. And the second device frequencies of different motion sensors may also be the same or different, and the present application does not limit them.
[0116] In one case, the device frequency of the above-mentioned sensor is fixed. When the smart watch is in different modes, the first device frequency of the PPG sensor in the smart watch is the same value, and the second device frequency of the motion sensor in the smart watch is also the same value. For example, when the smart watch is in sleep mode, the first device frequency of the PPG sensor is 100 Hz, and the second device frequency of the motion sensor is 100 Hz. When the smart watch is in sleep mode, the first device frequency of the PPG sensor is still 100 Hz, and the second device frequency of the motion sensor is still 100 Hz.
[0117] In this case, the device frequency of the above-mentioned sensor may be pre-set, that is, the first device frequency of the PPG sensor and the second device frequency of each motion sensor are pre-stored in the smart watch. The device frequency of the above-mentioned sensor may also be predicted by the first data packet and the second data packet reported by the sensor after the smart watch performs a specific operation (such as restart, algorithm switching, mode switching, etc.). Specifically, the smart watch can calculate a device frequency through the first data packet and the second data packet reported by the PPG sensor, and use the device frequency as the first device frequency of the PPG sensor. Similarly, for each motion sensor, the smart watch can calculate a device frequency through the first data packet and the second data packet reported by the motion sensor, and use the device frequency as the second device frequency of the motion sensor.
[0118] Exemplarily, the device frequency calculated based on the first data packet and the second data packet is specifically: (timestamp of the second data packet-timestamp of the first data packet) / number of data in the first data packet (or the second data packet). For example, a PPG data packet includes 10 PPG data. The acquisition time recorded by the timestamp of the first data packet collected by the PPG sensor of the smart watch after restarting is time point 1, and the acquisition time recorded by the timestamp of the second data packet is time point 2. Then the smart watch obtains the first device frequency of the PPG sensor through (time point 2-time point 1) / 10.
[0119] In another case, the device frequency of the above-mentioned sensor is variable, which is related to the current mode of the smart watch. In different modes, the device frequencies of the above-mentioned PPG sensor and motion sensor are different. For example, when the smart watch is in sleep mode, the first device frequency of the PPG sensor is 100 Hz, and the second device frequency of the motion sensor is 100 Hz. When the smart watch is in sleep mode, the first device frequency of the PPG sensor is 70 Hz, and the second device frequency of the motion sensor is 50 Hz.
[0120] In this case, the process of determining the device frequency of the sensor is similar to the process of determining the device frequency described above. Specifically, the device frequency of the sensor may be pre-set, that is, the first device frequency of the PPG sensor in different modes and the second device frequency of each motion sensor are pre-stored in the smart watch. The device frequency of the sensor described above may also be predicted by the first data packet and the second data packet reported by the sensor after the smart watch performs a specific operation (such as mode switching, etc.).
[0121] In this case, the first preset value corresponding to the motion sensor may be related to the device frequency of the motion sensor and the PPG sensor. For example, the first preset value corresponding to the motion sensor depends on the difference between the first device frequency of the PPG sensor and the second device frequency of the motion sensor. Since the higher the device frequency (such as the first device frequency and the second device frequency) of the sensor (such as the PPG sensor and the motion sensor), the shorter the interval time for collecting data, that is, the more data the sensor collects per unit time. For example, the device frequency of the PPG sensor is 50 hertz (hz), which means that the PPG sensor collects 50 PPG data in 1 second. For another example, the device frequency of the PPG sensor is 100hz, which means that the PPG sensor collects 100 PPG data in 1 second.
[0122] Therefore, when the difference between the first device frequency of the PPG sensor and the second device frequency of the motion sensor is greater, it indicates that the difference in the number of data collected by the two in a unit time is greater, and accordingly, the first preset value used to determine whether the motion data meets the preset conditions can be greater. When the difference between the first device frequency of the PPG sensor and the second device frequency of the motion sensor is smaller, it indicates that the difference in the number of data collected by the two in a unit time is smaller, and accordingly, the first preset value corresponding to the motion sensor can be smaller, so as to ensure that there is enough motion data to be fused and improve the accuracy of physiological parameter detection. For example, the device frequency of the PPG sensor is 50hz, and the second device frequency of the motion sensor is 25hz. The difference in the number of data collected by the two in a unit time (such as 1 second) is 25. When the device frequency of the PPG sensor is 100 Hz and the second device frequency of the motion sensor is 70 Hz, the difference in the number of data collected by the two within a unit time (such as 1 second) is 30, which is greater than 25. Therefore, the first preset value corresponding to the motion sensor when the first device frequency of the PPG sensor is 100 Hz and the second device frequency of the motion sensor is 70 can be greater than the first preset value corresponding to the motion sensor when the first device frequency of the PPG sensor is 50 Hz and the second device frequency of the motion sensor is 25 Hz.
[0123] Exemplarily, for each motion sensor, after the smart watch calculates the device frequency difference between the first device frequency of the above-mentioned PPG sensor and the second device frequency of the motion sensor, the smart watch can search for a first preset value corresponding to the device frequency difference from a preset data table, and use the first preset value as the first preset value corresponding to the motion sensor.
[0124] In some embodiments, in order to improve the efficiency of multi-source data alignment, before performing multi-source data alignment, that is, before executing the steps of "saving the PPG data collected by the PPG sensor in the first buffer" and "saving the motion data collected by the motion sensor in the second buffer corresponding to the motion sensor" in the above S402, the smart watch performs frequency deviation verification on the PPG data packet collected by the PPG sensor and the PPG data collected by each motion sensor, and obtains the frequency deviation verification result of the PPG sensor and the frequency deviation verification result of each motion sensor. The frequency deviation verification result indicates whether the frequency is abnormal.
[0125] When the frequency deviation check results of all sensors (i.e., the above-mentioned PPG sensor and each motion sensor) indicate that the frequency is normal, the smart device can save the data packets collected by the sensor in the corresponding buffers (such as the above-mentioned first buffer and second buffer), thereby avoiding the accumulation of frequency deviation errors, thereby improving the accuracy of multi-source data alignment, and thus improving the accuracy of the calculation of physiological parameters.
[0126] When the frequency deviation check result of the sensor indicates that the frequency is abnormal, it indicates that packet loss may occur, and the data packet collected by the sensor is abnormal, then the smart watch may not save the data collected by the sensor in the buffer corresponding to the sensor. For example, after the smart watch collects a PPG data packet through the PPG sensor, it performs a frequency deviation check on the PPG data packet to obtain the frequency deviation check result of the PPG sensor. When the frequency deviation check result of the PPG sensor indicates that the frequency of the PPG sensor is abnormal, it indicates that the PPG data packet may be lost, then the smart watch may not save the data packet in the first buffer.
[0127] In addition, when the frequency deviation check result of the sensor indicates that the frequency is abnormal, the smart watch can also report an error. The smart watch outputs a second prompt message, which is used to indicate that the physiological data is abnormal, so as to prompt the user to continue to wait for the smart watch to calculate the physiological detection result (the second prompt message shown in FIG8 ).
[0128] The above frequency deviation check will be described below with reference to specific examples.
[0129] For the PPG sensor, the PPG data packet reported by the PPG sensor includes P PPG data. After the smart watch collects each PPG data packet reported by the PPG sensor, it can calculate the time difference between the timestamp of the PPG data packet and the timestamp of the previous PPG data packet of the PPG data packet (i.e., the timestamp of the adjacent PPG data packet), and obtain the actual frequency of the PPG sensor by dividing the time difference by P. Afterwards, the smart watch calculates the difference between the first device frequency of the PPG sensor and the actual frequency of the PPG sensor. If the difference is less than the second preset value, indicating that no PPG data packet loss occurs between the adjacent PPG data packets, the smart watch can determine that the frequency deviation verification result of the PPG sensor indicates that the frequency of the PPG sensor is normal. If the difference is greater than or equal to the third preset value, indicating that a PPG data packet loss occurs between the adjacent PPG data packets, the smart watch can determine that the frequency deviation verification result of the PPG sensor indicates that the frequency of the PPG sensor is abnormal.
[0130] Similarly, for each motion sensor, after the smart watch collects a motion data packet collected by the motion sensor, it can calculate the time difference between the timestamp of the motion data packet and the timestamp of the previous motion data packet of the motion data packet (i.e., the timestamp of the adjacent motion data packet), and divide the time difference / the number of motion data in the motion data packet to obtain the actual frequency of the motion sensor. Afterwards, the smart watch calculates the difference between the second device frequency of the motion sensor and the actual frequency of the motion sensor. If the difference is less than the third preset value, indicating that there is no motion data packet loss between the adjacent motion data packets, the smart watch can determine that the frequency deviation check result of the motion sensor indicates that the frequency of the motion sensor is normal. If the difference is greater than or equal to the third preset value, indicating that there is a motion data packet loss between the adjacent motion data packets, the smart watch can determine that the frequency deviation check result of the motion sensor indicates that the frequency of the motion sensor is abnormal.
[0131] In some embodiments, the smart watch can save all data packets reported by the sensor in a buffer in the HAL layer (as shown in FIG. 3 ). For example, the HAL layer has a buffer corresponding to the PPG sensor, and the buffer corresponding to the PPG sensor is used as the third buffer. The third buffer is used to store all PPG data collected by the PPG sensor, that is, to store all PPG data packets reported by the PPG sensor. Then, the smart watch can continuously read PPG data packets from the third buffer. After the smart watch reads a PPG data packet from the third buffer, the smart watch performs a frequency deviation check on the PPG data packet, that is, performs a frequency check on the PPG sensor. When the frequency deviation check result of the PPG sensor indicates that the frequency is normal, it indicates that the PPG data in the read PPG data packet is normal data, and the smart watch can cache the read PPG data packet in the above-mentioned first buffer for alignment of multi-source data. When the frequency deviation check result of the PPG sensor indicates that the frequency is abnormal, it indicates that the PPG data in the read PPG data packet is abnormal data, and the smart watch stops caching the read PPG data packet in the first buffer. The smart watch can continue to read the next PPG data packet from the third buffer.
[0132] Similarly, the HAL layer has a buffer corresponding to each motion sensor, and the buffer corresponding to each motion sensor is used as the fourth buffer corresponding to the corresponding motion sensor. For the fourth buffer corresponding to each motion sensor, the fourth buffer corresponding to the motion sensor is used to store all motion data collected by the motion sensor, that is, to store all motion data packets reported by the motion sensor. Then, the smart watch can continuously read the motion data packet from the fourth buffer corresponding to the motion sensor. After the smart watch reads a motion data packet from the fourth buffer corresponding to the motion sensor, the smart watch performs a frequency deviation check on the motion data packet, that is, performs a frequency check on the motion sensor. When the frequency deviation check result of the motion sensor indicates that the frequency is normal, it indicates that the motion data in the read motion data packet is normal data, and the smart watch can cache the read motion data packet into the second buffer corresponding to the motion sensor for alignment of multi-source data. When the frequency deviation check result of the motion sensor indicates that the frequency is abnormal, it indicates that the motion data in the read motion data packet is abnormal data, and the smart watch stops caching the read motion data packet into the second buffer corresponding to the motion sensor. The smart watch can continue to read the next motion data packet from the second buffer corresponding to the motion sensor.
[0133] It should be noted that when the frequency deviation verification result of the above-mentioned PPG sensor or motion sensor indicates that the frequency is abnormal, the smart watch can output a second prompt message.
[0134] S404: The smart watch obtains and outputs physiological detection results based on the M pieces of PPG data and multiple pieces of motion data satisfying preset conditions obtained from each second buffer.
[0135] Exemplarily, the physiological detection results may include physiological parameters of the wearer of the smart watch. For example, specific parameter values of the wearer's heart rate, blood oxygen, cardiovascular, pulse, etc. The physiological detection results may include health monitoring results of the wearer of the smart watch. For example, the wearer's sleep quality, physical examination report, disease risk probability (such as the probability of the wearer suffering from atrial fibrillation and premature beats), etc.
[0136] In an embodiment of the present application, the smart watch can first use the above-mentioned M PPG data and multiple motion data satisfying preset conditions obtained from each second buffer as aligned multi-source data. Afterwards, the smart watch fuses and denoises the aligned multi-source data, and extracts a real PPG waveform from the fused and denoised data, that is, a PPG waveform without motion noise. Then, the smart watch can use the real PPG waveform to calculate the physiological parameters of the wearer of the smart watch, and accurately detect the physiological parameters, which can avoid the inability to accurately calculate the physiological parameters using PPG data due to motion noise, and can avoid the inability to accurately calculate the physiological parameters using multi-source data due to the misalignment of the multi-source data.
[0137] In some embodiments, if the smart watch needs to display the physiological parameters of the wearer of the smart watch, then the physiological parameters calculated above are the physiological detection results. That is, after the smart watch calculates the physiological parameters of the wearer, it can display the physiological parameters.
[0138] In other embodiments, if the smart watch needs to display the health monitoring results of the wearer of the smart watch, then after calculating the physiological parameters of the wearer, the smart watch performs health monitoring operations based on the physiological parameters of the wearer, such as calculating the probability of the wearer suffering from atrial fibrillation based on the relevant algorithm model (such as atrial fibrillation premature beat algorithm model) on the smart watch. Here, the probability of the wearer suffering from atrial fibrillation premature beats is the above-mentioned physiological detection result.
[0139] In some embodiments, the above-mentioned M PPG data and multiple motion data that meet preset conditions can also be read by the smart watch from the fifth buffer, so that the smart watch can directly read the aligned multi-source data from the fifth buffer, which is convenient for the smart watch to use the aligned multi-source data to calculate the physiological detection results, thereby improving the calculation efficiency of the physiological detection results.
[0140] In an embodiment of the present application, through data stratification and data verification in multiple dimensions, abnormal data can be discovered in a timely manner and corresponding processing can be performed (such as clearing the motion data in the second buffer and stopping caching abnormal data to the first buffer / second buffer), thereby ensuring the accuracy of the multi-source data for alignment processing, thereby ensuring the accuracy of physiological parameter calculation.
[0141] A possible process of calculating physiological detection results using multi-source data provided by the present application is described in detail below in conjunction with Figures 9 and 10. The process includes a monitoring triggering process, a data reporting process, a risk calculation process and a monitoring end process.
[0142] Exemplarily, as shown in FIG9 , first, the smart watch performs a monitoring trigger process. During the monitoring trigger process, the user wants the smart watch to perform a single measurement, such as detecting the probability of the wearer of the smart watch suffering from atrial fibrillation and premature beats. The user can click the atrial fibrillation and premature beats monitoring application icon on the interface displayed by the smart watch. After receiving the click operation, the system service layer of the smart watch triggers the light emitter (i.e., PPG light) of the smart watch to turn on and start collecting wearing data, and sends the wearing data to the algorithm layer in the smart watch. The algorithm layer detects whether the smart watch is worn based on the wearing data and obtains a wearing detection result. And the wearing detection result is reported to the system service layer. When the wearing detection result indicates that the smart watch is not worn, the system service layer can output a prompt message for prompting the user to wear the smart watch.
[0143] When the wearing detection result indicates that the smart watch is worn, the system service layer starts heart rate monitoring. Then, the smart watch performs a data reporting process.
[0144] In the data reporting process, first, the system service layer can obtain the acceleration data packet reported by the acceleration sensor, the PPG data packet reported by the PPG sensor, and the angular velocity data packet reported by the gyroscope. Exemplarily, as shown in FIG10, the system service layer can read the acceleration data packet reported by the acceleration sensor from the buffer corresponding to the acceleration sensor in the HAL layer, and the buffer corresponding to the acceleration sensor in the HAL layer is used to store all acceleration data reported by the acceleration sensor. Similarly, the system service layer can read the PPG data packet reported by the PPG sensor from the buffer corresponding to the PPG sensor in the HAL layer. And the system service layer can read the gyroscope data packet reported by the gyroscope from the buffer corresponding to the gyroscope in the HAL layer. Afterwards, the system service layer can send the acquired acceleration data packet reported by the acceleration sensor, the PPG data packet reported by the PPG sensor, and the angular velocity data packet reported by the gyroscope (i.e., multi-source data) to the algorithm layer. Afterwards, the algorithm layer can pre-process and align the multi-source data. After obtaining the aligned multi-source data, the algorithm layer can use the aligned multi-source data to determine whether the smart watch shakes (i.e., moves) during the collection of the aligned multi-source data, fuse and denoise the aligned multi-source data, extract the real PPG waveform, and avoid the influence of motion noise. Then, the smart watch performs the risk calculation process. The algorithm layer continues to use the real PPG waveform to calculate the probability of the wearer suffering from atrial fibrillation and premature beats. Afterwards, the algorithm layer can send the probability of the wearer suffering from atrial fibrillation and premature beats to the system service layer, which stores the probability of the wearer suffering from atrial fibrillation and premature beats, and sends the probability of the wearer suffering from atrial fibrillation and premature beats to the UI application layer. The UI application layer displays the probability of the wearer suffering from atrial fibrillation and premature beats on the display screen of the smart watch.
[0145] Exemplarily, as shown in FIG10 , the above-mentioned preprocessing indicates frequency deviation check. After the system service layer reads an acceleration data packet from the buffer corresponding to the acceleration sensor in the HAL layer, it can send it to the algorithm layer. The algorithm layer can calculate the actual frequency of the acceleration sensor using the timestamp of the acceleration data packet and the length of the acceleration data packet (i.e., the number of acceleration data included in the acceleration data packet), and determine the frequency deviation check result of the acceleration sensor according to the actual frequency and the device frequency of the acceleration sensor. If the frequency deviation check result of the acceleration sensor indicates that the frequency of the acceleration sensor is normal, indicating that the one motion data packet is normal data, the algorithm layer can store the acceleration data packet in the circular buffer corresponding to the acceleration sensor in the algorithm layer. Similarly, after the system service layer reads a PPG data packet from the buffer corresponding to the PPG sensor in the HAL layer, the algorithm layer can use the PPG data packet to determine the frequency deviation check result of the PPG sensor. If the frequency deviation check result of the PPG sensor indicates that the frequency of the PPG sensor is normal, the algorithm layer can store the PPG data packet in the circular buffer corresponding to the PPG sensor in the algorithm layer. And after the system service layer reads a gyroscope data packet from the buffer corresponding to the gyroscope in the HAL layer, the algorithm layer can use the gyroscope data packet to determine the frequency deviation check result of the gyroscope. If the frequency deviation check result of the gyroscope indicates that the frequency of the gyroscope is normal, the algorithm layer can store the gyroscope data packet in the circular buffer corresponding to the PPG sensor in the algorithm layer.
[0146] The data in the above-mentioned ring buffer can be used for multi-source data alignment processing.
[0147] As shown in FIG10 , the above M is 100. The specific process of the alignment processing is as follows: after the algorithm layer has 100 PPG data in the circular buffer corresponding to the PPG sensor, it determines the start time of all timestamps corresponding to the 100 PPG data to obtain the alignment start time (i.e., time1) and the end time of all timestamps corresponding to the 100 PPG data to obtain the alignment end time (i.e., time2). Afterwards, the algorithm layer can obtain the acceleration data with timestamps in the time period of time1-time2 from the circular buffer corresponding to the acceleration sensor, and obtain the start time and end time of all timestamps corresponding to the acceleration data in the time period of time1-time2 to obtain the start time and end time of the acceleration sensor. Then, the algorithm layer determines whether the start time of the acceleration sensor meets the requirements, that is, whether the difference with the alignment start time is small. And determine whether the end time of the acceleration sensor meets the requirements, that is, whether the difference with the alignment end time is small. Similarly, the algorithm layer can obtain the angular velocity data with timestamps in the time period time1-time2 from the circular buffer corresponding to the gyroscope, and obtain the start time and end time of all timestamps corresponding to the angular velocity data in the time period time1-time2, and obtain the start time and end time of the gyroscope. Then, the algorithm layer determines whether the start time of the gyroscope meets the requirements, that is, whether the difference with the alignment start time is small. And determine whether the end time of the gyroscope meets the requirements, that is, whether the difference with the alignment end time is small.
[0148] If the start time and end time of the acceleration sensor and the start time and end time of the gyroscope meet the requirements, the acceleration data in the time period of time1-time2, the angular velocity data in the time period of time1-time2 and the above 100 PPG data are aligned data. The algorithm layer can cache the aligned multi-source data through the buffer in the algorithm layer, that is, the alignment buffer corresponding to the acceleration sensor is used to save the acceleration data in the time period of time1-time2, the alignment buffer corresponding to the gyroscope is used to save the angular velocity data in the time period of time1-time2, and the alignment buffer corresponding to the PPG sensor is used to save the 100 PPG data as aligned data, so that the algorithm layer can read the aligned multi-source data.
[0149] Finally, the smartwatch completes the monitoring process. After the UI application layer displays the probability of the wearer suffering from atrial fibrillation and premature beats for a period of time, the UI application layer can stop displaying the probability of the wearer suffering from atrial fibrillation and premature beats, and display a prompt message indicating the end of the measurement. After that, the system service layer turns off the PPG light on the smartwatch.
[0150] It should be noted that the buffer corresponding to the sensor in the algorithm layer (such as the alignment buffer) and the buffer corresponding to the sensor in the HAL layer can be a circular buffer or a non-circular buffer, such as a linked list, and this application does not limit them. The sensor includes a PPG sensor, a gyroscope, and an acceleration sensor.
[0151] In some embodiments, the present application provides a computer storage medium including computer instructions. When the computer instructions are executed on a wearable device, the wearable device executes the method described above.
[0152] In some embodiments, the present application provides a computer program product, which, when executed on a wearable device, enables the wearable device to execute the method described above.
[0153] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0154] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0155] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0157] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0158] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
A physiological detection method based on a wearable device, characterized in that: The wearable device includes a multi-source sensor, wherein the multi-source sensor includes a photoplethysmography (PPG) sensor and one or more motion sensors. The method includes: the wearable device receives a first operation, wherein the first operation is used to trigger the wearable device to detect a physiological parameter of a wearer of the wearable device; in response to the first operation, the wearable device collects PPG data through the PPG sensor, saves the PPG data collected by the PPG sensor in a first buffer, collects motion data through the motion sensor, and saves the motion data collected by each motion sensor in one or more second buffers; wherein each piece of PPG data collected by the PPG sensor and each piece of motion data collected by the motion sensor respectively corresponds to a timestamp for recording the collection time of the corresponding data; after M pieces of PPG data are collected in the first buffer, the wearable device collects PPG data according to the M pieces of PPG data. The timestamp corresponding to the M PPG data is used to obtain multiple motion data that meet the preset conditions from each second buffer respectively; wherein M is a preset value, the multiple motion data that meet the preset conditions in each second buffer are continuously collected by the corresponding motion sensor, and the time recorded by the timestamps corresponding to the multiple motion data is after the time recorded by the first timestamp, and the time recorded by the timestamp corresponding to at least one motion data is before the time recorded by the second timestamp, and the difference between the number of the multiple motion data and M is less than the first preset value; the first timestamp is the timestamp with the earliest recording time among the timestamps corresponding to the M PPG data, and the second timestamp is the timestamp with the latest recording time among the timestamps corresponding to the M PPG data; the wearable device obtains and outputs the physiological detection result based on the M PPG data and the multiple motion data that meet the preset conditions obtained from the one or more second buffers. The method according to claim 1, characterized in that The first buffer and the second buffer are ring buffers. The method according to claim 1 or 2, characterized in that After M pieces of PPG data are collected in the first buffer, the wearable device obtains multiple pieces of motion data that meet the preset conditions from each second buffer according to the timestamps corresponding to the M pieces of PPG data, including: after the M pieces of PPG data are collected in the first buffer, the wearable device reads the motion data of the time interval corresponding to the first timestamp and the second timestamp from the second buffer; if the wearable device reads multiple pieces of motion data that meet the preset conditions, the multiple pieces of motion data that meet the preset conditions and the M pieces of PPG data are used for physiological detection; or, if the wearable device reads N pieces of motion data, the wearable device issues a first prompt message, and the first prompt message is used to indicate that the wearable device is collecting physiological data; N is less than M, and the difference between M and N is greater than or equal to the first preset value. The method according to claim 3, characterized in that The method further includes: when the wearable device reads the N pieces of motion data, the wearable device clears all the motion data in the second buffer. The method according to any one of claims 1 to 4, characterized in that The frequency at which the PPG sensor collects PPG data is a first device frequency, and the frequency at which the one or more motion sensors collect motion data is one or more second device frequencies; wherein the first device frequency is the same as the one or more second device frequencies; or, the first device frequency is different from the one or more second device frequencies; the first preset value is determined by the difference between the first device frequency and the one or more second device frequencies, and the smaller the difference between the first device frequency and the one or more second device frequencies, the smaller the first preset value; the second device frequencies at which different motion sensors collect motion data are the same or different. The method according to claim 5, characterized in that Before the PPG data collected by the PPG sensor is saved in the first buffer, the method further includes: the wearable device takes each P PPG data collected by the PPG sensor as a first data packet, and saves the first data packet and the timestamp of the first data packet in the third buffer; wherein the timestamp of the first data packet is the timestamp of one PPG data in the P PPG data, P is a first preset value, and the timestamp of the first data packet is used as the timestamp corresponding to each PPG data in the P PPG data; the wearable device calculates the first actual frequency of the PPG data collected by the PPG sensor according to the time recorded by the timestamps of adjacent first data packets in the third buffer and P; wherein the PPG data collected by the PPG sensor is saved in the first buffer, including: if the difference between the first actual frequency and the first device frequency is less than a second preset value, the wearable device caches the first data packet in the third buffer to the first buffer; wherein M PPG data are collected in the first buffer, including: K first data packets are collected in the first buffer, M=K*P. The method according to claim 6, characterized in that The method also includes: if the difference between the first actual frequency and the first device frequency is greater than or equal to the second preset value, the wearable device sends a second prompt message, and the second prompt message is used to indicate that the physiological data of the wearable device is abnormal. The method according to any one of claims 5 to 7, characterized in that The one or more motion sensors include an acceleration sensor and a gyroscope; the one or more second buffers include an acceleration buffer for storing first motion data collected by the acceleration sensor and a gyroscope buffer for storing second motion data collected by the gyroscope. The method according to claim 8, characterized in that Before the motion data collected by each motion sensor is saved in one or more second buffers respectively, the method further includes: the wearable device takes each Q first motion data collected by the acceleration sensor as a second data packet, and saves the second data packet and the timestamp of the second data packet in the fourth buffer; wherein the timestamp of the second data packet is the timestamp corresponding to one first motion data among the Q first motion data, Q is a second preset value, and the timestamp of the second data packet is used as the timestamp corresponding to each first motion data among the Q first motion data; the wearable device calculates the second actual frequency of the first motion data collected by the acceleration sensor according to the time and Q recorded by the timestamps of the adjacent second data packets in the fourth buffer; wherein saving the first motion data in the acceleration buffer includes: if the difference between the second actual frequency and the second device frequency corresponding to the acceleration sensor is less than a third preset value, the wearable device caches the second data packet in the fourth buffer to the acceleration buffer; wherein the plurality of first motion data satisfying the preset condition includes: W second data packets, N=W*Q, N is the number of the first motion data among the plurality of first motion data satisfying the preset condition. The method according to any one of claims 1 to 9, characterized in that After M pieces of PPG data are collected in the first buffer, the wearable device obtains multiple pieces of motion data that meet the preset conditions from each second buffer according to the timestamps corresponding to the M pieces of PPG data, and the method further includes: the wearable device saves the M pieces of PPG data and the multiple pieces of motion data that meet the preset conditions in a fifth buffer; wherein, the wearable device obtains and outputs a physiological detection result based on the M pieces of PPG data and the multiple pieces of motion data that meet the preset conditions obtained from the one or more second buffers, including: the wearable device reads the M pieces of PPG data and the multiple pieces of motion data that meet the preset conditions from the fifth buffer, and obtains and outputs the physiological detection result based on the M pieces of PPG data and the multiple pieces of motion data that meet the preset conditions. A wearable device, characterized in that: The wearable device includes a display screen, a memory, a multi-source sensor and one or more processors; the display screen, the multi-source sensor, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, the multi-source sensor includes a PPG sensor and one or more motion sensors, and the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the wearable device executes the method described in any one of claims 1 to 10. A computer-readable storage medium, characterized in that The invention comprises computer instructions, and when the computer instructions are executed on a wearable device, the wearable device is caused to execute the method according to any one of claims 1 to 10.