A method, device and medium for atrial fibrillation identification

By acquiring PPG signals on wearable devices and constructing local maximum scaling maps, combined with the MiRU network model, the problem of bulky traditional electrocardiogram equipment is solved, enabling convenient and unobtrusive atrial fibrillation identification and monitoring, improving early detection rates and quality of life.

CN120678447BActive Publication Date: 2025-10-31NANJING YUYUE SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511187785.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-31
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing methods for identifying atrial fibrillation rely on bulky electrocardiogram (ECG) equipment and complex electrode manipulation, making it difficult to achieve convenient and long-term non-invasive dynamic monitoring. As a result, paroxysmal atrial fibrillation often goes undetected due to the absence of symptoms.

Method used

The photoplethysmography (PPG) signal acquisition method is adopted. Through wearable devices such as smartwatches, the signal window is segmented and a local maximum scaling map is constructed to determine candidate peak points, extract RR interval sequences, and combine them with a lightweight MiRU network model for atrial fibrillation identification, thereby achieving automated analysis.

Benefits of technology

It enables convenient and unobtrusive long-term atrial fibrillation monitoring, improves the early detection rate of silent atrial fibrillation, reduces the risk of complications such as stroke, and improves patients' quality of life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120678447B_ABST
    Figure CN120678447B_ABST
Patent Text Reader

Abstract

This application discloses an atrial fibrillation (AF) identification method, device, and medium, comprising: acquiring the PPG signal of a subject and determining a specified frequency of the PPG signal; segmenting the PPG signal based on a set window length to obtain each window signal and determining a specified heart rate cycle for each window signal; determining a specified maximum scale for each window signal based on the specified heart rate cycle and the specified frequency; constructing a local maximum scale map of each window signal based on the specified maximum scale, and determining a set of candidate peak points in each local maximum scale map; determining an RR interval sequence based on the set of candidate peak points; and inputting the RR interval sequence into a pre-trained AF identification model to obtain the AF identification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a method, device and medium for atrial fibrillation identification. Background Technology

[0002] Atrial fibrillation (AF) is the most common and serious cardiac arrhythmia. It not only significantly increases the risk of stroke by 5 times, but also induces heart failure, worsens myocardial ischemia, and leads to a doubled risk of death and a severe decline in patients' quality of life. However, AF (especially paroxysmal AF) is often asymptomatic or has subtle symptoms, making early screening and continuous monitoring crucial for preventing fatal complications.

[0003] Most existing methods for identifying atrial fibrillation rely on electrocardiogram (ECG) detection. However, ECG equipment is bulky and inconvenient to carry, and its operation is complex, requiring professional setup and electrode placement, making it difficult to achieve truly seamless and convenient long-term dynamic monitoring. Summary of the Invention

[0004] This specification provides one or more embodiments of an atrial fibrillation identification method, device, and medium to solve the technical problems mentioned in the background art.

[0005] One or more embodiments of this specification employ the following technical solutions:

[0006] This specification provides one or more embodiments of a method for identifying atrial fibrillation, the method comprising:

[0007] Collect the PPG signal of the subject and determine the specified frequency of the PPG signal;

[0008] The PPG signal is segmented based on a set window length to obtain each window signal, and the specified heart rate cycle of each window signal is determined.

[0009] Based on the specified heart rate cycle and the specified frequency, determine the specified maximum scale of each window signal;

[0010] Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map;

[0011] The RR interval sequence is determined based on the candidate peak point set;

[0012] The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results.

[0013] It's important to note that atrial fibrillation (especially paroxysmal atrial fibrillation) is often asymptomatic and requires long-term dynamic monitoring to prevent fatal complications. However, traditional electrocardiogram (ECG) testing relies on bulky equipment and complex electrode pad operations, limiting its non-contact and convenient nature. This method, on the other hand, acquires PPG (photoplethysmography) signals, which can be obtained non-contactly through wearable devices (such as smartwatches), requiring no professional setup or electrode pads, thus solving the portability problem at its source. Next, by segmenting the PPG signal window and determining its period and frequency, a local maximum scaling map is constructed to identify candidate peaks, ultimately extracting the RR interval sequence. This processing adapts to the characteristics of the PPG signal, efficiently capturing heart rate information without complex hardware. Subsequently, the RR interval sequence is input into a pre-trained atrial fibrillation identification model for automated analysis, avoiding human intervention. Therefore, this method achieves truly non-contact and convenient long-term atrial fibrillation monitoring, allowing patients to continuously wear the device in daily life, detect silent atrial fibrillation early, reduce the risk of complications such as stroke, and improve quality of life.

[0014] Furthermore, determining the specified heart rate cycle for each of the window signals includes:

[0015] The autocorrelation waveform signal of the time-delayed version of the signal in each window is determined by the autocorrelation algorithm;

[0016] The specified heart rate cycle of each window signal is determined by calculating the similarity between each window signal and the autocorrelation waveform signal.

[0017] It should be noted that early screening for atrial fibrillation relies on long-term dynamic monitoring, and PPG signals are easily affected by noise and artifacts introduced by daily activities (such as exercise or body movement) when collected by wearable devices, leading to unstable cycle detection. This method captures the repetitive patterns of the signal through an autocorrelation algorithm and then verifies the cycle by combining similarity calculation, effectively filtering out transient interference and signal distortion, thereby ensuring that the heart rate cycle estimation for each window is more reliable and avoiding missed or false detections. This makes the subsequently extracted RR interval sequence more accurately reflect the real heart rate changes, improves the overall credibility of the atrial fibrillation identification model, and ultimately achieves more effective early warning of occult atrial fibrillation and prevention of complications in a portable and unobtrusive monitoring scenario.

[0018] Furthermore, constructing a local maximum scale map for each window signal based on the specified maximum scale includes:

[0019] Based on formula Construct local maximum scale maps for each of the window signals, wherein, This is a local maximum scale map of the signals in each window. This is a two-dimensional Boolean matrix, where the row index is for each scale. The column indices in the two-dimensional Boolean matrix are time. , , Specify the maximum scale. For the time of each window signal, For time The signal value, For time ( The signal value of ) For time ( The signal value of ).

[0020] It should be noted that PPG signals are susceptible to interference from motion artifacts and changes in device fit during long-term dynamic monitoring. Traditional peak detection methods rely on complex filtering or frequency domain transformations, resulting in high computational loads and difficulty in real-time operation on wearable devices. This new formula, however, transforms the temporal and scale relationships of the signal into a lightweight Boolean matrix (LMS) through simple neighborhood value comparison (i.e., determining whether the current point is simultaneously greater than its left and right neighbors). This significantly reduces computational complexity while maintaining the integrity of the waveform's spatiotemporal characteristics. Combined with an adaptively generated specified maximum scale, the scaling map construction process can accurately locate potential peaks at different scales and naturally adapt to the low computational constraints of wearable devices. This provides efficient and reliable underlying support for subsequent RR interval sequence extraction, ultimately achieving low-power, high-real-time early warning capabilities for concealed arrhythmias in a seamless and convenient long-term atrial fibrillation monitoring closed loop, significantly improving user compliance and the sustainability of health management.

[0021] Furthermore, determining the RR interval sequence based on the candidate peak set includes:

[0022] Obtain the preset heart rate threshold;

[0023] Sequentially determine whether the interval between adjacent candidate peak points exceeds the heart rate threshold range;

[0024] If it is determined that the interval between the specified adjacent candidate peaks does not exceed the heart rate threshold range, the next candidate peak in the specified adjacent candidate peaks is removed, and the interval between the subsequent adjacent candidate peaks is determined in turn to see if it exceeds the heart rate threshold range, until the interval between each adjacent candidate peak exceeds the heart rate threshold range, and peaks that meet the conditions are obtained.

[0025] The RR interval sequence is determined based on the peak points that meet the conditions.

