A method and system for monitoring animal heart rate based on dual-channel PPG
Through the abnormal detection and reconstruction model of dual-channel PPG signal, the problem of motion artifact interference in heart rate monitoring in mice was solved, and accurate heart rate detection under anesthesia or mild exercise states was achieved, which improved the robustness of data processing and accuracy.
Patent Information
- Application Number
- CN202410051962.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-01-12
AI Technical Summary
Existing PPG signal processing methods are poor in treating exercise artifacts in animals, especially mice, resulting in inaccurate heart rate monitoring, especially in anesthesia or mild exercise.
Dual-channel PPG data is used for abnormal detection and reconstruction, and the abnormal detection reconstruction model is constructed, the data that covers the abnormal area is weighted by using a mask, and data reconstruction is carried out in combination with convolutional neural network and Markov chain Monte Carlo algorithm. , reduces motion artifact interference and calculates more accurate heart rate values.
It improves the accuracy of heart rate monitoring in the presence of exercise artifacts, can accurately detect heart rate in the presence of mild exercise or anesthesia in mice, reduces noise interference, and enhances the robustness of data reconstruction.
Smart Images

Figure CN117814770B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of animal physiological detection, and in particular to an animal heart rate monitoring method and system based on dual-channel PPG. Background Art
[0002] Animal experimental research has always been the key to scientific breakthroughs in the fields of medicine and biology. Heart rate and respiratory rate are the most important and basic physiological parameters that characterize the metabolic level of animals. The data obtained can detect and highly predict dynamic clinical experimental conditions. Since mice and humans have certain similarities in biology, including organ structure, physiological function and genome composition, the measurement of their heart rate plays an important role in the field of medicine and biology. Photoplethysmography (PPG) is an optical and non-invasive method that reflects changes in blood volume in blood vessels. This change is related to the respiratory cycle and the ECG cycle, and various physiological parameters such as heart rate and respiratory rate can be extracted from the signal. This method uses a light source to emit light to the skin and uses a light sensor to absorb the reflected light. However, the collected signal is easily affected by motion artifacts, and rats are animals with relatively frequent activities. Even when anesthetized, rats will still have regular jitters or twitches, resulting in a significant quality impact on the signal collected by the PPG device. Such problems may reduce the accuracy of the application.
[0003] The current mainstream methods for removing motion artifacts and reconstructing to improve PPG quality are mainly aimed at human PPG signals. The normalized least mean square adaptive filter is used to remove motion artifacts, which uses the accelerometer signal as a reference to adaptively remove motion artifacts. Another study used empirical mode decomposition (EMD) and discrete wavelet transform (DWT) to obtain the components most relevant to the clean PPG signal. These methods reduce the impact of noise, but cannot reconstruct noisy PPG signals when the noise level is high. The methods for reconstructing PPG signals distorted by motion artifacts currently include deep convolutional generative adversarial network (GAN) methods, and there are also methods for reconstructing damaged and lost fragments from photoplethysmographic data using recurrent neural networks. These methods are mainly aimed at the reconstruction of human PPG, and the reconstruction effect of PPG for animals that are prone to regular shaking or twitching is poor. Summary of the invention
[0004] The purpose of the present invention is to provide a dual-channel PPG-based animal heart rate monitoring method and system suitable for anesthesia or slight exercise in order to solve the problems mentioned in the above background technology.
[0005] The above-mentioned purpose of the present application is achieved through the following technical solutions:
[0006] S1: Acquire the collected dual-channel PPG data to be reconstructed and perform preprocessing;
[0007] S2: construct an anomaly detection reconstruction model, obtain the collected heart rate data of the animals in the non-jitter time period and pre-process it, and train the anomaly detection reconstruction model through the pre-processed heart rate data;
[0008] S3: inputting the preprocessed dual-channel PPG data into the trained anomaly detection reconstruction model for anomaly detection, reconstructing the dual-channel PPG data, and obtaining anomaly scores of the two channels; determining an abnormal area of the abnormal PPG data according to the anomaly scores;
[0009] S4: performing weighted processing on the normal PPG data in the dual-channel PPG data and the abnormal PPG data corresponding to the abnormal area;
[0010] Use a mask to cover the abnormal PPG data corresponding to the abnormal area, input the normal PPG data and the masked abnormal PPG data into the anomaly detection and reconstruction model for training, and update the weight of the anomaly detection and reconstruction model;
[0011] The weighted dual-channel PPG data is input into the weight-updated anomaly detection reconstruction model to reconstruct the morphology of the abnormal PPG data in the dual-channel PPG data;
[0012] S5: filtering the reconstructed dual-channel PPG data to obtain two heart rate signal waveforms;
[0013] S6: Calculate the heart rate values corresponding to the two heart rate signal waveforms, weight the two heart rate values according to the abnormal scores of the two channels, determine the final heart rate value, and complete the heart rate detection.
[0014] Optionally, the preprocessing is filtering through a Butterworth low-pass filter.
[0015] Optionally, step S2 includes:
[0016] S21: Construct an anomaly detection reconstruction model through a convolutional neural network, including: n one-dimensional transposed convolutional layers and a frequency enhancement layer;
[0017] n-1 one-dimensional transposed convolutional layers are connected in sequence, the n-1th one-dimensional transposed convolutional layer is connected to the frequency enhancement layer; the nth one-dimensional transposed convolutional layer is connected after the frequency enhancement layer;
[0018] The input layer of the anomaly detection reconstruction model is the first one-dimensional transposed convolutional layer, and the output layer of the anomaly detection reconstruction model is the nth one-dimensional transposed convolutional layer;
[0019] S22: Iteratively detect the latent variables of the reconstruction model using the Markov Chain Monte Carlo algorithm and heart rate data;
[0020] S23: Update the parameters of the anomaly detection reconstruction model through the alternating back-propagation algorithm.
[0021] Optionally, the dual-channel PPG data includes: normal PPG data and abnormal PPG data; the normal PPG data accounts for more than 20% of the dual-channel PPG data; and the two channel data of the dual-channel PPG data remain synchronized.
[0022] Optionally, in step S4, the specific steps of inputting the weighted dual-channel PPG data into the weight-updated abnormality detection reconstruction model to reconstruct the morphology of abnormal PPG data in the dual-channel PPG data are as follows:
[0023] S41: extracting an average estimation value of one cycle from the normal PPG data of the dual-channel PPG data;
[0024] S42: Generate a noise reference signal by a fast Fourier transform method, and generate a synthesized noise reference signal by an inverse Fourier transform;
[0025] S43: subtracting the synthesized noise reference signal from the abnormal PPG data corresponding to the abnormal area to remove motion artifacts;
[0026] S44: superimposing the average estimated value and the abnormal PPG data to generate a damaged PPG signal;
[0027] S45: Reconstruct the damaged PPG signal through the anomaly detection reconstruction model to complete the reconstruction of the abnormal PPG data morphology of the dual-channel PPG data.
[0028] Optionally, step S5 includes:
[0029] The reconstructed abnormal PPG data is bandpass filtered, specifically including: using a Butterworth filter to remove baseline drift; using Amor wavelet to perform digital wavelet transform on the reconstructed abnormal PPG data to obtain a heart rate signal waveform.
[0030] An animal heart rate monitoring system based on dual-channel PPG, comprising: a dual PPG acquisition device, a controller, and a main control chip;
[0031] The dual PPG acquisition device is connected to the controller and the main control chip, and the controller is connected to the main control chip;
[0032] The dual PPG acquisition device includes two PPG sensors, which are respectively arranged on both sides of the animal's body surface;
[0033] The dual PPG acquisition device is used to collect the dual-channel PPG data to be reconstructed and the heart rate data of the animal without jitter, and send them to the main control chip; the controller is used to realize the synchronous sampling of the dual PPG acquisition device;
[0034] The main control chip is used to receive and collect dual-channel PPG data and heart rate data;
[0035] The main control chip is also used to construct an abnormality detection reconstruction model, and the abnormality detection reconstruction model is trained by heart rate data;
[0036] The main control chip is also used to process the dual-channel PPG data using a mask, input the processed dual-channel PPG data into the trained anomaly detection reconstruction model for training, and update the weight of the anomaly detection reconstruction model;
[0037] The main control chip is also used to perform anomaly detection and data reconstruction on the dual-channel PPG data by updating the weighted anomaly detection reconstruction model, and calculate the accurate heart rate value through the reconstructed dual-channel PPG data.
[0038] The model of the PPG sensor is max30105, and the model of the main control chip is esp32 pico.
[0039] An electronic device includes a processor, a memory, a user interface and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device performs an animal heart rate monitoring method based on dual-channel PPG.
[0040] A computer-readable storage medium stores instructions. When the instructions are executed, a dual-channel PPG-based animal heart rate monitoring method is performed.
[0041] The beneficial effects of the technical solution provided by this application are:
[0042] 1. Perform anomaly detection on the dual-channel PPG data to be reconstructed by building an anomaly detection reconstruction model to determine the anomaly scores and abnormal areas of the two channels. Use a mask to cover the abnormal PPG data corresponding to the abnormal area, input the normal PPG data and the masked abnormal PPG data into the anomaly detection reconstruction model for training, update the weights of the anomaly detection reconstruction model, and improve the accuracy of data reconstruction. Through anomaly detection and reconstruction technology, combined with dual-channel heart rate data, and weighted according to the anomaly score, more accurate heart rate data can be calculated.
[0043] 2. By extracting the average estimate of the period from the normal PPG data, a noise reference signal is synthesized to reduce the interference of motion artifacts.
[0044] 3. The PPG signal after abnormal reconstruction is bandpass filtered and wavelet transformed, and the heart rate is calculated by combining a fixed-length sliding window method, in which the abnormal score of the abnormal part is adjusted and weighted according to the abnormal score within the window. This comprehensive data processing method enables the heart rate of mice to be calculated in a more accurate way in the presence of motion artifacts. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The present application will be further described below with reference to the accompanying drawings and embodiments, in which:
[0046] Figure 1 is a step diagram of an animal heart rate monitoring method based on dual-channel PPG in an embodiment of the present application;
[0047] Figure 2 is a schematic diagram of abnormal detection reconstruction model detection of an animal heart rate monitoring method based on dual-channel PPG in an embodiment of the present application;
[0048] Figure 3 is a schematic diagram of the structure of an abnormality detection reconstruction model of an animal heart rate monitoring method based on dual-channel PPG in an embodiment of the present application;
[0049] Figure 4 is a flowchart of abnormal reconstruction of the animal heart rate monitoring method based on dual-channel PPG in an embodiment of the present application;
[0050] Figure 5 It is a schematic diagram of the structure of an electronic device of an animal heart rate monitoring method based on dual-channel PPG in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to have a clearer understanding of the technical features, purposes and effects of the present application, the specific implementation methods of the present application are now described in detail with reference to the accompanying drawings.
[0052] An embodiment of the present application provides an animal heart rate monitoring method based on dual-channel PPG.
[0053] Please refer to Figure 1 , Figure 1 : is a step diagram of an animal heart rate monitoring method based on dual-channel PPG in an embodiment of the present application, comprising:
[0054] S1: Acquire the collected dual-channel PPG data to be reconstructed and perform preprocessing;
[0055] S2: construct an anomaly detection reconstruction model, obtain the collected heart rate data of the animals in the non-jitter time period and pre-process it, and train the anomaly detection reconstruction model through the pre-processed heart rate data;
[0056] Specifically, the process of collecting the heart rate data of animals in the jitter-free time period is as follows: the heart rate data of the same animals in the anesthetized state are collected by dual PPG acquisition equipment, and the heart rate data in the jitter-free time period is intercepted from the heart rate data as training data for training the abnormality detection reconstruction model.
[0057] S3: inputting the preprocessed dual-channel PPG data into the trained anomaly detection reconstruction model for anomaly detection, reconstructing the dual-channel PPG data, and obtaining anomaly scores of the two channels; determining an abnormal area of the abnormal PPG data according to the anomaly scores;
[0058] Specifically, the anomaly detection reconstruction model generates multiple time series windows from the training data Y, implicitly learning the normal (non-abnormal) time dynamics and the correlation between multiple time series.
[0059] In anomaly detection, the mean squared error of all m time series is considered to calculate the anomaly score st for a specific timestamp t in the window as follows:
[0060]
[0061] Among them, y i,t represents the i-th dual-channel PPG data at time t; Represents the i-th dual-channel PPG data at time t after reconstruction.
[0062] Since two PPG signals are used, two channels of data are generated during the reconstruction process. In order to enhance the credibility of the reconstructed differences, the dual-channel PPG data is reconstructed and the reconstruction process of obtaining the anomaly score is divided into two times, including: one using the channel order during training and the other using the opposite channel order. The anomaly scores obtained from the two reconstructions are averaged to obtain the final anomaly score.
[0063] The PPG signal data has two channels, and the data obtained from the two channels are basically the same. Detecting anomalies is the role of reconstruction, which is to compare the abnormalities of the dual-channel PPG data with the input data to compare the abnormal parts of the PPG data. Reconstructing with the channel order opposite to that during training prevents errors caused by using the same channel all the time, prevents deviations in the trained parameters, and increases its robustness.
[0064] Since the anomaly score is represented by the mean square error between the target sequence and the reconstructed sequence, the threshold is fixed to a fixed value δ, and the distance exceeding the value δ is regarded as an abnormal area. At the same time, according to the periodic characteristics of PPG data, the left and right extended areas of the point where the anomaly score exceeds the value δ are also regarded as abnormal areas, to ensure that the anomaly scores of r time points in the validation set are greater than δ and are thus detected as abnormal.
[0065] S4: performing weighted processing on the normal PPG data in the dual-channel PPG data and the abnormal PPG data corresponding to the abnormal area;
[0066] Use a mask to cover the abnormal PPG data corresponding to the abnormal area, input the normal PPG data and the masked abnormal PPG data into the anomaly detection and reconstruction model for training, and update the weight of the anomaly detection and reconstruction model;
[0067] The weighted dual-channel PPG data is input into the weight-updated anomaly detection reconstruction model to reconstruct the morphology of the abnormal PPG data in the dual-channel PPG data;
[0068] Specifically, the dual-channel PPG synchronization characteristics are used to guide the two PPG channels to determine the position of the respiratory peak in the dual-channel PPG data; according to the position of the respiratory peak, the normal PPG data of the dual-channel PPG data and the abnormal PPG data corresponding to the abnormal area are weighted.
[0069] S5: filtering the reconstructed dual-channel PPG data to obtain two heart rate signal waveforms;
[0070] S6: Calculate the heart rate values corresponding to the two heart rate signal waveforms, weight the two heart rate values according to the abnormal scores of the two channels, determine the final heart rate value, and complete the heart rate detection.
[0071] Specifically, by repairing abnormal PPG data damaged by motion artifacts, a more accurate heart rate signal waveform is obtained, thereby achieving the function of accurately detecting the heart rate when the animal is exercising slightly.
[0072] The preprocessing is filtering through a Butterworth low-pass filter.
[0073] Step S2 includes:
[0074] S21: Construct an anomaly detection reconstruction model through a convolutional neural network, including: n one-dimensional transposed convolutional layers and a frequency enhancement layer;
[0075] n-1 one-dimensional transposed convolutional layers are connected in sequence, the n-1th one-dimensional transposed convolutional layer is connected to the frequency enhancement layer; the nth one-dimensional transposed convolutional layer is connected after the frequency enhancement layer;
[0076] The input layer of the anomaly detection reconstruction model is the first one-dimensional transposed convolutional layer, and the output layer of the anomaly detection reconstruction model is the nth one-dimensional transposed convolutional layer;
[0077] S22: Iteratively detect the latent variables of the reconstruction model using the Markov Chain Monte Carlo algorithm and heart rate data;
[0078] S23: Update the parameters of the anomaly detection reconstruction model through the alternating back-propagation algorithm.
[0079] Specifically, the anomaly detection reconstruction model uses a short-term Markov chain Monte Carlo algorithm to iterate latent variables and updates network weights through an alternating back-propagation algorithm. It does not rely on auxiliary networks such as encoders or discriminators such as VAE and GAN. It iterates latent variables through the Markov chain Monte Carlo algorithm, divides the time series into a series of equal-length windows, and uses an adaptive method to merge data information from different periods.
[0080] Specifically, the anomaly detection reconstruction model uses a top-down convolutional network. The convolutional network improves the resolution of time series data through a one-dimensional transposed convolution layer, and introduces a frequency enhancement layer to better capture frequency features, intra-cycle changes, and inter-cycle changes.
[0081] The convolutional network finds the harmonic frequency of the PPG signal in the frequency domain through fast Fourier transform (FFT), and uses the harmonic frequency of the PPG signal to convert the one-dimensional time series data into two-dimensional time series data.
[0082] The morphology of PPG data is formed by the superposition of the fundamental heartbeat frequency of the PPG signal and its harmonics. By performing Fourier transform on the PPG, selecting the amplitude values of the top 3 intensities, corresponding to the frequencies of the fundamental heartbeat frequency of the PPG and its harmonics, and obtaining the most significant frequencies {f1, f2, f3} and the non-normalized amplitude {A f1 , A f2 , A f3 These selected frequencies also correspond to 3 period lengths {p1, p2, p3}.
[0083] According to the selected frequencies {f1, f2, f3} and the corresponding period lengths {p1, p2, p3}, the one-dimensional time series of length N is reshaped into three two-dimensional tensors, and then a 2D convolution layer is used to capture intra-cycle and inter-cycle changes. The convolution result is expanded into one-dimensional data, and the three tensor results of different periods are merged in a residual manner. The amplitude A can reflect the relative importance of the selected frequency and period, corresponding to the importance of each transformed two-dimensional tensor. Therefore, the amplitude is used as the weight to merge into a one-dimensional data X ID ,as follows:
[0084]
[0085]
[0086] Among them, Softmax is a normalization function that converts the amplitude estimates into weights to ensure that they are all between 0 and 1 and the sum of all weights is 1. By using weights Perform weighted fusion on one-dimensional data. Represents the one-dimensional data of the result after the i-th convolution.
[0087] The dual-channel PPG data includes: normal PPG data and abnormal PPG data; the normal PPG data accounts for more than 20% of the dual-channel PPG data; and the two channel data of the dual-channel PPG data are kept synchronized.
[0088] In step S4, the specific steps of inputting the weighted dual-channel PPG data into the weight-updated abnormality detection reconstruction model to reconstruct the morphology of abnormal PPG data in the dual-channel PPG data are as follows:
[0089] S41: extracting an average estimation value of one cycle from the normal PPG data of the dual-channel PPG data;
[0090] S42: Generate a noise reference signal by a fast Fourier transform method, and generate a synthesized noise reference signal by an inverse Fourier transform;
[0091] S43: subtracting the synthesized noise reference signal from the abnormal PPG data corresponding to the abnormal area to remove motion artifacts;
[0092] S44: superimposing the average estimated value and the abnormal PPG data to generate a damaged PPG signal;
[0093] S45: Reconstruct the damaged PPG signal through the anomaly detection reconstruction model to complete the reconstruction of the abnormal PPG data morphology of the dual-channel PPG data.
[0094] Step S5 includes:
[0095] The reconstructed abnormal PPG data is bandpass filtered, specifically including: using a Butterworth filter to remove baseline drift; using Amor wavelet to perform digital wavelet transform on the reconstructed abnormal PPG data to obtain a heart rate signal waveform.
[0096] Specifically, Figure 4The process of abnormal PPG data reconstruction is shown. First, the average estimate of one cycle is extracted from the normal PPG data. Then, considering the motion artifacts present in the PPG signal, a synthetic reference noise signal is used to reduce the interference of motion artifacts. The noise reference signal is generated using the FFT method, and the synthetic noise reference signal is generated by the inverse Fourier transform. The synthetic noise reference signal is subtracted from the abnormal PPG data, and the dual-channel PPG synchronization feature is used to guide the two PPGs to determine the location of the respiratory peak in the PPG. The average estimate is superimposed on the abnormal PPG data to generate an impaired PPG signal that maintains the basic shape and heart rate characteristics of the PPG.
[0097] In the reconstruction of abnormal PPG data, a mask is used to cover the abnormal PPG data, and the unmasked normal PPG data and the masked abnormal PPG data are used to train the abnormal detection and reconstruction model, and the weight of the abnormal detection and reconstruction model is updated. After the training is completed, the abnormal PPG data is reconstructed using the abnormal detection and reconstruction model, which reduces the interference of motion artifacts and effectively repairs the abnormal PPG data.
[0098] The dual-channel PPG data after abnormal reconstruction was bandpass filtered, and the baseline drift was removed using a 5-12Hz Butterworth filter. The signal was digitally transformed using Amor wavelet to obtain a clear heart rate signal waveform.
[0099] To calculate the heart rate of mice, a sliding window method with a fixed length was used. Within each window, the anomaly score of the reconstructed abnormal part was adjusted to a predetermined fixed value. The two-way PPG data was calculated according to the peak-to-peak method, and the weight of the two signals was determined by the ratio of the anomaly scores within the window. In the experiment, the length of the sliding window was set to 5 seconds, and the offset between windows was 1 second. The combined application of the above methods allowed us to calculate the heart rate of mice in a more accurate way, especially in the presence of motion artifacts.
[0100] The present invention aims to solve the problem that in animal drug experiments, it is necessary to obtain heart rate data of mice after anesthesia, while measuring the heart rate in a non-anesthetized state will produce severe motion artifacts.
[0101] The present invention successfully reduces the interference of mouse movement on heart rate calculation through abnormal detection and reconstruction of dual-channel PPG signals, and obtains accurate heart rate data through weighted calculation of abnormal scores within the window. 1. Movement is one of the common factors that cause PPG signal interference. By detecting the abnormal part of the two channel data of the dual-channel PPG, and then reconstructing the PPG waveform through the consistency between the two channels, the impact of motion artifacts can be effectively reduced; 2. The abnormal score detected by the abnormality is used to judge the quality of the PPG signal in the window, and more reliable channel data is selected between the two channels, which can more accurately monitor the heart rate of the animal; 3. Using the consistency between the two channels of the dual-channel PPG, the data affected by motion artifacts is reconstructed and restored, allowing researchers to use the waveform of the PPG data to fully understand the physiological activities of the animal.
[0102] By performing abnormal detection and reconstruction of dual-channel PPG signals, most motion artifacts can be removed, and the heart rate data of mice can be monitored in real time when they are awake and moving without anesthetizing them, without the need for traumatic surgery or restraint in a fixture. It has the advantages of simple experimental conditions, little interference with animal experiments, and rich application scenarios, and has broad application prospects in animal drug experiments, animal behavioral analysis, and long-term monitoring of animal vital signs.
[0103] An animal heart rate monitoring system based on dual-channel PPG, comprising: a dual PPG acquisition device, a controller, and a main control chip;
[0104] The dual PPG acquisition device is connected to the controller and the main control chip, and the controller is connected to the main control chip;
[0105] The dual PPG acquisition device includes two PPG sensors, which are respectively arranged on both sides of the animal's body surface;
[0106] The dual PPG acquisition device is used to collect the dual-channel PPG data to be reconstructed and the heart rate data of the animal without jitter, and send them to the main control chip; the controller is used to realize the synchronous sampling of the dual PPG acquisition device;
[0107] The main control chip is used to receive and collect dual-channel PPG data and heart rate data;
[0108] The main control chip is also used to construct an abnormality detection reconstruction model, and the abnormality detection reconstruction model is trained by heart rate data;
[0109] The main control chip is also used to process the dual-channel PPG data using a mask, input the processed dual-channel PPG data into the trained anomaly detection reconstruction model for training, and update the weight of the anomaly detection reconstruction model;
[0110] The main control chip is also used to perform anomaly detection and data reconstruction on the dual-channel PPG data by updating the weighted anomaly detection reconstruction model, and calculate the accurate heart rate value through the reconstructed dual-channel PPG data.
[0111] The model of the PPG sensor is max30105, and the model of the main control chip is esp32 pico.
[0112] Specifically, the system of the present application includes two PPG sensors for simultaneously collecting dual-channel PPG signals from the surface of the animal. Through a synergistic controller, the PPG sensors on the left and right sides can achieve synchronous sampling to ensure that the collected data has a high degree of consistency. In the present application, the sampling frequency of the PPG sensor is set to 120 times per second to ensure high timing resolution. A small, lightweight, low-power wearable device is constructed using a dual-channel max30105 sensor and an esp32 pico chip. The device is fixed on the neck or chest of the animal and is easy to operate so as to obtain the PPG signal closest to the skin surface. The data collected by the PPG signals of the two max30105 sensors are processed and transmitted by the esp32 pico d4 chip. The PPG signal obtained by the esp32 pico d4 chip is first processed by a Butterworth low-pass filter to remove DC signals below 1Hz and noise components above 25Hz.
[0113] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0114] The present application also discloses an electronic device. Figure 5 , Figure 5 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0115] The communication bus 502 is used to realize the connection and communication between these components.
[0116] The user interface 503 may include a display screen (Display) and a camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.
[0117] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0118] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0119] The memory 505 may include a random access memory (Random Access Memory, RAM) or a read-only memory (Read-Only Memory).
[0120] Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 optionally also includes but is not limited to at least one storage device located away from the aforementioned processor 501. Refer to Figure 5, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for an animal heart rate monitoring method based on dual-channel PPG.
[0121] exist Figure 5 In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call the application program stored in the memory 505 for an animal heart rate monitoring method based on dual-channel PPG. When executed by one or more processors 501, the electronic device 500 executes one or more methods in the above-mentioned embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] In the several implementation modes provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which 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 system, 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 includes but is not limited to indirect coupling or communication connection of devices or units through some service interfaces, including but not limited to electrical or other forms.
[0124] The units described as separate components include but are not limited to, or may not be physically separated, and the components shown as units include but are not limited to, or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, including but not limited to each unit being physically present separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent commodity, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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 memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0127] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0128] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method for monitoring animal heart rate based on dual-channel PPG, characterized in that: The method comprises the following steps: S1: Acquire the collected dual-channel PPG data to be reconstructed and perform preprocessing; S2: construct an anomaly detection reconstruction model, obtain the collected heart rate data of the animals in the non-jitter time period and pre-process it, and train the anomaly detection reconstruction model through the pre-processed heart rate data; S3: inputting the preprocessed dual-channel PPG data into the trained anomaly detection and reconstruction model to perform anomaly detection, reconstruct the dual-channel PPG data, and obtain anomaly scores of the two channels; According to the abnormality score, the abnormal area of the abnormal PPG data is determined; S4: performing weighted processing on the normal PPG data in the dual-channel PPG data and the abnormal PPG data corresponding to the abnormal area; Use a mask to cover the abnormal PPG data corresponding to the abnormal area, input the normal PPG data and the masked abnormal PPG data into the anomaly detection and reconstruction model for training, and update the weight of the anomaly detection and reconstruction model; The weighted dual-channel PPG data is input into the weight-updated anomaly detection reconstruction model to reconstruct the morphology of the abnormal PPG data in the dual-channel PPG data; S5: filtering the reconstructed dual-channel PPG data to obtain two heart rate signal waveforms; S6: Calculate the heart rate values corresponding to the two heart rate signal waveforms, weight the two heart rate values according to the abnormal scores of the two channels, determine the final heart rate value, and complete the heart rate detection.
2. The animal heart rate monitoring method based on dual-channel PPG according to claim 1, characterized in that: The preprocessing is filtering through a Butterworth low-pass filter.
3. The animal heart rate monitoring method based on dual-channel PPG according to claim 1, characterized in that: Step S2 includes: S21: Construct an anomaly detection reconstruction model through a convolutional neural network, including: n one-dimensional transposed convolutional layers and a frequency enhancement layer; n-1 one-dimensional transposed convolutional layers are connected in sequence, the n-1th one-dimensional transposed convolutional layer is connected to the frequency enhancement layer; the nth one-dimensional transposed convolutional layer is connected after the frequency enhancement layer; The input layer of the anomaly detection reconstruction model is the first one-dimensional transposed convolutional layer, and the output layer of the anomaly detection reconstruction model is the nth one-dimensional transposed convolutional layer; S22: Iteratively detect the latent variables of the reconstruction model using the Markov Chain Monte Carlo algorithm and heart rate data; S23: Update the parameters of the anomaly detection reconstruction model through the alternating back-propagation algorithm.
4. The animal heart rate monitoring method based on dual-channel PPG according to claim 1, characterized in that: The dual-channel PPG data includes: normal PPG data and abnormal PPG data; the normal PPG data accounts for more than 20% of the dual-channel PPG data; and the two channel data of the dual-channel PPG data are kept synchronized.
5. The animal heart rate monitoring method based on dual-channel PPG according to claim 1, characterized in that: In step S4, the specific steps of inputting the weighted dual-channel PPG data into the weight-updated abnormality detection reconstruction model to reconstruct the morphology of abnormal PPG data in the dual-channel PPG data are as follows: S41: extracting an average estimation value of one cycle from the normal PPG data of the dual-channel PPG data; S42: Generate a noise reference signal by a fast Fourier transform method, and generate a synthesized noise reference signal by an inverse Fourier transform; S43: subtracting the synthesized noise reference signal from the abnormal PPG data corresponding to the abnormal area to remove motion artifacts; S44: superimposing the average estimated value and the abnormal PPG data to generate a damaged PPG signal; S45: Reconstruct the damaged PPG signal through the anomaly detection reconstruction model to complete the reconstruction of the abnormal PPG data morphology of the dual-channel PPG data.
6. The animal heart rate monitoring method based on dual-channel PPG according to claim 1, characterized in that: Step S5 includes: The reconstructed abnormal PPG data is bandpass filtered, specifically including: using a Butterworth filter to remove baseline drift; using Amor wavelet to perform digital wavelet transform on the reconstructed abnormal PPG data to obtain a heart rate signal waveform.
7. An animal heart rate monitoring system based on dual-channel PPG, characterized in that: include: Dual PPG acquisition equipment, controller, main control chip; The dual PPG acquisition device is connected to the controller and the main control chip, and the controller is connected to the main control chip; The dual PPG acquisition device includes two PPG sensors, which are respectively arranged on both sides of the animal's body surface; The dual PPG acquisition device is used to collect the dual-channel PPG data to be reconstructed and the heart rate data of the animal without jitter, and send them to the main control chip; the controller is used to realize the synchronous sampling of the dual PPG acquisition device; The main control chip is used to receive and collect dual-channel PPG data and heart rate data; The main control chip is also used to construct an abnormality detection reconstruction model, and the abnormality detection reconstruction model is trained by heart rate data; The main control chip is also used to process the dual-channel PPG data using a mask, input the processed dual-channel PPG data into the trained anomaly detection reconstruction model for training, and update the weight of the anomaly detection reconstruction model, specifically including: weighting the normal PPG data in the dual-channel PPG data and the abnormal PPG data corresponding to the abnormal area; Use a mask to cover the abnormal PPG data corresponding to the abnormal area, input the normal PPG data and the masked abnormal PPG data into the anomaly detection and reconstruction model for training, and update the weight of the anomaly detection and reconstruction model; The main control chip is also used to perform anomaly detection and data reconstruction on the dual-channel PPG data by updating the weighted anomaly detection reconstruction model, and calculate the accurate heart rate value through the reconstructed dual-channel PPG data.
8. An animal heart rate monitoring system based on dual-channel PPG as claimed in claim 7, characterized in that: The model of the PPG sensor is max30105, and the model of the main control chip is esp32pico.
9. An electronic device, characterized in that: The electronic device (500) comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device (500) executes the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method steps according to any one of claims 1 to 6 are performed.
Citation Information
Patent Citations
Abnormal emotion detection method based on physiological signals
CN115844401A
Multi-element time sequence anomaly detection method based on time domain and frequency domain adversarial learning
CN116595377A
Non-anesthetic animal heart rate monitoring system and method based on dual-channel PPG
CN116919373A
Unsupervised attribute network anomaly detection method and system based on view-level graph comparative learning
CN117201122A
Monitoring system, front-end measurement host equipment and charging base
CN209915968U
