Atrial fibrillation identification method, equipment and medium

Through PPG signal acquisition and lightweight atrial fibrillation recognition model, the problems of convenience and long-term monitoring of traditional electrocardiogram detection are solved, and non-contact and convenient atrial fibrillation recognition is achieved, reducing the risk of complications of latent atrial fibrillation.

CN120678447AActive Publication Date: 2025-09-23NANJING YUYUE SOFTWARE TECH
View PDF 11 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for identifying atrial fibrillation rely on bulky electrocardiogram (ECG) equipment, which is complex to operate and difficult to achieve convenient and long-term dynamic monitoring. As a result, latent atrial fibrillation is often asymptomatic and undetected, increasing the risk of fatal complications.

Method used

Photoplethysmography (PPG) signals are collected through wearable devices, the signal window is segmented and a local maximum scaling map is constructed to extract the RR interval sequence. Automated analysis is performed in combination with a lightweight atrial fibrillation recognition model to avoid human intervention.

Benefits of technology

It realizes non-invasive and convenient long-term atrial fibrillation monitoring, detects latent atrial fibrillation early, reduces the risk of complications such as stroke, and improves the quality of life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120678447A_ABST
    Figure CN120678447A_ABST
Patent Text Reader

Abstract

The invention discloses an atrial fibrillation recognition method and device and a medium, and the method comprises the steps: collecting a PPG signal of a subject, and determining the designated 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 of each window signal; determining a specified maximum scale of each window signal based on a specified heart rate cycle and a specified frequency; constructing a local maximum scale map of each window signal based on a specified maximum scale, and determining a candidate peak point set in each local maximum scale map; determining an RR interval sequence based on the candidate peak point set; and inputting the RR interval sequence into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition 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 identifying atrial fibrillation. Background Art

[0002] Atrial fibrillation (AF) is the most common and devastating cardiac arrhythmia. It not only significantly increases the risk of stroke by fivefold, but also can induce heart failure, exacerbate myocardial ischemia, double the risk of death, and severely impair patients' quality of life. However, AF, particularly paroxysmal AF, is often asymptomatic or has subtle symptoms. Early screening and ongoing monitoring are crucial to preventing fatal complications.

[0003] Most existing methods for identifying atrial fibrillation rely on electrocardiogram (ECG) testing. However, ECG equipment is bulky and non-portable, and its operation is complicated and requires professional setup and electrode attachment, making it difficult to achieve truly non-invasive and convenient long-term dynamic monitoring. Summary of the Invention

[0004] One or more embodiments of this specification provide an atrial fibrillation identification method, device, and medium to solve the technical problems raised by the background technology.

[0005] One or more embodiments of this specification adopt the following technical solutions: One or more embodiments of this specification provide a method for identifying atrial fibrillation, the method comprising: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

[0006] It's important to note that atrial fibrillation (especially paroxysmal atrial fibrillation) is often asymptomatic and requires long-term ambulatory monitoring to prevent life-threatening complications. However, traditional electrocardiogram (ECG) monitoring relies on bulky equipment and complex electrode operation, limiting its convenience and usability. This method, however, instead acquires PPG (photoplethysmography) signals, which can be acquired contactlessly via wearable devices (such as smartwatches) without requiring specialized setup or electrode attachment, thus addressing portability issues at the source. Next, the PPG signal is windowed and its period and frequency are determined. A local maximum scaling map is then 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 the need for complex hardware. The RR interval sequence is then fed into a pre-trained atrial fibrillation recognition model for automated analysis, eliminating manual intervention. This method, in turn, enables truly seamless and convenient long-term atrial fibrillation monitoring, enabling patients to wear the device continuously throughout their daily lives, enabling early detection of latent atrial fibrillation, thereby reducing the risk of complications such as stroke and improving quality of life.

[0007] Furthermore, determining the specified heart rate period of each window signal includes: Determine the autocorrelation waveform signal of the time-delayed version of each window signal through an autocorrelation algorithm; The designated heart rate period of each window signal is determined by calculating the similarity between each window signal and the autocorrelation waveform signal.

[0008] It should be noted that since early screening for atrial fibrillation relies on long-term dynamic monitoring, the PPG signal is susceptible to noise and artifacts introduced by daily activities (such as exercise or body movement) when collected by wearable devices, resulting in unstable cycle detection; this method captures the repetitive pattern of the signal through an autocorrelation algorithm, and then combines similarity calculation to verify the cycle, effectively filtering out transient interference and signal deformation, thereby ensuring that the heart rate cycle estimation in each window is more reliable and avoiding missed or false detections; this makes the subsequently extracted RR interval sequence more accurately reflect the true heart rate changes, improves the overall credibility of the atrial fibrillation recognition model, and ultimately achieves more effective latent atrial fibrillation warning and complication prevention in a portable and non-sensing monitoring scenario.

[0009] Furthermore, constructing a local maximum scaling diagram of each of the window signals based on the specified maximum scale includes: Based on the formula , construct a local maximum scaling diagram of each window signal, where is the local maximum scaling diagram of each window signal, is a two-dimensional Boolean matrix, in which the row index is each scale , the column index of the two-dimensional Boolean matrix is ​​time , , Specify a maximum scale for the, is the time of each window signal, For time The signal value of For time ( ) signal value, For time ( ) signal value.

[0010] It should be noted that, because 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, which impose a high computational load and make real-time operation difficult on wearable devices. This formula, however, transforms the signal's time-scale relationship 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 adaptive generation of a specified maximum scale, the scale map construction process can accurately locate potential peaks at different scales while naturally adapting to the low computing power constraints of wearable devices. This provides efficient and reliable underlying support for the subsequent extraction of RR interval sequences. Ultimately, within a seamless and convenient closed-loop long-term atrial fibrillation monitoring system, this method achieves low-power, high-real-time early warning capabilities for latent arrhythmias, significantly improving user compliance and the sustainability of health management.

[0011] Furthermore, determining the RR interval sequence based on the candidate peak point set includes: Obtain a pre-set heart rate threshold; determining in sequence whether the intervals between adjacent candidate peak points exceed the heart rate threshold range; If it is determined that the interval between the designated adjacent candidate peak points does not exceed the heart rate threshold range, the next candidate peak point among the designated adjacent candidate peak points is eliminated, and the intervals between subsequent adjacent candidate peak points are sequentially determined to determine whether they exceed the heart rate threshold range, until the intervals between all adjacent candidate peak points exceed the heart rate threshold range, thereby obtaining a peak point that meets the conditions; The RR interval sequence is determined based on the peak points that meet the conditions.

