Method for extracting respiratory waveform and outputting confidence, training method and related device
By extracting time-aligned respiratory waveforms from photoplethysmography (PPG) signals and outputting confidence scores using a fully convolutional dilated temporal neural network, the inaccurate output caused by signal quality fluctuations in existing technologies is solved, thereby improving the robustness and availability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2026-03-03
- Publication Date
- 2026-07-24
Smart Images

Figure CN122440165A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of physiological signal processing, intelligent health monitoring and wearable computing technology, and in particular to a method, training method and related equipment for extracting respiratory waveforms and outputting confidence. Background Technology
[0002] Photoplethysmography (PPG) signals can be acquired in a low-cost, non-invasive manner and are widely used in monitoring vital signs such as heart rate and blood oxygenation. Since respiratory activity causes changes in peripheral blood volume, pulse amplitude, and interbeat duration, PPG contains modulation information related to respiration, and theoretically, respiratory information can be inferred from PPG. Many existing methods primarily output respiratory rate (RR), but in practical applications, continuous respiratory waveforms are more valuable for respiratory morphology analysis, respiratory event detection, assessment of respiratory irregularities, and as input for subsequent algorithms.
[0003] On the other hand, in real-world scenarios, PPG signals are susceptible to motion artifacts, loose fitting, insufficient perfusion, and saturation shearing, leading to distortion or even unreliability of the respiratory waveform inferred from PPG. Many existing methods lack a mechanism for quantifying the reliability of prediction results, making it difficult for the system to reject or alert on low-quality inputs, thus affecting the security and reliability of actual deployments.
[0004] Therefore, there is an urgent need for a technical solution that can output a respiratory waveform from a PPG signal and simultaneously output a confidence level, so as to control or weightedly fuse the output when artifacts or poor signal quality occur, thereby improving system availability. Summary of the Invention
[0005] The main objective of this application is to propose a method, training method, electronic device, storage medium, and program product for extracting respiratory waveforms and outputting confidence scores based on photoplethysmography (PPG) signals. By constructing a multi-task learning neural network, which shares a feature extraction backbone and branches out a "respiratory waveform reconstruction head" and a "confidence regression head", a single model can synchronously output a respiratory waveform that is time-aligned with the input PPG signal and the quantized confidence score of the waveform from end to end.
[0006] To achieve the above objectives, one aspect of this application proposes a method for extracting respiratory waveforms and outputting confidence scores, the method comprising: Acquire photoplethysmography (PPG) signals; The photoplethysmography signal is input into a trained neural network, which includes a coding backbone network and at least two output heads connected to the coding backbone network. The at least two output heads include a waveform output head and a confidence output head. The waveform output head outputs a predicted respiratory waveform that is aligned with the input time. The confidence output head extracts window-level features from the intermediate features of the coding backbone network and outputs the corresponding confidence value based on the window-level features. The confidence value characterizes the reliability of the respiratory waveform prediction result. The output control is performed on the predicted respiratory waveform based on the confidence value to obtain the final respiratory waveform output.
[0007] In some embodiments, the dilation rate of the plurality of cascaded dilated convolutional residual modules increases layer by layer along the network depth direction.
[0008] In some embodiments, the expansion rate increases exponentially.
[0009] In some embodiments, the confidence output header includes: A global pooling layer is used to pool the feature representations in the coding backbone network used to generate respiratory waveform prediction results along the time dimension to obtain a window-level feature vector. A multilayer perceptron is used to map the window-level feature vectors to scalar values; An activation function layer is used to normalize the scalar value to the interval between 0 and 1 and output a confidence value.
[0010] In some embodiments, the global pooling layer is a global average pooling layer or a global max pooling layer.
[0011] In some embodiments, the output control of the respiratory waveform prediction result based on the confidence value includes at least one of the following methods: When the confidence value is less than the preset threshold, the prediction result of the breathing waveform in the current window is determined to be unreliable, and the output is stopped, a null value is output, or an unreliable flag is output. When the confidence value is not less than the preset threshold, the respiratory waveform prediction result of the current window is output; Based on the confidence value, the predicted respiratory waveform of the current window and the respiratory waveform of the historical window are weighted and fused to output the fused continuous respiratory waveform.
[0012] In some embodiments, before inputting the photoplethysmography (PPG) signal into the trained neural network, the method further includes: The preprocessed photoplethysmography signal is segmented according to a preset window length to construct the window input data; The window length corresponds to a time length of 8 to 64 seconds, and overlap between adjacent windows is allowed.
[0013] To achieve the above objectives, another aspect of this application provides a method for training the aforementioned neural network, comprising: Acquire training samples, which include photoplethysmography (PPG) signal window input data and a reference respiratory signal time-aligned with the PPG signal; The window input data is input into the neural network to be trained, the breathing waveform prediction result is obtained through the waveform output head, and the corresponding confidence value is obtained through the confidence output head. The waveform reconstruction loss is calculated based on the predicted respiratory waveform and the reference respiratory signal. A target confidence level is generated based on the reconstruction error between the predicted respiratory waveform and the reference respiratory signal, and a confidence loss is calculated based on the confidence level value and the target confidence level. The network parameters are updated jointly based on the waveform reconstruction loss and the confidence loss.
[0014] In some embodiments, the target confidence level is obtained by mapping the reconstruction error to a monotonically decreasing function.
[0015] In some embodiments, the monotonically decreasing function is an exponential decay function, a linear decay function, or a piecewise function.
[0016] In some embodiments, the waveform reconstruction loss uses mean squared error, mean absolute error, or Huber loss; the confidence loss uses binary cross-entropy loss or mean squared error loss.
[0017] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0018] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.
[0019] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0020] Compared with the prior art, this application has the following beneficial effects: 1) Outputs continuous respiratory waveforms instead of a single respiratory rate: Preserves respiratory morphology information and supports advanced clinical applications such as apnea detection, inspiratory / expiratory ratio analysis, and assessment of respiratory irregularities.
[0021] 2) Synchronous output of fine-grained confidence scores: The confidence scores are obtained directly from intermediate features by the neural network. They share the feature extraction backbone with the breathing waveform prediction, resulting in minimal computational overhead. The confidence scores are continuously distributed in the range of 0 to 1, providing a refined basis for subsequent decision-making, which is superior to traditional discrete signal quality classification.
[0022] 3) Joint training mechanism for confidence scores: The target confidence score is automatically generated using reconstruction error, eliminating the need for manual labeling of confidence scores; the waveform reconstruction loss and confidence score loss are jointly optimized, so that the confidence score output is naturally aligned with the quality of the prediction task, thus solving the problem of missing supervision signals in the source of confidence scores.
[0023] 4) Edge-friendly network architecture: The combination of fully convolutional architecture, dilated convolution, depthwise separable convolution, and residual connections significantly reduces the amount of computation and parameters while ensuring a large receptive field and high expressive power, enabling real-time inference on resource-constrained devices such as smartwatches and smart bands.
[0024] 5) Flexible output control strategy: Supports two output control modes: threshold rejection and confidence weighted fusion. It can be configured according to the application scenario requirements, and has both robustness and continuity. Attached Figure Description
[0025] Figure 1 A schematic flowchart of a method for extracting respiratory waveforms and outputting confidence scores based on PPG signals, provided in one embodiment of this application; Figure 2 A schematic diagram of the Edge-TCN structure provided in one embodiment of this application; Figure 3 This is a schematic diagram of the confidence output header structure provided in one embodiment of this application; Figure 4 A schematic diagram of confidence-based rejection and weighted fusion output provided in one embodiment of this application; Figure 5 A schematic diagram of a training process provided in one embodiment of this application; Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0028] Photoplethysmography (PPG) is a non-invasive physiological signal acquisition technology that uses photoelectric methods to detect changes in blood volume. Due to its advantages such as low cost, comfortable wear, and ease of operation, PPG signals have been widely used in devices such as smart bracelets, smartwatches, wearable chest patches, and bedside monitors for real-time monitoring of vital signs such as heart rate, blood oxygen saturation, and blood pressure trends.
[0029] Respiration is one of the core parameters for assessing human physiological state. Traditional respiratory monitoring relies heavily on specialized equipment such as nasal airflow sensors, chest and abdominal straps, and carbon dioxide concentration analyzers, which are not suitable for long-term continuous monitoring in everyday scenarios. Studies have shown that respiratory activity periodically modulates PPG signals through the autonomic nervous system and peripheral circulatory system, mainly manifested as: changes in pulse interval due to respiratory sinus arrhythmia, changes in peripheral blood volume due to changes in intrathoracic pressure caused by respiration, and changes in pulse amplitude due to changes in venous return. Based on these mechanisms, it is theoretically feasible to extract respiratory information from PPG signals.
[0030] Numerous existing methods attempt to estimate respiratory rate (RR) from PPG signals. However, respiratory rate is only a scalar value, losing the rich morphological information contained in the respiratory waveform, such as the inspiratory / expiratory duration ratio, apnea events, Cheyne-Stokes breathing pattern, and respiratory irregularity. This morphological information has significant clinical value for applications such as sleep apnea screening, chronic obstructive pulmonary disease management, and respiratory mechanics assessment in critically ill patients. Therefore, directly extracting a continuous respiratory waveform time-aligned with the original PPG signal, rather than a single respiratory rate, has become a pressing technical problem to be solved in this field.
[0031] On the other hand, PPG signals face severe signal quality challenges in real-world applications. Motion artifacts, loose fitting, ambient light interference, low perfusion, and sensor saturation shearing can all cause severe distortion of PPG signal waveforms, making the respiratory information inferred from them distorted or even completely unreliable. Most existing technologies adopt the following two approaches: one is to directly ignore signal quality issues and output prediction results in all time periods, resulting in the device frequently outputting incorrect information in motion scenarios, reducing user experience and clinical credibility; the other is to introduce an independent signal quality assessment module to classify PPG signals based on prior quality and only start the respiratory extraction algorithm during "high-quality" time periods. The latter approach has the following drawbacks: (1) Signal quality assessment and respiratory extraction are separated, making it difficult to achieve end-to-end optimization; (2) Signal quality assessment usually outputs discrete categories (such as "good" and "bad"), lacking fine-grained continuous confidence characterization; (3) Prediction results cannot be effectively utilized during "medium-quality" time periods, resulting in information waste.
[0032] In summary, there is an urgent need in this field for a technical solution that can directly extract time-aligned respiratory waveforms from PPG signals and simultaneously output the confidence level of the prediction results, so as to achieve intelligent rejection or confidence-weighted fusion during low-quality signal periods, thereby improving the robustness and clinical usability of the system while ensuring the continuity of output.
[0033] In view of this, this application provides a method, training method, electronic device, storage medium, and program product for extracting respiratory waveforms and outputting confidence scores based on photoplethysmography (PPG) signals. This scheme extracts time-aligned respiratory waveforms from PPG signals using a fully convolutional dilated temporal neural network, avoiding the insufficient information provided by only outputting respiratory frequency. Simultaneously, it outputs window-level confidence values, and uses confidence threshold control to achieve rejection or prompting, or confidence weighting to achieve smoothing and fusion of continuous outputs, thereby improving system robustness and reliability in the presence of motion artifacts or signal quality fluctuations. Furthermore, the network employs a depthwise separable one-dimensional convolutional and dilated residual structure, possessing low computational complexity and suitable for real-time deployment on the edge.
[0034] The method for extracting and outputting confidence scores of respiratory waveforms provided in this application relates to the field of physiological signal processing technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the method for extracting and outputting confidence scores of respiratory waveforms, but is not limited to the above forms.
[0035] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0036] Please see Figure 1 , Figure 1 This is a schematic flowchart of a method for extracting respiratory waveforms and outputting confidence scores based on PPG signals, provided in one embodiment of this application.
[0037] This embodiment provides a method for extracting respiratory waveforms and outputting confidence scores based on photoplethysmography (PPG) signals, including the following steps: Step S1: Acquire the photoplethysmography (PPG) signal and preprocess the PPG signal. The preprocessing includes at least resampling, filtering, and normalization.
[0038] The PPG signal can be acquired by wearable devices, bedside monitoring devices, or other terminals with PPG acquisition capabilities. Resampling is used to unify PPG signals from different devices with different sampling rates to a preset sampling rate; filtering is used to suppress baseline drift and high-frequency noise; normalization is used to reduce the impact of individual differences and amplitude drift on model inference.
[0039] Furthermore, the preprocessing includes: resampling the PPG signal to a preset sampling rate, and performing bandpass filtering on the resampled PPG signal to suppress baseline drift and high-frequency noise. The passband range of the bandpass filter can be set according to the characteristics of the respiration and PPG signals; this embodiment does not limit its value.
[0040] In one example embodiment, the PPG signal originates from a commercial smartwatch with a built-in green LED photoplethysmography sensor and a sampling rate of 50Hz. The raw PPG signal often contains noise and artifacts, requiring preprocessing to improve the signal-to-noise ratio.
[0041] Preprocessing specifically includes: (1) Resampling: The original 50Hz signal is resampled to 25Hz to reduce the computational burden and retain the breathing frequency band information. The resampling is performed after using an anti-aliasing finite impulse response low-pass filter.
[0042] (2) Bandpass filtering: Design a fourth-order Butterworth bandpass filter with a passband frequency range of 0.1Hz to 8Hz. The 0.1Hz high-pass component is used to suppress slow baseline drift caused by exercise and breathing; the 8Hz low-pass component is used to retain the pulse wave main peak information while suppressing high-frequency noise.
[0043] (3) Normalization: Z-score normalization is adopted, that is, the mean of each window of data is subtracted and divided by its standard deviation to eliminate the influence of individual signal amplitude differences and global amplitude drift on model inference.
[0044] Step S2: Divide the preprocessed PPG signal into segments according to the preset window length, and construct a window input data of length T.
[0045] Furthermore, the window length T corresponding to the input data is between 8 and 64 seconds, and overlap between adjacent windows is allowed. Sliding the window segmentation can increase the number of samples while ensuring respiratory cycle coverage and improving the continuity of inference output.
[0046] In one example implementation, the window length T is set to 32 seconds, corresponding to 800 sampling points at a 25Hz sampling rate. The overlap between adjacent windows is set to 16 seconds (50% overlap) to smooth prediction jumps at window boundaries and increase the number of samples in the testing phase.
[0047] The input data for each window is a one-dimensional time-series vector with shape (800,). Before being input into the neural network, the vector is expanded in the channel dimension to form a tensor with shape (1, 800).
[0048] Step S3: Input the window input data into the trained fully convolutional dilated temporal neural network and output the breathing waveform prediction result aligned with the window input time.
[0049] Please see Figure 2 , Figure 2 This is a schematic diagram of the Edge-TCN structure provided in one embodiment of this application.
[0050] Furthermore, the fully convolutional dilated temporal neural network includes: an input projection layer for mapping the window input data into a multi-channel feature representation; multiple cascaded dilated convolutional residual modules, each of which includes depth-separable one-dimensional dilated convolution, pointwise convolution, and residual connections, with the dilation rate of different dilated convolutional residual modules increasing sequentially; and a breathing waveform output head for mapping the output of the dilated convolutional residual modules into a single-channel breathing waveform prediction result.
[0051] Furthermore, the dilation rate of the dilated convolution residual module increases exponentially, thereby obtaining a large temporal receptive field with low computational complexity, in order to capture the low-frequency modulation features related to breathing in the PPG and generate time-aligned breathing waveform prediction results.
[0052] Step S4: Extract window-level features from the intermediate features of the fully convolutional dilated temporal neural network, and output the confidence value corresponding to the window input based on the window-level features.
[0053] Please see Figure 3 , Figure 3 This is a schematic diagram of the confidence output header structure provided in one embodiment of this application.
[0054] Further, step S4 includes: performing global pooling along the time dimension on the feature representation used to generate the respiratory waveform prediction result in the fully convolutional dilated temporal neural network to obtain a window-level feature vector; inputting the window-level feature vector into a multilayer perceptron and outputting the confidence value corresponding to the window input data, wherein the confidence value ranges from 0 to 1.
[0055] Global pooling can be global average pooling or other pooling methods. The multilayer perceptron can include at least two fully connected layers and a nonlinear activation function. Finally, a confidence value between 0 and 1 is obtained through Sigmoid mapping.
[0056] Step S5: Perform output control on the respiratory waveform prediction result based on the confidence value to obtain the final respiratory waveform output result.
[0057] Please see Figure 4 , Figure 4 This is a schematic diagram of a confidence-based rejection and weighted fusion output provided in one embodiment of this application.
[0058] Further, step S5 includes: when the confidence value is less than a preset threshold, determining that the respiratory waveform prediction result is unreliable, and stopping the output or outputting an unreliable flag; when the confidence value is not less than the preset threshold, outputting the respiratory waveform prediction result. This avoids outputting misleading respiratory waveforms in windows with strong artifacts or poor signal quality, improving system reliability.
[0059] Further, step S5 includes: weighted fusion of the respiratory waveform prediction result of the current window and the respiratory waveform results of the historical windows based on the confidence value to obtain a continuous respiratory waveform output. This method can be used to reduce the impact of low-confidence windows on the final output while ensuring output continuity.
[0060] In summary, in this embodiment, a breathing waveform aligned with the input window time is generated by a fully convolutional dilated temporal neural network, and a window-level confidence score is output from the network features to achieve a quantitative representation of the prediction reliability. During the inference stage, rejection or weighted fusion can be performed based on the confidence score, thereby improving the robustness and usability of the system in real artifact scenarios.
[0061] Please see Figure 5 , Figure 5 This is a schematic diagram of a training process provided for one embodiment of this application. This embodiment also provides a method for training the aforementioned fully convolutional dilated temporal neural network, including the following steps: T1. Obtain training samples, which include PPG signal window input data and reference respiratory signals time-aligned with the PPG signals; T2. Input the window input data into the fully convolutional dilated temporal neural network to be trained to obtain the breathing waveform prediction result and the corresponding confidence value; T3. Calculate the waveform reconstruction loss based on the predicted respiratory waveform and the reference respiratory signal; T4. Generate a target confidence level based on the reconstruction error between the predicted respiratory waveform and the reference respiratory signal, and calculate the confidence level loss. T5. Update the network parameters jointly based on the waveform reconstruction loss and the confidence loss.
[0062] Furthermore, the target confidence level is obtained by mapping the reconstruction error to a monotonically decreasing function. Specifically, the reconstruction error between the predicted respiratory waveform and the reference respiratory signal can be calculated first, and then the target confidence level can be obtained by mapping the error through exponential decay or equivalent monotonically decreasing function, so that the model learns the consistency relationship that "the smaller the error, the higher the confidence level, and the larger the error, the lower the confidence level".
[0063] Through the above training method, the network not only learns the ability to reconstruct breathing waveforms, but also learns the ability to quantify the reliability of the input window.
[0064] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0065] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0066] Please see Figure 6 , Figure 6 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 601 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 602 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called and executed by the processor 601 using the methods described in the embodiments of this application. The input / output interface 603 is used to implement information input and output; The communication interface 604 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 605 transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601, memory 602, input / output interface 603, and communication interface 604 are connected to each other within the device via bus 605.
[0067] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0068] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0069] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0070] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0071] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented in the embodiments of this program product are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. The executable computer program code or "code" used to perform the various embodiments can be written in high-level programming languages such as C, C++, Python, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0072] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0073] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0074] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0075] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0076] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0077] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0079] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0080] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0081] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0082] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for extracting respiratory waveforms and outputting confidence scores, characterized in that, The method includes the following steps: Acquire photoplethysmography (PPG) signals; The photoplethysmography signal is input into a trained neural network, the neural network comprising a coding backbone network and at least two output heads connected to the coding backbone network, the at least two output heads including a waveform output head and a confidence output head; The waveform output head outputs a predicted respiratory waveform that is aligned with the input time. The confidence output head extracts window-level features from the intermediate features of the coding backbone network and outputs the corresponding confidence value based on the window-level features. The confidence value characterizes the reliability of the respiratory waveform prediction result. The output control is performed on the predicted respiratory waveform based on the confidence value to obtain the final respiratory waveform output.
2. The method according to claim 1, characterized in that, The encoded backbone network is a fully convolutional dilated temporal neural network, which includes: The input projection layer is used to map the input data into a multi-channel feature representation; Multiple cascaded dilated convolutional residual modules, each containing depth-separable one-dimensional dilated convolution, pointwise convolution, and residual connections, with different dilated convolutional residual modules having different dilation rates; The waveform output head is connected to the output of the last dilated convolution residual module and is used to map the features into a single-channel breathing waveform prediction result.
3. The method according to claim 2, characterized in that, The dilation rate of the multiple cascaded dilated convolutional residual modules increases layer by layer along the network depth direction.
4. The method according to claim 1, characterized in that, The confidence output header includes: A global pooling layer is used to pool the feature representations in the coding backbone network used to generate respiratory waveform prediction results along the time dimension to obtain a window-level feature vector. A multilayer perceptron is used to map the window-level feature vectors to scalar values; An activation function layer is used to normalize the scalar value to the interval between 0 and 1 and output a confidence value.
5. The method according to claim 1, characterized in that, The output control based on the predicted respiratory waveform based on the confidence value includes at least one of the following methods: When the confidence value is less than the preset threshold, the prediction result of the breathing waveform in the current window is determined to be unreliable, and the output is stopped, a null value is output, or an unreliable flag is output. When the confidence value is not less than the preset threshold, the respiratory waveform prediction result of the current window is output; Based on the confidence value, the predicted respiratory waveform of the current window and the respiratory waveform of the historical window are weighted and fused to output the fused continuous respiratory waveform.
6. The method according to claim 1, characterized in that, The method also includes a step of preprocessing the photoplethysmography (PPG) signal, wherein the preprocessing includes at least one of the following operations: Resample to the preset sampling rate; Bandpass filtering is used to suppress baseline drift and high-frequency noise; Normalization.
7. The method according to claim 1, characterized in that, Before inputting the photoplethysmography (PPG) signal into the trained neural network, the method further includes: The preprocessed photoplethysmography signal is segmented according to a preset window length to construct the window input data; The window length corresponds to a time length of 8 to 64 seconds, and overlap between adjacent windows is allowed.
8. A method for training the neural network according to any one of claims 1 to 7, characterized in that, include: Acquire training samples, which include photoplethysmography (PPG) signal window input data and a reference respiratory signal time-aligned with the PPG signal; The window input data is input into the neural network to be trained, the breathing waveform prediction result is obtained through the waveform output head, and the corresponding confidence value is obtained through the confidence output head. The waveform reconstruction loss is calculated based on the predicted respiratory waveform and the reference respiratory signal. A target confidence level is generated based on the reconstruction error between the predicted respiratory waveform and the reference respiratory signal, and a confidence loss is calculated based on the confidence level value and the target confidence level. The network parameters are updated jointly based on the waveform reconstruction loss and the confidence loss.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 8.