Physiological data processing method and device, electronic equipment and storage medium
Through time series synchronization processing and missing data filling, the problems of inconsistent sensor acquisition frequency and missing data in wearable devices are solved, and a complete set of physiological data is generated, which improves the accuracy and consistency of data processing.
Patent Information
- Application Number
- CN202411219096.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, the physiological data obtained by wearable devices leads to inconsistent acquisition frequency and missing data due to different sensor categories and accuracy, which affects subsequent detection and analysis.
Through time series synchronization processing, abnormal data removal and missing data filling, we ensure that each sensor data is at the same acquisition frequency and denoising is used to use preset filtering algorithms to generate a complete physiological data collection.
It realizes synchronous processing and integrity of physiological data, improves the accuracy and consistency of data processing, and facilitates subsequent analysis and observation.
Smart Images

Figure CN119108101A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of physiological data processing, and in particular to a physiological data processing method, device, electronic equipment and storage medium. Background Art
[0002] Using wearable devices to acquire and detect physiological data of organisms over a long period of time is a common technology in the field of Internet of Things technology.
[0003] When the control end obtains the physiological data of the organism, it generally needs to pre-process the physiological data before using the pre-processed physiological data for the next step of detection and analysis. The existing physiological data pre-processing methods generally clean, integrate, transform and reduce the physiological data.
[0004] However, the inventors have discovered that due to the differences in the types, models and accuracy of various sensors, the physiological data obtained often have problems such as asynchronous collection frequency and missing data. Summary of the invention
[0005] The objectives of the present invention include, for example, providing a physiological data processing method, device, electronic device and storage medium, which can at least partially solve the above-mentioned technical problems.
[0006] The embodiments of the present invention can be implemented as follows:
[0007] In a first aspect, an embodiment of the present invention provides a physiological data processing method, which is applied to a controller, wherein the controller is respectively connected to multiple sensors for communication; the method comprises:
[0008] Respectively acquiring a plurality of physiological data sampled by each of the sensors at a respective sampling frequency;
[0009] Based on the sampling frequency of each sensor, each of the physiological data is subjected to time series synchronization processing to obtain a plurality of synchronized time series with consistent frequencies; wherein each synchronized time series corresponds to one of the sensors;
[0010] Based on a preset data cleaning method, remove the abnormal data in each of the synchronous time series, and mark the data missing at the data position where the abnormal data is located;
[0011] Based on the missing amount of physiological data in each of the synchronous time series and the data missing flag, respectively determine the total missing amount of data in each of the synchronous time series;
[0012] Based on the preset data filling method, the missing physiological data are filled according to the total amount of missing data to obtain a physiological data set with complete data volume.
[0013] Optionally, the method further comprises:
[0014] Performing Fourier transform and noise type detection on the physiological data set to obtain a noise frequency band and a noise type of the physiological data;
[0015] Determine a subset of filtering algorithms from a preset filtering algorithm set according to the noise frequency band and the noise type, wherein the subset of filtering algorithms includes at least two filtering algorithms;
[0016] Initializing the algorithm weight of each filtering algorithm in the filtering algorithm subset;
[0017] Using each filter algorithm in the filter algorithm subset to perform denoising on the physiological data set;
[0018] Adjusting the algorithm weight of each filtering algorithm according to the mean square error and signal-to-noise ratio corresponding to each filtering algorithm obtained by the denoising process;
[0019] The two filtering algorithms with the highest algorithm weights are determined as target filtering algorithms, and outputs of the target filtering algorithms are combined to generate a denoised data set corresponding to the physiological data set.
[0020] Optionally, the performing time series synchronization processing on each of the physiological data based on the sampling frequency of each of the sensors to obtain a plurality of synchronized time series with consistent frequencies includes:
[0021] Using a preset clock synchronization protocol to synchronize the physiological data acquired by each sensor, and obtain a plurality of initial time series with inconsistent frequencies;
[0022] Determining whether a common multiple of the frequencies of the initial time series is greater than a preset frequency threshold;
[0023] If yes, the frequency of each of the initial time series is synchronously stretched / scaled to a preset frequency to obtain each of the synchronous time series;
[0024] If not, the common multiple is used as the synchronization frequency of each of the time series to obtain each of the synchronized time series.
[0025] Optionally, removing abnormal data in each of the synchronized time series based on a preset data cleaning method includes:
[0026] For each of the synchronous time series, calculating the standard deviation of the synchronous time series, and calculating the data mean of the physiological data in the synchronous time series;
[0027] For each physiological data, determining whether the difference between the physiological data and the data mean is greater than a preset multiple of the standard deviation;
[0028] If so, the physiological data is determined to be the abnormal data, and the abnormal data is removed.
[0029] Optionally, the method of filling missing physiological data based on a preset data filling method according to the total amount of missing data to obtain a physiological data set with a complete data amount includes:
[0030] For each of the synchronization time series, determining a relationship between the total number of missing data and a plurality of preset missing data number thresholds;
[0031] Determining a target physiological data filling method from multiple physiological data filling methods based on a relationship between the total missing data quantity and multiple preset missing data quantity thresholds;
[0032] The missing physiological data is filled in according to the target physiological data filling method to obtain the physiological data set.
[0033] Optionally, the preset missing data quantity threshold includes a first preset missing data quantity threshold, a second preset missing data quantity threshold and a third preset missing data quantity threshold, and the physiological data filling method includes a first physiological data filling method, a second physiological data filling method, a third physiological data filling method and a fourth physiological data filling method; the determining a target physiological data filling method from multiple physiological data filling methods based on the relationship between the total missing data quantity and multiple preset missing data quantity thresholds includes:
[0034] If the total number of missing data is less than the first preset missing data number threshold, determining that the target physiological data filling method is the first physiological data filling method; wherein the first physiological data filling method is one or more of mean filling, median filling, linear interpolation filling, decision tree regression and nearest neighbor filling;
[0035] If the total number of missing data is greater than or equal to the first preset missing data number threshold and less than the second preset missing data number threshold, it is determined that the target physiological data filling method is the second physiological data filling method; wherein the second physiological data filling method is multivariate regression interpolation and / or time series prediction interpolation linear regression prediction interpolation, and the second preset missing data number threshold is greater than the first preset missing data number threshold;
[0036] If the total number of missing data is greater than or equal to the second preset missing data number threshold and less than the third preset missing data number threshold, then obtain the correlation between the synchronization time series, and determine whether there is a synchronization time series whose correlation with the current synchronization time series reaches a preset value and whose total number of missing data is between the first preset missing data number threshold and the second preset missing data number threshold;
[0037] If yes, it is determined that the target physiological data filling method is the third physiological data filling method; wherein the third physiological data filling method is a multivariate time series prediction model interpolation method, and the third preset missing data quantity threshold is greater than the second preset missing data quantity threshold;
[0038] If not, it is determined that the target physiological data filling method is the fourth physiological data filling method; wherein the fourth physiological data filling method is a preset integrated learning model filling method.
[0039] Optionally, the method further comprises:
[0040] Generate a visualization chart based on the name of each of the sensors, the data type, the data value, and the sampling time of the physiological data in each of the synchronized time series;
[0041] The visual chart is sent to a client and stored.
[0042] In a second aspect, an embodiment of the present invention provides a physiological data processing device, which is applied to a controller, wherein the controller is respectively connected to multiple sensors for communication; the physiological data processing device comprises:
[0043] A physiological data acquisition unit, used to respectively acquire a plurality of physiological data sampled by each of the sensors at a respective sampling frequency;
[0044] A time series synchronization processing unit, used for performing time series synchronization processing on each of the physiological data based on the sampling frequency of each of the sensors, so as to obtain a plurality of synchronized time series with consistent frequencies; wherein each of the synchronized time series corresponds to one of the sensors;
[0045] An abnormal data removal unit, used to remove abnormal data in each of the synchronous time series based on a preset data cleaning method, and mark the data missing at the data position where the abnormal data is located;
[0046] a total missing data quantity determining unit, configured to determine the total missing data quantity of each of the synchronous time series based on the missing quantity of physiological data in each of the synchronous time series and the data missing flag;
[0047] The physiological data filling unit is used to fill in the missing physiological data based on a preset data filling method and according to the total amount of missing data, so as to obtain a physiological data set with a complete data volume.
[0048] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the program.
[0049] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed, the server where the computer-readable storage medium is located is controlled to implement the steps of any one of the above methods.
[0050] The beneficial effects of the embodiments of the present invention include, for example:
[0051] By performing time series synchronization processing on the physiological data obtained by each sensor, multiple synchronized time series are obtained, so that the physiological data obtained by the control end can be synchronized to the same acquisition frequency, which is convenient for subsequent processing and observation and analysis. In addition, the present invention determines the number of missing physiological data in each synchronized time series, removes abnormal data in each synchronized time series by a preset data cleaning method, and marks the data missing at the data position where the abnormal data is located, and integrates to obtain the total number of missing data. Then, the missing physiological data is filled in by the preset data filling method, and finally a set of physiological data with a complete data volume is obtained. This makes the subsequent data processing results more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention;
[0054] Figure 2 A schematic diagram of the steps of a physiological data processing method provided by an embodiment of the present invention;
[0055] Figure 3 A schematic diagram of interaction between a controller and a sensor provided in an embodiment of the present invention;
[0056] Figure 4A schematic diagram of a preset missing data quantity threshold provided by an embodiment of the present invention;
[0057] Figure 5 This is an architecture diagram of a physiological data processing device provided in an embodiment of the present invention.
[0058] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication module; 300 - physiological data processing device; 301 - physiological data acquisition unit; 302 - time series synchronization processing unit; 303 - abnormal data removal unit; 304 - total missing data quantity determination unit; 305 - physiological data filling unit. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0060] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0062] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0063] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0064] Please refer to Figure 1, is a block diagram of an electronic device 100 provided by the present application. The electronic device 100 may be a device capable of performing data processing, which is not limited in this embodiment. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130. Each component is electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0065] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0066] The processor 120 is used to read / write data or programs stored in the memory and execute corresponding functions.
[0067] The communication module 130 is used to establish a communication connection between the server and other communication terminals through the network, and to send and receive data through the network.
[0068] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 The components shown in the figure can be implemented by hardware, software or a combination thereof. The electronic device 100 can be arranged in other devices or as an independent device.
[0069] Corresponding to the electronic device 100, an embodiment of the present invention provides a physiological data processing method, which is applied to a controller, and the controller is respectively connected to multiple sensors for communication. The method includes: Figure 2 The following steps are shown:
[0070] Step S110: respectively acquiring a plurality of physiological data sampled by each of the sensors at the respective sampling frequencies.
[0071] Step S120: Based on the sampling frequency of each of the sensors, time series synchronization processing is performed on each of the physiological data to obtain a plurality of synchronized time series with consistent frequencies; wherein each of the synchronized time series corresponds to one of the sensors.
[0072] Step S130: based on a preset data cleaning method, remove the abnormal data in each of the synchronous time series, and make a data missing mark at the data position where the abnormal data is located.
[0073] Step S140: based on the missing amount of physiological data in each of the synchronous time series and the data missing flag, respectively determine the total missing amount of data in each of the synchronous time series.
[0074] Step S150: Based on a preset data filling method, the missing physiological data are filled according to the total amount of missing data to obtain a physiological data set with complete data volume.
[0075] In step S110, a plurality of physiological data sampled by each of the sensors at the respective sampling frequencies are respectively acquired.
[0076] First, it should be noted that the above steps are only provided for the convenience of explaining the scheme of the present invention, and are not necessarily performed in sequence. In specific circumstances, the steps may be performed simultaneously or in sequence, and the present invention specification does not make specific limitations on this.
[0077] Physiological data can be biological physiological signals, such as electrocardiogram, blood pressure, blood oxygen, exercise degree, body temperature, heart rate, etc. See Figure 3 , is a schematic diagram of the interaction between the controller and multiple sensors. When collecting physiological data, each sensor collects corresponding physiological data at its own sampling frequency without interfering with each other.
[0078] For example, if an animal is given a wearable device that integrates three sensors: a body temperature sensor, a photoelectric sensor, and an arterial blood pressure sensor, then when the wearable device is running, the body temperature sensor obtains the animal's body temperature physiological data, the photoelectric sensor obtains the animal's heart rate physiological data, and the arterial blood pressure sensor obtains the animal's blood pressure physiological data.
[0079] Due to differences in the functions and models of sensors, each sensor generally has a different interval duration (i.e., sampling frequency) each time it samples physiological data. In an embodiment of the present invention, when each sensor has collected physiological data for a certain period of time or the amount of physiological data collected by each sensor has reached a certain amount, the controller acquires the physiological data of each sensor. In another optional implementation, the controller may also receive the physiological data returned by each sensor in real time, and uniformly process the acquired physiological data when a certain amount of data is reached.
[0080] In step S120, based on the sampling frequency of each sensor, time series synchronization processing is performed on each physiological data to obtain a plurality of synchronized time series with consistent frequencies; wherein each synchronized time series corresponds to one sensor.
[0081] There are two main steps to synchronize physiological data in time series: one is to align the time axis of physiological data sampling. For example, the time point when each sensor first collects physiological data is determined as the starting point of time. NTP (Network Time Protocol) synchronization and PTP (Precision Time Protocol) synchronization can be used; the second is to process the sampling frequency of each sensor to the same frequency, that is, to synchronize the interval between each sensor sampling of physiological data.
[0082] After time series synchronization processing, each sampling time point under the new sampling frequency can have a synchronized time series corresponding to the physiological data collected by each sensor.
[0083] Optionally, the performing time series synchronization processing on each of the physiological data based on the sampling frequency of each of the sensors to obtain a plurality of synchronized time series with consistent frequencies includes:
[0084] The physiological data acquired by each sensor is synchronized in time using a preset clock synchronization protocol to obtain a plurality of initial time series with inconsistent frequencies.
[0085] It is determined whether the common multiple of the frequencies of the initial time series is greater than a preset frequency threshold.
[0086] If so, the frequencies of the initial time series are synchronously stretched / scaled to a preset frequency to obtain the synchronous time series.
[0087] If not, the common multiple is used as the synchronization frequency of each of the time series to obtain each of the synchronized time series.
[0088] In an optional implementation, the GNSS (Global Navigation Satellite System) time can be used as a reference, and a pre-set clock synchronization protocol, such as PTP (Precision Time Protocol) and gPTP (generalized Precision Time Protocol), can be used to complete the time synchronization between the sensors, thereby obtaining multiple physiological data with timestamps corresponding to each sensor, i.e., the initial time series.
[0089] Furthermore, if the common multiple of the sampling interval duration (i.e., frequency) of the initial time series is too large (exceeding a preset frequency threshold), the time window can be forced to be stretched or scaled at a set duration, i.e., a preset frequency, to obtain the synchronized time series corresponding to each sensor for visual observation and segmented statistics.
[0090] For the initial time series whose common multiples of the sampling intervals do not exceed the preset frequency threshold, the coordinates of all data can be aligned and stretched in the time window of the common multiple of the sampling frequency. For example, if there are 6 sensors, the timestamps of the physiological data collected by the 6 sensors are aligned to the same time scale (such as a time point every 5 minutes), and a synchronized time series can be obtained.
[0091] In addition, for reference sequence data brought by possible external sources (such as sensors for obtaining ambient temperature, light, etc.), the DTW (Dynamic Time Warping) algorithm can be used to force extension or compression with each synchronized time series as a reference, so as to achieve dynamic time regularization of time series data from different sensors and solve the problems of asynchrony and time drift.
[0092] After the physiological data acquired by each sensor is processed through time series synchronization, each sampling time point can correspond to the physiological data collected by each sensor under the new sampling frequency. Therefore, data points that should have physiological data but do not have physiological data can be directly found from each synchronized time series, and data missing marks such as "N / A", "NAN", "0xffff" and other marks can be made on them, so that the controller can directly count the number of missing physiological data in each synchronized time series.
[0093] In step S130, based on a preset data cleaning method, the abnormal data in each of the synchronous time series is removed, and a data missing mark is made at the data position where the abnormal data is located.
[0094] Abnormal data can be physiological data that is not used in actual applications, has errors in itself, and affects the accuracy of subsequent data processing. After the controller obtains the physiological data, it can delete the abnormal data by directly deleting it. After deletion, the original position of the abnormal data is missing physiological data, so a data missing mark can be made at the data position of the original abnormal data.
[0095] Optionally, removing abnormal data in each of the synchronized time series based on a preset data cleaning method includes:
[0096] For each of the synchronous time series, the standard deviation of the synchronous time series is calculated, and the data mean of the physiological data in the synchronous time series is calculated.
[0097] For each physiological data, it is determined whether the difference between the physiological data and the data mean is greater than a preset multiple of the standard deviation.
[0098] If so, the physiological data is determined to be the abnormal data, and the abnormal data is removed.
[0099] In an optional implementation, whether the physiological data is abnormal data can be determined by determining the difference between the physiological data and the standard deviation of the synchronous time series in which the physiological data is located. For each physiological data, the difference between the data value of the physiological data and the data mean of the synchronous time series in which the physiological data is located can be compared with the standard deviation of the synchronous time series. If this difference is greater than a preset multiple of the standard deviation, the physiological data is considered to be abnormal data.
[0100] In another optional implementation, physiological data that exceeds the mean of a preset number of physiological data before and after by a preset multiple of the standard deviation, as well as physiological data that exceeds the theoretical distribution, may be removed as abnormal data.
[0101] In step S140, based on the missing amount of physiological data in each of the synchronous time series and the data missing flag, the total missing data amount of each of the synchronous time series is determined respectively.
[0102] By integrating the determined missing numbers in each synchronous time series and the number of data missing marks in step S130 , the number of missing physiological data in each synchronous time series (ie, the total number of missing data) can be obtained.
[0103] After obtaining the total number of missing data of each synchronous time series, step S150 is executed to fill the missing physiological data based on the preset data filling method according to the total number of missing data, so as to obtain a physiological data set with complete data volume.
[0104] In order to better process the acquired physiological data in the future, it is necessary to fill in the missing physiological data in each synchronized time series. When the amount of missing data is different, considering the calculation speed and the difficulty of filling the data, different filling methods (i.e., preset data filling methods) can be selected to fill in the missing physiological data to obtain a physiological data set with a complete data volume.
[0105] Optionally, the method of filling missing physiological data based on a preset data filling method according to the total amount of missing data to obtain a physiological data set with a complete data amount includes:
[0106] For each of the synchronization time series, determining a relationship between the total number of missing data and a plurality of preset missing data number thresholds;
[0107] Determining a target physiological data filling method from multiple physiological data filling methods based on a relationship between the total missing data quantity and multiple preset missing data quantity thresholds;
[0108] The missing physiological data is filled in according to the target physiological data filling method to obtain the physiological data set.
[0109] After obtaining the total number of missing data in each synchronous time series, in order to facilitate the judgment of the total number of missing data, multiple preset missing data number thresholds can be set in advance, and the appropriate physiological data filling method can be selected to fill the actual data according to the relationship between the total number of missing data and each preset missing data number threshold.
[0110] In another achievable implementation, the total amount of physiological data in the synchronized time sequence can be determined by the synchronization frequency and sampling duration of each synchronized time sequence. The sampling duration can be the length corresponding to the amount of physiological data acquired by the controller at one time on the synchronized time sequence, that is, the total duration of the intervals between the acquired physiological data. Since the amount of physiological data acquired by the controller each time is different, the total amount of physiological data in each synchronized time sequence can be determined by the synchronization frequency and the sampling duration, that is, for each synchronized time sequence, the sampling duration is multiplied by the synchronization frequency to obtain the total amount of physiological data in the synchronized time sequence.
[0111] Furthermore, the total amount of missing data in the synchronous time series can be divided by the total amount of physiological data to obtain the missing rate of the synchronous time series. A missing rate range is set, and according to the range of the calculated missing rate, a corresponding physiological data filling method is selected as the target physiological data filling method, and the missing physiological data is filled to obtain the physiological data set.
[0112] Optionally, the preset missing data quantity threshold includes a first preset missing data quantity threshold, a second preset missing data quantity threshold and a third preset missing data quantity threshold, and the physiological data filling method includes a first physiological data filling method, a second physiological data filling method, a third physiological data filling method and a fourth physiological data filling method. The determining a target physiological data filling method from multiple physiological data filling methods based on the relationship between the total missing data quantity and multiple preset missing data quantity thresholds includes:
[0113] If the total number of missing data is less than the first preset missing data number threshold, the target physiological data filling method is determined to be the first physiological data filling method; wherein the first physiological data filling method is one or more of mean filling, median filling, linear interpolation filling, decision tree regression and nearest neighbor filling.
[0114] If the total number of missing data is greater than or equal to the first preset missing data number threshold and less than the second preset missing data number threshold, the target physiological data filling method is determined to be the second physiological data filling method. The second physiological data filling method is multivariate regression interpolation and / or time series prediction interpolation linear regression prediction interpolation, and the second preset missing data number threshold is greater than the first preset missing data number threshold.
[0115] If the total number of missing data is greater than or equal to the second preset missing data number threshold and less than the third preset missing data number threshold, the correlation between each of the synchronous time series is obtained to determine whether there is a synchronous time series whose correlation with the current synchronous time series reaches a preset value and whose total number of missing data is between the first preset missing data number threshold and the second preset missing data number threshold.
[0116] If so, determine that the target physiological data filling method is the third physiological data filling method; wherein, the third physiological data filling method is a multivariate time series prediction model interpolation method, and the third preset missing data quantity threshold is greater than the second preset missing data quantity threshold.
[0117] If not, it is determined that the target physiological data filling method is the fourth physiological data filling method; wherein the fourth physiological data filling method is a preset integrated learning model filling method.
[0118] You can set Figure 4 The preset missing data quantity thresholds are shown, wherein the first preset missing data quantity threshold is the smallest, followed by the second preset missing data quantity threshold, and the third preset missing data quantity threshold is the largest.
[0119] When the calculated total number of missing data is less than the first preset missing data number threshold, it means that the missing amount of physiological data is very small, and the calculation speed can be given priority. Therefore, the first physiological data filling method such as mean filling, median filling, linear interpolation filling, decision tree regression and nearest neighbor filling can be used to fill the missing physiological data.
[0120] If the total number of missing data is greater than or equal to the first preset missing data number threshold and less than the second preset missing data number threshold, a relatively advanced second physiological data filling method of multivariate regression interpolation and / or time series prediction interpolation linear regression prediction interpolation can be used to fill in the physiological data.
[0121] For example, if regression imputation is used, a regression model can be built for known data, and then the model can be used to predict missing values. The main steps are as follows:
[0122] 1. Select regression variables: For target variables with missing values, determine the independent variables that affect it. The independent variables can be the lagged values of the time series itself or other covariates.
[0123] 2. Split known data: Divide the known data into two parts: training set and test set. The training set is used to build the regression model, and the test set is used to test the model accuracy.
[0124] 3. Establish a regression model: In the training set, use the known target variable value as the dependent variable, and the selected independent variables (such as lag values, covariates) as independent variables to fit the regression model (such as linear regression, decision tree regression, etc.).
[0125] 4. Model evaluation and selection: Evaluate the prediction performance of the regression model on the test set and select the regression model that performs best on the test set.
[0126] 5. Missing value prediction: Using the selected optimal regression model, input the known independent variable values near the missing target value into the model to predict and interpolate the missing target value.
[0127] 6. Update the interpolation results: fill the missing values in the original sequence with the predicted values, and update the complete sequence after filling as the data input for the next step of analysis.
[0128] If the total number of missing data is greater than or equal to the second preset missing data number threshold and less than the third preset missing data number threshold, the closeness between the filled data and the actual data should be considered. Therefore, it is necessary to judge whether there is a synchronous time series whose correlation with the current synchronous time series reaches the preset value and whose total number of missing data is between the first preset missing data number threshold and the second preset missing data number threshold according to the correlation between each synchronous time series (correlation is a preset value set according to the degree of functional correlation, such as the correlation between heart rate and exercise degree is 0.8). If it exists, the multivariate time series prediction model interpolation method (i.e., the third physiological data filling method) can be used to predict and fill the physiological data based on the physiological data in the synchronous time series with high correlation and more physiological data.
[0129] The steps of the interpolation method of the multivariate time series forecasting model are as follows:
[0130] 1. Multivariate time series prediction: Take the synchronized data of relevant sensor channels as input features, and the data of missing channels as the target sequence to be predicted. Build a multivariate time series prediction model, such as RNN variants such as LSTM and GRU, fit the model on the training set, and use other sensor data to predict the missing channels.
[0131] 2. Generative Adversarial Network Interpolation (GANs): Construct two adversarial generator and discriminator networks. The generator accepts other sensor data and outputs an estimate of the missing channel data. The discriminator determines the difference between the estimate and the true value and feeds it back to the generator for optimization, ultimately making the generator output a realistic missing value estimate that can deceive the discriminator.
[0132] 3. Collaborative interpolation based on transfer learning: Train generative models such as autoencoders on other sensor channels with data, use domain adaptation and other ideas to migrate the source domain encoder to the target missing sensor, perform fine-tuning and fitting on the decoding part of the target domain, and generate missing channel data estimates.
[0133] 4. Interpolation based on attention mechanism: The sensor data is regarded as a multivariate time series. The attention weight is dynamically calculated based on the data of other sensor sequences through the mutual attention mechanism, and each time step in the missing sequence is interpolated and estimated.
[0134] If it does not exist, the preset integrated learning model filling method (ie, the fourth physiological data filling method) is used to fill in the physiological data.
[0135] Specifically, the preset ensemble learning model filling method can be as follows:
[0136] 1. Benchmark interpolation model calculation: Use basic methods such as mean filling, linear interpolation, decision tree, linear regression, KNN, etc. to interpolate some missing data.
[0137] Interpolation using Generative Adversarial Networks (GANs): The generator network receives partial data available from the wearable device and generates an estimate of all sensor data; the discriminator network scores the authenticity of the generated all data; adversarial training is performed to prompt the generator to generate more realistic estimates of the missing data until: ① the scores of the real complete data and the generated interpolated data > S1; moreover, ② within the sliding window of the missing time series, calculate the standard deviations of the real values and the estimated values respectively to generate two standard deviation sequences, calculate their differences in each window, and the final average difference < S2 and variance < S3; if the result after S rounds of adversarial training does not meet the requirements, prompt the user to give up or select the best result obtained during the adversarial process for interpolation.
[0138] Interpolation using a time series model (such as Transformer) enhanced by the Attention Mechanism to improve the context understanding and interpolation accuracy of the missing data.
[0139] 2. Use ensemble learning algorithms such as Bagging, Boosting, Stacking, etc. to integrate the prediction results of different basic models to form a stronger interpolation model. Divide the complete dataset (data with all known values) into a training set and a validation set. The training set is used to train the model, and the validation set is used to evaluate the model performance. Cross-validation is used to optimize the model parameters.
[0140] 3. Use the validation set to evaluate the interpolation effect of the ensemble model, and calculate evaluation metrics such as Mean Squared Error (MSE), Mean Absolute Error (MAE), etc. Compare the interpolation effects of the above models to verify the superiority of the ensemble model.
[0141] 4. Perform precise interpolation on the multi-channel data according to the results of the optimal algorithm.
[0142] In another alternative implementation, if the filling method of the physiological data is determined by the missing rate range where the missing rate is located, the missing rate range can be set as the first missing rate range, the second missing rate range, and the third missing rate range. If the missing rate is within the first missing rate range, determine the target physiological data filling method as the first physiological data filling method. Among them, the first physiological data filling method is one or more of mean filling, median filling, linear interpolation adjacent mean filling, and nearest neighbor filling.
[0143] If the missing rate is within the second missing rate range, the target physiological data filling method is determined to be the second physiological data filling method, wherein the second physiological data filling method is multivariate regression interpolation and / or time series prediction interpolation linear regression prediction interpolation, and the minimum value of the second missing rate range is greater than the maximum value of the first missing rate range.
[0144] If the missing rate is within the third missing rate range, the correlation between each synchronous time series is obtained to determine whether there is a synchronous time series whose correlation with the current synchronous time series reaches a preset value and whose missing rate is not within the second missing rate range. The current synchronous time series is a synchronous time series whose missing rate is within the second missing rate range. If so, the target physiological data filling method is determined to be the third physiological data filling method. The third physiological data filling method is a multivariate time series prediction model interpolation method, and the minimum value of the third missing rate range is greater than the maximum value of the second missing rate range.
[0145] If not, the target physiological data filling method is determined to be the fourth physiological data filling method, wherein the fourth physiological data filling method is a preset integrated learning model filling method.
[0146] Optionally, the method further comprises:
[0147] Performing Fourier transform and noise type detection on the physiological data set to obtain the noise frequency band and noise type of the physiological data.
[0148] According to the noise frequency band and the noise type, a filtering algorithm subset is determined from a preset filtering algorithm set, and the filtering algorithm subset includes at least two filtering algorithms.
[0149] Initialize the algorithm weight of each filtering algorithm in the filtering algorithm subset.
[0150] Each filtering algorithm in the filtering algorithm subset is respectively used to perform denoising processing on the physiological data set.
[0151] The algorithm weight of each filtering algorithm is adjusted according to the mean square error and signal-to-noise ratio corresponding to each filtering algorithm obtained by the denoising process.
[0152] The two filtering algorithms with the highest algorithm weights are determined as target filtering algorithms, and outputs of the target filtering algorithms are combined to generate a denoised data set corresponding to the physiological data set.
[0153] The physiological data collected by wearable devices often contain high-frequency noise and short-term fluctuations, which will affect the extraction of rhythmic features. Filtering can effectively remove high-frequency noise and retain low-frequency rhythmic components. Therefore, after the missing physiological data in each synchronized time series are filled, the physiological data can be filtered by adaptive hybrid filtering.
[0154] First, frequency domain analysis is performed, that is, Fourier transform is used to analyze the spectrum characteristics of physiological data and identify the noise frequency band of physiological data. In addition, a machine learning model (such as a classifier, etc.) is used to detect the noise type of physiological data (such as Gaussian noise type, impulse noise type, etc.).
[0155] After obtaining the noise frequency band and noise type, multiple filtering algorithms (i.e., a subset of filtering algorithms) that match the noise frequency band and noise type of the physiological data can be determined from multiple filtering algorithms in the filtering algorithm library (i.e., a preset filtering algorithm set). Initialize the algorithm weights of each filtering algorithm in the filtering algorithm subset, and then use a traversal method to let each filtering algorithm filter the physiological data set once. Assign weights to each filtering algorithm based on the mean square error and signal-to-noise ratio corresponding to each filtering algorithm obtained by the filtering process. Finally, determine the two filtering algorithms with the highest algorithm weights as the target filtering algorithms, and combine the outputs of the target filtering algorithms to generate a denoised data set corresponding to the physiological data set.
[0156] Optionally, the method further comprises: generating a visualization chart based on the name of each sensor, the data type, data value and sampling time of the physiological data in each synchronous time series, sending the visualization chart to a client, and storing the visualization chart.
[0157] After denoising the physiological data set, the denoised data can be generated into visual charts, such as bar charts, line charts, etc., according to the name of the sensor (such as body temperature sensor, photoelectric sensor, etc.), the data type of the physiological data in each synchronized time series (body temperature, heart rate, etc.), data value (35°C, 65 times / min, etc.) and sampling time (July 5, 17:18:35), etc., and sent to the client for staff analysis, and the visual chart backup is stored at the same time.
[0158] Based on the same inventive concept, Figure 5 As shown, the embodiment of the present invention provides a physiological data processing device 300, which is applied to a controller, and the controller is respectively connected to multiple sensors for communication. The physiological data processing device 300 includes:
[0159] The physiological data acquisition unit 301 is used to respectively acquire a plurality of physiological data sampled by each of the sensors at a respective sampling frequency.
[0160] The time series synchronization processing unit 302 is used to perform time series synchronization processing on each of the physiological data based on the sampling frequency of each of the sensors to obtain multiple synchronized time series with consistent frequencies; wherein each synchronized time series corresponds to one of the sensors.
[0161] The abnormal data removal unit 303 is used to remove the abnormal data in each of the synchronous time series based on a preset data cleaning method, and mark the data missing at the data position where the abnormal data is located.
[0162] The total missing data quantity determining unit 304 is configured to determine the total missing data quantity of each of the synchronous time series based on the missing quantity of physiological data in each of the synchronous time series and the data missing flag.
[0163] The physiological data filling unit 305 is used to fill in the missing physiological data based on a preset data filling method and according to the total amount of missing data, so as to obtain a physiological data set with complete data volume.
[0164] Regarding the physiological data processing device 300 , the specific functions of each unit therein have been described in detail in the embodiment of the physiological data processing method provided in this specification, and will not be elaborated here.
[0165] Based on the same inventive concept, an embodiment of the present invention specification provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any of the above physiological data processing methods are implemented.
[0166] The present invention has at least the following beneficial effects:
[0167] 1. By performing time series synchronization processing on the physiological data obtained by each sensor, multiple synchronized time series are obtained, so that the physiological data obtained by the control end can be synchronized to the same acquisition frequency, which is convenient for subsequent processing and observation and analysis.
[0168] 2. By determining the number of missing physiological data in each synchronous time series, removing abnormal data in each synchronous time series through a preset data cleaning method, and marking the data missing at the data location where the abnormal data is located, the total number of missing data is obtained through integration. Then, the missing physiological data is filled in by a preset data filling method, and finally a physiological data set with a complete data volume is obtained. This makes the subsequent data processing results more accurate.
[0169] 3. According to the different amounts of missing physiological data in each synchronous time series, different data filling methods are adopted to make the filling of physiological data highly adaptable, fast and accurate.
[0170] 4. The physiological data set is denoised using an adaptive hybrid filtering method, which is efficient and has a good denoising effect.
[0171] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0172] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0173] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0174] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A physiological data processing method, characterized in that: Applied to a controller, the controller is respectively connected to multiple sensors for communication; the method comprises: Respectively acquiring a plurality of physiological data sampled by each of the sensors at a respective sampling frequency; Based on the sampling frequency of each sensor, each of the physiological data is subjected to time series synchronization processing to obtain a plurality of synchronized time series with consistent frequencies; wherein each synchronized time series corresponds to one of the sensors; Based on a preset data cleaning method, remove abnormal data in each of the synchronous time series, and mark the data missing at the data location where the abnormal data is located; Based on the missing amount of physiological data in each of the synchronous time series and the data missing flag, respectively determine the total missing amount of data in each of the synchronous time series; Based on a preset data filling method, the missing physiological data are filled according to the total amount of missing data to obtain a physiological data set with complete data volume.
2. The physiological data processing method according to claim 1, characterized in that: The method further comprises: Performing Fourier transform and noise type detection on the physiological data set to obtain a noise frequency band and a noise type of the physiological data; Determine a subset of filtering algorithms from a preset filtering algorithm set according to the noise frequency band and the noise type, wherein the subset of filtering algorithms includes at least two filtering algorithms; Initializing the algorithm weight of each filtering algorithm in the filtering algorithm subset; Using each filter algorithm in the filter algorithm subset to perform denoising on the physiological data set; Adjusting the algorithm weight of each filtering algorithm according to the mean square error and signal-to-noise ratio corresponding to each filtering algorithm obtained by the denoising process; The two filtering algorithms with the highest algorithm weights are determined as target filtering algorithms, and outputs of the target filtering algorithms are combined to generate a denoised data set corresponding to the physiological data set.
3. The physiological data processing method according to claim 1, characterized in that: The step of performing time series synchronization processing on each of the physiological data based on the sampling frequency of each of the sensors to obtain a plurality of synchronized time series with consistent frequencies includes: Using a preset clock synchronization protocol to synchronize the physiological data acquired by each sensor, and obtain a plurality of initial time series with inconsistent frequencies; Determining whether a common multiple of the frequencies of the initial time series is greater than a preset frequency threshold; If so, the frequencies of the initial time series are synchronously stretched / scaled to a preset frequency to obtain the synchronous time series; If not, the common multiple is used as the synchronization frequency of each of the time series to obtain each of the synchronized time series.
4. The physiological data processing method according to claim 1, characterized in that: The removing of abnormal data in each of the synchronous time series based on a preset data cleaning method includes: For each of the synchronous time series, calculating the standard deviation of the synchronous time series, and calculating the data mean of the physiological data in the synchronous time series; For each physiological data, determining whether the difference between the physiological data and the data mean is greater than a preset multiple of the standard deviation; If so, the physiological data is determined to be the abnormal data, and the abnormal data is removed.
5. The physiological data processing method according to claim 1, characterized in that: The method of filling the missing physiological data based on the preset data filling method according to the total amount of missing data to obtain a physiological data set with a complete data volume includes: For each of the synchronization time series, determining a relationship between the total number of missing data and a plurality of preset missing data number thresholds; Determining a target physiological data filling method from multiple physiological data filling methods based on a relationship between the total missing data quantity and multiple preset missing data quantity thresholds; The missing physiological data is filled in according to the target physiological data filling method to obtain the physiological data set.
6. The physiological data processing method according to claim 5, characterized in that: The preset missing data quantity threshold includes a first preset missing data quantity threshold, a second preset missing data quantity threshold and a third preset missing data quantity threshold, and the physiological data filling method includes a first physiological data filling method, a second physiological data filling method, a third physiological data filling method and a fourth physiological data filling method; the determining a target physiological data filling method from multiple physiological data filling methods based on the relationship between the total missing data quantity and multiple preset missing data quantity thresholds includes: If the total number of missing data is less than the first preset missing data number threshold, determining that the target physiological data filling method is the first physiological data filling method; wherein the first physiological data filling method is one or more of mean filling, median filling, linear interpolation filling, decision tree regression and nearest neighbor filling; If the total number of missing data is greater than or equal to the first preset missing data number threshold and less than the second preset missing data number threshold, it is determined that the target physiological data filling method is the second physiological data filling method; wherein the second physiological data filling method is multivariate regression interpolation and / or time series prediction interpolation linear regression prediction interpolation, and the second preset missing data number threshold is greater than the first preset missing data number threshold; If the total number of missing data is greater than or equal to the second preset missing data number threshold and less than the third preset missing data number threshold, then obtain the correlation between the synchronization time series, and determine whether there is a synchronization time series whose correlation with the current synchronization time series reaches a preset value and whose total number of missing data is between the first preset missing data number threshold and the second preset missing data number threshold; If yes, it is determined that the target physiological data filling method is the third physiological data filling method; wherein the third physiological data filling method is a multivariate time series prediction model interpolation method, and the third preset missing data quantity threshold is greater than the second preset missing data quantity threshold; If not, it is determined that the target physiological data filling method is the fourth physiological data filling method; wherein the fourth physiological data filling method is a preset integrated learning model filling method.
7. The physiological data processing method according to claim 1, characterized in that: The method further comprises: Generate a visualization chart based on the name of each of the sensors, the data type, the data value and the sampling time of the physiological data in each of the synchronized time series; The visual chart is sent to a client and stored.
8. A physiological data processing device, characterized in that: Applied to a controller, the controller is communicatively connected with a plurality of sensors respectively; The physiological data processing device comprises: A physiological data acquisition unit, used to respectively acquire a plurality of physiological data sampled by each of the sensors at a respective sampling frequency; A time series synchronization processing unit, used for performing time series synchronization processing on each of the physiological data based on the sampling frequency of each of the sensors, so as to obtain a plurality of synchronized time series with consistent frequencies; wherein each of the synchronized time series corresponds to one of the sensors; An abnormal data removal unit, used to remove abnormal data in each of the synchronous time series based on a preset data cleaning method, and mark the data missing at the data position where the abnormal data is located; a total missing data quantity determining unit, configured to determine the total missing data quantity of each of the synchronous time series based on the missing quantity of physiological data in each of the synchronous time series and the data missing flag; The physiological data filling unit is used to fill in the missing physiological data based on a preset data filling method and according to the total amount of missing data, so as to obtain a physiological data set with complete data volume.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, and when the computer program is executed, the server where the computer-readable storage medium is located is controlled to implement the steps of the method according to any one of claims 1 to 7.