[0012] It should be noted that since PPG signals are susceptible to transient noise and pseudo-peak interference introduced by daily activities (such as exercise or changes in body position) during long-term monitoring by wearable devices, the set of candidate peak points may contain non-physiological short-interval error points. If directly used to generate RR interval sequences, it will cause sequence distortion and amplify the risk of misjudgment of the atrial fibrillation recognition model. This method introduces a heart rate threshold as a physiological rationality boundary, iteratively screens the intervals between adjacent peak points, effectively filters out pseudo-peaks or abnormal points (such as interference shorter than the minimum duration of a normal heartbeat), and retains only reliable points that conform to physiological laws, thereby purifying the RR interval sequence in a noisy environment, making the input of the atrial fibrillation recognition model closer to the actual heart rate variability characteristics, and ultimately improving the accuracy and reliability of atrial fibrillation screening in non-sensitive and convenient PPG dynamic monitoring, supporting more timely early warning of latent atrial fibrillation and prevention of related serious complications.

[0013] 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: determining a designated level of each of the window signals based on preset parameter information of each of the window signals, wherein the preset parameter information includes one or more of sample entropy, kurtosis, and zero-crossing rate; The constructing of a local maximum scaling diagram of each of the window signals based on the specified maximum scale includes: Based on the specified level and the specified maximum scale, a local maximum scaling map of each of the window signals is constructed.

[0014] It should be noted that the quality of PPG signals collected by wearable devices over a long period of time will fluctuate in real time due to user activity (such as exercise, device displacement or environmental interference), resulting in significant differences in the noise level and morphological complexity of signals in different windows. If the same fixed scale is used to construct a scaling diagram for low-quality and high-quality signals, a large number of false peaks will be generated due to noise interference, or the real peaks will be lost due to excessive smoothing. This method introduces preset parameters to quantify signal features (such as sample entropy to reflect waveform irregularity, kurtosis to characterize pulse characteristics, and zero-crossing rate to indicate high-frequency noise), intelligently divides signal levels, and then dynamically matches the most appropriate scale to construct a scaling diagram - a conservative scale is used for high-noise windows to suppress false peaks, and a fine scale is used for high-quality windows to retain details, so that the real heartbeat peak point can always be accurately located in complex usage scenarios, ensuring the reliability of subsequent RR interval sequences, and ultimately providing a more robust data foundation for atrial fibrillation recognition models, achieving high detection rates and low false alarm rates under non-sensing monitoring, and effectively warning of hidden arrhythmias.

[0015] Furthermore, the determining, based on the specified level and the specified maximum scale, constructing a local maximum scaling diagram of each of the window signals includes: determining a specified threshold coefficient for each of the window signals based on the specified level; adjusting the specified maximum scale based on the specified threshold coefficient to obtain an adjusted maximum scale of each of the window signals; Based on the adjusted maximum scale, a local maximum scaling diagram of each window signal is constructed.

[0016] It should be noted that since the PPG signals collected by wearable devices will produce drastic quality fluctuations due to environmental interference, device fit or body movements during the user's daily activities, if the fixed maximum scale of the high-quality signal is used to construct a scale map for the window with significant noise, the real peak may be lost due to excessive smoothing, or pseudo peaks may be generated due to high-frequency noise interference; this method intelligently customizes the threshold coefficient based on the signal level (such as assigning a conservative coefficient to low-quality signals to reduce the scale to suppress noise, and assigning an open coefficient to high-quality signals to expand the scale to retain details), thereby dynamically optimizing the scale map's ability to focus on real heartbeat features, effectively improving the robustness of peak detection in complex environments, and ensuring that different quality windows can output reliable RR interval sequences. Ultimately, the atrial fibrillation recognition model maintains stable high accuracy in long-term non-sensing monitoring, providing reliable protection for early detection of latent atrial fibrillation and prevention of serious complications.

[0017] Furthermore, determining a candidate peak point set in each of the local maximum scale maps includes: Based on the specified level, setting a time expansion threshold; Determining the designated time corresponding to each candidate peak point in each of the local maximum scaling diagrams; Determine, based on the time expansion threshold, a candidate time interval corresponding to each of the specified times; The point with the largest amplitude in each candidate time interval is selected as the candidate peak point set.

[0018] It should be noted that because 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 caused by motion interference) are prone to peak splitting or adjacent pseudo-peaks, while high-quality signals must precisely capture the true peak shape. If a fixed time threshold is used to divide the interval, it may not be able to effectively isolate pseudo-peak interference for low-quality signals, and may miss details for high-quality signals due to overly wide intervals. This method intelligently customizes the time expansion threshold by signal level (for example, a larger threshold is configured for low-level signals to accommodate noise perturbations, and a smaller threshold is configured for high-level signals to improve resolution accuracy). It forcibly selects the point with the maximum amplitude within the candidate time interval. This not only suppresses the interference of non-physiological pseudo-peaks (such as secondary waves caused by motion artifacts) on heartbeat counting, but also preserves the integrity of the true main peak under different quality windows. This adaptively optimizes the physiological credibility of the RR interval series in complex scenarios, ultimately ensuring that the atrial fibrillation recognition model continuously outputs highly robust early warning results under convenient and non-perceptible long-term monitoring, providing a solid guarantee for early intervention of hidden arrhythmias.

[0019] Furthermore, before inputting the RR interval sequence into a pre-trained atrial fibrillation recognition model, the method further includes: Collecting multiple RR interval sequences, and constructing a training set, a validation set, and a test set based on the multiple RR interval sequences; Build an initial atrial fibrillation recognition model through the MiRU network; Training the initial atrial fibrillation recognition model using the training set, calculating the prediction error using a cross entropy loss function, and updating the network parameters using a gradient descent method until the model converges, thereby obtaining an atrial fibrillation recognition model to be verified; Verifying the atrial fibrillation recognition model to be verified using the verification set; If the verification is successful, the atrial fibrillation recognition model to be tested is obtained; Testing the atrial fibrillation recognition model to be tested using a test set; If the test passes, the atrial fibrillation recognition model is obtained.

[0020] It should be noted that the core pathological characteristics of atrial fibrillation are the extreme disorder of the RR interval sequence and sudden rhythm mutations. Traditional recurrent neural networks have the problems of large number of parameters 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 streamlining the gating units (reducing two gating units) and solidifying the core parameters λ (controlling the strength of long-term rhythm memory) and β (regulating the sensitivity to sudden rhythm abnormalities), making the model both lightweight and pathologically interpretable - λ enhances the ability to capture the persistent disordered rhythm of atrial fibrillation, and β By specifically responding to the "sudden" RR interval fluctuations unique to atrial fibrillation and combining refined training with the cross-entropy loss function and gradient descent, the model ensures that, under strict three-stage data set verification, it can achieve both efficient mobile deployment (meeting the resource constraints of wearable devices) and accurately distinguish between physiological heart rhythm variability and the pathological absolute irregularity of atrial fibrillation. Ultimately, in PPG-free dynamic monitoring, it provides high-risk groups with a local, real-time, clinically reliable atrial fibrillation early warning capability, resolving the contradiction of "accuracy and convenience cannot be achieved at the same time" in traditional solutions from the source, and truly realizing a closed-loop early intervention for latent atrial fibrillation.