[0026] It should be noted that PPG signals are susceptible to transient noise and spurious peak interference from daily activities (such as exercise or changes in body position) during long-term monitoring in wearable devices. This can lead to the candidate peak set containing non-physiological short-interval errors. Directly using these signals to generate RR interval sequences would cause sequence distortion and amplify the risk of misjudgment in atrial fibrillation identification models. This method introduces a heart rate threshold as a physiologically reasonable boundary and iteratively filters the intervals between adjacent peaks to effectively remove spurious peaks or abnormal points (such as interference shorter than the minimum normal heartbeat duration), retaining only reliable points that conform to physiological laws. This purifies the RR interval sequence in noisy environments, making the input of the atrial fibrillation identification model closer to the true heart rate variability characteristics. Ultimately, this improves the accuracy and reliability of atrial fibrillation screening in seamless and convenient PPG dynamic monitoring, supporting more timely early warning of occult atrial fibrillation and prevention of related serious complications.

[0027] Furthermore, before determining the specified maximum scale of each window signal based on the specified heart rate cycle and the specified frequency, the method further includes:

[0028] Based on the preset parameter information of each window signal, a specified level of each window signal is determined. The preset parameter information includes one or more of sample entropy, kurtosis and zero crossover rate.

[0029] The step of constructing a local maximum scale map for each window signal based on the specified maximum scale includes:

[0030] Based on the specified level and the specified maximum scale, a local maximum scale map of each window signal is constructed.

[0031] It should be noted that the quality of PPG signals collected by wearable devices over a long period of time fluctuates in real time due to user activity (such as movement, device displacement, or environmental interference), resulting in significant differences in noise levels and morphological complexity of signals in different windows. If the same fixed scale is used to construct scale maps for low-quality and high-quality signals, a large number of false peaks will be generated due to noise interference, or the true peaks will be lost due to excessive smoothing. This method introduces preset parameters to quantify signal features (such as sample entropy reflecting waveform irregularity, kurtosis representing pulse characteristics, and zero crossover rate indicating high-frequency noise), intelligently classifies signal levels, and then dynamically matches the most suitable scale to construct scale maps—using a conservative scale to suppress false peaks for high-noise windows and a fine scale to preserve details for high-quality windows. This ensures that the true heartbeat peaks are always accurately located in complex usage scenarios, ensuring the reliability of subsequent RR interval sequences. Ultimately, this provides a more robust data foundation for atrial fibrillation identification models, achieving high detection rates and low false alarm rates under non-intrusive monitoring, and effectively warning of occult arrhythmias.

[0032] Furthermore, the step of constructing a local maximum scale map for each window signal based on the specified level and the specified maximum scale includes:

[0033] Based on the specified level, determine the specified threshold coefficient for each of the window signals;

[0034] The maximum adjustment scale of each window signal is obtained by adjusting the specified maximum scale based on the specified threshold coefficient.

[0035] Based on the adjusted maximum scale, a local maximum scale map of each window signal is constructed.

[0036] It should be noted that the PPG signals collected by wearable devices can experience significant quality fluctuations due to environmental interference, device fit, or limb movements during daily activities. If a scale map is constructed using the same fixed maximum scale as for high-quality signals in noisy windows, excessive smoothing may lead to the loss of true peaks or the generation of spurious peaks due to high-frequency noise interference. This method intelligently customizes threshold coefficients based on signal level (e.g., assigning conservative coefficients to low-quality signals to reduce the scale and suppress noise, and assigning open coefficients to high-quality signals to increase the scale and preserve details), thereby dynamically optimizing the scale map's ability to focus on true heartbeat characteristics. This effectively improves the robustness of peak detection in complex environments, ensuring that reliable RR interval sequences can be output for different quality windows. Ultimately, this enables the atrial fibrillation identification model to maintain stable high accuracy during long-term, unobtrusive monitoring, providing a reliable guarantee for the early detection of occult atrial fibrillation and the prevention of serious complications.

[0037] Furthermore, determining the set of candidate peak points in each of the local maximum scaling maps includes:

[0038] Based on the specified level, a time extension threshold is set;

[0039] Determine the specified time corresponding to each candidate peak point in each of the local maximum scaling plots;

[0040] Based on the time expansion threshold, determine the candidate time intervals corresponding to each specified time;

[0041] The point with the largest amplitude in each of the candidate time intervals is selected as the candidate peak point set.

[0042] It should be noted that, since the quality of PPG signals collected by wearable devices during dynamic monitoring changes in real time with user activity, low-quality signals (such as those under motion interference) are prone to peak splitting or adjacent spurious peaks, while high-quality signals require precise capture of the true peak morphology. If a fixed time threshold is used to divide the interval, it may not be able to effectively isolate spurious peak interference for low-quality signals, while for high-quality signals, the interval may be too wide and miss details. This method intelligently customizes the time expansion threshold by signal level (e.g., a larger threshold is configured for low-level signals to accommodate noise disturbances, and a smaller threshold is configured for high-level signals to improve resolution accuracy). It forcibly selects the point with the largest amplitude within the candidate time interval, which not only suppresses the interference of non-physiological spurious peaks (such as secondary waves caused by motion artifacts) on heart rate counting, but also preserves the integrity of the true main peak under different quality windows. Thus, it adaptively optimizes the physiological reliability of the RR interval sequence in complex scenarios, and ultimately ensures that the atrial fibrillation identification model continuously outputs highly robust early warning results under convenient and imperceptible long-term monitoring, providing a solid guarantee for the early intervention of occult arrhythmias.

[0043] Furthermore, before inputting the RR interval sequence into the pre-trained atrial fibrillation identification model, the method further includes:

[0044] Collect multiple RR interval sequences, and construct training, validation and test sets based on the multiple RR interval sequences;

[0045] An initial atrial fibrillation identification model was constructed using a MiRU network;

[0046] The initial atrial fibrillation identification model is trained using the training set, the prediction error is calculated using the cross-entropy loss function, and the network parameters are updated using the gradient descent method until the model converges, thus obtaining the atrial fibrillation identification model to be verified.

[0047] The atrial fibrillation identification model to be verified is validated using the validation set.

[0048] If the verification is successful, the atrial fibrillation identification model to be tested will be obtained;

[0049] The atrial fibrillation identification model under test was tested using a test set.

[0050] If the test passes, the atrial fibrillation identification model is obtained.

[0051] It should be noted that since the core pathological features of atrial fibrillation are the extreme disorder and sudden rhythmic mutations in the RR interval sequence, traditional recurrent neural networks suffer from large parameter counts and low computational efficiency when deployed on mobile terminals, and it is difficult to balance long-term rhythm dependence and mutation response capabilities. The MiRU network significantly reduces the number of parameters (by reducing two gating units) and solidifies the core parameters λ (controlling the strength of long-term rhythmic memory) and β (regulating sensitivity to sudden rhythmic abnormalities), making the model both lightweight and pathologically interpretable—λ enhances the ability to capture persistent atrial fibrillation rhythmic disturbances, while β... This approach specifically addresses the "sudden change" RR interval fluctuations unique to atrial fibrillation (AF). Combined with refined training using the cross-entropy loss function and gradient descent, the model ensures that, under rigorous three-stage dataset validation, it can achieve efficient mobile deployment (meeting wearable device resource constraints) and accurately distinguish between physiological rhythm variability and the pathological, absolute irregularity of AF. Ultimately, through PPG-based non-intrusive dynamic monitoring, it provides high-risk individuals with locally available, real-time, clinically reliable AF early warning capabilities, fundamentally resolving the traditional dilemma of "incompatibility between accuracy and convenience," and truly achieving a closed-loop early intervention for occult AF.

[0052] This specification provides one or more embodiments of an atrial fibrillation identification device, comprising:

[0053] At least one processor and bus; and,

[0054] A memory communicatively connected to the at least one processor; wherein,

[0055] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0056] Collect the PPG signal of the subject and determine the specified frequency of the PPG signal;

[0057] The PPG signal is segmented based on a set window length to obtain each window signal, and the specified heart rate cycle of each window signal is determined.

[0058] Based on the specified heart rate cycle and the specified frequency, determine the specified maximum scale of each window signal;

[0059] Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map;