[0021] One or more embodiments of this specification provide an atrial fibrillation identification device, including: at least one processor and a bus; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

[0022] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions. When executed by a computer, the computer-executable instructions can achieve: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

[0023] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: Atrial fibrillation (especially paroxysmal AF) is often asymptomatic and requires long-term ambulatory monitoring to prevent life-threatening complications. However, traditional electrocardiogram (ECG) monitoring relies on bulky equipment and complex electrode operation, limiting its convenience and usability. This method, however, instead acquires PPG (photoplethysmography) signals, which can be acquired contactlessly through wearable devices (such as smartwatches) without the need for specialized setup or electrode attachment, thus addressing portability issues at the source. Next, the PPG signal is windowed and its period and frequency are determined. A local maximum scaling map is then 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 the need for complex hardware. The RR interval sequence is then fed into a pre-trained AF recognition model for automated analysis, eliminating manual intervention. This method, in turn, enables truly contactless and convenient long-term AF monitoring, allowing patients to wear the device continuously throughout their daily lives, enabling early detection of latent AF, thereby reducing the risk of complications such as stroke and improving quality of life. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some of the embodiments described in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work. In the drawings: Figure 1 A flowchart of a method for identifying atrial fibrillation according to one or more embodiments of this specification; Figure 2A schematic diagram of the waveform of a PPG signal and an autocorrelation signal provided in one or more embodiments of this specification; Figure 3 A schematic diagram of the structure of an atrial fibrillation identification system provided in one or more embodiments of this specification; Figure 4 A redundancy determination diagram provided for one or more embodiments of this specification; Figure 5 A diagram of the MiRU network architecture provided for one or more embodiments of this specification; Figure 6 A schematic diagram of a specific process of the atrial fibrillation identification method provided in one or more embodiments of this specification; Figure 7 A schematic diagram of the structure of an atrial fibrillation identification device provided in one or more embodiments of this specification. DETAILED DESCRIPTION

[0025] The embodiments of this specification provide a method, device, and medium for identifying atrial fibrillation.

[0026] Traditional electrocardiogram (ECG) is the gold standard for AF diagnosis, but its equipment is bulky and non-portable, and its operation is complicated, requiring professional setup and electrode application. It is difficult to achieve truly non-invasive and convenient long-term dynamic monitoring, resulting in the missed diagnosis of a large number of potential AF patients. Photoplethysmography (PPG) technology provides a breakthrough solution. It uses photoelectric sensors on everyday wearable devices such as smart watches / bracelets to continuously collect pulse signals non-invasively and non-invasively, and users only need to wear them normally. The development of a high-performance PPG-based automatic AF identification algorithm is of great significance: it provides a large population with an unprecedented, affordable and user-friendly AF screening and long-term monitoring tool, which is expected to significantly improve the early detection rate of AF, thereby preventing disabling / fatal complications such as stroke, and buying patients valuable treatment time.

[0027] Currently, atrial fibrillation recognition technology based on photoplethysmography (PPG) signals mainly focuses on the following two research directions: 1. Feature modeling method based on RR interval This type of method typically detects peaks in PPG or ECG signals, extracts the RR interval sequence between heartbeats, and constructs its time-domain, frequency-domain, or nonlinear features. It then uses traditional machine learning models (such as support vector machines and decision trees) or deep learning networks to identify atrial fibrillation. This method has strong modeling capabilities for rhythmic features and is easily interpretable. However, its main disadvantages are: 1. Peak detection accuracy is highly dependent: Once there is motion artifact or low signal-to-noise ratio in the PPG signal, it will directly affect the stability of the RR interval; 2. Complex feature engineering and weak generalization: Artificially constructed features need to be readjusted for different individuals or devices, and their transferability is limited. 3. Rhythm information is sparse and lacks morphological details: Classification is performed using only the RR interval sequence, ignoring the important pathological information contained in the PPG waveform itself.

[0028] (2) Method based on end-to-end modeling of PPG signals Another approach attempts to directly input raw PPG signals into deep neural networks (such as CNN and LSTM) for automatic feature extraction and classification. This approach can learn the complex morphological patterns underlying PPG, but it also has the following problems: 1. High computational overhead and resource consumption: End-to-end models typically have large parameters and are not suitable for deployment on edge platforms such as wearable devices. 2. High dependence on signal quality: The original PPG waveform is sensitive to baseline drift, lighting changes, motion interference, etc., which limits recognition accuracy; 3. High training difficulty and slow convergence: High-dimensional waveform input leads to long model training time and high sample size requirements.

[0029] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this specification without creative work should fall within the scope of protection of this specification.

[0030] Figure 1 This is a flow chart of a method for identifying atrial fibrillation according to one or more embodiments of this specification. The flow can be executed by an atrial fibrillation identification system. Certain input parameters or intermediate results in the flow can be manually adjusted to help improve accuracy.

[0031] The method steps of the embodiment of this specification are as follows: S101 , collecting a PPG signal of a subject and determining a specified frequency of the PPG signal.

[0032] In Example S101 of this specification, optical sensors on wearable devices (such as smartwatches) can be used to collect PPG (photoplethysmography) signals contactlessly, without the need for electrodes or specialized operation. Furthermore, the device hardware's native sampling frequency can be directly read as the "specified frequency" (e.g., 100 samples per second), ensuring that the signal source is naturally compatible with the portable device.

[0033] S102 , segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal.

[0034] In Example S102 of this specification, the PPG signal can be segmented into continuous segments of a fixed duration (e.g., 10 seconds), with each window covering at least multiple heartbeats, providing a basis for local analysis. Furthermore, based on the PPG signal characteristics of S101, an autocorrelation algorithm can be used to automatically calculate the average heartbeat interval ("specified heart rate period") for each window signal.

[0035] S103: Determine a specified maximum scale of each window signal based on the specified heart rate cycle and the specified frequency.

[0036] In the embodiment S103 of this specification, the real-time period result of S102 and the sampling frequency of S101 can be combined to automatically calculate the maximum analysis scale of the current window ("specified maximum scale") through a preset proportional rule to ensure that the complete heartbeat waveform is covered.

[0037] S104 : constructing a local maximum scaling map of each of the window signals based on the specified maximum scale, and determining a candidate peak point set in each of the local maximum scaling maps.

[0038] In the embodiment S104 of the present specification, based on the dynamic maximum scale generated in S103, the local maximum value of the signal can be automatically searched in the time and scale space, and a set of candidate peak points can be output. S105: Determine an RR interval sequence based on the candidate peak point set.

[0039] In Example S105 of this specification, abnormally short intervals (e.g., non-physiological intervals <0.3 seconds) can be automatically removed from the candidate peak set from S104, retaining peaks that conform to heart rate patterns. A sequence of RR intervals is output based on the purified peak time differences, providing a reliable rhythmic basis for model input.

[0040] S106: Input the RR interval sequence into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

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

[0042] It's important to note that atrial fibrillation (especially paroxysmal atrial fibrillation) is often asymptomatic and requires long-term ambulatory monitoring to prevent life-threatening complications. However, traditional electrocardiogram (ECG) monitoring relies on bulky equipment and complex electrode operation, limiting its convenience and usability. This method, however, instead acquires PPG (photoplethysmography) signals, which can be acquired contactlessly via wearable devices (such as smartwatches) without requiring specialized setup or electrode attachment, thus addressing portability issues at the source. Next, the PPG signal is windowed and its period and frequency are determined. A local maximum scaling map is then 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 the need for complex hardware. The RR interval sequence is then fed into a pre-trained atrial fibrillation recognition model for automated analysis, eliminating manual intervention. This method, in turn, enables truly seamless and convenient long-term atrial fibrillation monitoring, enabling patients to wear the device continuously throughout their daily lives, enabling early detection of latent atrial fibrillation, thereby reducing the risk of complications such as stroke and improving quality of life.

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

[0044] In the embodiments of this specification, the above-mentioned autocorrelation algorithm can be used to estimate the peak period of the PPG signal (specified heart rate period) through the following specific implementation scheme: The autocorrelation algorithm describes the similarity between two signals. The size of the correlation is measured by the correlation coefficient. Autocorrelation is the correlation between a function and the function itself. When there is a periodic component in the function, the maximum value of the autocorrelation algorithm can well reflect this periodicity.

[0045] When using the autocorrelation function to estimate the peak period of the PPG signal, if there is a PPG signal with a length of 20s and a frequency of 125hz, the waveform of the PPG signal and the waveform of the autocorrelation signal can be seen in Figure 2 Schematic diagram of the waveform of the PPG signal and the waveform of the autocorrelation signal is shown, in which the upper side is the waveform of the PPG signal and the lower side is the waveform of the autocorrelation signal.

[0046] According to the principle of autocorrelation, it can be concluded that the peak point of the autocorrelation signal can be considered as the integer period of the signal. Therefore, combined with the physiological threshold of the heart rate signal (heart rate is 30bpm-200bpm, period is 0.5hz-3.33hz), the period T of the heart rate can be determined in the autocorrelation signal.

[0047] It should be noted that since early screening for atrial fibrillation relies on long-term dynamic monitoring, the PPG signal is susceptible to noise and artifacts introduced by daily activities (such as exercise or body movement) when collected by wearable devices, resulting in unstable cycle detection; this method captures the repetitive pattern of the signal through an autocorrelation algorithm, and then combines similarity calculation to verify the cycle, effectively filtering out transient interference and signal deformation, thereby ensuring that the heart rate cycle estimation in each window is more reliable and avoiding missed or false detections; this makes the subsequently extracted RR interval sequence more accurately reflect the true heart rate changes, improves the overall credibility of the atrial fibrillation recognition model, and ultimately achieves more effective latent atrial fibrillation warning and complication prevention in a portable and non-sensing monitoring scenario.

[0048] Furthermore, constructing a local maximum scaling diagram of each of the window signals based on the specified maximum scale includes: Based on the formula , construct a local maximum scaling diagram of each window signal, where is the local maximum scaling diagram of each window signal, is a two-dimensional Boolean matrix, in which the row index is each scale , the column index of the two-dimensional Boolean matrix is ​​time , , Specify a maximum scale for the, is the time of each window signal, For time The signal value of For time ( ) signal value, For time ( ) signal value.

[0049] It should be noted that, because 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, which impose a high computational load and make real-time operation difficult on wearable devices. This formula, however, transforms the signal's time-scale relationship 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 adaptive generation of a specified maximum scale, the scale map construction process can accurately locate potential peaks at different scales while naturally adapting to the low computing power constraints of wearable devices. This provides efficient and reliable underlying support for the subsequent extraction of RR interval sequences. Ultimately, within a seamless and convenient closed-loop long-term atrial fibrillation monitoring system, this method achieves low-power, high-real-time early warning capabilities for latent arrhythmias, significantly improving user compliance and the sustainability of health management.

[0050] Furthermore, when determining the RR interval sequence based on the candidate peak point set, a preset heart rate threshold can be first obtained; whether the intervals between adjacent candidate peak points exceed the heart rate threshold range is determined in sequence; if it is determined that the intervals between specified adjacent candidate peak points do not exceed the heart rate threshold range, the next candidate peak point among the specified adjacent candidate peak points is eliminated, and whether the intervals between subsequent adjacent candidate peak points exceed the heart rate threshold range is determined in sequence, until the intervals between each adjacent candidate peak point exceed the heart rate threshold range, thereby obtaining a peak point that meets the conditions; and the RR interval sequence is determined based on the peak point that meets the conditions.

[0051] In the embodiments of this specification, physiologically reasonable heart rate boundary values ​​(such as fixed thresholds corresponding to minimum heartbeat intervals) can be loaded from the system preset library. Heart rate thresholds can serve as universal medical rules, independent of the signal processing process, and provide a benchmark for subsequent judgments.

[0052] From the set of candidate peak points output in the previous step (S104), two adjacent points are selected 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 latter point is permanently removed (since it is physiologically impossible for two consecutive heartbeats to have such a short interval), and the next set of adjacent points is examined. If the interval is greater than the threshold, the two points are retained and moved to the next set. This process is repeated until the intervals between all remaining adjacent points are greater than the heart rate threshold. By dynamically removing abnormally short intervals (e.g., false peaks generated by motion artifacts), the sequence is ensured to retain only physiologically credible peaks. The filtered peaks are sorted in ascending time order. The time difference between adjacent peaks (current point timestamp minus previous point timestamp) is calculated in milliseconds. This generates a continuous RR interval sequence as input to the atrial fibrillation recognition model (S106).