[0060] The RR interval sequence is determined based on the candidate peak point set;

[0061] The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results.

[0062] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, which, when executed by a computer, can perform the following:

[0063] Collect the PPG signal of the subject and determine the specified frequency of the PPG signal;

[0064] The PPG signal is segmented based on a set window length to obtain each window signal, and the specified heart rate cycle of each window signal is determined.

[0065] Based on the specified heart rate cycle and the specified frequency, determine the specified maximum scale of each window signal;

[0066] Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map;

[0067] The RR interval sequence is determined based on the candidate peak point set;

[0068] The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results.

[0069] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

[0070] Atrial fibrillation (especially paroxysmal atrial fibrillation) is often asymptomatic and requires long-term dynamic monitoring to prevent fatal complications. However, traditional electrocardiogram (ECG) testing relies on bulky equipment and complex electrode pad operations, limiting its non-contact and convenient nature. This method, on the other hand, acquires PPG (photoplethysmography) signals, which can be obtained non-contactly through wearable devices (such as smartwatches), without the need for professional setup or electrode pads, thus solving the portability problem at its source. Next, by segmenting the PPG signal window and determining its period and frequency, a local maximum scaling map is constructed to identify candidate peaks, ultimately extracting the RR interval sequence. This processing adapts to the characteristics of the PPG signal, efficiently capturing heart rate information without complex hardware. Subsequently, the RR interval sequence is input into a pre-trained atrial fibrillation identification model for automated analysis, avoiding human intervention. Therefore, this method achieves truly non-contact and convenient long-term atrial fibrillation monitoring, allowing patients to continuously wear the device in daily life, detect silent atrial fibrillation early, reduce the risk of complications such as stroke, and improve quality of life. Attached Figure Description

[0071] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0072] Figure 1 A flowchart illustrating an atrial fibrillation identification method provided in one or more embodiments of this specification;

[0073] Figure 2 A schematic diagram of the waveforms of the PPG signal and the autocorrelation signal provided in one or more embodiments of this specification;

[0074] Figure 3 A schematic diagram of the structure of an atrial fibrillation identification system provided in one or more embodiments of this specification;

[0075] Figure 4 A redundancy determination diagram provided for one or more embodiments of this specification;

[0076] Figure 5 A MiRU network architecture diagram provided for one or more embodiments of this specification;

[0077] Figure 6 A schematic flowchart illustrating the atrial fibrillation identification method provided in one or more embodiments of this specification;

[0078] Figure 7 This is a schematic diagram of the structure of an atrial fibrillation identification device provided for one or more embodiments of this specification. Detailed Implementation

[0079] This specification provides an embodiment of a method, device, and medium for identifying atrial fibrillation.

[0080] Traditional electrocardiograms (ECGs) are the gold standard for diagnosing atrial fibrillation (AF), but the equipment is bulky and inconvenient, and the operation is complex, requiring professional setup and electrode placement. This makes it difficult to achieve truly seamless and convenient long-term dynamic monitoring, leading to a large number of potential AF patients being missed. Photoplethysmography (PPG) technology offers a breakthrough solution. It utilizes photoelectric sensors in everyday wearable devices such as smartwatches and fitness trackers to continuously and non-invasively collect pulse signals; users simply need to wear the device normally. Developing a high-performance AF automatic identification algorithm based on PPG is of great significance: it provides a large-scale population with an unprecedented, affordable, and user-friendly tool for AF screening and long-term monitoring, potentially significantly improving the early detection rate of AF, thereby preventing disabling / fatal complications such as stroke, and buying valuable treatment time for patients.

[0081] Currently, atrial fibrillation identification technology based on optical volumetric plethysmography (PPG) signals mainly focuses on the following two research directions:

[0082] (I) Feature modeling method based on RR interval

[0083] These methods typically extract the RR interval sequence between heartbeats by detecting peaks in PPG or electrocardiogram signals, and construct their time-domain, frequency-domain, or nonlinear features. They then use traditional machine learning models (such as support vector machines and decision trees) or deep learning networks to detect atrial fibrillation. These methods have strong modeling capabilities for rhythmic features and good interpretability. However, their main disadvantage is:

[0084] 1. Peak detection accuracy depends on high accuracy: If motion artifacts or low signal-to-noise ratio are present in the PPG signal, the stability of the RR interval will be directly affected.

[0085] 2. Complex feature engineering and weak generalization ability: Manually constructed features need to be readjusted for different individuals or devices, resulting in limited transferability;

[0086] 3. Sparse rhythm information and lack of morphological details: Classification is based solely on RR interval sequences, ignoring the important pathological information contained in the PPG waveform itself.

[0087] (II) End-to-end modeling method based on PPG signal

[0088] Another approach attempts to directly input the raw PPG signal into a deep neural network (such as CNN, LSTM, etc.) for automatic feature extraction and classification. This type of method can learn the underlying complex morphological patterns in PPGs, but it also has the following problems:

[0089] 1. High computational overhead and resource consumption: End-to-end models typically have a large number of parameters, making them unsuitable for deployment on edge platforms such as wearable devices;

[0090] 2. High dependence on signal quality: The original PPG waveform is sensitive to baseline drift, changes in illumination, motion interference, etc., which limits the accuracy of identification;

[0091] 3. High training difficulty and slow convergence: High-dimensional waveform input leads to long model training time and requires a large sample size.

[0092] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0093] Figure 1 This diagram illustrates a flowchart of an atrial fibrillation identification method provided in one or more embodiments of this specification. This process can be executed by an atrial fibrillation identification system. Certain input parameters or intermediate results in the process can be manually adjusted to help improve accuracy.

[0094] The method flow steps of the embodiments in this specification are as follows:

[0095] S101, Collect the PPG signal of the subject and determine the specified frequency of the PPG signal.

[0096] In embodiment S101 of this specification, PPG (photoplethysmography) signals can be collected contactlessly using the optical sensor of a wearable device (such as a smartwatch), without the need for electrode pads or professional operation. Simultaneously, the original sampling frequency of the device hardware can be directly read as the "specified frequency" (e.g., 100 samples per second), ensuring that the signal source is naturally compatible with portable devices.

[0097] S102, the PPG signal is segmented based on the set window length to obtain each window signal, and the specified heart rate cycle of each window signal is determined.

[0098] In embodiment S102 of this specification, the PPG signal can be divided into continuous segments of fixed duration (e.g., 10 seconds), with each window covering at least multiple heartbeats, providing a basis for local analysis. Simultaneously, based on the PPG signal characteristics of S101, the average heartbeat interval ("specified heart rate cycle") can be automatically calculated for each window signal using an autocorrelation algorithm.

[0099] S103, based on the specified heart rate cycle and the specified frequency, determine the specified maximum scale of each window signal.

[0100] In embodiment S103 of this specification, the real-time periodic results of S102 and the sampling frequency of S101 can be combined to automatically calculate the maximum analysis scale ("specified maximum scale") of the current window through a preset ratio rule, ensuring complete coverage of the heartbeat waveform.

[0101] S104, Based on the specified maximum scale, construct a local maximum scale map of each window signal, and determine a set of candidate peak points in each local maximum scale map.

[0102] In embodiment S104 of this specification, based on the dynamic maximum scale generated in S103, the local maxima of the signal can be automatically searched in the time and scale space, and a set of candidate peak points can be output.

[0103] S105, determine the RR interval sequence based on the candidate peak point set.

[0104] In embodiment S105 of this specification, abnormally short interval points (such as non-physiological points <0.3 seconds) can be automatically removed based on the candidate peak set in S104, retaining peaks that conform to the heart rate pattern. The RR interval sequence is output based on the purified peak time difference, providing a reliable rhythm basis for model input.

[0105] S106, Input the RR interval sequence into the pre-trained atrial fibrillation identification model to obtain the atrial fibrillation identification result.

[0106] In embodiment S106 of this specification, the lightweight MiRU recognition model pre-installed in the wearable device can be called based on the RR interval sequence in S105 to output the "normal / atrial fibrillation" conclusion in real time without user operation or external devices.

[0107] It's important to note that atrial fibrillation (especially paroxysmal atrial fibrillation) is often asymptomatic and requires long-term dynamic monitoring to prevent fatal complications. However, traditional electrocardiogram (ECG) testing relies on bulky equipment and complex electrode pad operations, limiting its non-contact and convenient nature. This method, on the other hand, acquires PPG (photoplethysmography) signals, which can be obtained non-contactly through wearable devices (such as smartwatches), requiring no professional setup or electrode pads, thus solving the portability problem at its source. Next, by segmenting the PPG signal window and determining its period and frequency, a local maximum scaling map is constructed to identify candidate peaks, ultimately extracting the RR interval sequence. This processing adapts to the characteristics of the PPG signal, efficiently capturing heart rate information without complex hardware. Subsequently, the RR interval sequence is input into a pre-trained atrial fibrillation identification model for automated analysis, avoiding human intervention. Therefore, this method achieves truly non-contact and convenient long-term atrial fibrillation monitoring, allowing patients to continuously wear the device in daily life, detect silent atrial fibrillation early, reduce the risk of complications such as stroke, and improve quality of life.

[0108] Furthermore, when determining the specified heart rate cycle of each window signal, the autocorrelation waveform signal of the time-delayed version of each window signal can be determined by an autocorrelation algorithm, and the specified heart rate cycle of each window signal can be determined by calculating the similarity between each window signal and the autocorrelation waveform signal.

[0109] In the embodiments of this specification, the estimation of the peak period (specified heart rate period) of the PPG signal using the above autocorrelation algorithm can be achieved through the following specific implementation scheme:

[0110] The autocorrelation algorithm describes the similarity between two signals. The magnitude of the correlation is measured by the correlation coefficient. Autocorrelation is the correlation between a function and itself. When the function has a periodic component, the maximum value of the autocorrelation algorithm can well reflect this periodicity.

[0111] When estimating the peak period of a PPG signal using the autocorrelation function, assuming there is a PPG signal with a length of 20 seconds and a frequency of 125 Hz, the waveforms of the PPG signal and the autocorrelation signal are shown below. Figure 2 The diagram shows the waveforms of the PPG signal and the autocorrelation signal. The upper part of the diagram shows the waveform of the PPG signal, and the lower part shows the waveform of the autocorrelation signal.

[0112] Based on the principle of autocorrelation, the peak point of the autocorrelation signal can be considered as the integer period of the signal. Therefore, by combining the physiological threshold of the heart rate signal (heart rate between 30 bpm and 200 bpm, period between 0.5 Hz and 3.33 Hz), the period T of the heart rate can be determined in the autocorrelation signal.

[0113] It should be noted that early screening for atrial fibrillation relies on long-term dynamic monitoring, and PPG signals are easily affected by noise and artifacts introduced by daily activities (such as exercise or body movement) when collected by wearable devices, leading to unstable cycle detection. This method captures the repetitive patterns of the signal through an autocorrelation algorithm and then verifies the cycle by combining similarity calculation, effectively filtering out transient interference and signal distortion, thereby ensuring that the heart rate cycle estimation for each window is more reliable and avoiding missed or false detections. This makes the subsequently extracted RR interval sequence more accurately reflect the real heart rate changes, improves the overall credibility of the atrial fibrillation identification model, and ultimately achieves more effective early warning of occult atrial fibrillation and prevention of complications in a portable and unobtrusive monitoring scenario.

[0114] Furthermore, constructing a local maximum scale map for each window signal based on the specified maximum scale includes:

[0115] Based on formula Construct local maximum scale maps for each of the window signals, wherein, This is a local maximum scale map of the signals in each window. This is a two-dimensional Boolean matrix, where the row index is for each scale. The column indices in the two-dimensional Boolean matrix are time. , , Specify the maximum scale. For the time of each window signal, For time The signal value, For time ( The signal value of ) For time ( The signal value of ).

[0116] It should be noted that PPG signals are susceptible to interference from motion artifacts and changes in device fit during long-term dynamic monitoring. Traditional peak detection methods rely on complex filtering or frequency domain transformations, resulting in high computational loads and difficulty in real-time operation on wearable devices. This new formula, however, transforms the temporal and scale relationships of the signal into a lightweight Boolean matrix (LMS) through simple neighborhood value comparison (i.e., determining whether the current point is simultaneously greater than its left and right neighbors). This significantly reduces computational complexity while maintaining the integrity of the waveform's spatiotemporal characteristics. Combined with an adaptively generated specified maximum scale, the scaling map construction process can accurately locate potential peaks at different scales and naturally adapt to the low computational constraints of wearable devices. This provides efficient and reliable underlying support for subsequent RR interval sequence extraction, ultimately achieving low-power, high-real-time early warning capabilities for concealed arrhythmias in a seamless and convenient long-term atrial fibrillation monitoring closed loop, significantly improving user compliance and the sustainability of health management.

[0117] Furthermore, when determining the RR interval sequence based on the candidate peak point set, a pre-set heart rate threshold can be obtained first; the interval between adjacent candidate peak points can be determined sequentially to see if it exceeds the heart rate threshold range; if it is determined that the interval between a specified adjacent candidate peak point does not exceed the heart rate threshold range, the next candidate peak point among the specified adjacent candidate peak points is removed, and the interval between subsequent adjacent candidate peak points is determined sequentially to see if it exceeds the heart rate threshold range, until the interval between each adjacent candidate peak point exceeds the heart rate threshold range, thus obtaining peak points that meet the conditions; the RR interval sequence is determined based on the peak points that meet the conditions.

[0118] In the embodiments described in this specification, physiologically reasonable heart rate boundary values ​​(such as fixed thresholds corresponding to the minimum heart rate interval) can be loaded from a system preset library. Heart rate thresholds can serve as universal medical rules, independent of the signal processing flow, providing a benchmark for subsequent judgments.

[0119] From the candidate peak point set output in the previous step (S104), adjacent points are selected sequentially in chronological order. If the time interval between the current adjacent points is less than or equal to the heart rate threshold (e.g., the interval is too short), the next point is permanently removed (because physiologically it is impossible for two consecutive heartbeats to have such a short interval), and the next set of adjacent points is checked; if the interval is greater than the threshold, both points are retained and moved to the next set. The above operation is repeated until the interval of all remaining adjacent points meets the condition of being greater than the heart rate threshold. By dynamically removing abnormally short interval points (such as false peaks generated by motion artifacts), it is ensured that the sequence retains only physiologically reliable peak points.

[0120] Arrange the selected peaks in ascending order of time. Calculate the time difference between adjacent peaks (current timestamp - previous timestamp), in milliseconds. Generate a continuous RR interval sequence as input to the atrial fibrillation identification model (S106).

[0121] It should be noted that PPG signals are susceptible to transient noise and spurious peak interference from daily activities (such as exercise or changes in body position) during long-term monitoring in wearable devices. This can lead to the candidate peak set containing non-physiological short-interval errors. Directly using these signals to generate RR interval sequences would cause sequence distortion and amplify the risk of misjudgment in atrial fibrillation identification models. This method introduces a heart rate threshold as a physiologically reasonable boundary and iteratively filters the intervals between adjacent peaks to effectively remove spurious peaks or abnormal points (such as interference shorter than the minimum normal heartbeat duration), retaining only reliable points that conform to physiological laws. This purifies the RR interval sequence in noisy environments, making the input of the atrial fibrillation identification model closer to the true heart rate variability characteristics. Ultimately, this improves the accuracy and reliability of atrial fibrillation screening in seamless and convenient PPG dynamic monitoring, supporting more timely early warning of occult atrial fibrillation and prevention of related serious complications.

[0122] Furthermore, before determining the specified maximum scale of each window signal based on the specified heart rate cycle and the specified frequency, the specified level of each window signal can be determined based on the preset parameter information of each window signal. The preset parameter information includes one or more of sample entropy, kurtosis and zero crossover rate.