[0053] It should be noted that since PPG signals are susceptible to transient noise and pseudo-peak interference introduced by daily activities (such as exercise or changes in body position) during long-term monitoring by wearable devices, the set of candidate peak points may contain non-physiological short-interval error points. If directly used to generate RR interval sequences, it will cause sequence distortion and amplify the risk of misjudgment of the atrial fibrillation recognition model. This method introduces a heart rate threshold as a physiological rationality boundary, iteratively screens the intervals between adjacent peak points, effectively filters out pseudo-peaks or abnormal points (such as interference shorter than the minimum duration of a normal heartbeat), and retains only reliable points that conform to physiological laws, thereby purifying the RR interval sequence in a noisy environment, making the input of the atrial fibrillation recognition model closer to the actual heart rate variability characteristics, and ultimately improving the accuracy and reliability of atrial fibrillation screening in non-sensitive and convenient PPG dynamic monitoring, supporting more timely early warning of latent atrial fibrillation and prevention of related serious complications.

[0054] 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, and the preset parameter information includes one or more of sample entropy, kurtosis and zero crossing rate.

[0055] In actual application scenarios, the quality of PPG signals varies dramatically, especially in situations such as exercise, vascular differences, and loose wearing. Even if the signal is filtered, it will still cause significant interference to the algorithm. To this end, a signal quality scoring mechanism (SQI) can be introduced on each window signal. The SQI score is calculated based on indicators such as the sample entropy (SE), kurtosis (K), and zero crossing rate (ZCR) of the PPG signal. Then, each window signal is divided into specified levels based on the SQI score. The specified levels can include three categories: high-quality signals, medium-quality signals, and low-quality signals.

[0056] Sample entropy quantifies the regularity or predictability of a signal. For high-quality PPG signals, normal sinus rhythm or regular atrial fibrillation rhythm, while varying in morphology and rhythm, typically exhibit a certain degree of regularity and predictability within a short time window. This results in lower sample entropy values. For low-quality PPG signals, when contaminated by random interference such as high-frequency noise and motion artifacts, the signal becomes highly "chaotic" and unpredictable. Sample entropy values ​​can increase significantly. For example, rapid hand movements or unstable device wear can cause significant irregular jitter in the signal, increasing SE. A high SE value indicates that the signal within the window contains a significant amount of non-physiological, random "noise," which severely interferes with the identification and analysis of true heart beats, making the analysis results for that window likely unreliable.

[0057] Kurtosis describes the degree of "spiky" or "flat" in the shape of a data distribution, with particular attention paid to the weight of the distribution's tail (outliers). For high-quality PPG signals, a clear, sharp PPG pulse wave (including the main wave and dicrotic wave) exhibits steep rising and falling edges in the time series, with prominent peaks. This corresponds to a high kurtosis value, indicating a pronounced "peak" characteristic of the signal. For low-quality PPG signals, severe baseline drift (such as caused by breathing or motion) can flatten the waveform. Low-frequency or high-frequency noise can obscure sharp features, and motion-induced artifacts can produce large, slowly varying amplitudes. These conditions can all result in a reduced kurtosis value (approaching a uniform or normal distribution). Excessively low kurtosis indicates that the PPG signal has lost its characteristic sharp pulse characteristics. Low kurtosis indicates that the PPG signal within the window has been severely distorted, destroying or masking the sharp features of the original pulse wave, hindering accurate peak location extraction and morphological analysis.

[0058] The zero-crossing rate (ZCR) counts 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 between beats (although the baseline may drift slightly). The signal primarily completes a complete cycle of baseline crossings (upward and downward) within a single pulse, occasionally including smaller dicrotic features. Therefore, within a short time window, the ZCR is generally moderate. For low-quality PPG signals, when contaminated by high-frequency noise (such as myoelectric noise or signal interference), the signal can rapidly oscillate above and below the baseline, causing a sharp increase in the ZCR. When an irregular rhythm, such as atrial fibrillation, is mixed with significant noise, the irregular rhythm itself may increase the ZCR somewhat, but the added noise can lead to an abnormally high ZCR. Severe baseline drift can also sometimes affect the number of local zero-crossing points. An abnormally high ZCR (much higher than expected for a clean pulse wave) is a direct indicator of significant high-frequency noise or oscillations in the signal. This "spur"-like noise is extremely destructive to analysis algorithms based on RR intervals or morphology.

[0059] These three metrics (randomness SE, morphology sharpness K, and high-frequency noise ZCR) capture signal quality degradation from different dimensions. A poor signal may exhibit abnormalities in only one or two metrics, or it may affect all three simultaneously. Their combined use provides a more comprehensive assessment of the overall signal reliability. Together, they highlight the most detrimental interference sources in PPG signal analysis: motion artifacts (typically resulting in high SE and low K), high-frequency electrical noise / poor contact (resulting in high ZCR and potentially high SE), and baseline wander (resulting in low K).

[0060] When constructing the local maximum scaling diagram of each window signal based on the specified maximum scale, the specified level of each window signal can be considered, and the local maximum scaling diagram of each window signal can be constructed based on the specified level and the specified maximum scale.

[0061] It should be noted that the quality of PPG signals collected by wearable devices over a long period of time will fluctuate in real time due to user activity (such as exercise, device displacement or environmental interference), resulting in significant differences in the noise level and morphological complexity of signals in different windows. If the same fixed scale is used to construct a scaling diagram for low-quality and high-quality signals, a large number of false peaks will be generated due to noise interference, or the real peaks will be lost due to excessive smoothing. This method introduces preset parameters to quantify signal features (such as sample entropy to reflect waveform irregularity, kurtosis to characterize pulse characteristics, and zero-crossing rate to indicate high-frequency noise), intelligently divides signal levels, and then dynamically matches the most appropriate scale to construct a scaling diagram - a conservative scale is used for high-noise windows to suppress false peaks, and a fine scale is used for high-quality windows to retain details, so that the real heartbeat peak point can always be accurately located in complex usage scenarios, ensuring the reliability of subsequent RR interval sequences, and ultimately providing a more robust data foundation for atrial fibrillation recognition models, achieving high detection rates and low false alarm rates under non-sensing monitoring, and effectively warning of hidden arrhythmias.

[0062] Furthermore, when constructing the local maximum scaling diagram of each window signal based on the specified level and the specified maximum scale, the specified threshold coefficient of each window signal can be determined based on the specified level. For window signals with high specified levels, the specified threshold system can be set higher. For example, for high-quality window signals, the specified threshold coefficient is 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, a local maximum scaling diagram of each window signal is constructed.