[0123] In practical applications, PPG signal quality varies drastically, especially under conditions of motion, vascular differences, and loosening of the device. Even after signal filtering, it can still significantly interfere with the algorithm. To address this, a Signal Quality Index (SQI) mechanism can be introduced for each window of signal. The SQI score is calculated based on indicators such as Sample Entropy (SE), Kurtosis (K), and Zero Crossing Rate (ZCR) of the PPG signal. Then, the signals in each window are classified into specified levels based on the SQI scores. These specified levels can include high-quality signals, medium-quality signals, and low-quality signals.

[0124] Sample entropy quantifies the regularity or predictability of a signal. For high-quality PPG signals, normal sinus rhythm or regular atrial fibrillation rhythm, although different in morphology and rhythm, usually exhibit a certain regularity and predictability within a short time window. The sample entropy value is low. For low-quality PPG signals, when the signal is contaminated by random interference such as high-frequency noise and motion artifacts, the signal becomes very "chaotic" and unpredictable. The sample entropy value increases significantly. For example, a user's rapid hand gesture or unstable device wearing can cause a large number of irregular jitters in the signal, increasing the SE value. A high SE value indicates that the signal within the window contains a large amount of non-physiological, random "noise," severely interfering with the identification and analysis of the true heartbeat; the analysis results of this window are likely unreliable.

[0125] Kurtosis describes the "sharpness" or "flatness" of the data distribution shape, with particular attention to the weights of the tails (outliers). For high-quality PPG signals, a clear, sharp PPG pulse wave (including the main wave, dicrotic wave, etc.) appears as a steep rising and falling edge in the time series, with very prominent peaks. This corresponds to a high kurtosis value. It indicates that the signal's "sharp" characteristics are significant. For low-quality PPG signals, severe baseline drift (such as due to breathing or movement) can flatten the entire waveform. Low- or high-frequency noise can contaminate the signal, masking its sharp features. Motion-induced artifacts with large, slowly changing amplitudes can also cause a decrease in kurtosis (becoming more uniform or normal kurtosis). A kurtosis value that is too low indicates that the PPG signal has lost its characteristic sharp pulse characteristics. A low kurtosis value indicates severe distortion of the PPG signal morphology within the window, destroying or masking the sharp features of the original pulse wave, making it difficult to accurately extract peak positions and perform morphological analysis.

[0126] The zero-crossing rate (ZCR) is used to calculate the number of times a signal crosses the zero-value horizontal line (baseline) per unit time. For high-quality PPG signals, a normal pulse wave typically fluctuates around a relatively stable baseline during the beat interval (although the baseline may drift slightly). The signal mainly completes a full cycle of crossing the baseline (both upward and downward) within a single pulse, occasionally containing smaller dicrotic features. Therefore, within a short time window, the ZCR is generally at a moderate level. For low-quality PPG signals, when contaminated with high-frequency noise (such as electromyographic noise or signal interference), the signal oscillates rapidly back and forth above and below the baseline, causing a sharp increase in ZCR. When irregular rhythms such as atrial fibrillation are present but mixed with severe noise, the irregular rhythm itself may increase the ZCR somewhat, but the noise superposition will cause an abnormally high ZCR. Severe baseline drift can also sometimes affect the number of local zero-crossing points. An abnormally high ZCR (far exceeding the expectation of a clean pulse wave) is a direct indication of the presence of significant high-frequency noise or oscillations in the signal. This "spiculated" noise is extremely destructive to analysis algorithms based on RR intervals or morphology.

[0127] These three metrics capture signal quality degradation from different dimensions (randomness (SE), morphological sharpness (K), and high-frequency noise (ZCR)). A poor-quality signal may only be abnormal in one or two metrics, but it may also affect all three simultaneously. Using them in combination can provide a more comprehensive assessment of the overall reliability of the signal. They collectively point to the most critical sources of interference in PPG signal analysis—motion artifacts (typically leading to high SE and low K) and high-frequency electrical noise / poor contact (leading to high ZCR and potentially high SE), as well as baseline drift (leading to low K).

[0128] When constructing the local maximum scale map of each window signal based on the specified maximum scale, the specified level of each window signal can be considered. The local maximum scale map of each window signal is constructed based on the specified level and the specified maximum scale.

[0129] It should be noted that the quality of PPG signals collected by wearable devices over a long period of time fluctuates in real time due to user activity (such as movement, device displacement, or environmental interference), resulting in significant differences in noise levels and morphological complexity of signals in different windows. If the same fixed scale is used to construct scale maps for low-quality and high-quality signals, a large number of false peaks will be generated due to noise interference, or the true peaks will be lost due to excessive smoothing. This method introduces preset parameters to quantify signal features (such as sample entropy reflecting waveform irregularity, kurtosis representing pulse characteristics, and zero crossover rate indicating high-frequency noise), intelligently classifies signal levels, and then dynamically matches the most suitable scale to construct scale maps—using a conservative scale to suppress false peaks for high-noise windows and a fine scale to preserve details for high-quality windows. This ensures that the true heartbeat peaks are always accurately located in complex usage scenarios, ensuring the reliability of subsequent RR interval sequences. Ultimately, this provides a more robust data foundation for atrial fibrillation identification models, achieving high detection rates and low false alarm rates under non-intrusive monitoring, and effectively warning of occult arrhythmias.

[0130] Furthermore, when constructing the local maximum scale map of each window signal based on the specified level and the specified maximum scale, a specified threshold coefficient can be determined for each window signal based on the specified level. For window signals with high specified levels, the specified threshold coefficient can be set higher. For example, for high-quality window signals, the specified threshold coefficient can be set to 1; for medium-quality window signals, the specified threshold coefficient can be set to 0.8; and for low-quality window signals, the specified threshold coefficient can be set to 0.7. The specified maximum scale is adjusted based on the specified threshold coefficient to obtain the adjusted maximum scale of each window signal. Based on the adjusted maximum scale, the local maximum scale map of each window signal is constructed.

[0131] It should be noted that the PPG signals collected by wearable devices can experience significant quality fluctuations due to environmental interference, device fit, or limb movements during daily activities. If a scale map is constructed using the same fixed maximum scale as for high-quality signals in noisy windows, excessive smoothing may lead to the loss of true peaks or the generation of spurious peaks due to high-frequency noise interference. This method intelligently customizes threshold coefficients based on signal level (e.g., assigning conservative coefficients to low-quality signals to reduce the scale and suppress noise, and assigning open coefficients to high-quality signals to increase the scale and preserve details), thereby dynamically optimizing the scale map's ability to focus on true heartbeat characteristics. This effectively improves the robustness of peak detection in complex environments, ensuring that reliable RR interval sequences can be output for different quality windows. Ultimately, this enables the atrial fibrillation identification model to maintain stable high accuracy during long-term, unobtrusive monitoring, providing a reliable guarantee for the early detection of occult atrial fibrillation and the prevention of serious complications.

[0132] Furthermore, when determining the candidate peak set in each of the local maximum scale maps, a time expansion threshold can be set based on the specified level. For window signals with a high specified level, the specified threshold system can be set lower. For example, for high-quality window signals, the time expansion threshold can be set to 0; for medium-quality window signals, the time expansion threshold can be set to 1; and for low-quality window signals, the time expansion threshold can be set to 2. A specified time corresponding to each candidate peak is determined in each of the local maximum scale maps; a candidate time interval corresponding to each specified time is determined based on the time expansion threshold; and the point with the largest amplitude in each candidate time interval is selected as the candidate peak set.

[0133] It should be noted that, since the quality of PPG signals collected by wearable devices during dynamic monitoring changes in real time with user activity, low-quality signals (such as those under motion interference) are prone to peak splitting or adjacent spurious peaks, while high-quality signals require precise capture of the true peak morphology. If a fixed time threshold is used to divide the interval, it may not be able to effectively isolate spurious peak interference for low-quality signals, while for high-quality signals, the interval may be too wide and miss details. This method intelligently customizes the time expansion threshold by signal level (e.g., a larger threshold is configured for low-level signals to accommodate noise disturbances, and a smaller threshold is configured for high-level signals to improve resolution accuracy). It forcibly selects the point with the largest amplitude within the candidate time interval, which not only suppresses the interference of non-physiological spurious peaks (such as secondary waves caused by motion artifacts) on heart rate counting, but also preserves the integrity of the true main peak under different quality windows. Thus, it adaptively optimizes the physiological reliability of the RR interval sequence in complex scenarios, and ultimately ensures that the atrial fibrillation identification model continuously outputs highly robust early warning results under convenient and imperceptible long-term monitoring, providing a solid guarantee for the early intervention of occult arrhythmias.

[0134] Furthermore, the embodiments of this specification can generate an atrial fibrillation identification model through the following implementation scheme:

[0135] Multiple RR interval sequences are collected, and training, validation, and test sets are constructed based on these sequences. An initial atrial fibrillation (AF) identification model is built using a MiRU network. The initial AF identification model is trained using the training set, and the prediction error is calculated using the cross-entropy loss function. The network parameters are updated using the gradient descent method until the model converges, resulting in an AF identification model to be validated. The AF identification model to be validated is then validated using the validation set. If the validation is successful, a AF identification model to be tested is obtained. The AF identification model to be tested is then tested using the test set. If the test is successful, the AF identification model is obtained.

[0136] It should be noted that since the core pathological features of atrial fibrillation are the extreme disorder and sudden rhythmic mutations in the RR interval sequence, traditional recurrent neural networks suffer from large parameter counts and low computational efficiency when deployed on mobile terminals, and it is difficult to balance long-term rhythm dependence and mutation response capabilities. The MiRU network significantly reduces the number of parameters (by reducing two gating units) and solidifies the core parameters λ (controlling the strength of long-term rhythmic memory) and β (regulating sensitivity to sudden rhythmic abnormalities), making the model both lightweight and pathologically interpretable—λ enhances the ability to capture persistent atrial fibrillation rhythmic disturbances, while β... This approach specifically addresses the "sudden change" RR interval fluctuations unique to atrial fibrillation (AF). Combined with refined training using the cross-entropy loss function and gradient descent, the model ensures that, under rigorous three-stage dataset validation, it can achieve efficient mobile deployment (meeting wearable device resource constraints) and accurately distinguish between physiological rhythm variability and the pathological, absolute irregularity of AF. Ultimately, through PPG-based non-intrusive dynamic monitoring, it provides high-risk individuals with locally available, real-time, clinically reliable AF early warning capabilities, fundamentally resolving the traditional dilemma of "incompatibility between accuracy and convenience," and truly achieving a closed-loop early intervention for occult AF.

[0137] Corresponding to the above embodiments, Figure 3 This specification provides a schematic diagram of an atrial fibrillation (AF) identification system, which includes a PPG data processing module, an AF model training module, and an AF model identification module.

[0138] The following are the specific implementation steps for the atrial fibrillation identification system:

[0139] Step 1. Use a PPG device to collect PPG signals from the human body, where pgg_origin and fso are the original signal frequencies.

[0140] Step 2. The acquired PPG signal ppg_origin is sent to the PPG data processing module; the PPG data processing module includes PPG signal filtering, PPG signal downsampling, PPG signal segmentation, PPG signal quality assessment, PPG signal peak extraction, and equivalent RR interval extraction.

[0141] PPG signal filtering stage:

[0142] By removing baseline drift and filtering out high-frequency noise from ppg_origin, we obtain ppg_filter.

[0143] PPG signal downsampling stage:

[0144] Downsample the pgg_filter to obtain pgg_downsample, where fsd is the frequency of pgg_downsample.

[0145] PPG signal segmentation process:

[0146] The pgg_downsample is divided into segments by sliding window according to the set window length to obtain pgg_window, where N is the length of pgg_window.

[0147] PPG signal quality assessment process:

[0148] In practical applications, the quality of PPG signals varies drastically, especially under conditions of motion, vascular differences, and loosening of the device. Even after filtering the signal, it can still cause significant interference to the algorithm. To address this, a signal quality scoring mechanism (SQI) is introduced into the pgg_window. The SQI score is calculated based on indicators such as sample entropy (SE), kurtosis (K), and zero crossover rate (ZCR) of the PPG signal within the pgg_window. Then, based on the score, the pgg_window is divided into three categories: high-quality signal, medium-quality signal, and low-quality signal.

[0149] Signal Quality Index (SQI);

[0150] Normalized sample entropy score;

[0151] : Normalized kurtosis score;

[0152] : Normalized zero crossover rate score;

[0153] The formula for calculating the Signal Quality Index (SQI) is as follows:

[0154] ;

[0155] in , , They are , , The coefficient, and + + =1, at this time The range is between 0 and 1;

[0156] when Between 0.7 and 1, x_window is a high-quality signal;

[0157] when Between 0.4 and 0.7, x_window is a medium-quality signal;

[0158] when Between 0 and 0.4, x_window is a low-quality signal.

[0159] PPG signal peak extraction step:

[0160] This section proposes a multi-scale extremum detection method as the core algorithm for extracting PPG peaks. The main steps of this algorithm are as follows:

[0161] 1. Estimate the heart rate cycle T based on the PPG data in pppg_window, and then set the maximum scale. The calculation formula is as follows:

[0162] ;

[0163] According to the formula, when the heart rate within the ppg_window is fast, T decreases. When the heart rate within the ppg_window window decreases, T increases. By increasing the size, the effect of dynamically adjusting Smax is achieved.

[0164] 2. According to Construct a Local Maxima Scalogram (LMS), which is a two-dimensional Boolean matrix:

[0165] The row index is for each scale s, where s∈[1,Smax];

[0166] The column index is time t, where t∈[1,N];

[0167] The LMS is calculated as follows:

[0168] ;

[0169] Where p[t] is each value of ppg_window. If LMS is 1 at position [s,t], it means that p[t] is a maximum point in the interval [ts,t+s], that is, a candidate peak point.

[0170] 3. After constructing the LMS matrix, according to The quality of the ppg_window signal was evaluated, and then three different methods were used for high, medium, and low quality signals respectively:

[0171] High-quality signal: LMS full consistency determination;

[0172] Medium quality signal: LMS near-consistency determination;

[0173] Low-quality signals: LMS near-consistency judgment, redundancy judgment threshold

[0174] The criteria for full consistency and near consistency are as follows: A threshold θ (0 < θ ≤ 1) is set, and the constructed LMS matrix is ​​iterated over time t. At each time t, p[t] is considered a maximum point in the θ·Smax scale. When θ is 1, it is a full consistency criterion; when 0.6 < θ < 1, it is a near consistency criterion. In medium and low quality signals, the θ corresponding to medium quality signals is 0.8, and the θ corresponding to low quality signals is 0.7.

[0175] The redundancy determination threshold refers to the following: when the signal quality is poor, a time expansion threshold φ is set when traversing time t. If p[t] is also a maximum point at multiple scales at the time point [t, t+φ], these maximum points are merged into a maximum value cluster, and then the maximum value point in the cluster is selected as the candidate peak point.

[0176] LMS consistency is determined point-by-point; that is, a time point t is only considered a "peak" if it is marked as a local maximum (LMS = 1) at multiple scales. If the true peak value "slightly shifts" to t±1 or t±2 at multiple scales due to noise, sampling point offset, or scale interference, and because the PPG signal is filtered or smoothed, the peak is no longer a sharp single point but a local plateau-like high point, these factors will cause the true peak to fail to meet the consistency criteria and thus be missed.

[0177] This phenomenon is particularly common in the following situations:

[0178] After PPG signals are smoothed or filtered, the position of the true peak value shifts at different scales; when the heart interval is shortened (such as at high heart rates), the peak is narrower and more sensitive to the shift; noise interference affects the judgment of local maxima and breaks the consistency.