[0063] It should be noted that since the PPG signals collected by wearable devices will produce drastic quality fluctuations due to environmental interference, device fit or body movements during the user's daily activities, if the fixed maximum scale of the high-quality signal is used to construct a scale map for the window with significant noise, the real peak may be lost due to excessive smoothing, or pseudo peaks may be generated due to high-frequency noise interference; this method intelligently customizes the threshold coefficient based on the signal level (such as assigning a conservative coefficient to low-quality signals to reduce the scale to suppress noise, and assigning an open coefficient to high-quality signals to expand the scale to retain details), thereby dynamically optimizing the scale map's ability to focus on real heartbeat features, effectively improving the robustness of peak detection in complex environments, and ensuring that different quality windows can output reliable RR interval sequences. Ultimately, the atrial fibrillation recognition model maintains stable high accuracy in long-term non-sensing monitoring, providing reliable protection for early detection of latent atrial fibrillation and prevention of serious complications.

[0064] Furthermore, when determining the candidate peak point set in each of the local maximum scaling diagrams, a time expansion threshold can be set based on the specified level. For window signals with high specified levels, 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; in each of the local maximum scaling diagrams, the specified time corresponding to each candidate peak point is determined; based on the time expansion threshold, the candidate time interval corresponding to each of the specified times is determined; and the point with the largest amplitude in each of the candidate time intervals is selected as the candidate peak point set.

[0065] It should be noted that because 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 caused by motion interference) are prone to peak splitting or adjacent pseudo-peaks, while high-quality signals must precisely capture the true peak shape. If a fixed time threshold is used to divide the interval, it may not be able to effectively isolate pseudo-peak interference for low-quality signals, and may miss details for high-quality signals due to overly wide intervals. This method intelligently customizes the time expansion threshold by signal level (for example, a larger threshold is configured for low-level signals to accommodate noise perturbations, and a smaller threshold is configured for high-level signals to improve resolution accuracy). It forcibly selects the point with the maximum amplitude within the candidate time interval. This not only suppresses the interference of non-physiological pseudo-peaks (such as secondary waves caused by motion artifacts) on heartbeat counting, but also preserves the integrity of the true main peak under different quality windows. This adaptively optimizes the physiological credibility of the RR interval series in complex scenarios, ultimately ensuring that the atrial fibrillation recognition model continuously outputs highly robust early warning results under convenient and non-perceptible long-term monitoring, providing a solid guarantee for early intervention of hidden arrhythmias.

[0066] Furthermore, the embodiment of this specification can generate an atrial fibrillation recognition model through the following implementation scheme: Collect multiple RR interval sequences, and construct a training set, a validation set, and a test set based on the multiple RR interval sequences; construct an initial atrial fibrillation recognition model through the MiRU network; train the initial atrial fibrillation recognition model through the training set, calculate the prediction error with the cross entropy loss function, and use the gradient descent method to update the network parameters until the model converges to obtain the atrial fibrillation recognition model to be verified; verify the atrial fibrillation recognition model to be verified through the validation set; if the verification passes, obtain the atrial fibrillation recognition model to be tested; test the atrial fibrillation recognition model to be tested through the test set; if the test passes, obtain the atrial fibrillation recognition model.

[0067] It should be noted that the core pathological characteristics of atrial fibrillation are the extreme disorder of the RR interval sequence and sudden rhythm mutations. Traditional recurrent neural networks have the problems of large number of parameters 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 streamlining the gating units (reducing two gating units) and solidifying the core parameters λ (controlling the strength of long-term rhythm memory) and β (regulating the sensitivity to sudden rhythm abnormalities), making the model both lightweight and pathologically interpretable - λ enhances the ability to capture the persistent disordered rhythm of atrial fibrillation, and β By specifically responding to the "sudden" RR interval fluctuations unique to atrial fibrillation and combining refined training with the cross-entropy loss function and gradient descent, the model ensures that, under strict three-stage data set verification, it can achieve both efficient mobile deployment (meeting the resource constraints of wearable devices) and accurately distinguish between physiological heart rhythm variability and the pathological absolute irregularity of atrial fibrillation. Ultimately, in PPG-free dynamic monitoring, it provides high-risk groups with a local, real-time, clinically reliable atrial fibrillation early warning capability, resolving the contradiction of "accuracy and convenience cannot be achieved at the same time" in traditional solutions from the source, and truly realizing a closed-loop early intervention for latent atrial fibrillation.

[0068] Corresponding to the above embodiment, Figure 3 The present invention provides a structural diagram of an atrial fibrillation recognition system, which includes a PPG data processing module, an atrial fibrillation model training module, and an atrial fibrillation model recognition module.

[0069] The following are the corresponding specific implementation steps of the atrial fibrillation recognition system: Step 1. Use a PPG device to collect the human body's PPG signal ppg_origin, where fso is the original frequency of the signal.

[0070] Step 2. Send the collected PPG signal ppg_origin 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.

[0071] PPG signal filtering link: The baseline drift and high-frequency noise of ppg_origin are removed to obtain ppg_filter.

[0072] PPG signal downsampling link: Downsample ppg_filter to obtain ppg_downsample, where fsd is the frequency of ppg_downsample.

[0073] PPG signal segmentation link: Perform sliding window cutting and segmentation on ppg_downsample according to the set window length to obtain ppg_window, where N is the length of ppg_window.

[0074] PPG signal quality assessment: In actual application scenarios, the quality of PPG signals varies dramatically, especially in situations such as motion, vascular differences, and loose wearing. Even if the signal is filtered, it will still cause significant interference to the algorithm. For this reason, a signal quality scoring mechanism (SQI) is introduced on the ppg_window. The SQI score is calculated based on indicators such as the sample entropy (SE), kurtosis (K), and zero crossing rate (ZCR) of the PPG signal in the ppg_window. The ppg_window is then divided into three categories based on the score: high-quality signal, medium-quality signal, and low-quality signal.

[0075] : Signal quality index (SQI); : Normalized sample entropy score; : normalized kurtosis score; : normalized zero-crossing rate score; The signal quality index (SQI) is calculated as follows: ; in 、 、 They are 、 、 The coefficient of + + =1, at this time The range is between 0 and 1; when Between 0.7 and 1, x_window is a high-quality signal; when Between 0.4 and 0.7, x_window is a medium-quality signal; when Between 0 and 0.4, x_window is a low-quality signal.

[0076] PPG signal peak extraction step: This section proposes a multi-scale extreme value detection method as the core algorithm for extracting PPG peaks. The main steps of the algorithm are as follows: 1. Estimate the heart rate period T based on the PPG data in ppg_window, and then set the maximum scale , the calculation formula is as follows: ; According to the formula, when the heart rate in the ppg_window window is fast, T decreases. When the heart rate in the ppg_window window is slow, T increases. becomes larger, thus achieving the effect of dynamically adjusting Smax.

[0077] 2. According to Construct a local maximum scale map (LMS), which is a two-dimensional Boolean matrix: The row index is each scale s, where s∈[1,Smax]; The column index is time t, where t∈[1,N]; LMS is calculated as follows: ; Among them, p[t] is each value of ppg_window. If LMS is 1 at the [s, t] position, it means that p[t] is the maximum point in the [ts, t+s] interval, that is, the candidate peak point.

[0078] 3. After constructing the LMS matrix, according to Evaluate the ppg_window signal quality, and then use three different methods for high, medium, and low quality signals: High-quality signal: LMS full consistency judgment; Medium quality signal: LMS near-consistent judgment; Low-quality signal: LMS near-consistency judgment, redundancy judgment threshold Full and near-consistency are determined by setting a threshold θ (0 < θ ≤ 1), traversing the constructed LMS matrix over time t, and finding the point at each time t where p[t] is considered a maximum on the θ·Smax scale. When θ is 1, full consistency is achieved, while when 0.6 < θ < 1, near-consistency is achieved. For medium- and low-quality signals, θ is 0.8 for medium-quality signals and 0.7 for low-quality signals.

[0079] The redundancy judgment threshold means: 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 cluster, and then the maximum value point in the area is selected as the candidate peak point.

[0080] LMS consistency is determined point by point. A time point t is considered a peak only if it is marked as a local maximum (LMS value of 1) at multiple scales. If the true peak is slightly shifted to t±1 or t±2 at multiple scales due to noise, sampling point offset, or scale interference, and if the peak is no longer a sharp single point but a local plateau after filtering or smoothing the PPG signal, this will cause the true peak to fail consistency and be missed.

[0081] This phenomenon is particularly common in the following situations: After the PPG signal is smoothed or filtered, the true peak position shifts at different scales; when the heart beat interval is shortened (such as at a high heart rate), the peak becomes narrower and the shift is more sensitive; noise interference affects the judgment of local maximum values ​​and breaks the consistency.

[0082] The real heartbeat peak usually shows similar local extreme value behavior at several nearby sampling points, that is, incomplete alignment. For each time point t, observe its neighborhood [t-2, t+2]. If t itself does not meet the consistency (such as LMS < θ• ), but the LMS values ​​of t±1 and t±2 in the neighborhood are also close to the same (for example, both ≥ 0.7), then all points in [t-2, t+2] that meet the local maximum judgment are grouped into a "peak cluster"; the point with the largest amplitude is selected as the "merged peak position".

[0083] like Figure 4 As shown in the redundant judgment diagram, when the time is 4-5, it can be equivalent to a peak point. However, due to the fully consistent judgment, neither 4 nor 5 can be considered as peak points. When time t=5, in the interval [4,6], a nearly consistent judgment can be used to form a "peak cluster" of the three points t=4, t=5 and t=6, from which the point with the largest amplitude is selected as the "merged peak position".

[0084] Equivalent RR interval extraction: The PPG signal peak extraction process obtains candidate peak points within the ppg_window window. Then, all candidate peak points in the ppg_window are combined, and duplicate points are removed to form candidate peak points for the ppg_downsample. The ppg_downsample is then upsampled from frequency fso to frequency fsd, mapping the ppg_downsample to the ppg_filter. Simultaneously, the candidate peak points of the ppg_downsample are obtained from the candidate peak points of the ppg_filter. The true peak point of the ppg_filter is determined by the minimum heart rate threshold. The time difference between two consecutive true PPG peak points is then calculated in chronological order to obtain the equivalent RR interval sequence.

[0085] Heart rate threshold determination means: for all candidate peak points of ppg_filter, the interval between them and the next candidate peak point is calculated. 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.

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

[0087] Step 4. Initialize the parameters of the atrial fibrillation recognition model, set the scaling coefficients β and λ, input the RR interval sequence into the atrial fibrillation recognition model for training, calculate the prediction error using the cross entropy loss function, use the gradient descent method (such as the Adam optimizer) to update the network parameters until the model converges, generate the atrial fibrillation recognition model and save the model.

[0088] A simplified GRU network (MiRU) was used to build an atrial fibrillation recognition model. GRU is a gated recurrent neural network that uses two gating mechanisms to control information flow. Because GRU networks can optimize gradient vanishing and gradient exploding problems, they are widely used in time series data modeling. However, in wearable devices, due to more stringent requirements for model parameters, MiRU, which uses a reduced gating mechanism unit in the GRU network, was used to build an atrial fibrillation recognition model. Compared with the GRU network, the MiRU network has the following advantages: 1. By reducing the number of gating mechanism units, the MiRU network has fewer parameters and a 2.9x training speedup, making it ideal for deployment on mobile terminals or wrist-worn devices. 2. The MiRU's λ and β parameters can be set to fixed values ​​or a small number of learnable parameters to control the model's reliance on new and old information. This structure offers good interpretability: 1) λ indicates the degree of "rhythm preservation," with a larger value indicating a model's tendency to retain long-term dependencies; 2) β simulates the "rhythm abrupt response" during atrial fibrillation. This allows the MiRU network to improve its ability to distinguish between AF states.

[0089] The atrial fibrillation recognition model includes an input layer, a MiRU core layer, a fully connected classification layer, and an output layer.

[0090] Input layer: equivalent RR interval sequence x with dimension L×1 t ; MiRU core layer: see Figure 5 The MiRU network architecture diagram shown here consists of a fully connected neural network with m hidden units (m preferably ranges from 16 to 64) that outputs the final hidden state ,in The dimension is m×1, and the MiRU core network architecture is as follows Figure 5 As shown; The calculation process is as follows: Input transformation module: receives the current time step input vector , and through the weight matrix Mapping to hidden state space; ; History state control module: hide the state of the previous time step With fixed zoom factor Multiplication is used to control the degree of forgetting; ; Candidate state generation module: The above two weighted additions are input into the nonlinear activation function to generate candidate states ,in is the hidden layer bias; ; State Fusion Module: Using another scaling factor , in a weighted manner and Fusion, generating the current hidden state ; ; Fully connected classification layer: m-dimensional→m-dimensional(weight The dimension is m×m, the bias Dimension is m×1); The relu activation function is used, and the output z of the fully connected classification layer is: ; Output layer: m dimension → 1 dimension (weight The dimension is m×1, bias dimension is 1); The output layer uses the Sigmoid function to calculate z and output the final atrial fibrillation probability. The formula is as follows: ; Step 5. Input the divided test set data into the saved atrial fibrillation recognition model to obtain the 1-dimensional prediction value vector output y corresponding to the test set samples. If y is greater than 0.5, the data is atrial fibrillation, otherwise it is non-atrial fibrillation data.