[0179] The actual heartbeat peaks typically exhibit similar local extremum behavior at several nearby sampling points, i.e., they are not perfectly aligned. For each time point t, observing its neighborhood [t-2, t+2], if t itself does not satisfy consistency (e.g., LMS < θ•), However, if the LMS values ​​of t±1 and t±2 in the neighborhood are also close to the same (e.g., both are ≥ 0.7), then all points in [t-2, t+2] that satisfy the local maximum criterion are formed into a "peak cluster"; the point with the largest amplitude is selected as the "merged peak position".

[0180] like Figure 4The redundancy determination diagram shown can be considered as a peak point when the time is between 4 and 5. However, due to the full consistency determination, neither 4 nor 5 can be considered a peak point at this time. When the time is t=5, the near consistency determination can be used in the interval [4,6] to form a "peak cluster" of the three points t=4, t=5 and t=6, and select the point with the largest amplitude as the "merged peak position".

[0181] Equivalent RR interval extraction:

[0182] Candidate peak points within the pgg_window are obtained through the peak extraction process of the PPG signal. Then, all candidate peak points from the pgg_window are combined, and duplicates are removed to form the candidate peak points of the pgg_downsample. The pgg_downsample is then sampled from frequency fso to frequency fsd, mapping it to pgg_filter. Simultaneously, candidate peak points for the pgg_filter are obtained based on the candidate peak points of the pgg_downsample. The true peak points of the pgg_filter are determined by using a minimum heart rate threshold. Finally, the time difference between two adjacent true PPG peak points is calculated chronologically to obtain an equivalent RR interval sequence.

[0183] Heart rate threshold determination refers to: calculating the interval between each candidate peak point of all ppg_filter and the next candidate peak point. If the interval is greater than the minimum heart rate threshold, the point is the true peak point. If the interval is less than the minimum heart rate threshold, the candidate peak point with the largest peak value is selected as the true peak point.

[0184] Step 3. The equivalent RR interval sequence is segmented by a sliding window according to a fixed length L, and then the training set, validation set and test set of the equivalent RR interval sequence are constructed.

[0185] Step 4. Initialize the parameters of the atrial fibrillation identification model, set the scaling factors β and λ, input the RR interval sequence into the atrial fibrillation identification model for training, calculate the prediction error using the cross-entropy loss function, update the network parameters using a gradient descent method (e.g., Adam optimizer) until the model converges, generate the atrial fibrillation identification model and save the model.

[0186] A simplified GRU network (MiRU) was used to construct the atrial fibrillation (AF) identification model. GRU is a gated recurrent neural network that uses two gating mechanisms to control information flow. Because GRU networks can optimize the vanishing and exploding gradient problems, they are widely used in time series data modeling. However, in wearable devices, due to the more stringent requirements on model parameters, MiRU, which reduces the number of gating mechanism units in the GRU network, was used to construct the AF identification model. Compared to GRU networks, MiRU networks have the following advantages:

[0187] 1. Due to the reduction of two gating mechanism units, the MiRU network has fewer parameters and a 2.9x training speedup, making it ideal for deployment in mobile terminals or wrist-worn devices;

[0188] 2. The λ and β parameters of MiRU can be set to fixed values ​​or a small number of learnable parameters to control the model's dependence on old and new information. This structure has good interpretability: 1) λ represents the degree of "rhythm preservation," with a larger value indicating that the model tends to retain long-term dependencies; 2) β can simulate the "rhythm mutation response" when atrial fibrillation occurs. Based on this, the MiRU network can improve its ability to distinguish AF states.

[0189] The atrial fibrillation identification model consists of an input layer, a MiRU core layer, a fully connected classification layer, and an output layer.

[0190] Input layer: an equivalent RR interval sequence x of dimension L×1. t ;

[0191] MiRU core layer: See MiRU core layer Figure 5 The illustrated MiRU network architecture diagram contains a fully connected neural network with m hidden units (m preferably ranging from 16 to 64), outputting the final hidden state. ,in The dimension is m×1, and the core network architecture of MiRU is as follows: Figure 5 As shown;

[0192] The calculation process is as follows:

[0193] Input transformation module: Receives the input vector at the current time step. And through the weight matrix Mapped to the hidden state space;

[0194] ;

[0195] Historical state control module: Hides the state of the previous time step. With fixed scaling factor Multiplication is used to regulate the degree of forgetting;

[0196] ;

[0197] Candidate state generation module: The weighted sum of the above two items is then input into a nonlinear activation function to generate candidate states. ,in For hidden layer bias;

[0198] ;

[0199] State fusion module: utilizing another scaling factor In a weighted manner and Merge to generate the current hidden state. ;

[0200] ;

[0201] Fully connected classification layer:

[0202] m-dimensional → m-dimensional (weight) The dimension is m×m, and the bias is... (Dimension is m×1)

[0203] The ReLU activation function is used, and the output z of the fully connected classification layer is:

[0204] ;

[0205] Output layer:

[0206] m-dimensional to 1-dimensional (weight) The dimension is m×1, and the bias is... (Dimension 1);

[0207] The output layer uses the Sigmoid function to calculate z and outputs the final atrial fibrillation probability, as shown in the following formula:

[0208] ;

[0209] Step 5. Input the divided test set data into the saved atrial fibrillation identification model to obtain the 1-dimensional predicted value vector output y corresponding to the test set sample. If y is greater than 0.5, the data is atrial fibrillation data; otherwise, it is non-atrial fibrillation data.

[0210] Figure 6This is a schematic diagram illustrating the specific process of the atrial fibrillation identification method provided in one or more embodiments of this specification. Initially, a PPG device is used to collect human PPG signals; the PPG signals are bandpass filtered to obtain the target PPG signal; the target PPG signal is downsampled, and then windowed PPG data is acquired; Smax and SQI scores are calculated, an LMS matrix is ​​constructed, and the peaks of the windowed PPG signals are obtained; the peaks of the windowed PPG signals are combined to obtain the true peak points of the target PPG sequence; the time difference between two adjacent true peak points of PPGs is calculated to obtain an equivalent RR interval sequence; the RR interval sequence is segmented into training, validation, and test sets; an atrial fibrillation identification model is trained based on the MiRU structure; the model results are evaluated using the test set, and the process ends.

[0211] It should be noted that the embodiments in this specification, through the above content, have the following beneficial effects:

[0212] Accurate peak extraction and strong anti-interference ability: By introducing an adaptive scale selection mechanism and a quality-aware detection mechanism, the traditional MSPTDfast algorithm is improved, which significantly enhances the accuracy and stability of PPG peak detection in complex environments.

[0213] Compact feature representation and complete rhythm information: Using a fixed-length peak sequence as model input preserves rhythm information while avoiding the impact of RR interval error on the results;

[0214] The model has a lightweight structure and is computationally friendly: it uses a simplified gated recurrent unit (GRU) network to model the peak sequence, which has a smaller parameter scale and faster inference speed compared with traditional end-to-end deep networks, making it suitable for real-time deployment on wearable devices.

[0215] Robust and adaptable: This method is highly robust to common noise factors in PPG signals (such as slight motion interference and light intensity changes), and is suitable for atrial fibrillation screening in various application scenarios.

[0216] Figure 7 A schematic diagram of an atrial fibrillation identification device provided for one or more embodiments of this specification includes:

[0217] At least one processor and bus; and,

[0218] A memory communicatively connected to the at least one processor; wherein,

[0219] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0220] Collect the PPG signal of the subject and determine the specified frequency of the PPG signal;

[0221] The PPG signal is segmented based on a set window length to obtain each window signal, and the specified heart rate cycle of each window signal is determined.

[0222] Based on the specified heart rate cycle and the specified frequency, determine the specified maximum scale of each window signal;

[0223] Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map;

[0224] The RR interval sequence is determined based on the candidate peak point set;

[0225] The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results.

[0226] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, which, when executed by a computer, can perform the following:

[0227] Collect the PPG signal of the subject and determine the specified frequency of the PPG signal;

[0228] The PPG signal is segmented based on a set window length to obtain each window signal, and the specified heart rate cycle of each window signal is determined.

[0229] Based on the specified heart rate cycle and the specified frequency, determine the specified maximum scale of each window signal;

[0230] Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map;

[0231] The RR interval sequence is determined based on the candidate peak point set;