[0091] Figure 6 A specific flow chart of the atrial fibrillation identification method provided for one or more embodiments of this specification: at the beginning, a PPG device is used to collect human PPG signals; the PPG signals are band-pass filtered to obtain a target PPG signal; the target PPG signal is downsampled, and then a sliding window is used to obtain window PPG data; the Smax and SQI scores are calculated, an LMS matrix is ​​constructed, and the peak of the window PPG signal is obtained; the peak of the window PPG signal is combined to obtain the true peak point of the target PPG sequence; the time difference between two adjacent true PPG peak points is calculated to obtain an equivalent RR interval sequence; the RR interval sequence is segmented into a training set, a validation set, and a test set; an atrial fibrillation identification model is trained according to the MiRU structure; the model results are evaluated using the test set, and the process ends.

[0092] It should be noted that the embodiments of this specification have the following beneficial effects through the above content: 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, significantly improving the accuracy and stability of PPG peak detection in complex environments; Compact feature expression and complete rhythm information: Using a fixed-length peak sequence as the model input preserves rhythm information while avoiding the impact of RR interval errors on the results; Lightweight model structure and resource-friendly computing: This model uses a simplified gated recurrent unit (GRU) network to model peak sequences. Compared to traditional end-to-end deep networks, it has a smaller parameter size and faster inference speed, making it suitable for real-time deployment on wearable devices. Strong robustness and good adaptability: This method is highly robust to common noise factors in PPG signals (such as slight motion interference, light intensity changes, etc.) and is suitable for atrial fibrillation screening in various application scenarios.

[0093] Figure 7 A schematic structural diagram of an atrial fibrillation identification device provided for one or more embodiments of this specification includes: at least one processor and a bus; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

[0094] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions. When executed by a computer, the computer-executable instructions can achieve: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result. The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced. Each embodiment focuses on the differences from other embodiments. In particular, the device, equipment, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant details, refer to the descriptions of the method embodiments.

[0095] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0096] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.

[0097] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0098] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0099] In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above units may be implemented in the form of hardware or software.

[0100] If the integrated module / unit is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased based on the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0101] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for identifying atrial fibrillation, characterized in that: The method comprises: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

2. The method according to claim 1, characterized in that Determining the specified heart rate period of each window signal includes: Determine the autocorrelation waveform signal of the time-delayed version of each window signal through an autocorrelation algorithm; The designated heart rate period 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 constructing of a local maximum scaling diagram of each of the window signals based on the specified maximum scale includes: Based on the formula , construct a local maximum scaling diagram of each window signal, where is the local maximum scaling diagram of each window signal, is a two-dimensional Boolean matrix, in which the row index is each scale , the column index of the two-dimensional Boolean matrix is ​​time , , Specify a maximum scale for the, is the time of each window signal, For time The signal value of For time ( ) signal value, For time ( ) signal value.

4. The method according to claim 1, wherein The determining of the RR interval sequence based on the candidate peak point set includes: Obtain a pre-set heart rate threshold; determining in sequence whether the intervals between adjacent candidate peak points exceed the heart rate threshold range; If it is determined that the interval between the designated adjacent candidate peak points does not exceed the heart rate threshold range, the next candidate peak point among the designated adjacent candidate peak points is eliminated, and the intervals between subsequent adjacent candidate peak points are sequentially determined to determine whether they exceed the heart rate threshold range, until the intervals between all adjacent candidate peak points exceed the heart rate threshold range, thereby obtaining a peak point that meets the conditions; The RR interval sequence is determined based on the peak points that meet the conditions.

5. The method according to claim 1, wherein Before determining the specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency, the method further includes: determining a designated level of each of the window signals based on preset parameter information of each of the window signals, wherein the preset parameter information includes one or more of sample entropy, kurtosis, and zero-crossing rate; The constructing of a local maximum scaling diagram of each of the window signals based on the specified maximum scale includes: Based on the specified level and the specified maximum scale, a local maximum scaling map of each of the window signals is constructed.

6. The method according to claim 5, characterized in that The determining, based on the specified level and the specified maximum scale, constructing a local maximum scaling diagram of each of the window signals comprises: determining a specified threshold coefficient for each of the window signals based on the specified level; adjusting the specified maximum scale based on the specified threshold coefficient to obtain an adjusted maximum scale of each of the window signals; Based on the adjusted maximum scale, a local maximum scaling diagram of each window signal is constructed.

7. The method according to claim 5, characterized in that Determining a candidate peak point set in each of the local maximum scale maps includes: Based on the specified level, setting a time expansion threshold; Determining the designated time corresponding to each candidate peak point in each of the local maximum scaling diagrams; Determine, based on the time expansion threshold, a candidate time interval corresponding to each of the specified times; The point with the largest amplitude in each candidate time interval is selected as the candidate peak point set.

8. The method according to claim 1, characterized in that Before inputting the RR interval sequence into a pre-trained atrial fibrillation recognition model, the method further includes: Collecting multiple RR interval sequences, and constructing a training set, a validation set, and a test set based on the multiple RR interval sequences; Build an initial atrial fibrillation recognition model through the MiRU network; Training the initial atrial fibrillation recognition model using the training set, calculating the prediction error using a cross entropy loss function, and updating the network parameters using a gradient descent method until the model converges, thereby obtaining an atrial fibrillation recognition model to be verified; Verifying the atrial fibrillation recognition model to be verified using the verification set; If the verification is successful, the atrial fibrillation recognition model to be tested is obtained; Testing the atrial fibrillation recognition model to be tested using a test set; If the test passes, the atrial fibrillation recognition model is obtained.

9. An atrial fibrillation identification device, characterized in that: include: at least one processor and a 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, the instructions being executed by the at least one processor to enable the at least one processor to: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

10. A non-volatile computer storage medium, characterized in that The computer-executable instructions are stored, and when the computer-executable instructions are executed by a computer, they can achieve: Acquiring a PPG signal from a subject and determining a specified frequency of the PPG signal; Segmenting the PPG signal based on a set window length to obtain window signals, and determining a specified heart rate cycle for each window signal; determining a specified maximum scale of each of the window signals based on the specified heart rate cycle and the specified frequency; Based on the specified maximum scale, constructing a local maximum scaling map of each window signal, and determining a candidate peak point set in each local maximum scaling map; Determine the RR interval sequence based on the candidate peak point set; The RR interval sequence is input into a pre-trained atrial fibrillation recognition model to obtain an atrial fibrillation recognition result.

Citation Information

Patent Citations

  • Detection device for atrial fibrillation and operating method thereof

    CN110575152A

  • Computer-implemented method and system for contact photoplethysmography (PPG)

    CN111050638A

  • Atrial fibrillation identification method based on statistical characteristics

    CN113940682A

  • Computer-implemented method for synchronizing optical photoelectrogram (PPG) signals with electrocardiogram (ECG) signals

    CN115023182A

  • Processing method and device for performing fragment screening on PPG signal

    CN115456031A