[0232] The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain the atrial fibrillation identification result. The various embodiments in this specification are described in a progressive manner; similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the embodiments of apparatus, devices, and non-volatile computer storage media, since they are basically similar to the method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0233] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0234] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0235] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units 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 devices or units may be electrical, mechanical, or other forms.

[0236] The units described 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.

[0237] 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 aforementioned units can be implemented in hardware or software.

[0238] If the integrated module / 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, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0239] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for identifying atrial fibrillation, characterized in that, The method includes: The PPG signal of the subject is collected, and a specified frequency of the PPG signal is determined, wherein the specified frequency is the signal sampling frequency; The PPG signal is segmented based on a set window length to obtain each window signal, and a specified heart rate cycle for each window signal is determined, wherein the specified heart rate cycle is the average heartbeat interval automatically calculated for each window signal. Based on the specified heart rate cycle and the specified frequency, a specified maximum scale is determined for each window signal, wherein the specified maximum scale is the maximum analysis scale for calculating the current window to ensure complete coverage of the heartbeat waveform; Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map; The RR interval sequence is determined based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results; Before determining the specified maximum scale of each window signal based on the specified heart rate cycle and the specified frequency, the method further includes: Based on the preset parameter information of each window signal, a specified level of each window signal is determined. The preset parameter information includes one or more of sample entropy, kurtosis and zero crossover rate, wherein the specified level represents different levels of signal quality. The step of constructing a local maximum scale map for each window signal based on the specified maximum scale includes: Based on the specified level and the specified maximum scale, a local maximum scale map of each window signal is constructed; The step of constructing a local maximum scale map for each window signal based on the specified level and the specified maximum scale includes: Based on the specified level, determine the specified threshold coefficient for each of the window signals; The maximum adjustment scale of each window signal is obtained by adjusting the specified maximum scale based on the specified threshold coefficient. Based on the adjusted maximum scale, a local maximum scale map of each window signal is constructed.

2. The method according to claim 1, characterized in that, Determining the specified heart rate cycle for each of the window signals includes: The autocorrelation waveform signal of the time-delayed version of the signal in each window is determined by the autocorrelation algorithm; The specified heart rate cycle of each window signal is determined by calculating the similarity between each window signal and the autocorrelation waveform signal.

3. The method according to claim 1, characterized in that, The step of constructing a local maximum scale map for each window signal based on the specified maximum scale includes: Based on formula Construct local maximum scale maps for each of the window signals, wherein, This is a local maximum scale map of the signals in each window. This is a two-dimensional Boolean matrix, where the row index is for each scale. The column indices in the two-dimensional Boolean matrix are time. , , Specify the maximum scale. For the time of each window signal, For time The signal value, For time ( The signal value of ) For time ( The signal value of ).

4. The method according to claim 1, characterized in that, The step of determining the RR interval sequence based on the candidate peak point set includes: Obtain the preset heart rate threshold; Sequentially determine whether the interval between adjacent candidate peak points exceeds the heart rate threshold range; If it is determined that the interval between the specified adjacent candidate peaks does not exceed the heart rate threshold range, the next candidate peak in the specified adjacent candidate peaks is removed, and the interval between the subsequent adjacent candidate peaks is determined in turn to see if it exceeds the heart rate threshold range, until the interval between each adjacent candidate peak exceeds the heart rate threshold range, and peaks that meet the conditions are obtained. The RR interval sequence is determined based on the peak points that meet the conditions.

5. The method according to claim 1, characterized in that, Determining the set of candidate peak points in each of the local maximum scaling maps includes: Based on the specified level, a time extension threshold is set; Determine the specified time corresponding to each candidate peak point in each of the local maximum scaling plots; Based on the time expansion threshold, determine the candidate time intervals corresponding to each specified time; The point with the largest amplitude in each of the candidate time intervals is selected as the candidate peak point set.

6. The method according to claim 1, characterized in that, Before inputting the RR interval sequence into the pre-trained atrial fibrillation identification model, the method further includes: Collect multiple RR interval sequences, and construct training, validation and test sets based on the multiple RR interval sequences; An initial atrial fibrillation identification model was constructed using a MiRU network; The initial atrial fibrillation identification model is trained using the training set, the prediction error is calculated using the cross-entropy loss function, and the network parameters are updated using the gradient descent method until the model converges, thus obtaining the atrial fibrillation identification model to be verified. The atrial fibrillation identification model to be verified is validated using the validation set. If the verification is successful, the atrial fibrillation identification model to be tested will be obtained; The atrial fibrillation identification model under test was tested using a test set. If the test passes, the atrial fibrillation identification model is obtained.

7. An atrial fibrillation identification device, characterized in that, include: At least one processor and bus; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: The PPG signal of the subject is collected, and a specified frequency of the PPG signal is determined, wherein the specified frequency is the signal sampling frequency; The PPG signal is segmented based on a set window length to obtain each window signal, and a specified heart rate cycle for each window signal is determined, wherein the specified heart rate cycle is the average heartbeat interval automatically calculated for each window signal. Based on the specified heart rate cycle and the specified frequency, a specified maximum scale is determined for each window signal, wherein the specified maximum scale is the maximum analysis scale for calculating the current window to ensure complete coverage of the heartbeat waveform; Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map; The RR interval sequence is determined based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results; Before determining the specified maximum scale of each window signal based on the specified heart rate cycle and the specified frequency, the method further includes: Based on the preset parameter information of each window signal, a specified level of each window signal is determined. The preset parameter information includes one or more of sample entropy, kurtosis and zero crossover rate, wherein the specified level represents different levels of signal quality. The step of constructing a local maximum scale map for each window signal based on the specified maximum scale includes: Based on the specified level and the specified maximum scale, a local maximum scale map of each window signal is constructed; The step of constructing a local maximum scale map for each window signal based on the specified level and the specified maximum scale includes: Based on the specified level, determine the specified threshold coefficient for each of the window signals; The maximum adjustment scale of each window signal is obtained by adjusting the specified maximum scale based on the specified threshold coefficient. Based on the adjusted maximum scale, a local maximum scale map of each window signal is constructed.

8. A non-volatile computer storage medium, characterized in that, It stores computer-executable instructions, which, when executed by a computer, can achieve the following: The PPG signal of the subject is collected, and a specified frequency of the PPG signal is determined, wherein the specified frequency is the signal sampling frequency; The PPG signal is segmented based on a set window length to obtain each window signal, and a specified heart rate cycle for each window signal is determined, wherein the specified heart rate cycle is the average heartbeat interval automatically calculated for each window signal. Based on the specified heart rate cycle and the specified frequency, a specified maximum scale is determined for each window signal, wherein the specified maximum scale is the maximum analysis scale for calculating the current window to ensure complete coverage of the heartbeat waveform; Based on the specified maximum scale, a local maximum scale map of each window signal is constructed, and a set of candidate peak points is determined in each local maximum scale map; The RR interval sequence is determined based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation identification model to obtain atrial fibrillation identification results; Before determining the specified maximum scale of each window signal based on the specified heart rate cycle and the specified frequency, the method further includes: Based on the preset parameter information of each window signal, a specified level of each window signal is determined. The preset parameter information includes one or more of sample entropy, kurtosis and zero crossover rate, wherein the specified level represents different levels of signal quality. The step of constructing a local maximum scale map for each window signal based on the specified maximum scale includes: Based on the specified level and the specified maximum scale, a local maximum scale map of each window signal is constructed; The step of constructing a local maximum scale map for each window signal based on the specified level and the specified maximum scale includes: Based on the specified level, determine the specified threshold coefficient for each of the window signals; The maximum adjustment scale of each window signal is obtained by adjusting the specified maximum scale based on the specified threshold coefficient. Based on the adjusted maximum scale, a local maximum scale map of each window signal is constructed.

Citation Information

Patent Citations

  • Active power distribution network pilot protection method and system based on time domain characteristics

    CN117977507A

  • System and method for continuous atrial fibrillation detection via PPG to ECG signal translation

    US20240122519A1